Skip to content

Commit

Permalink
Used texelFetch instead of texture in the gather path
Browse files Browse the repository at this point in the history
  • Loading branch information
mdagois committed Jan 28, 2024
1 parent 919aef4 commit 47a4cec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shaders/oit_depth_peeling/gather.frag
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ layout(set = 0, binding = 1) uniform sampler2D depthTex;

void main()
{
const float layerDepth = texture(depthTex, gl_FragCoord.xy / textureSize(depthTex, 0).xy).r;
const float layerDepth = texelFetch(depthTex, ivec2(gl_FragCoord.xy), 0).r;
if(gl_FragCoord.z >= layerDepth)
{
discard;
Expand Down

0 comments on commit 47a4cec

Please sign in to comment.