Search Unity

No Shadows On Custom Shader

Discussion in 'Shaders' started by hugettini, Sep 22, 2014.

  1. hugettini

    hugettini

    Joined:
    Apr 1, 2013
    Posts:
    19
    Hello I've got a problem receiving shadows on my custom shader. I've got a mesh with 2 Materials:

    The road material is a built in diffuse shader. And there (as you may see) I can receive shadows.

    The second material is a really simple custom shader, ant there I cannot see any shadow.

    I've tried several shaders, and no one cast any shader (except for the built in shaders).

    Any help would be apreciated. Thank you!

    PD: I'm using unity free

    Here's my simple custom shader.

    Shader "Blend 2 Textures" {

    Properties {
    _MainTex ("Texture 1", 2D) = ""
    }

    SubShader {

    Lighting On
    Pass {

    SetTexture[_MainTex]
    }
    }
    Fallback "Diffuse"
    }

    32618-shadows.png 32619-noshadows.png
     
    Last edited: Sep 22, 2014