1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-04-04 11:06:41 +00:00

lightmanager.cpp ()

This commit is contained in:
Bo Svensson 2021-09-18 16:21:11 +00:00 committed by GitHub
parent 68db9869f5
commit 179f91276a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1204,7 +1204,6 @@ namespace SceneUtil
const std::vector<LightManager::LightSourceViewBound>& LightManager::getLightsInViewSpace(osg::Camera *camera, const osg::RefMatrix* viewMatrix, size_t frameNum) const std::vector<LightManager::LightSourceViewBound>& LightManager::getLightsInViewSpace(osg::Camera *camera, const osg::RefMatrix* viewMatrix, size_t frameNum)
{ {
bool isReflection = isReflectionCamera(camera);
osg::observer_ptr<osg::Camera> camPtr (camera); osg::observer_ptr<osg::Camera> camPtr (camera);
auto it = mLightsInViewSpace.find(camPtr); auto it = mLightsInViewSpace.find(camPtr);
@ -1212,6 +1211,8 @@ namespace SceneUtil
{ {
it = mLightsInViewSpace.insert(std::make_pair(camPtr, LightSourceViewBoundCollection())).first; it = mLightsInViewSpace.insert(std::make_pair(camPtr, LightSourceViewBoundCollection())).first;
bool isReflection = isReflectionCamera(camera);
for (const auto& transform : mLights) for (const auto& transform : mLights)
{ {
osg::Matrixf worldViewMat = transform.mWorldMatrix * (*viewMatrix); osg::Matrixf worldViewMat = transform.mWorldMatrix * (*viewMatrix);