Search Unity

[Solved] Shadow Problem - Custom Lighting Surface Shader

Discussion in 'Shaders' started by Deleted User, Sep 20, 2018.

  1. Deleted User

    Deleted User

    Guest

    I'm creating a Custom Lighting Surface Shader to create the lighting technique in Lara Croft Go, but I hit a problem with how the shadows are rendering. Outside of the point light the shadows render pure black when they should be slightly darker that the objects main color.



    Here is my shader:



    Ramp Texture used in "white mode":
    There is a small black band, a 1 pixel grey band, and then a giant white band

     
  2. Deleted User

    Deleted User

    Guest

    I plugged object color into emission as well it seem to have fixed it.

    Now I have a new problem.

    The banded lighting is not showing up on the cube anymore



    The bands show here:

     
    Last edited by a moderator: Sep 20, 2018
  3. Deleted User

    Deleted User

    Guest

    I fixed it after trying every combination



    Example:



    I switched Ramp texture type to gray too don't know if that made a difference.