Skip to content

Commit

Permalink
- fixed incorrect calculation of strata's previous pixel
Browse files Browse the repository at this point in the history
  • Loading branch information
sultim-t committed Apr 26, 2022
1 parent a657aa0 commit 315053e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion Source/Shaders/CmASVGFMerging.comp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void main()
}

const ivec2 curPix = gradPix * COMPUTE_ASVGF_STRATA_SIZE + ivec2(xx, yy);
const ivec2 prevPix = getPrevFramePix(framebufMotion_Sampler, curPix);
const ivec2 prevPix = ivec2(floor(getPrevScreenPos(framebufMotion_Sampler, curPix)));

const vec3 prevColor = texelFetchUnfilteredDirect(prevPix);
const float prevLuminance = getLuminance(prevColor);
Expand Down
5 changes: 0 additions & 5 deletions Source/Shaders/ShaderCommonGLSLFunc.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,6 @@ vec2 getCurScreenPos(sampler2D motionSampler, const ivec2 prevPix)
return ((vec2(prevPix) + vec2(0.5)) * invScreenSize - motionCurToPrev) * screenSize;
}
*/

ivec2 getPrevFramePix(sampler2D motionSampler, const ivec2 curFramePix)
{
return ivec2(floor(getPrevScreenPos(motionSampler, curFramePix) - 0.5));
}
#endif // DESC_SET_FRAMEBUFFERS
#endif // DESC_SET_GLOBAL_UNIFORM

Expand Down

0 comments on commit 315053e

Please sign in to comment.