How are depth values resolved in OpenGL textures when multisampling?

放肆的年华 提交于 2019-12-10 20:19:24

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!