Forráskód Böngészése

workaround for 1 pixel texture issues

- always use at least 2x2 textures
Alexander Rose 4 éve
szülő
commit
1988275695
1 módosított fájl, 1 hozzáadás és 0 törlés
  1. 1 0
      src/mol-gl/renderable/util.ts

+ 1 - 0
src/mol-gl/renderable/util.ts

@@ -9,6 +9,7 @@ import { Vec3 } from '../../mol-math/linear-algebra';
 import { BoundaryHelper } from '../../mol-math/geometry/boundary-helper';
 
 export function calculateTextureInfo (n: number, itemSize: number) {
+    n = Math.max(n, 2); // observed issues with 1 pixel textures
     const sqN = Math.sqrt(n);
     let width = Math.ceil(sqN);
     width = width + (itemSize - (width % itemSize)) % itemSize;