Refactor PBR texture layers from separate sub-elements to a single layer sub-element.
Add new element to PyMJCF schema. PiperOrigin-RevId: 690115286 Change-Id: I7bb3f184cb321ca96037b2ca0ee160efef37469d
This commit is contained in:
committed by
Copybara-Service
parent
078c7bb42e
commit
61cb552f8a
@@ -805,10 +805,10 @@ TEST_F(XMLReaderTest, MaterialTextureTest) {
|
||||
<texture file="tiny0.png" type="2d" name="tiny0"/>
|
||||
<texture file="tiny1.png" type="2d" name="tiny1"/>
|
||||
<material name="material">
|
||||
<occlusion texture="tiny0"/>
|
||||
<roughness texture="tiny0"/>
|
||||
<metallic texture="tiny0"/>
|
||||
<rgb texture="tiny1"/>
|
||||
<layer role="occlusion" texture="tiny0"/>
|
||||
<layer role="roughness" texture="tiny0"/>
|
||||
<layer role="metallic" texture="tiny0"/>
|
||||
<layer role="rgb" texture="tiny1"/>
|
||||
</material>
|
||||
</asset>
|
||||
<worldbody>
|
||||
@@ -873,8 +873,8 @@ TEST_F(XMLReaderTest, MaterialTextureFailTest) {
|
||||
<texture file="tiny0.png" type="2d" name="tiny0"/>
|
||||
<texture file="tiny1.png" type="2d" name="tiny1"/>
|
||||
<material name="material" texture="tiny1">
|
||||
<rgb texture="tiny1"/>
|
||||
<occlusion texture="tiny0"/>
|
||||
<layer role="rgb" texture="tiny1"/>
|
||||
<layer role="occlusion" texture="tiny0"/>
|
||||
</material>
|
||||
</asset>
|
||||
<worldbody>
|
||||
@@ -887,7 +887,7 @@ TEST_F(XMLReaderTest, MaterialTextureFailTest) {
|
||||
mjModel* m = LoadModelFromString(xml, error.data(), error.size());
|
||||
EXPECT_THAT(m, IsNull());
|
||||
EXPECT_THAT(error.data(), HasSubstr("A material with a texture attribute "
|
||||
"cannot have texture sub-elements"));
|
||||
"cannot have layer sub-elements"));
|
||||
}
|
||||
|
||||
TEST_F(XMLReaderTest, LargeTextureTest) {
|
||||
|
||||
Reference in New Issue
Block a user