GLSL: is it an error to use a non-multisampled texture with a sampler2DMS
<p>I have an app that may run either with or without multisampling. I am fetching samples from previously rendered multisample textures in a shader. Is it necessary to compile different versions of the shader, either with a sampler2D or a sampler2DMS to access the texture, depending on whether it is a multisample texture or not?</p>

<p>I tried to fetch from a non-multisampled texture through a sampler2DMS and it works, but I don't know if this is undefined behaviour according to the specification, or how much I can rely on this to work.</p>

<p>Does anyone know whether this is propperly defined behaviour?</p>