Search Unity

Question Low Poly Water - flat shading triangles [ShaderGraph Image]

Discussion in 'Shader Graph' started by studentutu, Aug 2, 2019.

  1. studentutu

    studentutu

    Joined:
    Oct 22, 2017
    Posts:
    121
    Could anyone help me out with the shader :
    should be done in vertex - you can take the vertex position in object space and convert to uv (+ float3(0,5,0.5))
    then use sine and from wave phase - Time*Wave Speed and take a noise to calculate new displacement on y.

    After that, you need to calculate light you need normals - for flat shading squares you would use cross(ddy(worldPosition), ddx(worldPosition)). Is there is a way to get normals but in triangles?
    Here is what I've got right now, as you see it interpolates color between the vertices. Is there is a way to not interpolate color that is taken from vertex in shadergraph?

    upload_2019-8-2_12-30-10.png