diff options
| author | Tom Englund <tomenglund26@gmail.com> | 2025-07-01 11:32:00 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-01 11:32:00 +0200 |
| commit | f464dfbefa08089433301f011b81c70f100ab18e (patch) | |
| tree | 6188c5f4e31d79f2192965665d86e26046c1043c /src/render/shaders/glsl/blur1.frag | |
| parent | 8c37d2ce258df773ba7d8b10e7d0ff49d77ed476 (diff) | |
shader: replace texture2d with texture (#10893)
* shader: replace texture2d with texture
remove unused v_color and replace deprecated texture2d with texture.
* shader: use the more modern essl3 extension
GL_OES_EGL_image_external_essl3 provides support for samplerExternalOES
in texture function, aquamarine already use it. apply it here too.
Diffstat (limited to 'src/render/shaders/glsl/blur1.frag')
| -rw-r--r-- | src/render/shaders/glsl/blur1.frag | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/render/shaders/glsl/blur1.frag b/src/render/shaders/glsl/blur1.frag index f0f8cc10..796fb42d 100644 --- a/src/render/shaders/glsl/blur1.frag +++ b/src/render/shaders/glsl/blur1.frag @@ -112,11 +112,11 @@ layout(location = 0) out vec4 fragColor; void main() { vec2 uv = v_texcoord * 2.0; - vec4 sum = texture2D(tex, uv) * 4.0; - sum += texture2D(tex, uv - halfpixel.xy * radius); - sum += texture2D(tex, uv + halfpixel.xy * radius); - sum += texture2D(tex, uv + vec2(halfpixel.x, -halfpixel.y) * radius); - sum += texture2D(tex, uv - vec2(halfpixel.x, -halfpixel.y) * radius); + vec4 sum = texture(tex, uv) * 4.0; + sum += texture(tex, uv - halfpixel.xy * radius); + sum += texture(tex, uv + halfpixel.xy * radius); + sum += texture(tex, uv + vec2(halfpixel.x, -halfpixel.y) * radius); + sum += texture(tex, uv - vec2(halfpixel.x, -halfpixel.y) * radius); vec4 color = sum / 8.0; |
