Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

How to enable backside hits for the ray-tracer ?

Discussion in 'HDRP Ray Tracing' started by pixartist, Dec 5, 2020.

  1. pixartist

    pixartist

    Joined:
    Nov 4, 2012
    Posts:
    22
    I need the ray-tracer to hit the backside of faces, otherwise you need twice the amount of faces to keep - let's say a cave - in shadow since otherwise the sunlight will just go in through the back side of the inner walls. How can I enable that ?
     
  2. pixartist

    pixartist

    Joined:
    Nov 4, 2012
    Posts:
    22
    Ok the issue lies in the RaytracingShadow.raytrace file, it's either the
    Code (csharp):
    1. // Macro that defines if we are raytracing from the light source to the object in backface culling or the opposite in frontface culling
    2. #define LIGHT_TO_SURFACE
    or the RAY_FLAG_CULL_FRONT_FACING_TRIANGLES flag in the directional tracer TraceRay call.
    Please fix this to take the material & shadow settings into account !