|
|
|
|
|
|
UpdateLightingHierarchyWeights(hierarchyWeight, weight); // Shouldn't be needed, but safer in case we decide to change hierarchy priority |
|
|
|
|
|
|
|
// Reproject color pyramid |
|
|
|
float4 velocityBuffer = SAMPLE_TEXTURE2D_LOD( |
|
|
|
float4 velocityBuffer = LOAD_TEXTURE2D_LOD( |
|
|
|
s_linear_clamp_sampler, |
|
|
|
hit.positionNDC * _CameraMotionVectorsScale.xy, |
|
|
|
hit.positionSS, |
|
|
|
0.0 |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
float3 preLD = SAMPLE_TEXTURE2D_LOD( |
|
|
|
_ColorPyramidTexture, |
|
|
|
s_trilinear_clamp_sampler, |
|
|
|
(hit.positionNDC - velocityNDC) * _ColorPyramidScale.xy, |
|
|
|
// Offset by half a texel to properly interpolate between this pixel and its mips |
|
|
|
(hit.positionNDC - velocityNDC) * _ColorPyramidScale.xy + _ColorPyramidSize.zw * 0.5, |
|
|
|
mipLevel |
|
|
|
).rgb; |
|
|
|
|
|
|
|