Deferred Shading - Ray Tracing - Shadows problem

Started by
1 comment, last by Aaron Smith 7 years, 2 months ago

Hello all,
First of all, apologies if this is not allowed to be posted in this group I will remove if needed

I am working on basic shadows using ray tracing. I have a deferred system set up and am sampling the world positions at each step of the trace. I am currently getting some results but there is something incorrect when I move the camera around and look at certain angles

below is a video clip of what is happening



I was wondering if anyone had any advice on what I might be doing wrong, anything that stands out that I am missing.

I am happy to get back in touch with code but didn't want to plaster the post with code.

Thank you
Aaron

Advertisement
I guess you get the worldspace position from z buffer and a small error causes self occlusion.
A small offset (eventually depending on distance and normal dot eye) may fix it.

How do you accelerate raytracing?
Look up NVs hybrid ray traced shadows, they use a regular grid from the light's view and bin triangles to grid cells. A ray determinates the cell it goes through and iterates over all its triangles.
Not sure when this can beat a global acceleration structure in worldspace, which can be used for all lights.
Hi

Thanks for replying

Ye I take the world position and add a small offset along the normal to stop that error

Before I look to optimise I need to fix the view so I can move around scene and the shadows work that's what I am struggling with

This topic is closed to new replies.

Advertisement