Search Unity

Bug Ray tracing not working properly on build

Discussion in 'High Definition Render Pipeline' started by ProgrammerTurtle, Jun 4, 2020.

  1. ProgrammerTurtle

    ProgrammerTurtle

    Joined:
    Oct 8, 2018
    Posts:
    28
    I have been working on a Ray traced demo. I am experiencing a weird issue at the moment. When I run the game on the editor all is fine. Ray tracing works just as expected. Crystal-clear. A very weird issue starts to surface when I build & run the game. I really don't know a proper way to explain this so I am providing screenshots for it.

    Is this is a bug or am I doing something wrong here? I checked all my build settings over and over again and couldn't find anything wrong.

    Edit: I am using 2020.1.0b11
    Edit2: My GPU is RTX 2080 TI / CPU is ThreadRipper 3960x

    In Engine (Working Fine):
    In-Engine-Footage.png


    In-Game/Builded(Not working fine at all):
    In-Game-Footage.png
     
  2. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    Hey, have you tried to disable asynchronous execution in "async compute shader" tab in your HDRP frame settings? (it may not help but we've had a issue recently breaking rendering that has been fixed but maybe not in your editor version)

    If that doesn't work, it could be nice to try to enable only one raytracing effect at a time to see which one is failing in build to be able to narrow down the issue if there's one.
     
  3. ProgrammerTurtle

    ProgrammerTurtle

    Joined:
    Oct 8, 2018
    Posts:
    28
    Hello @chap-unity , thanks for the reply.

    It was enabled by default but as far as I know async computer shader is disabled automatically when there is ray tracing available. However disabling it manually didn't help with my issue either.

    On your second suggestion I disabled all ray tracing effects on my global post process volume, the moment I enable recursive rendering the issue starts to happen in a build game. Everything works just fine in the editor no matter what I do. Almost every single material in my scene has raytracing rendering pass(it's a very very very small scene) so I don't have any clue what I can do without recursive rendering but yeah, problem seems to be with recursive rendering.
     
    Last edited: Jun 4, 2020
  4. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    Thanks for the detailed information. I will try to repro on my side and create a report if needed.
    Are you using HDRP 8.1.0 ?
     
  5. ProgrammerTurtle

    ProgrammerTurtle

    Joined:
    Oct 8, 2018
    Posts:
    28
    @chap-unity Yes, it is 8.1.0

    I can provide the project file via PM to you if that's going to help in any way. Zipped version of the project is 3GB
     
    chap-unity likes this.
  6. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    So, I took a look at the project and this is a setup issue.

    I suggest to use raytraced screen space reflection if you want accurate realtime reflection instead of using recursive rendering and puting every single object in the raytracing pass.

    It's incredibly costly to use it for every object and from an artistic standpoint, it's not perfect because it also overrides the smoothness of your materials. It's not designed to be used that way.