Basic shader question

Hi All,
I’m going through the tutorials for shading and am perplexed about a basic component. In the following basic shader

Shader "Tutorial/Basic" {
    Properties {
        _Color ("Main Color", Color) = (1,0.5,0.5,1)
    }
    SubShader {
        Pass {
            Material {
                Diffuse [_Color]
            }
            Lighting On
        }
    }
}

the command “Main Color” doesn’t affect the shader itself does it? When I apply this shader to a new material, the default color of the material is white. so my question is, why define the color as (1,0.5,0.5,1) if the default color in the material starts at white? I’m sure there’s something I’m missing… Thanks for the help.
d

If you change the shader of existing material, then it keeps the property values of matching properties. Maybe the existing material had a while color?

Properties {
        _Color ("Main Color", Color) = (1,0.5,0.5,1)

I guess my main question is, why define the color (in the above line of code) if color is actually dependent upon the settings of “Main Color” in the inspector? does this make sense?
thanks
d

The value in the shader is what the color is initially (as in, when you create a new material with the shader selected in the project view). It is optional; and yes, it’s just what is the default color. It can be tweaked in the material inspector.

gotcha. Thanks for the help!

danny