MCPcopy Create free account
hub / github.com/Autodesk/Aurora / updateGPUStruct

Method updateGPUStruct

Libraries/Aurora/Source/EnvironmentBase.cpp:52–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50EnvironmentBase::EnvironmentBase() : FixedValues(propertySet()) {}
51
52void EnvironmentBase::updateGPUStruct(EnvironmentData& data)
53{
54 data.lightTop = _values.asFloat3("light_top");
55 data.lightBottom = _values.asFloat3("light_bottom");
56 data.lightTransform = transpose(_values.asMatrix("light_transform"));
57 data.lightTransformInv = transpose(inverse(_values.asMatrix("light_transform")));
58 data.backgroundTop = _values.asFloat3("background_top");
59 data.backgroundBottom = _values.asFloat3("background_bottom");
60 data.backgroundTransform = transpose(_values.asMatrix("background_transform"));
61 data.backgroundUseScreen = _values.asBoolean("background_use_screen") ? 1 : 0;
62 data.hasBackgroundTex = _values.asImage("background_image") ? 1 : 0;
63
64 shared_ptr<ImageBase> pLightTex =
65 dynamic_pointer_cast<ImageBase>(_values.asImage("light_image"));
66 data.hasLightTex = pLightTex ? 1 : 0;
67 if (pLightTex)
68 {
69 data.lightTexLuminanceIntegral = pLightTex->luminanceIntegral();
70 }
71}
72
73END_AURORA

Callers

nothing calls this directly

Calls 4

asFloat3Method · 0.80
asBooleanMethod · 0.80
asImageMethod · 0.80
luminanceIntegralMethod · 0.80

Tested by

no test coverage detected