From 64f9da85ed26b770fac6b5fcdd6df0693c868710 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Sun, 8 Dec 2024 14:15:59 -0800 Subject: [PATCH] Remove objects with transmission from the scene for now Assigning post pass 2 means we don't actually render them as we only render 0 and 1; transmission needs separate consideration. --- src/scene.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/scene.cpp b/src/scene.cpp index f488562..4ce4a55 100644 --- a/src/scene.cpp +++ b/src/scene.cpp @@ -432,6 +432,9 @@ bool loadScene(Geometry& geometry, std::vector& materials, std::vector if (material && material->alpha_mode != cgltf_alpha_mode_opaque) draw.postPass = 1; + if (material && material->has_transmission) + draw.postPass = 2; + draws.push_back(draw); } }