Rendering glitch with GL_DEPTH_TEST and transparent textures

前端 未结 3 1896
北荒
北荒 2021-01-14 10:26

From one angle my shrubs look like this:

From the other, they look like this:

3条回答
  •  余生分开走
    2021-01-14 11:18

    That link (and sorting on CPU) is for alpha blending. If you need only Alpha Testing (not Blending), then you don't need to sort anything. Just enable alpha test, keeping depth test enabled, and everything will be rendered fine.

    See here: http://www.opengl.org/wiki/Transparency_Sorting You need "Alpha test" that requires alpha testing, not "Standard translucent" that requires sorting.

提交回复
热议问题