Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Multisampled textures

  1. #1
    Junior Member Regular Contributor
    Join Date
    Jun 2012
    Posts
    191

    Multisampled textures

    Which operations can be effective in fragment shader for multisampled depth textures? I mean, for RGBA textures, we could just take average of color values came from texelFetch().

    What should be ideal shader code for multisampled depth texture?

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,126
    I don't understand your question. Do you mean, what's the point of having them?

    Think about the edge AA benefits of rasterizing to an MSAA window. Same benefits go to rasterizing to an MSAA texture or renderbuffer attached to an FBO.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Jun 2012
    Posts
    191
    Quote Originally Posted by Dark Photon View Post
    Do you mean, what's the point of having them?
    No, I mean for RGBA textures, we can average the color values for all the samples. But is it the good way in case of depth textures?

  4. #4
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,126
    Quote Originally Posted by debonair View Post
    No, I mean for RGBA textures, we can average the color values for all the samples. But is it the good way in case of depth textures?
    With standard MSAA rasterization, the MSAA depth buffer is only used to capture subsample MSAA color information properly. What you really want is the downsampled color, not the downsampled depth.

    So why are you concerned about how to downsample the depth buffer?

    Averaging depths doesn't really have any useful meaning. What makes more sense (considering shadow maps, which is just a depth buffer afterall) is something like what PCF does, where multiple depth compares are done per-texel/sample and then the boolean comparison results are averaged.
    Last edited by Dark Photon; 11-21-2013 at 07:12 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •