From efb8703db5815028d61bd8b30aad1cbab36788ab Mon Sep 17 00:00:00 2001 From: lindsay Date: Thu, 29 Feb 2024 13:41:40 +0100 Subject: [PATCH 1/2] Don't cull transparent DTX meshes from pick render pass --- .../dtx/triangles/renderers/DTXTrianglesPickMeshRenderer.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesPickMeshRenderer.js b/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesPickMeshRenderer.js index 1ba4f366f4..db6a6ed9a6 100644 --- a/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesPickMeshRenderer.js +++ b/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesPickMeshRenderer.js @@ -324,11 +324,6 @@ export class DTXTrianglesPickMeshRenderer { // get color src.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"); - src.push(`if (color.a == 0u) {`); - src.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"); // Cull vertex - src.push(" return;"); - src.push("};"); - // get pick-color src.push("vPickColor = vec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0)) / 255.0;"); From 1e7738d7ac99fca6c505ae0df60ef675b9e465d4 Mon Sep 17 00:00:00 2001 From: lindsay Date: Thu, 29 Feb 2024 13:43:36 +0100 Subject: [PATCH 2/2] Transparent picking examples --- .../picking_dtx_batching_opacity.html | 313 ++++++++++++++++++ .../picking_vbo_batching_opacity.html | 312 +++++++++++++++++ 2 files changed, 625 insertions(+) create mode 100644 examples/scenemodel/picking_dtx_batching_opacity.html create mode 100644 examples/scenemodel/picking_vbo_batching_opacity.html diff --git a/examples/scenemodel/picking_dtx_batching_opacity.html b/examples/scenemodel/picking_dtx_batching_opacity.html new file mode 100644 index 0000000000..548024473c --- /dev/null +++ b/examples/scenemodel/picking_dtx_batching_opacity.html @@ -0,0 +1,313 @@ + + + + + + + xeokit Example + + + + + + + +
+ +

SceneModel

+

Test Picking Transparent DTX Meshes

+ +
+ + + + \ No newline at end of file diff --git a/examples/scenemodel/picking_vbo_batching_opacity.html b/examples/scenemodel/picking_vbo_batching_opacity.html new file mode 100644 index 0000000000..9e8f3c553e --- /dev/null +++ b/examples/scenemodel/picking_vbo_batching_opacity.html @@ -0,0 +1,312 @@ + + + + + + + xeokit Example + + + + + + + +
+ +

SceneModel

+

Test Picking Transparent Batched VBO Meshes

+ +
+ + + + \ No newline at end of file