问题
I'm using an FBO to render my scene to a depth texture (GL_DEPTH_COMPONENT
). When I enable multisampling in my application, those samples are resolved to a single texel, but how are they combined? Is the depth of the nearest sample stored to the texture, or the average of the samples? Is this behavior vendor-dependent?
回答1:
See the multisample specification document:
"If the depth test passes, all multisample buffer depth sample values are set to the depth of the fragment's centermost sample's depth value, and all multisample buffer color sample values are set to the color value of the incoming fragment."
来源:https://stackoverflow.com/questions/1002971/how-are-depth-values-resolved-in-opengl-textures-when-multisampling