From 0e3cfc427750031ac231b6cafd0f88a27229778a Mon Sep 17 00:00:00 2001 From: Sascha Gehlich Date: Thu, 10 Mar 2022 15:29:39 +0100 Subject: [PATCH] `sample` is a reserved word in some opengl versions --- src/proj2d/tiling/TilingSprite2dRenderer.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/proj2d/tiling/TilingSprite2dRenderer.ts b/src/proj2d/tiling/TilingSprite2dRenderer.ts index 8c56fe7..782c5db 100644 --- a/src/proj2d/tiling/TilingSprite2dRenderer.ts +++ b/src/proj2d/tiling/TilingSprite2dRenderer.ts @@ -35,8 +35,8 @@ vec2 coord = mod(vTextureCoord.xy / vTextureCoord.z - uClampOffset, vec2(1.0, 1. coord = (uMapCoord * vec3(coord, 1.0)).xy; coord = clamp(coord, uClampFrame.xy, uClampFrame.zw); -vec4 sample = texture2D(uSampler, coord); -gl_FragColor = sample * uColor; +vec4 _sample = texture2D(uSampler, coord); +gl_FragColor = _sample * uColor; } `; const shaderSimpleFrag = ` @@ -47,8 +47,8 @@ uniform vec4 uColor; void main(void) { -vec4 sample = texture2D(uSampler, vTextureCoord.xy / vTextureCoord.z); -gl_FragColor = sample * uColor; +vec4 _sample = texture2D(uSampler, vTextureCoord.xy / vTextureCoord.z); +gl_FragColor = _sample * uColor; } `;