|
|
|
|
|
|
BiquadraticFilter(1 - fc, weights, offsets); // Inverse-translate the filter centered around 0.5 |
|
|
|
|
|
|
|
// Apply the viewport scale right at the end. |
|
|
|
// TODO: perform per-sample (4, in this case) bilateral filtering, rather than per-pixel. This should reduce leaking. |
|
|
|
// TODO: precompute (VBufferResolution.zw * VBufferUvScale). |
|
|
|
result = (weights[0].x * weights[0].y) * SAMPLE_TEXTURE3D_LOD(VBuffer, clampSampler, float3(min((ic + float2(offsets[0].x, offsets[0].y)) * (VBufferResolution.zw * VBufferUvScale), VBufferUvLimit), w), 0) // Top left |
|
|
|
+ (weights[1].x * weights[0].y) * SAMPLE_TEXTURE3D_LOD(VBuffer, clampSampler, float3(min((ic + float2(offsets[1].x, offsets[0].y)) * (VBufferResolution.zw * VBufferUvScale), VBufferUvLimit), w), 0) // Top right |
|
|
|