diff --git a/internal/graphicsdriver/directx/pipeline_windows.go b/internal/graphicsdriver/directx/pipeline_windows.go index 5fe13386b..1f5e7df8f 100644 --- a/internal/graphicsdriver/directx/pipeline_windows.go +++ b/internal/graphicsdriver/directx/pipeline_windows.go @@ -175,7 +175,7 @@ float4 PSMain(PSInput input) : SV_TARGET { float2 pos = input.texcoord; float2 texel_size = 1.0 / source_size; - // Shift 1/512 [texel] to avoid the tie-breaking issue. + // Shift 1/512 [texel] to avoid the tie-breaking issue (#1212). // As all the vertex positions are aligned to 1/16 [pixel], this shiting should work in most cases. float2 p0 = pos - (texel_size) / 2.0 + (texel_size / 512.0); float2 p1 = pos + (texel_size) / 2.0 + (texel_size / 512.0); diff --git a/internal/graphicsdriver/metal/graphics_darwin.go b/internal/graphicsdriver/metal/graphics_darwin.go index 30df6d051..351b638d1 100644 --- a/internal/graphicsdriver/metal/graphics_darwin.go +++ b/internal/graphicsdriver/metal/graphics_darwin.go @@ -129,7 +129,7 @@ struct ColorFromTexel { inline float4 Do(VertexOut v, texture2d texture, constant float2& source_size, constant float4& source_region) { const float2 texel_size = 1 / source_size; - // Shift 1/512 [texel] to avoid the tie-breaking issue. + // Shift 1/512 [texel] to avoid the tie-breaking issue (#1212). // As all the vertex positions are aligned to 1/16 [pixel], this shiting should work in most cases. float2 p0 = v.tex - texel_size / 2.0 + (texel_size / 512.0); float2 p1 = v.tex + texel_size / 2.0 + (texel_size / 512.0); @@ -149,7 +149,7 @@ struct ColorFromTexel { inline float4 Do(VertexOut v, texture2d texture, constant float2& source_size, constant float4& source_region) { const float2 texel_size = 1 / source_size; - // Shift 1/512 [texel] to avoid the tie-breaking issue. + // Shift 1/512 [texel] to avoid the tie-breaking issue (#1212). // As all the vertex positions are aligned to 1/16 [pixel], this shiting should work in most cases. float2 p0 = v.tex - texel_size / 2.0 + (texel_size / 512.0); float2 p1 = v.tex + texel_size / 2.0 + (texel_size / 512.0); diff --git a/internal/graphicsdriver/opengl/defaultshader.go b/internal/graphicsdriver/opengl/defaultshader.go index 9b0cf1ae6..148f9b1e0 100644 --- a/internal/graphicsdriver/opengl/defaultshader.go +++ b/internal/graphicsdriver/opengl/defaultshader.go @@ -192,7 +192,7 @@ void main(void) { vec4 color; highp vec2 texel_size = 1.0 / source_size; - // Shift 1/512 [texel] to avoid the tie-breaking issue. + // Shift 1/512 [texel] to avoid the tie-breaking issue (#1212). // As all the vertex positions are aligned to 1/16 [pixel], this shiting should work in most cases. highp vec2 p0 = pos - (texel_size) / 2.0 + (texel_size / 512.0); highp vec2 p1 = pos + (texel_size) / 2.0 + (texel_size / 512.0);