Search Unity

No shadow on custom shader unless put a standard shader in scene

Discussion in 'Shaders' started by timchen214, Oct 12, 2018.

  1. timchen214

    timchen214

    Joined:
    Dec 22, 2015
    Posts:
    6
    I build a scene with only my custom shaders, non of them cast or receive any shadows.

    but if I put a cube with standard shader, all objects with my custom shaders cast and receive shadows correct (but only in the area around the cube with standard shader). I didn't make any change of the custom shaders or the settings.


    I'm using two directional lights, unity pro,build for desktop,all graphic settings allow shadows,light cast shadows, and my custom shaders have cast and receive shadows functions.

    please advice
     

    Attached Files:

    • 2.png
      2.png
      File size:
      277.9 KB
      Views:
      744
    • 1.png
      1.png
      File size:
      240.9 KB
      Views:
      722
    Last edited: Dec 23, 2018