summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2019-02-12 15:31:10 -0300
committerJuan Linietsky <reduzio@gmail.com>2019-02-12 15:31:10 -0300
commit0d0d074c4de70761e2824628db5984ece9a990d1 (patch)
tree5a36eb7042f17888169b690cd863c206bfec5494
parent4af8009b9d1e89a7811b427bdfa73503541227b7 (diff)
Use UVs with the nvidia rendering hack, fixes #24563
-rw-r--r--drivers/gles2/rasterizer_canvas_gles2.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gles2/rasterizer_canvas_gles2.cpp b/drivers/gles2/rasterizer_canvas_gles2.cpp
index 49b84895a7..72bc33e407 100644
--- a/drivers/gles2/rasterizer_canvas_gles2.cpp
+++ b/drivers/gles2/rasterizer_canvas_gles2.cpp
@@ -576,8 +576,15 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
}
} else {
+ static const Vector2 uvs[4] = {
+ Vector2(0.0, 0.0),
+ Vector2(0.0, 1.0),
+ Vector2(1.0, 1.0),
+ Vector2(1.0, 0.0),
+ };
+
state.canvas_shader.set_uniform(CanvasShaderGLES2::COLOR_TEXPIXEL_SIZE, Vector2());
- _draw_gui_primitive(4, points, NULL, NULL);
+ _draw_gui_primitive(4, points, NULL, uvs);
}
} else {