|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
float4 unity_ShadowColor; |
|
|
|
|
|
|
|
// t = animateMaterials ? Time.realtimeSinceStartup : 0. |
|
|
|
float4 _CurrentTime; // { t/20, t, t*2, t*3 } |
|
|
|
float4 _PreviousTime; // { t/20, t, t*2, t*3 } |
|
|
|
float4 _DeltaTime; // { dt, 1/dt, smoothdt, 1/smoothdt } |
|
|
|
float4 _SinCurrentTime; // { sin(t/8), sin(t/4), sin(t/2), sin(t) } |
|
|
|
float4 _CosCurrentTime; // { cos(t/8), cos(t/4), cos(t/2), cos(t) } |
|
|
|
|
|
|
|
// Volumetric lighting. |
|
|
|
float4 _AmbientProbeCoeffs[7]; // 3 bands of SH, packed, rescaled and convolved with the phase function |
|
|
|
float _GlobalAsymmetry; |
|
|
|
float3 _GlobalScattering; |
|
|
|
float _GlobalExtinction; |
|
|
|
float4 _VBufferResolution; // { w, h, 1/w, 1/h } |
|
|
|
float4 _VBufferSliceCount; // { count, 1/count, 0, 0 } |
|
|
|
float4 _VBufferDepthEncodingParams; // See the call site for description |
|
|
|
float4 _VBufferDepthDecodingParams; // See the call site for description |
|
|
|
CBUFFER_END |
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------- |
|
|
|
|
|
|
float4x4 _ViewProjMatrix; |
|
|
|
float4x4 _InvViewProjMatrix; |
|
|
|
float4x4 _NonJitteredViewProjMatrix; |
|
|
|
float4x4 _PrevViewProjMatrix; // non-jittered |
|
|
|
float4x4 _PrevViewProjMatrix; // non-jittered |
|
|
|
|
|
|
|
// TODO: put commonly used vars together (below), and then sort them by the frequency of use (descending). |
|
|
|
// Note: a matrix is 4 * 4 * 4 = 64 bytes (1x cache line), so no need to sort those. |
|
|
|
|
|
|
float3 _CameraPositionWS; |
|
|
|
#endif |
|
|
|
float _DetViewMatrix; // determinant(_ViewMatrix) |
|
|
|
float4 _ScreenSize; // { w, h, 1 / w, 1 / h } |
|
|
|
float4 _ScreenToTargetScale; // { w / RTHandle.maxWidth, h / RTHandle.maxHeight, 0, 0 } |
|
|
|
float _DetViewMatrix; // determinant(_ViewMatrix) |
|
|
|
float4 _ScreenSize; // { w, h, 1 / w, 1 / h } |
|
|
|
float4 _ScreenToTargetScale; // { w / RTHandle.maxWidth, h / RTHandle.maxHeight, 0, 0 } |
|
|
|
|
|
|
|
// Values used to linearize the Z buffer (http://www.humus.name/temp/Linearize%20depth.txt) |
|
|
|
// x = 1 - f/n |
|
|
|
|
|
|
// w = orthographic camera's height (0 if perspective) |
|
|
|
float4 _FrustumParams; |
|
|
|
|
|
|
|
float4 _FrustumPlanes[6]; // { (a, b, c) = N, d = -dot(N, P) } [L, R, T, B, N, F] |
|
|
|
|
|
|
|
// t = animateMaterials ? Time.realtimeSinceStartup : 0. |
|
|
|
float4 _CurrentTime; // { t/20, t, t*2, t*3 } |
|
|
|
float4 _PreviousTime; // { t/20, t, t*2, t*3 } |
|
|
|
float4 _DeltaTime; // { dt, 1/dt, smoothdt, 1/smoothdt } |
|
|
|
float4 _SinCurrentTime; // { sin(t/8), sin(t/4), sin(t/2), sin(t) } |
|
|
|
float4 _CosCurrentTime; // { cos(t/8), cos(t/4), cos(t/2), cos(t) } |
|
|
|
|
|
|
|
float4 _TaaFrameRotation; // { sin(taaFrame * PI/2), cos(taaFrame * PI/2), 0, 0 } |
|
|
|
float4 _TaaFrameRotation; // { sin(taaFrame * PI/2), cos(taaFrame * PI/2), 0, 0 } |
|
|
|
float4 _FrustumPlanes[6]; // { (a, b, c) = N, d = -dot(N, P) } [L, R, T, B, N, F] |
|
|
|
// Volumetric lighting. |
|
|
|
float4 _AmbientProbeCoeffs[7]; // 3 bands of SH, packed, rescaled and convolved with the phase function |
|
|
|
float _GlobalAsymmetry; |
|
|
|
float3 _GlobalScattering; |
|
|
|
float _GlobalExtinction; |
|
|
|
float4 _VBufferResolution; // { w, h, 1/w, 1/h } |
|
|
|
float4 _VBufferSliceCount; // { count, 1/count, 0, 0 } |
|
|
|
float4 _VBufferDepthEncodingParams; // See the call site for description |
|
|
|
float4 _VBufferDepthDecodingParams; // See the call site for description |
|
|
|
CBUFFER_END |
|
|
|
|
|
|
|
// Custom generated by HDRP, not from Unity Engine (passed in via HDCamera) |
|
|
|