# HG changeset patch # User sam # Date 1734167429 -25200 # Node ID 675fe4c844e50121f68f4c81ba70d78afe9ccb27 # Parent a86de84f087f9d0dbf4c01450e513f46605a1e25 autocommit diff -r a86de84f087f -r 675fe4c844e5 semicongine/text.nim --- a/semicongine/text.nim Sat Dec 14 16:10:01 2024 +0700 +++ b/semicongine/text.nim Sat Dec 14 16:10:29 2024 +0700 @@ -98,14 +98,14 @@ const int[6] indices = int[](0, 1, 2, 2, 3, 0); const int[4] i_x = int[](0, 0, 2, 2); const int[4] i_y = int[](1, 3, 3, 1); -// const float epsilon = 0.000000000000001; -const float epsilon = 0.1; +const float epsilon = 0.000000000000001; +// const float epsilon = 0.1; void main() { int vertexI = indices[gl_VertexIndex]; vec3 pos = vec3(glyphData.pos[glyphIndex][i_x[vertexI]], glyphData.pos[glyphIndex][i_y[vertexI]], 0); vec2 uv = vec2(glyphData.uv[glyphIndex][i_x[vertexI]], glyphData.uv[glyphIndex][i_y[vertexI]]); - gl_Position = vec4(pos * scale + position, 1.0) + vec4(0, 0, 0, gl_VertexIndex * epsilon); + gl_Position = vec4(pos * scale + position, 1.0) + vec4(0, 0, gl_VertexIndex * epsilon, 0); fragmentUv = uv; fragmentColor = color; } """