From 46a1715d8a63230c04755a39c34cddae8f6e6fb2 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Fri, 26 Feb 2021 20:10:58 +0000 Subject: [PATCH] Actually return something --- components/sceneutil/util.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/sceneutil/util.cpp b/components/sceneutil/util.cpp index 8a381681b1..fa3c7d26da 100644 --- a/components/sceneutil/util.cpp +++ b/components/sceneutil/util.cpp @@ -265,7 +265,8 @@ bool attachAlphaToCoverageFriendlyFramebufferToCamera(osg::Camera* camera, osg:: { unsigned int samples = 0; unsigned int colourSamples = 0; - if (Settings::Manager::getBool("antialias alpha test", "Shaders") && Settings::Manager::getInt("antialiasing", "Video") > 1) + bool addMSAAIntermediateTarget = Settings::Manager::getBool("antialias alpha test", "Shaders") && Settings::Manager::getInt("antialiasing", "Video") > 1; + if (addMSAAIntermediateTarget) { // Alpha-to-coverage requires a multisampled framebuffer. // OSG will set that up automatically and resolve it to the specified single-sample texture for us. @@ -274,6 +275,7 @@ bool attachAlphaToCoverageFriendlyFramebufferToCamera(osg::Camera* camera, osg:: colourSamples = 1; } camera->attach(buffer, texture, level, face, mipMapGeneration, samples, colourSamples); + return addMSAAIntermediateTarget; } }