Search Unity

Resolved Raytraced shadows look awful from far away? Strange Shadow Artifacts with Raytracing Enabled

Discussion in 'High Definition Render Pipeline' started by JustTiredOfEverything, Mar 21, 2023.

  1. JustTiredOfEverything

    JustTiredOfEverything

    Joined:
    Aug 4, 2022
    Posts:
    80
    Hello there,

    I've encountered a peculiar problem in my project. When I turn on raytracing, everything in close proximity appears to be working well. However, at a distance, I start to notice unusual shadow artifacts. Here's an image for reference:

    Screenshot 2023-03-21 075220.png

    Could anyone please provide some guidance on what might be causing this issue? Your help is greatly appreciated.

    Thank you in advance.
     
  2. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    Can you try increasing the ray bias / distant ray bias to see if it helps?



    World position is constructed from the gbuffer depth and rays are fired from the gbuffer/shading normal. This can result in rays firing below the horizon of the geometric normal. Adding a little offset to the ray origin (ray bias in your ray tracing settings) can be used to work around this issue.
     
  3. JustTiredOfEverything

    JustTiredOfEverything

    Joined:
    Aug 4, 2022
    Posts:
    80
    Ah.. Setting Distant Ray Bias helped resolve it. Many thanks!
     
    m0nsky likes this.