feat: remove bounding box from SceneAsset and create renderable wireframe bounding box in ThermionAsset

This commit is contained in:
Nick Fisher
2024-12-21 07:45:50 +08:00
parent 51bdca7158
commit 8d8acef481
13 changed files with 274 additions and 53 deletions

View File

@@ -105,6 +105,9 @@ namespace thermion
auto *hitTestMaterialInstance = _material->createInstance();
_materialInstances.push_back(hitTestMaterialInstance);
hitTestMaterialInstance->setParameter("baseColorFactor", math::float4{0.0f, 0.0f, 0.0f, 0.0f});
hitTestMaterialInstance->setTransparencyMode(MaterialInstance::TransparencyMode::TWO_PASSES_ONE_SIDE);
hitTestMaterialInstance->setCullingMode(MaterialInstance::CullingMode::BACK);
hitTestMaterialInstance->setParameter("scale", _scale);
rm.setMaterialInstanceAt(renderableInstance, 0, hitTestMaterialInstance);
}