Hi !
I’ve setup HDRP pipeline with raytracing and I have a huge problem with it. Take a look at this picture :
All my materials (except for the character but that’s not important) are set to opaque/raytracing/standard I’ve also enabled SSR for them because if I disable it my materials are black. But why are they this much specular ? I’ve tried to play a bit with the metallic and smoothness values but that doesn’t change the specularity so much.
So … yes if anyone knows how I can have a material that is not as specular as a mirror it would be greatly appreciated
Tama
Hey, from what I see, while what you used does produce “ray traced reflection”, this is not the proper way to have them.
Instead of adding a Recursive Rendering Override and put your object in the raytracing pass, you should put back your material in the default pass, and then add a Screen Space Reflection override and enable raytraced reflection there. (Cf documentation on ray traced reflections)
There, you will be able to select the number of bounce you want, the min smoothness at which you’d want your reflections ray traced… etc
Recursive Rendering will override your material smoothness to 1 making the specular reflection you experience.
Recursive Rendering was created to be used in very specific situation when you need to have multiple refraction within multiple transparent objects (cars headlight for example). It is to be used “carefully” because it’s very costly performance wise (compared to Ray Traced Reflections in the Screen Space Reflection override). You can learn more about it in the documentation about Recursive Rendering.
Ho nice ! That’s way better. Indeed, I didn’t give enough attention at these resources when I saw them.
Thank you very much. Just a pic of the result :
Tama
1 Like
Ho wait ! Is it normal that my custom hit shader doesn’t work anymore ?
edit : I have a ClosestHit Shader that I use for my system purpose
AFAIK, changing the setup like I suggested shouldn’t prevent you to do custom stuff with raytracing shaders.
Hmmm. In this case that’s weird. My ClosestHit shader is not triggered when my materials are set to Default and not Raytracing. Do you know if I have something in particular to do when I set and launch my custom RT Shader on my objects or on the RayTracingAccelerationStructure maybe ?
Hi,
Yes this is how I launch my RayTracingShader and it was working until I enable the default pass instead of the Raytracing pass on my materials for visuals results purpose (as shown in the previous posts). To be more precise, the shader never enter in the closestHit shader. Meaning the raytracing pass is not execute anymore on the objects. I don’t really know where to search anymore if you have anything that can help me resolve this problem it would be very nice.
If it can help I based my implementation on this code : GitHub - SlightlyMad/SimpleDxrPathTracer: Simple DXR powered PathTracer in Unity
Edit: Also my custom raytracing pass is not a visual pass, it’s a pass I use to compute other stuff as visibility and collision to use in my system
Tama