when i use stencil to make ground geometry, forexample when plane is six level, it work, but when i zoom into seven level , it disapper some piece, and seven level is produce dynamic and is child of six level
and i try to remake question as fllow , but i cant, please help,
贴地图,模板测试实现
my webgl config is like below:
this.renderer = new WebGLRenderer({
canvas: this.canvas,
antialias: true,
alpha: true,
logarithmicDepthBuffer: true,
precision: “highp”,
stencil: true,
});
this.renderer.sortObjects = true;
this.renderer.setPixelRatio(window.devicePixelRatio);
this.renderer.setClearColor(0xFFFFFF, 0.0);
this.renderer.autoClearStencil = false;
animate(){
this.animateId = requestAnimationFrame(this.animate.bind(this));
this.stats.update();
this.renderer.clearStencil(1,1,1);
if(this.base){
this.controls.update();
}
if (this.base){
TWEEN.update();
}
for(let runtime of this.tilesRuntimeS){
const dt = this.clock.getDelta();
runtime.update(dt, this.camera);
}
if (Config.outLine.on){
this.effectOutline.render(); // 合成器渲染
} else {
this.renderer.autoClear = true;
this.renderer.render(this.scene, this.camera);
}
}
and the geometry in picure is a planeGeometry, and it’s struct is a Quad-Tree