alelievr / HDRP-Custom-Passes

A bunch of custom passes made for HDRP
MIT License
1.25k stars 136 forks source link

Questions about the wetness effect #45

Open DieZone19 opened 1 year ago

DieZone19 commented 1 year ago

Hi, the screen space wetness looks very good. I would have a question. Can you delete your wet in an area? So like in the photo with the snow. 2022-11-19 04_25_23-Start

alelievr commented 1 year ago

So, right now this is not possible because it's a screen-space effect. Though with more work you could set up a volume system (like in your picture) that you pass to the shader to fade the effect. You'd need to convert the list of volumes to a list of OBB with a fading radius and upload it with a GraphicsBuffer. Then in the shader, you can simply iterate over all the volumes to find the minimum fading value to apply at a certain position in world space.

An alternative solution to locally apply wetness like that is to use a decal shader graph: https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@16.0/manual/master-stack-hdrp.html