Browse Source

fix: webgl1 shader err

xzw 4 months ago
parent
commit
a82f3913b6
3 changed files with 6 additions and 2 deletions
  1. 1 1
      public/lib/Cesium/Cesium.js
  2. 4 0
      public/lib/potree/potree.js
  3. 1 1
      public/lib/potree/potree.js.map

File diff suppressed because it is too large
+ 1 - 1
public/lib/Cesium/Cesium.js


+ 4 - 0
public/lib/potree/potree.js

@@ -29168,6 +29168,10 @@
 	      vs,
 	      vs,
 	      fs
 	      fs
 	    } = Common$1.changeShaderToWebgl2(shader.vertexShader, shader.fragmentShader, 'RawShaderMaterial');
 	    } = Common$1.changeShaderToWebgl2(shader.vertexShader, shader.fragmentShader, 'RawShaderMaterial');
+	    if (!Potree.settings.isWebgl2) {
+	      defines['round(x)'] = 'floor(x + 0.5)'; //webgl1 unsupport round
+	      fs = fs.replace('int(round(color.g * 255.0)) << 8', 'int(round(color.g * 255.0 * pow(2.0, 8.0)))'); //unsupport <<
+	    }
 	    super({
 	    super({
 	      fragmentShader: fs,
 	      fragmentShader: fs,
 	      vertexShader: vs,
 	      vertexShader: vs,

File diff suppressed because it is too large
+ 1 - 1
public/lib/potree/potree.js.map