slight change to lod, comments for fog in interpolation shader

This commit is contained in:
mschuetz 2014-11-07 12:47:52 +01:00
parent db5723cc5b
commit 41c96745b3
2 changed files with 17 additions and 14 deletions

View File

@ -167,16 +167,17 @@ Potree.PointCloudOctree.prototype.update = function(camera){
}else if(this.numVisiblePoints > this.visiblePointsTarget*1.1){
// decrease to value at which point count target is met
var n = 0;
for(var i = 0; i < visibleNodes.length; i++){
var element = visibleNodes[i];
n += element.node.numPoints;
if(n >= this.visiblePointsTarget){
this.LOD = 1 / element.lod;
break;
}
}
//var n = 0;
//for(var i = 0; i < visibleNodes.length; i++){
// var element = visibleNodes[i];
// n += element.node.numPoints;
//
// if(n >= this.visiblePointsTarget){
// this.LOD = 1 / element.lod;
// break;
// }
//}
this.LOD *= 0.95;
}

View File

@ -100,6 +100,12 @@ Potree.PointCloudRGBInterpolationMaterial.fs_points_rgb = [
" ",
" gl_FragColor = vec4(vColor, 1.0); ",
" gl_FragDepthEXT = gl_FragCoord.z + blendDepth*(1.0-pow(c, 1.0)) * gl_FragCoord.w ; ",
" ",
" //float dist = gl_FragCoord.z / gl_FragCoord.w; ",
" //float fog = clamp(dist / 2000.0, 0.0, 1.0); ",
" //fog = min(fog, 0.6); ",
" //gl_FragColor = gl_FragColor * (1.0-fog) + vec4(170.0, 180.0, 190, 1.0) * fog / 256.0; ",
" //gl_FragColor.a = 1.0; ",
"} "];
@ -111,7 +117,3 @@ Potree.PointCloudRGBInterpolationMaterial.fs_points_rgb = [