In your ShaderLabUnity’s language for defining the structure of Shader objects. More info
See in Glossary code, you can define material properties. A material property is a property that Unity stores as part of the material asset. This allows artists to create, edit, and share materials with different configurations.
If you use material properties:
If you do not use material properties:
The only times that you would normally not create a material property is if you want to set shader property values entirely using scriptsA piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. More info
See in Glossary (for example, if you are making procedural content), if the properties cannot be made into material properties, or if you don’t want them to be edited in the Inspector.
Shader property values are found and provided to shaders from these places:
The order of precedence is like above: per-instance data overrides everything; then Material data is used; and finally if shader property does not exist in these two places then global property value is used. Finally, if there’s no shader property value defined anywhere, then “default” (zero for floats, black for colors, empty white texture for textures) value will be provided.
Materials can contain both serialized and runtime-set property values.
Serialized data is all the properties defined in shader’s Properties block. Typically these are values that need to be stored in the material, and are tweakable by the user in Material Inspector.
A material can also have some properties that are used by the shader, but not declared in shader’s Properties block. Typically this is for properties that are set from script code at runtime, e.g. via Material.SetColor. Note that matrices and arrays can only exist as non-serialized runtime properties (since there’s no way to define them in Properties block).