mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Use legacy call when rendering to a single texture
Fixes depth buffer in when undersampling > 1
This commit is contained in:
parent
579fc93c24
commit
1e96403954
1 changed files with 7 additions and 0 deletions
|
@ -168,6 +168,13 @@ void TextureBufferOutput::activate(PipelineContext &context)
|
||||||
size = texture->getSize();
|
size = texture->getSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use legacy call when there's single texture without depth texture
|
||||||
|
// This binds default depth buffer to the FBO
|
||||||
|
if (textures.size() == 1 && depth_stencil == NO_DEPTH_TEXTURE) {
|
||||||
|
driver->setRenderTarget(textures[0], m_clear, m_clear, context.clear_color);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
video::ITexture *depth_texture = nullptr;
|
video::ITexture *depth_texture = nullptr;
|
||||||
if (depth_stencil != NO_DEPTH_TEXTURE)
|
if (depth_stencil != NO_DEPTH_TEXTURE)
|
||||||
depth_texture = buffer->getTexture(depth_stencil);
|
depth_texture = buffer->getTexture(depth_stencil);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue