Skip to main content
deleted 2 characters in body
Source Link
harut9
  • 157
  • 1
  • 8

There is no Mobile shader which will only adjust the color of the object, you must write your own custom shader or modify Unity's build-in shaders. If you only want that "color shader" here is the code for that shader.

Shader "Custom/ColorShader" {
Properties {
    _Color("Color", Color) = (1.000000,1.000000,1.000000,1.000000)
}
SubShader {
    Tags 
{ 
    "RenderType"="Opaque"
}
    LOD 150
    
    CGPROGRAM
    // Physically based Standard lighting model, and enable shadows on all light types
    #pragma surface surf Lambert noforwardadd

    float4 _Color;

    struct Input {
        float4half color : COLOR;
    };
    void surf (Input IN, inout SurfaceOutput o) {
        o.Albedo = _Color;
    }
    ENDCG
}
FallBack "Diffuse"  }

To create that shader you need to go to Create->Shader->Standard Surface Shader.Open it in some code editor ,delete all existing code and paste this code. Now you can use this shader for your materials choosing it from Custom menu.

There is no Mobile shader which will only adjust the color of the object, you must write your own custom shader or modify Unity's build-in shaders. If you only want that "color shader" here is the code for that shader.

Shader "Custom/ColorShader" {
Properties {
    _Color("Color", Color) = (1.000000,1.000000,1.000000,1.000000)
}
SubShader {
    Tags 
{ 
    "RenderType"="Opaque"
}
    LOD 150
    
    CGPROGRAM
    // Physically based Standard lighting model, and enable shadows on all light types
    #pragma surface surf Lambert noforwardadd

    float4 _Color;

    struct Input {
        float4 color : COLOR;
    };
    void surf (Input IN, inout SurfaceOutput o) {
        o.Albedo = _Color;
    }
    ENDCG
}
FallBack "Diffuse"  }

To create that shader you need to go to Create->Shader->Standard Surface Shader.Open it in some code editor ,delete all existing code and paste this code. Now you can use this shader for your materials choosing it from Custom menu.

There is no Mobile shader which will only adjust the color of the object, you must write your own custom shader or modify Unity's build-in shaders. If you only want that "color shader" here is the code for that shader.

Shader "Custom/ColorShader" {
Properties {
    _Color("Color", Color) = (1.000000,1.000000,1.000000,1.000000)
}
SubShader {
    Tags 
{ 
    "RenderType"="Opaque"
}
    LOD 150
    
    CGPROGRAM
    // Physically based Standard lighting model, and enable shadows on all light types
    #pragma surface surf Lambert noforwardadd

    float4 _Color;

    struct Input {
        half color : COLOR;
    };
    void surf (Input IN, inout SurfaceOutput o) {
        o.Albedo = _Color;
    }
    ENDCG
}
FallBack "Diffuse"  }

To create that shader you need to go to Create->Shader->Standard Surface Shader.Open it in some code editor ,delete all existing code and paste this code. Now you can use this shader for your materials choosing it from Custom menu.

Source Link
harut9
  • 157
  • 1
  • 8

There is no Mobile shader which will only adjust the color of the object, you must write your own custom shader or modify Unity's build-in shaders. If you only want that "color shader" here is the code for that shader.

Shader "Custom/ColorShader" {
Properties {
    _Color("Color", Color) = (1.000000,1.000000,1.000000,1.000000)
}
SubShader {
    Tags 
{ 
    "RenderType"="Opaque"
}
    LOD 150
    
    CGPROGRAM
    // Physically based Standard lighting model, and enable shadows on all light types
    #pragma surface surf Lambert noforwardadd

    float4 _Color;

    struct Input {
        float4 color : COLOR;
    };
    void surf (Input IN, inout SurfaceOutput o) {
        o.Albedo = _Color;
    }
    ENDCG
}
FallBack "Diffuse"  }

To create that shader you need to go to Create->Shader->Standard Surface Shader.Open it in some code editor ,delete all existing code and paste this code. Now you can use this shader for your materials choosing it from Custom menu.