Skip to main content
4 events
when toggle format what by license comment
Apr 19, 2022 at 15:42 comment added Dahl That makes a lot of sense :) . I have not thought about it that way. That's actually more like how self-shadowing works i think. Tracing backwards towards the light (for x iterations) until you hit something (below the height/depth value). something like that. I think i need to let it sink in. I'm not entirely sure how i would go about doing this. So render the sprites' depth textures like you would the sprite color textures. But to a render target instead. Then sample that texture when rendering the terrain. So i guess the newly drawn depth-texture would align with the terrain?
Apr 19, 2022 at 15:11 comment added DMGregory You need to invert your thinking here. Render your sprite depths to a render target, then your shadow shader runs on the terrain, and looks up into the depth texture. Instead of asking "given this point in the depth map, where does its shadow fall?" you then ask "given this point that may be in shadow, which shadow map texels might shadow it? And so you raymarch the light ray backwards through the depth texture until you find an occluder or clear the maximum occluder height.
S Apr 19, 2022 at 15:01 review First questions
Apr 19, 2022 at 18:38
S Apr 19, 2022 at 15:01 history asked Dahl CC BY-SA 4.0