refactoring + texture projection

This commit is contained in:
Nick Fisher
2025-03-25 09:39:02 +08:00
parent 0cbbc058e0
commit 999b1e613f
33 changed files with 7357 additions and 1168 deletions

View File

@@ -22,11 +22,9 @@ namespace thermion
SceneAsset *sceneAsset,
Engine *engine,
View *view,
Scene *scene,
Material *material) noexcept : _source(sceneAsset),
_engine(engine),
_view(view),
_scene(scene),
_material(material)
{
auto &entityManager = _engine->getEntityManager();
@@ -80,6 +78,10 @@ namespace thermion
_materialInstances.push_back(materialInstance);
auto instance = _source->createInstance(&materialInstance, 1);
if(!instance) {
Log("FATAL: failed to create asset instance");
}
TRACE("Created Gizmo axis glTF instance with head entity %d", instance->getEntity());
auto color = filament::math::float4(AXIS_COLORS[axis], 0.5f);
materialInstance->setParameter("baseColorFactor", color);