| 50 | EnvironmentBase::EnvironmentBase() : FixedValues(propertySet()) {} |
| 51 | |
| 52 | void 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 | |
| 73 | END_AURORA |
nothing calls this directly
no test coverage detected