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

Shadow mapping - pass custom varying to FBO, and read it?

$
0
0

I'm using shadow mapping with GLSL on a partially 3d game, where shadows are cast from 3d objects onto 2d sprites - this works very well. 

 

Now i would also like to have sprites cast proper shadows (with depth), and consequently i need to render them into shadowmapping pass - but i would like them to NOT cast shadows over the sprites themselves and just ignore the shadows (but take into account shadows from buildings / 3d objects), i can mark when sprites are rendered by sending a varying from vertex to fragment shader, but i'm not sure how …


Viewing all articles
Browse latest Browse all 16874

Trending Articles



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