瀏覽代碼

Ignore destination alpha when blitting to window in compatibility renderer

clayjohn 5 月之前
父節點
當前提交
eb4f3a82a3
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/gles3/rasterizer_gles3.cpp

+ 3 - 0
drivers/gles3/rasterizer_gles3.cpp

@@ -437,6 +437,9 @@ void RasterizerGLES3::_blit_render_target_to_screen(RID p_render_target, Display
 
 	glActiveTexture(GL_TEXTURE0);
 	glBindTexture(GL_TEXTURE_2D, rt->color);
+	glEnable(GL_BLEND);
+	glBlendFunc(GL_ONE, GL_ZERO);
+
 	if (rt->view_count > 1) {
 		copy_effects->copy_to_rect_3d(screenrect, p_layer, GLES3::Texture::TYPE_LAYERED);
 	} else {