aframe-loader-3dtiles-component icon indicating copy to clipboard operation
aframe-loader-3dtiles-component copied to clipboard

add subtractBox option

Open Algorush opened this issue 10 months ago • 0 comments

Hi @Avnerus! We at 3DStreet would be glad to get your advice on the best way to solve another important task for us. I'm trying to add a subtractBox selector attribute to component so that the content of tiles intersected with that Box will not be drawn. I'm trying to do this using shaders for now. This approach works on a simple example with two boxes or other objects. The question is how to add shaders to the tiles material in the right way. I discovered the shaderCallback function in three-loader-3diles options. I use it to add shaders to the tiles material using material.onBeforeCompile. I get this strange result in the screenshot. The white box is the clipping area. image

  • It looks like somewhere transformations are applied to tiles that give this result.
  • It looks like the tiles are cloned and the fragmentShader is applied to all instances.
  • The uniforms parameters are not updated for the material.
  • Textures look darker.

Will be great if you give some advices about this task!

Algorush avatar Apr 12 '24 21:04 Algorush