|
|
@ -188,7 +188,7 @@ namespace FidelityFX |
|
|
_dispatchDescription.Reset = _reset; |
|
|
_dispatchDescription.Reset = _reset; |
|
|
_reset = false; |
|
|
_reset = false; |
|
|
|
|
|
|
|
|
// Perform custom jittering of the camera's projection matrix according to FSR2's documentation
|
|
|
|
|
|
|
|
|
// Perform custom jittering of the camera's projection matrix according to FSR2's recipe
|
|
|
int jitterPhaseCount = Fsr2.GetJitterPhaseCount(_renderSize.x, _displaySize.x); |
|
|
int jitterPhaseCount = Fsr2.GetJitterPhaseCount(_renderSize.x, _displaySize.x); |
|
|
Fsr2.GetJitterOffset(out float jitterX, out float jitterY, Time.frameCount, jitterPhaseCount); |
|
|
Fsr2.GetJitterOffset(out float jitterX, out float jitterY, Time.frameCount, jitterPhaseCount); |
|
|
|
|
|
|
|
|
@ -200,7 +200,7 @@ namespace FidelityFX |
|
|
var jitterTranslationMatrix = Matrix4x4.Translate(new Vector3(jitterX, jitterY, 0)); |
|
|
var jitterTranslationMatrix = Matrix4x4.Translate(new Vector3(jitterX, jitterY, 0)); |
|
|
_renderCamera.nonJitteredProjectionMatrix = _renderCamera.projectionMatrix; |
|
|
_renderCamera.nonJitteredProjectionMatrix = _renderCamera.projectionMatrix; |
|
|
_renderCamera.projectionMatrix = jitterTranslationMatrix * _renderCamera.nonJitteredProjectionMatrix; |
|
|
_renderCamera.projectionMatrix = jitterTranslationMatrix * _renderCamera.nonJitteredProjectionMatrix; |
|
|
_renderCamera.useJitteredProjectionMatrixForTransparentRendering = false; |
|
|
|
|
|
|
|
|
_renderCamera.useJitteredProjectionMatrixForTransparentRendering = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void OnRenderImage(RenderTexture src, RenderTexture dest) |
|
|
private void OnRenderImage(RenderTexture src, RenderTexture dest) |
|
|
|