From b03300730da7b52277b8ce2b2f7e8fde9ece4f7a Mon Sep 17 00:00:00 2001 From: Benjamin BERNARD Date: Sat, 4 Jan 2014 15:37:51 +0100 Subject: [PATCH] Correcting multi-resolution repeated tiles (artifacts on edges) --- src/js/libpannellum.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/js/libpannellum.js b/src/js/libpannellum.js index 37616ea..2dfa733 100644 --- a/src/js/libpannellum.js +++ b/src/js/libpannellum.js @@ -490,6 +490,8 @@ function Renderer(canvas, image, imageType) { gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, img); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_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.generateMipmap(gl.TEXTURE_2D); gl.bindTexture(gl.TEXTURE_2D, null); }