Unity3d 内置世界变量

来源:互联网 发布:域名购买之后 编辑:程序博客网 时间:2024/06/07 11:52
// The following built-in uniforms (except _LightColor0) // are also defined in "UnityCG.cginc", // i.e. one could #include "UnityCG.cginc" uniform float4 _Time, _SinTime, _CosTime; // time valuesuniform float4 _ProjectionParams;// x = 1 or -1 (-1 if projection is flipped)// y = near plane; z = far plane; w = 1/far planeuniform float4 _ScreenParams; // x = width; y = height; z = 1 + 1/width; w = 1 + 1/heightuniform float4 unity_Scale; // w = 1/scale; see _World2Objectuniform float3 _WorldSpaceCameraPos;uniform float4x4 _Object2World; // model matrixuniform float4x4 _World2Object; // inverse model matrix // (all but the bottom-right element have to be scaled // with unity_Scale.w if scaling is important) uniform float4 _LightPositionRange; // xyz = pos, w = 1/rangeuniform float4 _WorldSpaceLightPos0; // position or direction of light sourceuniform float4 _LightColor0; // color of light source 

0 0
原创粉丝点击