mirror of https://github.com/godotengine/godot
Fix final blit in OpenGL when stereo rendering is used
This commit is contained in:
parent
fc523ec5f6
commit
a2e4aed449
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue