Search Unity

Question Light bias not affecting instanced meshes

Discussion in 'Shaders' started by carcasanchez, Jul 20, 2020.

  1. carcasanchez

    carcasanchez

    Joined:
    Jul 15, 2018
    Posts:
    177
    Hello again,
    I am having trouble another time with instanced meshes. This time, it appear that the light bias is ignored by those meshes, leading to undesired results.
    Left are instanced meshes, right the non instanced.
    upload_2020-7-20_18-50-32.png
    They both are constructed by billboarding quads, and they both have the same self-shadowing problem. The difference is that I can get rid in the non-instanced model by increasing a little the shadow bias, but the instanced ones ignore it completely.
    I am using a surface shader with a shadow pass. What is missing in my shader?