diff --git a/pxr/imaging/plugin/hdEmbree/light.cpp b/pxr/imaging/plugin/hdEmbree/light.cpp index b1555a5ba2..ee03567894 100644 --- a/pxr/imaging/plugin/hdEmbree/light.cpp +++ b/pxr/imaging/plugin/hdEmbree/light.cpp @@ -75,6 +75,8 @@ HdEmbree_Light::Sync(HdSceneDelegate *sceneDelegate, // Store luminance parameters _lightData.intensity = sceneDelegate->GetLightParamValue( id, HdLightTokens->intensity).GetWithDefault(1.0f); + _lightData.diffuse = sceneDelegate->GetLightParamValue( + id, HdLightTokens->diffuse).GetWithDefault(1.0f); _lightData.exposure = sceneDelegate->GetLightParamValue( id, HdLightTokens->exposure).GetWithDefault(0.0f); _lightData.color = sceneDelegate->GetLightParamValue( diff --git a/pxr/imaging/plugin/hdEmbree/light.h b/pxr/imaging/plugin/hdEmbree/light.h index 906ba185bc..2dd44d0898 100644 --- a/pxr/imaging/plugin/hdEmbree/light.h +++ b/pxr/imaging/plugin/hdEmbree/light.h @@ -68,6 +68,7 @@ struct HdEmbree_LightData GfMatrix4f xformWorldToLight; GfVec3f color; float intensity = 1.0f; + float diffuse = 1.0f; float exposure = 0.0f; float colorTemperature = 6500.0f; bool enableColorTemperature = false; diff --git a/pxr/imaging/plugin/hdEmbree/renderer.cpp b/pxr/imaging/plugin/hdEmbree/renderer.cpp index 276110c405..345f27a1d5 100644 --- a/pxr/imaging/plugin/hdEmbree/renderer.cpp +++ b/pxr/imaging/plugin/hdEmbree/renderer.cpp @@ -402,7 +402,9 @@ _SampleCylinder(GfMatrix4f const& xf, GfMatrix3f const& normalXform, GfVec3f _EvalLightBasic(HdEmbree_LightData const& light) { - GfVec3f Le = light.color * light.intensity * powf(2.0f, light.exposure); + // Our current material model is always 100% diffuse, so diffuse parameter + // is a stright multiplier + GfVec3f Le = light.color * light.intensity * light.diffuse * powf(2.0f, light.exposure); if (light.enableColorTemperature) { Le = GfCompMult(Le, _BlackbodyTemperatureAsRgb(light.colorTemperature));