From 76b46a92edbf00cf04b3a9797b5446a94bb699ca Mon Sep 17 00:00:00 2001 From: Paul Mathieu Date: Sun, 12 Dec 2021 15:47:53 -0800 Subject: [PATCH] Fix texture aberrations in the distance --- gl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gl.js b/gl.js index e09dcba..e1cedae 100644 --- a/gl.js +++ b/gl.js @@ -40,8 +40,8 @@ export async function loadTexture(gl, url) { gl.bindTexture(gl.TEXTURE_2D, texture); gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, 1); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); -// gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); -// gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image); gl.generateMipmap(gl.TEXTURE_2D);