- Home /
Literals in ShaderLab Fixed-Function Shaders
I saw this syntax in an example shader on the web:
SetTexture[_Texture2] {
ConstantColor (0,0,0, [_Blend])
Combine texture Lerp(constant) previous
}
I can't find any information or examples of using literal values like that in the official documentation. Does any exist? If not, can anyone share their experience on how literals can be used?
For writing fallbacks it would be useful if I could write a literal or partially literal value for this SetTexture command:
matrix [MatrixPropertyName]
The matrix command seems under-documented in general. Doesn't even say what size the matrix needs to be. I assume they expect us to know the underlying graphics function that a command represents but they could at least give the function's name or link to that function's documentation on a 3rd party website. The documentation doesn't explicitly mention that there's no way to declare a matrix property in the properties block. It also doesn't seem to mention that using a property name that's not defined in the properties block is valid and generates a hidden property (inferred type?) which can be set from code.
Your answer
