How to get full list of Unity shader properties

前端 未结 2 877
长发绾君心
长发绾君心 2021-01-11 16:51

I am quite new to shaders and have been searching for a full list of Unity shader properties. I haven\'t found any such documentation. What I found was SL-Properties. Where

2条回答
  •  灰色年华
    2021-01-11 17:21

    The properties of a shader in Unity are just a public variables visible to the engine, because Cg shader is wrapped into ShaderLab program.

    You can see the structure of a shader in Unity at this presentation of Andy Touch: https://www.youtube.com/watch?v=zr1zQpdYG1Q&t=7m36s

    So, when you see fixed _Stroke; half4 _StrokeColor; later in your code it's just an actual variables that are used by Cg program and binded to these properties.

    Check adjacent Unity docs section to get to know how these properties are mapped to shader variables.

提交回复
热议问题