Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 16874

OGL Depth sorting of alpha tex for shadowmapping

$
0
0

So basically i want to draw tree leaves into the shadowmap, to do that i would need to disable depth writes to zbuff and read depth value of current fragment to see if leaf (as its a texture with alpha) is closer to light than actual fragment.

Now i know that i cant write and read to the same fbo texture so i could sample depth (please note i write depth value to rgba tex), now when i try to draw an alpha tex i need to sample this alpha texture to see if it has alpha 1.0 to perform a ch


Viewing all articles
Browse latest Browse all 16874

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>