From 7e4450da554f286e0b499029de27765224d58bc2 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 7 Mar 2017 16:55:05 +0100 Subject: [PATCH] Change the renderOrder of composite maps to ensure they are updated before water reflections or other cameras that may be using it. --- components/terrain/chunkmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/terrain/chunkmanager.cpp b/components/terrain/chunkmanager.cpp index 64708cdf3..ab660dfb9 100644 --- a/components/terrain/chunkmanager.cpp +++ b/components/terrain/chunkmanager.cpp @@ -94,7 +94,7 @@ osg::ref_ptr ChunkManager::createCompositeMapRTT(osg::ref_ptrsetClearColor(osg::Vec4(0.f, 0.f, 0.f, 1.f)); camera->setClearMask(GL_COLOR_BUFFER_BIT); camera->setViewport(0, 0, mCompositeMapSize, mCompositeMapSize); - camera->setRenderOrder(osg::Camera::PRE_RENDER); + camera->setRenderOrder(osg::Camera::PRE_RENDER, -1); camera->setImplicitBufferAttachmentMask(osg::DisplaySettings::IMPLICIT_COLOR_BUFFER_ATTACHMENT); // no need for a depth buffer return camera;