From 0d0d074c4de70761e2824628db5984ece9a990d1 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 12 Feb 2019 15:31:10 -0300 Subject: Use UVs with the nvidia rendering hack, fixes #24563 --- drivers/gles2/rasterizer_canvas_gles2.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'drivers/gles2/rasterizer_canvas_gles2.cpp') 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 { -- cgit v1.2.3