Unity Water system rendering customization

Hello everyone,

I’m working with the Unity Water System in HDRP and would like to customize how the underside of the water plane is rendered. Could anyone guide me on which specific script or shader file in HDRP is responsible for handling the underside rendering of the water surface? I’m hoping to modify it to achieve a specific visual effect.

Thank you in advance for any help or pointers!

There’s a node in the shader graph called HDSampleBuffer, in there, there’s a dropdown allowing you to get a mask of when your camera is underwater or not.
In the Underwater scene in the HDRP package manager water sample project, there’s example on how to setup a custom pass to customize the water rendering a little.

If you are looking to modify the shader themselves, you can definitely do it.
We can’t really provie any support but there is a lot in those files:

  • com.unity.render-pipelines.high-definition/Runtime/Material/Water/Water.hlsl
  • com.unity.render-pipelines.high-definition/Runtime/Water/Shaders/UnderWaterUtilities.hlsl

Thanks for you help :+1:.