Search Unity

Modified "Standard Shader" with surface shader

Discussion in 'Shaders' started by tsangwailam, May 8, 2017.

  1. tsangwailam

    tsangwailam

    Joined:
    Jul 30, 2013
    Posts:
    280
    I want to create a modified version of standard shader. I create one with surface shader and all effect looks like the build-in "Standard shader" when run on desktop.

    I use the code like below.
    Code (CSharp):
    1.   CGPROGRAM
    2.         // Physically based Standard lighting model, and enable shadows on all light types
    3.         #pragma surface surf Standard fullforwardshadows
    4.  
    5.         // Use shader model 3.0 target, to get nicer looking lighting
    6.         #pragma target 3.0
    7.       ...
    8.         void surf (Input IN, inout SurfaceOutputStandard o) {  
    9. ...
    10. }
    But when compile on android, the lighting/reflection seem gone compare with build-in "Standard" shader. Seem the addpass didn't apply.

    Anyone have exp. creating "standard shader" with surface shader?