fix GLES2 line rendering

fixes #17147
This commit is contained in:
karroffel 2018-03-02 11:25:54 +01:00
parent ccc6897215
commit 8b82f4ad2e

View file

@ -405,6 +405,8 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
Rect2 dst_rect = Rect2(r->rect.position, r->rect.size); Rect2 dst_rect = Rect2(r->rect.position, r->rect.size);
state.canvas_shader.set_uniform(CanvasShaderGLES2::COLOR_TEXPIXEL_SIZE, texpixel_size);
if (dst_rect.size.width < 0) { if (dst_rect.size.width < 0) {
dst_rect.position.x += dst_rect.size.width; dst_rect.position.x += dst_rect.size.width;
dst_rect.size.width *= -1; dst_rect.size.width *= -1;
@ -633,7 +635,7 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
Item::CommandPolygon *polygon = static_cast<Item::CommandPolygon *>(command); Item::CommandPolygon *polygon = static_cast<Item::CommandPolygon *>(command);
state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_TEXTURE_RECT, false); state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_TEXTURE_RECT, false);
state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_UV_ATTRIBUTE, false); state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_UV_ATTRIBUTE, true);
if (state.canvas_shader.bind()) if (state.canvas_shader.bind())
_set_uniforms(); _set_uniforms();