refactoring + texture projection
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user