Unity3d 內置世界變量

// 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 values
uniform float4 _ProjectionParams;
// x = 1 or -1 (-1 if projection is flipped)
// y = near plane; z = far plane; w = 1/far plane
uniform float4 _ScreenParams; 
// x = width; y = height; z = 1 + 1/width; w = 1 + 1/height
uniform float4 unity_Scale; // w = 1/scale; see _World2Object
uniform float3 _WorldSpaceCameraPos;
uniform float4x4 _Object2World; // model matrix
uniform 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/range
uniform float4 _WorldSpaceLightPos0; 
// position or direction of light source
uniform float4 _LightColor0; // color of light source 

發佈了104 篇原創文章 · 獲贊 7 · 訪問量 42萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章