|
@@ -81642,8 +81642,7 @@ void main()
|
|
|
uniform mat4 pano0Matrix;
|
|
|
|
|
|
uniform vec3 pano1Position;
|
|
|
- uniform mat4 pano1Matrix;
|
|
|
- //uniform mat4 pano1Matrix2;
|
|
|
+ uniform mat4 pano1Matrix;
|
|
|
|
|
|
|
|
|
varying vec2 vUv;
|
|
@@ -81708,17 +81707,14 @@ void main()
|
|
|
uniform float minOpa;
|
|
|
|
|
|
|
|
|
-
|
|
|
- /* uniform sampler2D pano0Map;
|
|
|
- uniform sampler2D pano1Map; */
|
|
|
+
|
|
|
uniform samplerCube pano0Map;
|
|
|
uniform samplerCube pano1Map;
|
|
|
|
|
|
|
|
|
varying vec2 vUv;
|
|
|
varying vec3 vWorldPosition0;
|
|
|
- varying vec3 vWorldPosition1;
|
|
|
- //varying vec3 vWorldPosition12;
|
|
|
+ varying vec3 vWorldPosition1;
|
|
|
|
|
|
|
|
|
/* vec2 getSamplerCoord( vec3 direction )
|
|
@@ -81761,7 +81757,7 @@ void main()
|
|
|
//distance *= 255. * .001; // distance is now in meters
|
|
|
|
|
|
//更改
|
|
|
- float distance = (depth.g + depth.r / 256.) * 255.; //为什么要乘以255
|
|
|
+ float distance = (depth.g + depth.r / 256.) * 255.;
|
|
|
|
|
|
if(distance == 0.0){//漫游点底部识别不到的区域,给一个地板高度
|
|
|
if(uv2.y < depthTexUVyLimit) distance = heightUp / dir.y;
|
|
@@ -81773,7 +81769,6 @@ void main()
|
|
|
|
|
|
depthValue.x = distance;
|
|
|
|
|
|
- // return r[1] + r[0] / 256
|
|
|
distance += .1; // add a safety margin
|
|
|
|
|
|
vec4 eyePos2 = vec4(normalize(eyePos.xyz) * distance, 1.);
|
|
@@ -86311,7 +86306,7 @@ void main()
|
|
|
if (!(x < 0 || y < 0 || x >= this.canvas.width || y >= this.canvas.height)){
|
|
|
let blockIndex = this.canvas.width * y + x;
|
|
|
let color = imgData.data.slice(blockIndex*4, (blockIndex+1)*4);
|
|
|
- return color[1] + color[0] / 256
|
|
|
+ return color[1] + color[0] / 256 //为什么不是除以255见聊天记录.(验证过比点云的远一点点)
|
|
|
}
|
|
|
};
|
|
|
|
|
@@ -104727,6 +104722,7 @@ void main()
|
|
|
var rtEDL = this.getRtEDL(params.viewport);
|
|
|
if(rtEDL){
|
|
|
renderer.setRenderTarget( rtEDL );
|
|
|
+ renderer.setClearAlpha(0);
|
|
|
renderer.clear( true, true, true );
|
|
|
}
|
|
|
|
|
@@ -121050,7 +121046,7 @@ ENDSEC
|
|
|
|
|
|
}));
|
|
|
viewer.scene.scene.add(this.groundPlane);
|
|
|
- this.groundPlane.position.z = -1;
|
|
|
+ this.groundPlane.position.z = 0.1;
|
|
|
}else {
|
|
|
this.groundPlane.material.map = map;
|
|
|
}
|
|
@@ -135718,7 +135714,7 @@ ENDSEC
|
|
|
const maxVertexVisi = 5e6;
|
|
|
const maxTexVisi = 500;
|
|
|
|
|
|
- const maxDepth = 100;
|
|
|
+ let maxDepth = 100;
|
|
|
|
|
|
function getGpuMemoryUsage(win = window){//总的
|
|
|
let c = 0;
|
|
@@ -143232,9 +143228,8 @@ ENDSEC
|
|
|
const tile = node.item;
|
|
|
node = node.next;
|
|
|
this.unloadTile(tileset, tile, unloadCallback);
|
|
|
- //add: 针对部分特别精细的如 https://4dkk.4dage.com/scene_view_data/SG-t-WReTBN204dQ/images/3dtiles/tileset.json
|
|
|
|
|
|
- if(viewer.visiVertexCount > 1500000){
|
|
|
+ if(viewer.visiVertexCount > 1500000){ //add: 针对部分特别精细的很卡如 https://4dkk.4dage.com/scene_view_data/SG-t-WReTBN204dQ/images/3dtiles/tileset.json
|
|
|
tileset.options.maximumScreenSpaceError *= 1.1;
|
|
|
tileset.options.maximumScreenSpaceError = Math.min(1000, tileset.options.maximumScreenSpaceError);
|
|
|
}
|