Skip to content

Commit

Permalink
Use textureOffset
Browse files Browse the repository at this point in the history
  • Loading branch information
vanruesc committed Jul 28, 2024
1 parent 93b3b94 commit 426ec33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
7 changes: 2 additions & 5 deletions src/effects/shaders/smaa.frag
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
uniform lowp sampler2D weightMap;

in vec2 vOffset0;
in vec2 vOffset1;

/**
* Moves values to a target vector based on a given conditional vector.
*/
Expand All @@ -25,8 +22,8 @@ vec4 smaa(sampler2D inputBuffer, const in vec4 inputColor, const in vec2 uv) {

// Fetch the blending weights for the current pixel.
vec4 a;
a.x = texture(weightMap, vOffset0).a;
a.y = texture(weightMap, vOffset1).g;
a.x = textureOffset(weightMap, uv, ivec2(1, 0)).a;
a.y = textureOffset(weightMap, uv, ivec2(0, 1)).g;
a.wz = texture(weightMap, uv).rb;

vec4 color = inputColor;
Expand Down
9 changes: 0 additions & 9 deletions src/effects/shaders/smaa.vert

This file was deleted.

0 comments on commit 426ec33

Please sign in to comment.