Search Unity

Water shader with distance fade

Discussion in 'Shaders' started by andrzej_, Nov 14, 2017.

  1. andrzej_

    andrzej_

    Joined:
    Dec 2, 2016
    Posts:
    81
    Hello,
    I'm looking for a way to fade with distance the default WaterProDaytime prefab from the environment pack. I want it to seamlessly transition to the background skybox.
    I was able to make a simple surface shader that fades with camera depth with the help of Amplify Shader, in hope I can just copy paste that bit to the Fx/Water shader, but with my zero knowledge of HLSL that turned out to be a little bit more challenging. :)
    An alternate solution might be a fog that takes the color from the same cubemap as the skybox.