Make decorations lit, Rename unlit_decor material to decor.
PiperOrigin-RevId: 933693797 Change-Id: I37128b528296d978d4917ec65316d8d99ce017bb
This commit is contained in:
committed by
Copybara-Service
parent
037bdfa519
commit
e2afec9153
@@ -162,7 +162,7 @@ var Module = {
|
||||
"assets/outline_composite.filamat",
|
||||
"assets/outline_flatten.filamat",
|
||||
"assets/outline_jumpflood.filamat",
|
||||
"assets/unlit_decor.filamat",
|
||||
"assets/decor.filamat",
|
||||
"assets/unlit_depth.filamat",
|
||||
"assets/unlit_segmentation.filamat",
|
||||
"assets/unlit_ui.filamat"
|
||||
|
||||
@@ -112,7 +112,7 @@ set(MATERIAL_FILES
|
||||
outline_composite.mat
|
||||
outline_flatten.mat
|
||||
outline_jumpflood.mat
|
||||
unlit_decor.mat
|
||||
decor.mat
|
||||
unlit_depth.mat
|
||||
unlit_segmentation.mat
|
||||
unlit_ui.mat
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2025 DeepMind Technologies Limited
|
||||
// Copyright 2026 DeepMind Technologies Limited
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@@ -13,16 +13,19 @@
|
||||
// limitations under the License.
|
||||
|
||||
material {
|
||||
name : unlit_decor,
|
||||
shadingModel : unlit,
|
||||
name : decor,
|
||||
shadingModel : specularGlossiness,
|
||||
parameters : [
|
||||
{ type : float4, name : BaseColorFactor }
|
||||
]
|
||||
}
|
||||
|
||||
fragment {
|
||||
void material(inout MaterialInputs material) {
|
||||
prepareMaterial(material);
|
||||
material.baseColor = materialParams.BaseColorFactor;
|
||||
}
|
||||
void material(inout MaterialInputs material) {
|
||||
prepareMaterial(material);
|
||||
material.baseColor = materialParams.BaseColorFactor;
|
||||
material.specularColor = vec3(0.0);
|
||||
material.glossiness = 0.0;
|
||||
material.emissive = vec4(0.0);
|
||||
}
|
||||
}
|
||||
@@ -111,7 +111,7 @@ MaterialManager::MaterialType MaterialManager::GetMaterialType(
|
||||
if (material.color_texture) {
|
||||
return ObjectManager::kUnlitUi;
|
||||
} else {
|
||||
return ObjectManager::kUnlitDecor;
|
||||
return ObjectManager::kDecor;
|
||||
}
|
||||
} else if (material.orm_texture) {
|
||||
if (material.opacity_texture) {
|
||||
|
||||
@@ -76,7 +76,7 @@ ObjectManager::ObjectManager(filament::Engine* engine) : engine_(engine) {
|
||||
LoadMaterial(engine, "phong_cube_reflect.filamat");
|
||||
materials_[kUnlitSegmentation] =
|
||||
LoadMaterial(engine, "unlit_segmentation.filamat");
|
||||
materials_[kUnlitDecor] = LoadMaterial(engine, "unlit_decor.filamat");
|
||||
materials_[kDecor] = LoadMaterial(engine, "decor.filamat");
|
||||
materials_[kUnlitDepth] = LoadMaterial(engine, "unlit_depth.filamat");
|
||||
materials_[kUnlitUi] = LoadMaterial(engine, "unlit_ui.filamat");
|
||||
materials_[kOutlineComposite] =
|
||||
|
||||
@@ -57,7 +57,7 @@ class ObjectManager {
|
||||
kPhongCubeFade,
|
||||
kPhongCubeReflect,
|
||||
kUnlitSegmentation,
|
||||
kUnlitDecor,
|
||||
kDecor,
|
||||
kUnlitDepth,
|
||||
kUnlitUi,
|
||||
kOutlineComposite,
|
||||
|
||||
Reference in New Issue
Block a user