Skip to content

Commit

Permalink
Adjust SGSR2 res fix to only apply to Jitteruv
Browse files Browse the repository at this point in the history
Signed-off-by: Rodrigo Holztrattner <[email protected]>
  • Loading branch information
RodrigoHolztrattner-QuIC committed Jan 16, 2025
1 parent 065fad0 commit b0eb94e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions samples/sgsr2/shaders/sgsr2_upscale.comp
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ void main()
float Biasmax_viewportXScale = min(float(params.displaySize.x) / float(params.renderSize.x), 1.99); //Biasmax_viewportXScale
float scalefactor = min(20.0, pow((float(params.displaySize.x) / float(params.renderSize.x)) * (float(params.displaySize.y) / float(params.renderSize.y)), 3.0));
float f2 = params.preExposure; //1.0; //preExposure
vec2 HistoryInfoViewportSizeInverse = params.renderSizeRcp;
vec2 HistoryInfoViewportSizeInverse = params.displaySizeRcp;
vec2 HistoryInfoViewportSize = vec2(params.displaySize);
vec2 InputJitter = params.jitterOffset;
vec2 InputInfoViewportSize = vec2(params.renderSize);
vec2 Hruv = (vec2(gl_GlobalInvocationID.xy) + vec2(0.5)) * HistoryInfoViewportSizeInverse;
vec2 Jitteruv;
Jitteruv.x = clamp(Hruv.x + (InputJitter.x * HistoryInfoViewportSizeInverse.x), 0.0, 1.0);
Jitteruv.y = clamp(Hruv.y + (InputJitter.y * HistoryInfoViewportSizeInverse.y), 0.0, 1.0);
Jitteruv.x = clamp(Hruv.x + (InputJitter.x * params.renderSizeRcp.x), 0.0, 1.0);
Jitteruv.y = clamp(Hruv.y + (InputJitter.y * params.renderSizeRcp.y), 0.0, 1.0);

ivec2 InputPos = ivec2(Jitteruv * InputInfoViewportSize);

Expand Down

0 comments on commit b0eb94e

Please sign in to comment.