Merge branch 'fix_clearing_empty_fbo' into 'master'

Don't clear FBOs with no attachments (#7716)

Closes #7716

See merge request OpenMW/openmw!3785
ini_importer_tests
Alexei Kotov 12 months ago
commit 0aafd74902

@ -662,6 +662,11 @@ namespace MWRender
for (const auto& name : pass->getRenderTargets())
{
if (name.empty())
{
continue;
}
auto& renderTarget = technique->getRenderTargetsMap()[name];
subPass.mStateSet->setTextureAttribute(subTexUnit, renderTarget.mTarget);
subPass.mStateSet->addUniform(new osg::Uniform(name.c_str(), subTexUnit));

@ -561,7 +561,7 @@ color buffer will accumulate.
source_format = rgb;
internal_format = rgb16f;
source_type = float;
clear_color = vec4(1,0,0,1);
clear_color = vec4(0,0,0,1);
}
fragment red(target=RT_Red,blend=(add, src_color, one), rt1=RT_Red) {

Loading…
Cancel
Save