Moonlit-Games / Ultimate-Water-System

14 stars 7 forks source link

Foam Shore blending with water depth #17

Open leonidasos opened 7 years ago

leonidasos commented 7 years ago

unity: 5.6.4f1 uws version: 1.0.0 and same with hot-fix: b1 spec: Intel Core i5, Geforce 970GTX

Foam shore causes undesired 'ghost effect' for any objects. It looks also bad on any other objects (especially when object is moving... 'ghost' is also moving. The best solution for me would be to not blend shore foam with water depth, so it should only appear on water surface.

Another option is to have explicitly layers in configuration to ignore shore foam effect on objects with particular layers. Is there any way to hack it quickly ? I must say that we waited a lot of time to move from PWW to UWS.

2017-10-20_02h27_37

MCPGNZ commented 7 years ago

Hi, The shore-foam is depth-based screen-space effect, so the best solution will be probably to add masking. I'll try to hack through it on the weekend.

leonidasos commented 7 years ago

Thank you, I really appreciate it. In-meantime I looked into Shader "UltimateWater/Utility/ShorelineMaskRender" half4 t = half4(min(1.0, _TileSizesInv * _WaveDampingThreshold * 0)); is it ok?