Advertisement

screen space shadows

Started by April 29, 2018 09:04 AM
2 comments, last by _WeirdCat_ 6 years, 9 months ago

so how exactly you do this kind of efffect, what do you need to draw and what ro compare with, didn't find any good tutorial for that.

Do you have to store each fragment position in textures then compare it within fragment shader or what?

 

cheers

You don't need to store positions because you can compute fragment position from depth buffer values. 

Same basic structure as screen space reflections, except instead of tracing along the reflection direction, you trace towards the light. If/when you find a hit, instead of using the color at that location for reflection data, you check if the intersection point is closer than the light source or not. 

Advertisement

So in other words, for each frame write depth buffer to a texture then draw scene with light/shadow pass and then sample the ray from each fragment towards the light right? ;)

This topic is closed to new replies.

Advertisement