# HG changeset patch # User sam # Date 1722853051 -25200 # Node ID 76ca976804d02c5a6a2caa9f876c4f2b7908c75d # Parent 9ff18be62a1eb26289d3ebca6160a28f23e34537 fix: scale x to keep aspect ratio instead of y diff -r 9ff18be62a1e -r 76ca976804d0 semicongine/text.nim --- a/semicongine/text.nim Sun Aug 04 23:52:37 2024 +0700 +++ b/semicongine/text.nim Mon Aug 05 17:17:31 2024 +0700 @@ -37,7 +37,7 @@ color {.ShaderOutput.}: Vec4f descriptorSets {.DescriptorSets.}: (TextboxDescriptorSet, ) vertexCode = """void main() { - gl_Position = vec4(position * vec3(1, textbox.aspectratio, 1) * textbox.scale + textbox.position, 1.0); + gl_Position = vec4(position * vec3(1 / textbox.aspectratio, 1, 1) * textbox.scale + textbox.position, 1.0); fragmentUv = uv; } """ fragmentCode = """void main() {