opengl z-sorting transparency

前端 未结 3 1248
说谎
说谎 2020-12-11 13:00

im rendering png\'s on simple squares in opengl es 2.0, but when i try and draw something behind an square i have already drawn the transparent area in my top square are ren

3条回答
  •  被撕碎了的回忆
    2020-12-11 13:03

    Your title is essentially the answer to your question!

    Generally transparency is done by first rendering all opaque objects in the scene (letting the z-buffer figure out what's visible), then rendering all transparent objects from back to front.

提交回复
热议问题