Search Unity

Raytracing Prepass?

Discussion in 'High Definition Render Pipeline' started by merpheus, Oct 2, 2021.

  1. merpheus

    merpheus

    Joined:
    Mar 5, 2013
    Posts:
    202
    I have been manually porting a shader to HDRP to add raytracing support. While doing that I am using shader graph's generated shader code to inspect which passes that I should be adding.

    There are two subshaders, one is the regular raster pipeline-related while the other is totally for DXR passes.
    But at the last Pass of first subshader is called "Raytracing Prepass". Seems like even if I don't add that pass, raytracing features like pathtracing and rt reflections do work.

    I would like to know what that pass does in particular. Any insight would be appreciated.
     
  2. merpheus

    merpheus

    Joined:
    Mar 5, 2013
    Posts:
    202
  3. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    The feature that requires it is recursive rendering.
     
    merpheus likes this.
  4. merpheus

    merpheus

    Joined:
    Mar 5, 2013
    Posts:
    202
    Great! Thanks for the insight.