|
|
|
|
|
|
isFirstFrame = false; |
|
|
|
} |
|
|
|
|
|
|
|
taaFrameIndex = taaEnabled ? (uint)postProcessLayer.temporalAntialiasing.sampleIndex : 0; |
|
|
|
// TEMP: Re-enable this code once we bump the postprocessing package to 0.1.19 (or above)
|
|
|
|
// current package 0.1.8 don't have the .sampleIndex and it fail with template...
|
|
|
|
// taaFrameIndex = taaEnabled ? (uint)postProcessLayer.temporalAntialiasing.sampleIndex : 0;
|
|
|
|
const uint taaFrameCount = 8; |
|
|
|
taaFrameIndex = taaEnabled ? (uint)Time.renderedFrameCount % taaFrameCount : 0; |
|
|
|
// END TEMP
|
|
|
|
taaFrameRotation = new Vector2(Mathf.Sin(taaFrameIndex * (0.5f * Mathf.PI)), |
|
|
|
Mathf.Cos(taaFrameIndex * (0.5f * Mathf.PI))); |
|
|
|
|
|
|
|