소스 검색

Merge pull request #33427 from akien-mga/revert-shifting-32657

Partial revert of #32657, undoing line shifting by 0.5
Rémi Verschelde 5 년 전
부모
커밋
81c6a7e5f2
2개의 변경된 파일4개의 추가작업 그리고 8개의 파일을 삭제
  1. 2 4
      drivers/gles2/rasterizer_canvas_gles2.cpp
  2. 2 4
      drivers/gles3/rasterizer_canvas_gles3.cpp

+ 2 - 4
drivers/gles2/rasterizer_canvas_gles2.cpp

@@ -494,10 +494,8 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
 
 				if (line->width <= 1) {
 					Vector2 verts[2] = {
-						// Offset the line slightly to make sure we always draw the pixel at the from coordinate.
-						// Without this, corners of rectangles might be missing a pixel. (See diamond exit rule and #32657)
-						Vector2(Math::floor(line->from.x) + 0.5, Math::floor(line->from.y) + 0.5),
-						Vector2(Math::floor(line->to.x) + 0.5, Math::floor(line->to.y) + 0.5)
+						Vector2(line->from.x, line->from.y),
+						Vector2(line->to.x, line->to.y)
 					};
 
 #ifdef GLES_OVER_GL

+ 2 - 4
drivers/gles3/rasterizer_canvas_gles3.cpp

@@ -548,10 +548,8 @@ void RasterizerCanvasGLES3::_canvas_item_render_commands(Item *p_item, Item *cur
 
 				if (line->width <= 1) {
 					Vector2 verts[2] = {
-						// Offset the line slightly to make sure we always draw the pixel at the from coordinate.
-						// Without this, corners of rectangles might be missing a pixel. (See diamond exit rule and #32657)
-						Vector2(Math::floor(line->from.x) + 0.5, Math::floor(line->from.y) + 0.5),
-						Vector2(Math::floor(line->to.x) + 0.5, Math::floor(line->to.y) + 0.5)
+						Vector2(line->from.x, line->from.y),
+						Vector2(line->to.x, line->to.y)
 					};
 
 #ifdef GLES_OVER_GL