| 182 | } |
| 183 | |
| 184 | static float3 GetLightColor(pxr::HdSceneDelegate& SceneDelegate, const pxr::SdfPath& Id) |
| 185 | { |
| 186 | float3 Color{1, 1, 1}; |
| 187 | |
| 188 | { |
| 189 | const pxr::VtValue ColorVal = SceneDelegate.GetLightParamValue(Id, pxr::HdLightTokens->color); |
| 190 | if (ColorVal.IsHolding<pxr::GfVec3f>()) |
| 191 | { |
| 192 | Color = ToFloat3(ColorVal.Get<pxr::GfVec3f>()); |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | { |
| 197 | const pxr::VtValue EnableColorTempVal = SceneDelegate.GetLightParamValue(Id, pxr::HdLightTokens->enableColorTemperature); |
| 198 | if (EnableColorTempVal.GetWithDefault<bool>(false)) |
| 199 | { |
| 200 | pxr::VtValue ColorTempVal = SceneDelegate.GetLightParamValue(Id, pxr::HdLightTokens->colorTemperature); |
| 201 | if (ColorTempVal.IsHolding<float>()) |
| 202 | { |
| 203 | float ColorTemp = ColorTempVal.Get<float>(); |
| 204 | float3 BlackbodyColor = BlackbodyTemperatureAsRgb(ColorTemp); |
| 205 | Color *= BlackbodyColor; |
| 206 | } |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | return Color; |
| 211 | } |
| 212 | |
| 213 | static float GetLightIntensity(pxr::HdSceneDelegate& SceneDelegate, const pxr::SdfPath& Id) |
| 214 | { |
no test coverage detected