Pārlūkot izejas kodu

Fix regression with non-power-of-two equirectangular images.

This regression was introduced in 9788fc6512.
pull/1015/head
Matthew Petroff pirms 3 gadiem
vecāks
revīzija
4e069c768d
1 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. +3
    -2
      src/js/libpannellum.js

+ 3
- 2
src/js/libpannellum.js Parādīt failu

@@ -483,8 +483,9 @@ function Renderer(container) {
}

// Set parameters for rendering any size
if (imageType != "cubemap" && image.width <= maxWidth && haov == 2 * Math.PI)
gl.texParameteri(glBindType, gl.TEXTURE_WRAP_S, gl.REPEAT);
if (imageType != "cubemap" && image.width <= maxWidth &&
haov == 2 * Math.PI && (image.width & (image.width - 1)) == 0)
gl.texParameteri(glBindType, gl.TEXTURE_WRAP_S, gl.REPEAT); // Only supported for power-of-two images in WebGL 1
else
gl.texParameteri(glBindType, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
gl.texParameteri(glBindType, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);


Notiek ielāde…
Atcelt
Saglabāt