Is it true that the only way in OpenGL to sample a multisampled texture, i.e. a multisampled FBO color buffer, is by using texelFetch
and specifying the sample you want using an integer index? This provides no information about the position of the sample within the pixel.
Is there some reference which can provide the sub-pixel offsets for each sample?
Also, what about fragments which lie on the inside of polygons? These will not use all of the multisample samples: Will all of the samples then contain the same data?
I am trying to come up with a way to segment my rendered scene for post processing regions separately in a fragment shader. In order to prevent jaggies my segmentation data must be multisampled too. I'm trying to avoid full supersampling so that I don't make shading more expensive, but it isn't clear how I can retrieve the right samples in the shader when using multisampling.
Edit: I may be incorrect in certain assumptions about how multisampling works. Perhaps each sample does not really need to have a position associated with it.
perhaps ARB_texture_multisample is the extension I need to look at?