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:
Tom Erez
2024-07-19 09:28:34 -07:00
committed by Copybara-Service
parent 8a8a44a4db
commit 796173170c
14 changed files with 99 additions and 27 deletions
+14 -2
View File
@@ -50,7 +50,6 @@ public const int mjNREF = 2;
public const int mjNIMP = 5;
public const int mjNSOLVER = 200;
public const int mjNISLAND = 20;
public const int mjNTEXMAT = 6;
public const bool THIRD_PARTY_MUJOCO_INCLUDE_MJPLUGIN_H_ = true;
public const bool mjEXTERNC = true;
public const bool THIRD_PARTY_MUJOCO_MJRENDER_H_ = true;
@@ -209,6 +208,19 @@ public enum mjtTexture : int{
mjTEXTURE_CUBE = 1,
mjTEXTURE_SKYBOX = 2,
}
public enum mjtTextureRole : int{
mjTEXROLE_USER = 0,
mjTEXROLE_RGB = 1,
mjTEXROLE_OCCLUSION = 2,
mjTEXROLE_ROUGHNESS = 3,
mjTEXROLE_METALLIC = 4,
mjTEXROLE_NORMAL = 5,
mjTEXROLE_OPACITY = 6,
mjTEXROLE_EMISSIVE = 7,
mjTEXROLE_RGBA = 8,
mjTEXROLE_ORM = 9,
mjNTEXROLE = 10,
}
public enum mjtIntegrator : int{
mjINT_EULER = 0,
mjINT_RK4 = 1,
@@ -5631,7 +5643,7 @@ public unsafe struct mjrContext_ {
public fixed uint auxFBO_r[10];
public fixed uint auxColor[10];
public fixed uint auxColor_r[10];
public fixed int mat_texid[600];
public fixed int mat_texid[1000];
public fixed int mat_texuniform[100];
public fixed int mat_texrepeat[200];
public int ntexture;