Remove ObjectManager dependency from Material.
PiperOrigin-RevId: 897056556 Change-Id: Ic02239d7a411b52333b48a069292b21afb547b19
This commit is contained in:
committed by
Copybara-Service
parent
edc807895f
commit
f6baacfa86
@@ -86,10 +86,20 @@ static bool IsBehind(const mjtNum* headpos, const float* pos, const float* mat)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Drawable::Drawable(ObjectManager* object_mgr, ModelObjects* model_objects,
|
Drawable::Drawable(ObjectManager* object_mgr, ModelObjects* model_objects,
|
||||||
const mjvGeom& geom)
|
const mjvGeom& geom,
|
||||||
: material_(object_mgr),
|
const Material::Textures* fallback_textures)
|
||||||
|
: material_(object_mgr->GetEngine()),
|
||||||
model_objs_(model_objects),
|
model_objs_(model_objects),
|
||||||
|
object_mgr_(object_mgr),
|
||||||
renderables_(object_mgr->GetEngine()) {
|
renderables_(object_mgr->GetEngine()) {
|
||||||
|
material_.SetMaterial(
|
||||||
|
Material::DrawMode::kDepth,
|
||||||
|
object_mgr_->GetMaterial(ObjectManager::kUnlitDepth));
|
||||||
|
material_.SetMaterial(
|
||||||
|
Material::DrawMode::kSegmentation,
|
||||||
|
object_mgr_->GetMaterial(ObjectManager::kUnlitSegmentation));
|
||||||
|
material_.SetFallbackTextures(fallback_textures);
|
||||||
|
|
||||||
if (geom.category == mjCAT_DECOR) {
|
if (geom.category == mjCAT_DECOR) {
|
||||||
renderables_.SetCastShadows(false);
|
renderables_.SetCastShadows(false);
|
||||||
renderables_.SetReceiveShadows(false);
|
renderables_.SetReceiveShadows(false);
|
||||||
@@ -229,7 +239,9 @@ void Drawable::SetDrawMode(Material::DrawMode mode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Drawable::UpdateReflectionTexture(const Texture* tex) {
|
void Drawable::UpdateReflectionTexture(const Texture* tex) {
|
||||||
material_.UpdateReflectionTexture(tex);
|
Material::Textures textures = material_.GetTextures();
|
||||||
|
textures.reflection = tex;
|
||||||
|
material_.UpdateTextures(textures);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Drawable::SetLayerMask(std::uint8_t mask) {
|
void Drawable::SetLayerMask(std::uint8_t mask) {
|
||||||
@@ -353,6 +365,11 @@ void Drawable::SetTransform(const mjvGeom& geom) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Drawable::SetNormalMaterial(ObjectManager::MaterialType material_type) {
|
||||||
|
filament::Material* material = object_mgr_->GetMaterial(material_type);
|
||||||
|
material_.SetMaterial(Material::DrawMode::kNormal, material);
|
||||||
|
}
|
||||||
|
|
||||||
void Drawable::UpdateMaterial(const mjvGeom& geom, bool use_segid_color,
|
void Drawable::UpdateMaterial(const mjvGeom& geom, bool use_segid_color,
|
||||||
bool enable_reflection, const mjtNum* headpos) {
|
bool enable_reflection, const mjtNum* headpos) {
|
||||||
const mjModel* model = model_objs_->GetModel();
|
const mjModel* model = model_objs_->GetModel();
|
||||||
@@ -385,21 +402,21 @@ void Drawable::UpdateMaterial(const mjvGeom& geom, bool use_segid_color,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (geom.type == mjGEOM_LINE || geom.type == mjGEOM_LINEBOX) {
|
if (geom.type == mjGEOM_LINE || geom.type == mjGEOM_LINEBOX) {
|
||||||
material_.SetNormalMaterialType(ObjectManager::kUnlitLine);
|
SetNormalMaterial(ObjectManager::kUnlitLine);
|
||||||
} else {
|
} else {
|
||||||
bool material_assigned = false;
|
bool material_assigned = false;
|
||||||
if (geom.matid >= 0) {
|
if (geom.matid >= 0) {
|
||||||
material_assigned = true;
|
material_assigned = true;
|
||||||
if (textures.orm) {
|
if (textures.orm) {
|
||||||
material_.SetNormalMaterialType(ObjectManager::kPbrPacked);
|
SetNormalMaterial(ObjectManager::kPbrPacked);
|
||||||
} else if (textures.metallic) {
|
} else if (textures.metallic) {
|
||||||
material_.SetNormalMaterialType(ObjectManager::kPbr);
|
SetNormalMaterial(ObjectManager::kPbr);
|
||||||
} else if (textures.roughness) {
|
} else if (textures.roughness) {
|
||||||
material_.SetNormalMaterialType(ObjectManager::kPbr);
|
SetNormalMaterial(ObjectManager::kPbr);
|
||||||
} else if (model->mat_metallic[geom.matid] >= 0) {
|
} else if (model->mat_metallic[geom.matid] >= 0) {
|
||||||
material_.SetNormalMaterialType(ObjectManager::kPbr);
|
SetNormalMaterial(ObjectManager::kPbr);
|
||||||
} else if (model->mat_roughness[geom.matid] >= 0) {
|
} else if (model->mat_roughness[geom.matid] >= 0) {
|
||||||
material_.SetNormalMaterialType(ObjectManager::kPbr);
|
SetNormalMaterial(ObjectManager::kPbr);
|
||||||
} else {
|
} else {
|
||||||
material_assigned = false;
|
material_assigned = false;
|
||||||
}
|
}
|
||||||
@@ -418,36 +435,36 @@ void Drawable::UpdateMaterial(const mjvGeom& geom, bool use_segid_color,
|
|||||||
|
|
||||||
if (textures.color == nullptr) {
|
if (textures.color == nullptr) {
|
||||||
if (color.a < 1.0f) {
|
if (color.a < 1.0f) {
|
||||||
material_.SetNormalMaterialType(ObjectManager::kPhongColorFade);
|
SetNormalMaterial(ObjectManager::kPhongColorFade);
|
||||||
} else if (reflective_) {
|
} else if (reflective_) {
|
||||||
material_.SetNormalMaterialType(ObjectManager::kPhongColorReflect);
|
SetNormalMaterial(ObjectManager::kPhongColorReflect);
|
||||||
} else {
|
} else {
|
||||||
material_.SetNormalMaterialType(ObjectManager::kPhongColor);
|
SetNormalMaterial(ObjectManager::kPhongColor);
|
||||||
}
|
}
|
||||||
} else if (textures.color->GetFilamentTexture()->getTarget() ==
|
} else if (textures.color->GetFilamentTexture()->getTarget() ==
|
||||||
filament::Texture::Sampler::SAMPLER_CUBEMAP) {
|
filament::Texture::Sampler::SAMPLER_CUBEMAP) {
|
||||||
if (color.a < 1.0f) {
|
if (color.a < 1.0f) {
|
||||||
material_.SetNormalMaterialType(ObjectManager::kPhongCubeFade);
|
SetNormalMaterial(ObjectManager::kPhongCubeFade);
|
||||||
} else if (reflective_) {
|
} else if (reflective_) {
|
||||||
material_.SetNormalMaterialType(ObjectManager::kPhongCubeReflect);
|
SetNormalMaterial(ObjectManager::kPhongCubeReflect);
|
||||||
} else {
|
} else {
|
||||||
material_.SetNormalMaterialType(ObjectManager::kPhongCube);
|
SetNormalMaterial(ObjectManager::kPhongCube);
|
||||||
}
|
}
|
||||||
} else if (has_texcoords) {
|
} else if (has_texcoords) {
|
||||||
if (color.a < 1.0f) {
|
if (color.a < 1.0f) {
|
||||||
material_.SetNormalMaterialType(ObjectManager::kPhong2dUvFade);
|
SetNormalMaterial(ObjectManager::kPhong2dUvFade);
|
||||||
} else if (reflective_) {
|
} else if (reflective_) {
|
||||||
material_.SetNormalMaterialType(ObjectManager::kPhong2dUvReflect);
|
SetNormalMaterial(ObjectManager::kPhong2dUvReflect);
|
||||||
} else {
|
} else {
|
||||||
material_.SetNormalMaterialType(ObjectManager::kPhong2dUv);
|
SetNormalMaterial(ObjectManager::kPhong2dUv);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (color.a < 1.0f) {
|
if (color.a < 1.0f) {
|
||||||
material_.SetNormalMaterialType(ObjectManager::kPhong2dFade);
|
SetNormalMaterial(ObjectManager::kPhong2dFade);
|
||||||
} else if (reflective_) {
|
} else if (reflective_) {
|
||||||
material_.SetNormalMaterialType(ObjectManager::kPhong2dReflect);
|
SetNormalMaterial(ObjectManager::kPhong2dReflect);
|
||||||
} else {
|
} else {
|
||||||
material_.SetNormalMaterialType(ObjectManager::kPhong2d);
|
SetNormalMaterial(ObjectManager::kPhong2d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace mujoco {
|
|||||||
class Drawable {
|
class Drawable {
|
||||||
public:
|
public:
|
||||||
Drawable(ObjectManager* object_mgr, ModelObjects* model_objects,
|
Drawable(ObjectManager* object_mgr, ModelObjects* model_objects,
|
||||||
const mjvGeom& geom);
|
const mjvGeom& geom, const Material::Textures* fallback_textures);
|
||||||
~Drawable() noexcept = default;
|
~Drawable() noexcept = default;
|
||||||
|
|
||||||
Drawable(const Drawable&) = delete;
|
Drawable(const Drawable&) = delete;
|
||||||
@@ -79,12 +79,16 @@ class Drawable {
|
|||||||
// Updates the transform of the drawable for rendering.
|
// Updates the transform of the drawable for rendering.
|
||||||
void SetTransform(const mjvGeom& geom);
|
void SetTransform(const mjvGeom& geom);
|
||||||
|
|
||||||
|
// Sets the material for the drawable.
|
||||||
|
void SetNormalMaterial(ObjectManager::MaterialType material_type);
|
||||||
|
|
||||||
// Updates the material parameters of the drawable for rendering.
|
// Updates the material parameters of the drawable for rendering.
|
||||||
void UpdateMaterial(const mjvGeom& geom, bool use_segid_color,
|
void UpdateMaterial(const mjvGeom& geom, bool use_segid_color,
|
||||||
bool enable_reflection, const mjtNum* headpos);
|
bool enable_reflection, const mjtNum* headpos);
|
||||||
|
|
||||||
Material material_;
|
Material material_;
|
||||||
ModelObjects* model_objs_ = nullptr;
|
ModelObjects* model_objs_ = nullptr;
|
||||||
|
ObjectManager* object_mgr_ = nullptr;
|
||||||
Renderables renderables_;
|
Renderables renderables_;
|
||||||
bool reflective_ = false;
|
bool reflective_ = false;
|
||||||
filament::math::mat4 transform_;
|
filament::math::mat4 transform_;
|
||||||
|
|||||||
@@ -19,45 +19,35 @@
|
|||||||
#include <filament/MaterialInstance.h>
|
#include <filament/MaterialInstance.h>
|
||||||
#include <filament/RenderableManager.h>
|
#include <filament/RenderableManager.h>
|
||||||
#include <filament/TextureSampler.h>
|
#include <filament/TextureSampler.h>
|
||||||
#include <mujoco/mjmodel.h>
|
|
||||||
#include "experimental/filament/filament/object_manager.h"
|
|
||||||
#include "experimental/filament/filament/texture.h"
|
#include "experimental/filament/filament/texture.h"
|
||||||
|
|
||||||
namespace mujoco {
|
namespace mujoco {
|
||||||
|
|
||||||
Material::Material(ObjectManager* object_mgr) : object_mgr_(object_mgr) {
|
Material::Material(filament::Engine* engine)
|
||||||
instances_[kDepth] =
|
: engine_(engine) {
|
||||||
object_mgr_->GetMaterial(ObjectManager::kUnlitDepth)->createInstance();
|
|
||||||
instances_[kSegmentation] =
|
|
||||||
object_mgr_->GetMaterial(ObjectManager::kUnlitSegmentation)
|
|
||||||
->createInstance();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Material::~Material() noexcept {
|
Material::~Material() noexcept {
|
||||||
filament::Engine* engine = object_mgr_->GetEngine();
|
|
||||||
for (int i = 0; i < kNumDrawModes; ++i) {
|
for (int i = 0; i < kNumDrawModes; ++i) {
|
||||||
if (instances_[i]) {
|
if (instances_[i]) {
|
||||||
engine->destroy(instances_[i]);
|
engine_->destroy(instances_[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Material::SetNormalMaterialType(
|
void Material::SetMaterial(DrawMode mode, filament::Material* material) {
|
||||||
ObjectManager::MaterialType material_type) {
|
if (instances_[mode]) {
|
||||||
filament::Material* material = object_mgr_->GetMaterial(material_type);
|
|
||||||
|
|
||||||
if (instances_[kNormal]) {
|
|
||||||
const filament::Material* current_material =
|
const filament::Material* current_material =
|
||||||
instances_[kNormal]->getMaterial();
|
instances_[mode]->getMaterial();
|
||||||
if (current_material == material) {
|
if (current_material == material) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
object_mgr_->GetEngine()->destroy(instances_[kNormal]);
|
engine_->destroy(instances_[mode]);
|
||||||
instances_[kNormal] = nullptr;
|
instances_[mode] = nullptr;
|
||||||
}
|
}
|
||||||
if (material) {
|
if (material) {
|
||||||
instances_[kNormal] = material->createInstance();
|
instances_[mode] = material->createInstance();
|
||||||
UpdateMaterialInstances();
|
UpdateMaterialInstances();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -72,9 +62,8 @@ void Material::UpdateTextures(const Textures& textures) {
|
|||||||
UpdateMaterialInstances();
|
UpdateMaterialInstances();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Material::UpdateReflectionTexture(const Texture* tex) {
|
void Material::SetFallbackTextures(const Textures* fallback_textures) {
|
||||||
textures_.reflection = tex;
|
fallback_textures_ = fallback_textures;
|
||||||
UpdateMaterialInstances();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Material::UpdateMaterialInstances() {
|
void Material::UpdateMaterialInstances() {
|
||||||
@@ -130,25 +119,32 @@ void Material::UpdateMaterialInstances() {
|
|||||||
filament::TextureSampler::MinFilter::LINEAR_MIPMAP_LINEAR);
|
filament::TextureSampler::MinFilter::LINEAR_MIPMAP_LINEAR);
|
||||||
|
|
||||||
auto TrySetTexture = [&](const char* name, const Texture* texture,
|
auto TrySetTexture = [&](const char* name, const Texture* texture,
|
||||||
mjtTextureRole role) {
|
const Texture* fallback) {
|
||||||
if (material->hasParameter(name)) {
|
if (material->hasParameter(name)) {
|
||||||
if (texture) {
|
if (texture) {
|
||||||
instance->setParameter(name, texture->GetFilamentTexture(), sampler);
|
instance->setParameter(name, texture->GetFilamentTexture(), sampler);
|
||||||
} else {
|
} else if (fallback) {
|
||||||
auto* fallback = object_mgr_->GetFallbackTexture(role);
|
|
||||||
instance->setParameter(name, fallback->GetFilamentTexture(), sampler);
|
instance->setParameter(name, fallback->GetFilamentTexture(), sampler);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
TrySetTexture("BaseColor", textures_.color, mjTEXROLE_RGB);
|
TrySetTexture("BaseColor", textures_.color,
|
||||||
TrySetTexture("Normal", textures_.normal, mjTEXROLE_NORMAL);
|
fallback_textures_ ? fallback_textures_->color : nullptr);
|
||||||
TrySetTexture("Metallic", textures_.metallic, mjTEXROLE_METALLIC);
|
TrySetTexture("Normal", textures_.normal,
|
||||||
TrySetTexture("Roughness", textures_.roughness, mjTEXROLE_ROUGHNESS);
|
fallback_textures_ ? fallback_textures_->normal : nullptr);
|
||||||
TrySetTexture("Occlusion", textures_.occlusion, mjTEXROLE_OCCLUSION);
|
TrySetTexture("Metallic", textures_.metallic,
|
||||||
TrySetTexture("ORM", textures_.orm, mjTEXROLE_ORM);
|
fallback_textures_ ? fallback_textures_->metallic : nullptr);
|
||||||
TrySetTexture("Emissive", textures_.emissive, mjTEXROLE_EMISSIVE);
|
TrySetTexture("Roughness", textures_.roughness,
|
||||||
TrySetTexture("Reflection", textures_.reflection, mjTEXROLE_USER);
|
fallback_textures_ ? fallback_textures_->roughness : nullptr);
|
||||||
|
TrySetTexture("Occlusion", textures_.occlusion,
|
||||||
|
fallback_textures_ ? fallback_textures_->occlusion : nullptr);
|
||||||
|
TrySetTexture("ORM", textures_.orm,
|
||||||
|
fallback_textures_ ? fallback_textures_->orm : nullptr);
|
||||||
|
TrySetTexture("Emissive", textures_.emissive,
|
||||||
|
fallback_textures_ ? fallback_textures_->emissive : nullptr);
|
||||||
|
TrySetTexture("Reflection", textures_.reflection,
|
||||||
|
fallback_textures_ ? fallback_textures_->reflection : nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace mujoco
|
} // namespace mujoco
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
#include <math/vec2.h>
|
#include <math/vec2.h>
|
||||||
#include <math/vec3.h>
|
#include <math/vec3.h>
|
||||||
#include <math/vec4.h>
|
#include <math/vec4.h>
|
||||||
#include "experimental/filament/filament/object_manager.h"
|
|
||||||
#include "experimental/filament/filament/texture.h"
|
#include "experimental/filament/filament/texture.h"
|
||||||
|
|
||||||
namespace mujoco {
|
namespace mujoco {
|
||||||
@@ -65,24 +64,29 @@ class Material {
|
|||||||
bool tex_uniform = false;
|
bool tex_uniform = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
Material(ObjectManager* object_mgr);
|
explicit Material(filament::Engine* engine);
|
||||||
~Material() noexcept;
|
~Material() noexcept;
|
||||||
|
|
||||||
Material(const Material&) = delete;
|
Material(const Material&) = delete;
|
||||||
Material& operator=(const Material&) = delete;
|
Material& operator=(const Material&) = delete;
|
||||||
|
|
||||||
// Assigns a material to the draw mode.
|
// Assigns a material to the draw mode.
|
||||||
void SetNormalMaterialType(ObjectManager::MaterialType material_type);
|
void SetMaterial(DrawMode mode, filament::Material* material);
|
||||||
|
|
||||||
// Updates the material parameters of the drawable for rendering.
|
// Sets the fallback textures for the material.
|
||||||
|
void SetFallbackTextures(const Textures* fallback_textures);
|
||||||
|
|
||||||
|
// Updates the parameters for the material.
|
||||||
void UpdateParams(const Params& params);
|
void UpdateParams(const Params& params);
|
||||||
|
|
||||||
// Updates the material textures of the drawable for rendering.
|
// Updates the textures for the material.
|
||||||
void UpdateTextures(const Textures& textures);
|
void UpdateTextures(const Textures& textures);
|
||||||
|
|
||||||
// Update the reflection texture. We do this separately since the reflection
|
// Returns the current material parameters.
|
||||||
// texture needs to be rendered before it can be applied to the material.
|
const Params& GetParams() const { return params_; }
|
||||||
void UpdateReflectionTexture(const Texture* tex);
|
|
||||||
|
// Returns the current material textures.
|
||||||
|
const Textures& GetTextures() const { return textures_; }
|
||||||
|
|
||||||
// Returns the material instance assigned to the draw mode.
|
// Returns the material instance assigned to the draw mode.
|
||||||
filament::MaterialInstance* GetMaterialInstance(DrawMode mode) {
|
filament::MaterialInstance* GetMaterialInstance(DrawMode mode) {
|
||||||
@@ -94,8 +98,9 @@ class Material {
|
|||||||
// textures.
|
// textures.
|
||||||
void UpdateMaterialInstances();
|
void UpdateMaterialInstances();
|
||||||
|
|
||||||
ObjectManager* object_mgr_ = nullptr;
|
filament::Engine* engine_ = nullptr;
|
||||||
filament::MaterialInstance* instances_[kNumDrawModes] = {nullptr};
|
filament::MaterialInstance* instances_[kNumDrawModes] = {nullptr};
|
||||||
|
const Textures* fallback_textures_ = nullptr;
|
||||||
Params params_;
|
Params params_;
|
||||||
Textures textures_;
|
Textures textures_;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -139,6 +139,15 @@ SceneBridge::SceneBridge(ObjectManager* object_mgr, const mjModel* model,
|
|||||||
ReadElement(model, "filament.fallback.environment_light_intensity",
|
ReadElement(model, "filament.fallback.environment_light_intensity",
|
||||||
fallback_environment_light_intensity_);
|
fallback_environment_light_intensity_);
|
||||||
|
|
||||||
|
fallback_textures_.color = object_mgr_->GetFallbackTexture(mjTEXROLE_RGB);
|
||||||
|
fallback_textures_.normal = object_mgr_->GetFallbackTexture(mjTEXROLE_NORMAL);
|
||||||
|
fallback_textures_.metallic = object_mgr_->GetFallbackTexture(mjTEXROLE_METALLIC);
|
||||||
|
fallback_textures_.roughness = object_mgr_->GetFallbackTexture(mjTEXROLE_ROUGHNESS);
|
||||||
|
fallback_textures_.occlusion = object_mgr_->GetFallbackTexture(mjTEXROLE_OCCLUSION);
|
||||||
|
fallback_textures_.orm = object_mgr_->GetFallbackTexture(mjTEXROLE_ORM);
|
||||||
|
fallback_textures_.emissive = object_mgr_->GetFallbackTexture(mjTEXROLE_EMISSIVE);
|
||||||
|
fallback_textures_.reflection = object_mgr_->GetFallbackTexture(mjTEXROLE_USER);
|
||||||
|
|
||||||
// Create an empty/black indirect light to ensure that the skybox is oriented
|
// Create an empty/black indirect light to ensure that the skybox is oriented
|
||||||
// to respect mujoco's Z-up convention.
|
// to respect mujoco's Z-up convention.
|
||||||
filament::IndirectLight* empty_ibl =
|
filament::IndirectLight* empty_ibl =
|
||||||
@@ -313,8 +322,8 @@ void SceneBridge::Update(const mjrRect& viewport, const mjvScene* scene) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto drawable =
|
auto drawable = std::make_unique<Drawable>(
|
||||||
std::make_unique<Drawable>(object_mgr_, model_objects_.get(), *geom);
|
object_mgr_, model_objects_.get(), *geom, &fallback_textures_);
|
||||||
drawable->Update(model_objects_->GetModel(), scene, *geom);
|
drawable->Update(model_objects_->GetModel(), scene, *geom);
|
||||||
scene_view_->AddToScene(drawable.get());
|
scene_view_->AddToScene(drawable.get());
|
||||||
drawables_.push_back(std::move(drawable));
|
drawables_.push_back(std::move(drawable));
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
#include <mujoco/mujoco.h>
|
#include <mujoco/mujoco.h>
|
||||||
#include "experimental/filament/filament/drawable.h"
|
#include "experimental/filament/filament/drawable.h"
|
||||||
#include "experimental/filament/filament/light.h"
|
#include "experimental/filament/filament/light.h"
|
||||||
|
#include "experimental/filament/filament/material.h"
|
||||||
#include "experimental/filament/filament/model_objects.h"
|
#include "experimental/filament/filament/model_objects.h"
|
||||||
#include "experimental/filament/filament/object_manager.h"
|
#include "experimental/filament/filament/object_manager.h"
|
||||||
#include "experimental/filament/filament/scene_view.h"
|
#include "experimental/filament/filament/scene_view.h"
|
||||||
@@ -78,6 +79,7 @@ class SceneBridge {
|
|||||||
float fallback_head_light_intensity_ = 0.f;
|
float fallback_head_light_intensity_ = 0.f;
|
||||||
float fallback_scene_light_intensity_ = 80'000.f;
|
float fallback_scene_light_intensity_ = 80'000.f;
|
||||||
float fallback_environment_light_intensity_ = 5'000.f;
|
float fallback_environment_light_intensity_ = 5'000.f;
|
||||||
|
Material::Textures fallback_textures_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace mujoco
|
} // namespace mujoco
|
||||||
|
|||||||
Reference in New Issue
Block a user