|
|
|
|
|
|
|
|
|
|
CBUFFER_START(UnityPerCamera) |
|
|
|
// Time (t = time since current level load) values from Unity |
|
|
|
// DEPRECATED: use _CurrentTime, _PreviousTime, _DeltaTime, _SinCurrentTime, _CosCurrentTime |
|
|
|
float4 _Time; // (t/20, t, t*2, t*3) |
|
|
|
float4 _LastTime; // Last frame time (t/20, t, t*2, t*3) |
|
|
|
float4 _SinTime; // sin(t/8), sin(t/4), sin(t/2), sin(t) |
|
|
|
|
|
|
#if !defined(USING_STEREO_MATRICES) |
|
|
|
// DEPRECATED: use _CameraPositionWS |
|
|
|
float3 _WorldSpaceCameraPos; |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
// w = 1/far plane |
|
|
|
// DEPRECATED: use _FrustumParams, UNITY_UV_STARTS_AT_TOP |
|
|
|
float4 _ProjectionParams; |
|
|
|
|
|
|
|
// x = width |
|
|
|
|
|
|
// DEPRECATED: use _ScreenSize |
|
|
|
float4 _ScreenParams; |
|
|
|
|
|
|
|
// Values used to linearize the Z buffer (http://www.humus.name/temp/Linearize%20depth.txt) |
|
|
|
|
|
|
// y = 1 |
|
|
|
// z = x/far |
|
|
|
// w = 1/far |
|
|
|
// DEPRECATED: use _DepthBufferParams |
|
|
|
float4 _ZBufferParams; |
|
|
|
|
|
|
|
// x = orthographic camera's width |
|
|
|
|
|
|
// DEPRECATED: use _FrustumParams, IsPerspectiveProjection() |
|
|
|
float4 unity_OrthoParams; |
|
|
|
CBUFFER_END |
|
|
|
|
|
|
|