MCPcopy Create free account
hub / github.com/DiligentGraphics/DiligentFX / GetLightExposedPower

Function GetLightExposedPower

Hydrogent/src/HnLight.cpp:226–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226static float GetLightExposedPower(pxr::HdSceneDelegate& SceneDelegate, const pxr::SdfPath& Id)
227{
228 float ExposedPower = 1;
229
230 const pxr::VtValue ExposureVal = SceneDelegate.GetLightParamValue(Id, pxr::HdLightTokens->exposure);
231 if (ExposureVal.IsHolding<float>())
232 {
233 float Exposure = ExposureVal.Get<float>();
234 ExposedPower = std::pow(2.0f, clamp(Exposure, -50.0f, 50.0f));
235 }
236
237 return ExposedPower;
238}
239
240// Returns the area of the maximum possible facing profile.
241static float GetLightArea(pxr::HdSceneDelegate& SceneDelegate, const pxr::SdfPath& Id, const pxr::TfToken LightType, float MetersPerUnit)

Callers 1

ApproximateAreaLightMethod · 0.85

Calls 1

GetLightParamValueMethod · 0.80

Tested by

no test coverage detected