Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Basic surface shader brighter than standard shader

Discussion in 'Shaders' started by zugolbr, Jun 21, 2023.

  1. zugolbr

    zugolbr

    Joined:
    Nov 23, 2021
    Posts:
    6
    Hi, I'm trying to get a surface shader to look like the standard shader.
    I only use an albedo texture, and nothing else.

    Here with the standard shader:
    StandardShader.jpg

    And here is my surface shader, using the same texture, and looking much brighter:

    Code (CSharp):
    1.     Properties
    2.     {
    3.         _MainTex("_MainTex", 2D) = "white" {}
    4.     }
    5.  
    6.     SubShader
    7.     {
    8.         Tags { "RenderType" = "Opaque" }
    9.  
    10.         CGPROGRAM
    11.         #pragma surface surf Standard
    12.         #pragma target 3.0
    13.  
    14.         sampler2D _MainTex;
    15.  
    16.         struct Input
    17.         {
    18.             float2 uv_MainTex;
    19.         };
    20.  
    21.         void surf(Input IN, inout SurfaceOutputStandard o)
    22.         {
    23.             o.Albedo = tex2D (_MainTex, IN.uv_MainTex);
    24.         }
    25.         ENDCG
    26.     }
    27.     FallBack "Diffuse"
    Can you see what I'm doing wrong?

    Thanks! :)
     
  2. zugolbr

    zugolbr

    Joined:
    Nov 23, 2021
    Posts:
    6
    I finally found out! There is an albedo color multiplier in the standard shader settings! ;)