Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Shader with shadows and right colors

Discussion in 'Shaders' started by KeithW, May 7, 2018.

  1. KeithW

    KeithW

    Joined:
    Dec 15, 2017
    Posts:
    9
    I will start out by saying I have never written a shader before.

    When I use Legacy Shaders/Diffuse shadows appear on the outside walls of the house, but not on the inside. Also, all the inside walls (same color) appear pinkish/purplish and blend together with no shadows/shading.

    When I use DoubleSided/Legacy Shaders/VertexLitCutoutCullOff (or any VertexLit shader) the inside walls are the correct color (tan) and have shadows that make it easy to distinguish where they bend and end. However, the house does not receive shadows cast by the house next door or its own roofline.

    I am confused about why the walls are the wrong color in certain shaders and I would like to have shadows where I want them. All meshs are set to CastShadowsMode = On and ReceiveShadows = true

    I am certainly willing to write a shader, but I have no idea where a good starting place would be.

    I tried creating a standard surface shader and it had the same problems as the diffuse shader.