diff --git a/exts/cesium.omniverse/mdl/cesium.mdl b/exts/cesium.omniverse/mdl/cesium.mdl index 47bf9f678..2c0540e7f 100644 --- a/exts/cesium.omniverse/mdl/cesium.mdl +++ b/exts/cesium.omniverse/mdl/cesium.mdl @@ -55,8 +55,7 @@ export material cesium_material( roughness_factor: roughness_factor, emissive_factor: emissive_factor, alpha_mode: alpha_mode, - alpha_cutoff: alpha_cutoff, - vertex_color_name: string("vertexColor") + alpha_cutoff: alpha_cutoff ); } in material( diff --git a/src/core/include/cesium/omniverse/Tokens.h b/src/core/include/cesium/omniverse/Tokens.h index 4db73bb05..d3aa739b2 100644 --- a/src/core/include/cesium/omniverse/Tokens.h +++ b/src/core/include/cesium/omniverse/Tokens.h @@ -50,7 +50,6 @@ __pragma(warning(push)) __pragma(warning(disable : 4003)) (sourceAsset) \ (subdivisionScheme) \ (vertex) \ - (vertexColor) \ (_cesium_localToEcefTransform) \ (_cesium_tilesetId) \ (_deletedPrims) \ @@ -106,6 +105,7 @@ __pragma(warning(push)) __pragma(warning(disable : 4003)) ((outputs_mdl_surface, "outputs:mdl:surface")) \ ((outputs_mdl_volume, "outputs:mdl:volume")) \ ((outputs_out, "outputs:out")) \ + ((primvars_displayColor, "primvars:displayColor")) \ ((primvars_normals, "primvars:normals")) \ ((primvars_st_0, "primvars:st_0")) \ ((primvars_st_1, "primvars:st_1")) \ @@ -117,7 +117,6 @@ __pragma(warning(push)) __pragma(warning(disable : 4003)) ((primvars_st_7, "primvars:st_7")) \ ((primvars_st_8, "primvars:st_8")) \ ((primvars_st_9, "primvars:st_9")) \ - ((primvars_vertexColor, "primvars:vertexColor")) \ ((xformOp_transform_cesium, "xformOp:transform:cesium")) TF_DECLARE_PUBLIC_TOKENS(UsdTokens, USD_TOKENS); @@ -218,7 +217,7 @@ const omni::fabric::Type inputs_alpha_cutoff(omni::fabric::BaseDataType::eFloat, const omni::fabric::Type inputs_alpha_mode(omni::fabric::BaseDataType::eInt, 1, 0, omni::fabric::AttributeRole::eNone); const omni::fabric::Type inputs_base_alpha(omni::fabric::BaseDataType::eFloat, 1, 0, omni::fabric::AttributeRole::eNone); const omni::fabric::Type inputs_base_color_factor(omni::fabric::BaseDataType::eFloat, 3, 0, omni::fabric::AttributeRole::eColor); -const omni::fabric::Type inputs_debug_color(omni::fabric::BaseDataType::eFloat, 3, 0, omni::fabric::AttributeRole::eNone); +const omni::fabric::Type inputs_debug_color(omni::fabric::BaseDataType::eFloat, 3, 0, omni::fabric::AttributeRole::eColor); const omni::fabric::Type inputs_emissive_factor(omni::fabric::BaseDataType::eFloat, 3, 0, omni::fabric::AttributeRole::eColor); const omni::fabric::Type inputs_excludeFromWhiteMode(omni::fabric::BaseDataType::eBool, 1, 0, omni::fabric::AttributeRole::eNone); const omni::fabric::Type inputs_metallic_factor(omni::fabric::BaseDataType::eFloat, 1, 0, omni::fabric::AttributeRole::eNone); @@ -239,9 +238,9 @@ const omni::fabric::Type outputs_out(omni::fabric::BaseDataType::eToken, 1, 0, o const omni::fabric::Type points(omni::fabric::BaseDataType::eFloat, 3, 1, omni::fabric::AttributeRole::ePosition); const omni::fabric::Type primvarInterpolations(omni::fabric::BaseDataType::eToken, 1, 1, omni::fabric::AttributeRole::eNone); const omni::fabric::Type primvars(omni::fabric::BaseDataType::eToken, 1, 1, omni::fabric::AttributeRole::eNone); +const omni::fabric::Type primvars_displayColor(omni::fabric::BaseDataType::eFloat, 3, 1, omni::fabric::AttributeRole::eColor); const omni::fabric::Type primvars_normals(omni::fabric::BaseDataType::eFloat, 3, 1, omni::fabric::AttributeRole::eNormal); const omni::fabric::Type primvars_st(omni::fabric::BaseDataType::eFloat, 2, 1, omni::fabric::AttributeRole::eTexCoord); -const omni::fabric::Type primvars_vertexColor(omni::fabric::BaseDataType::eFloat, 3, 1, omni::fabric::AttributeRole::eColor); const omni::fabric::Type Shader(omni::fabric::BaseDataType::eTag, 1, 0, omni::fabric::AttributeRole::ePrimTypeName); const omni::fabric::Type subdivisionScheme(omni::fabric::BaseDataType::eToken, 1, 0, omni::fabric::AttributeRole::eNone); const omni::fabric::Type _cesium_localToEcefTransform(omni::fabric::BaseDataType::eDouble, 16, 0, omni::fabric::AttributeRole::eMatrix); diff --git a/src/core/src/FabricGeometry.cpp b/src/core/src/FabricGeometry.cpp index 3ef1a7b10..5238a1258 100644 --- a/src/core/src/FabricGeometry.cpp +++ b/src/core/src/FabricGeometry.cpp @@ -153,7 +153,7 @@ void FabricGeometry::initialize() { } if (hasVertexColors) { - attributes.addAttribute(FabricTypes::primvars_vertexColor, FabricTokens::primvars_vertexColor); + attributes.addAttribute(FabricTypes::primvars_displayColor, FabricTokens::primvars_displayColor); } attributes.createAttributes(_path); @@ -205,7 +205,7 @@ void FabricGeometry::initialize() { } if (hasVertexColors) { - primvarsFabric[primvarIndexVertexColor] = FabricTokens::primvars_vertexColor; + primvarsFabric[primvarIndexVertexColor] = FabricTokens::primvars_displayColor; primvarInterpolationsFabric[primvarIndexVertexColor] = FabricTokens::vertex; } } @@ -251,7 +251,7 @@ void FabricGeometry::reset() { } if (hasVertexColors) { - srw.setArrayAttributeSize(_path, FabricTokens::primvars_vertexColor, 0); + srw.setArrayAttributeSize(_path, FabricTokens::primvars_displayColor, 0); } } @@ -307,9 +307,9 @@ void FabricGeometry::setGeometry( gsl::span vertexColorsSpan(vertexColorsData); if (hasVertexColors) { vertexColors.fill(vertexColorsSpan); - srw.setArrayAttributeSize(_path, FabricTokens::primvars_vertexColor, numVoxels * 8); + srw.setArrayAttributeSize(_path, FabricTokens::primvars_displayColor, numVoxels * 8); } - auto vertexColorsFabric = srw.getArrayAttributeWr(_path, FabricTokens::primvars_vertexColor); + auto vertexColorsFabric = srw.getArrayAttributeWr(_path, FabricTokens::primvars_displayColor); size_t vertIndex = 0; size_t vertexCountsIndex = 0; @@ -427,9 +427,9 @@ void FabricGeometry::setGeometry( } if (hasVertexColors) { - srw.setArrayAttributeSize(_path, FabricTokens::primvars_vertexColor, vertexColors.size()); + srw.setArrayAttributeSize(_path, FabricTokens::primvars_displayColor, vertexColors.size()); - auto vertexColorsFabric = srw.getArrayAttributeWr(_path, FabricTokens::primvars_vertexColor); + auto vertexColorsFabric = srw.getArrayAttributeWr(_path, FabricTokens::primvars_displayColor); vertexColors.fill(vertexColorsFabric); }