Add support in mjModel for tagging textures with different roles, and use the slot index of a texture to designate its role.
PiperOrigin-RevId: 654030065 Change-Id: I34a5b132a7f91a6bb8f260500c1b9c128a03b596
This commit is contained in:
committed by
Copybara-Service
parent
8a8a44a4db
commit
796173170c
@@ -63,7 +63,9 @@ static void settexture(int type, int state, const mjrContext* con, const mjvGeom
|
||||
float plane[4], scl[2];
|
||||
int texid = -1;
|
||||
if (geom) {
|
||||
texid = (geom->matid == -1) ? -1 : con->mat_texid[mjNTEXMAT * geom->matid];
|
||||
if (geom->matid >= 0) {
|
||||
texid = con->mat_texid[mjNTEXROLE * geom->matid + mjTEXROLE_RGB];
|
||||
}
|
||||
}
|
||||
|
||||
// shadow
|
||||
|
||||
Reference in New Issue
Block a user