1
0
Fork 0

Fix final blit in OpenGL when stereo rendering is used

This commit is contained in:
Bastiaan Olij 2025-06-10 14:47:07 +10:00
parent fc523ec5f6
commit a2e4aed449
1 changed files with 7 additions and 1 deletions

View File

@ -436,7 +436,13 @@ void RasterizerGLES3::_blit_render_target_to_screen(RID p_render_target, Display
glViewport(int(MIN(p1.x, p2.x)), int(MIN(p1.y, p2.y)), Math::abs(size.x), Math::abs(size.y));
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, rt->color);
GLenum target = rt->view_count > 1 ? GL_TEXTURE_2D_ARRAY : GL_TEXTURE_2D;
glBindTexture(target, rt->color);
glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glDisable(GL_CULL_FACE);
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ZERO);