summaryrefslogtreecommitdiffstats
path: root/virtual-programs
diff options
context:
space:
mode:
authorOmar Rizwan <omar@omar.website>2023-09-23 10:30:22 +0000
committerOmar Rizwan <omar@omar.website>2023-09-23 10:30:22 +0000
commitea152053ab9865991ef7b08cfbe67dc093210505 (patch)
tree6a0cfad400bcbd7caa5283af0d51dfd4ae06420a /virtual-programs
parentGpu/display: Move a lot of glyph logic into shader (diff)
downloadfolk-ea152053ab9865991ef7b08cfbe67dc093210505.tar.gz
folk-ea152053ab9865991ef7b08cfbe67dc093210505.zip
display: Fix glyph angles
Diffstat (limited to 'virtual-programs')
-rw-r--r--virtual-programs/display.folk8
1 files changed, 4 insertions, 4 deletions
diff --git a/virtual-programs/display.folk b/virtual-programs/display.folk
index d508748a..67f12767 100644
--- a/virtual-programs/display.folk
+++ b/virtual-programs/display.folk
@@ -137,10 +137,10 @@ On process {
float bottom = planeGlyphBounds[1] * em;
float right = planeGlyphBounds[2] * em;
float top = planeGlyphBounds[3] * em;
- vec2 a = pos + rotate(vec2(left, -top), radians);
- vec2 b = pos + rotate(vec2(right, -top), radians);
- vec2 c = pos + rotate(vec2(right, -bottom), radians);
- vec2 d = pos + rotate(vec2(left, -bottom), radians);
+ vec2 a = pos + rotate(vec2(left, -top), -radians);
+ vec2 b = pos + rotate(vec2(right, -top), -radians);
+ vec2 c = pos + rotate(vec2(right, -bottom), -radians);
+ vec2 d = pos + rotate(vec2(left, -bottom), -radians);
vec2 glyphUv = invBilinear(gl_FragCoord.xy, a, b, c, d);
if( max( abs(glyphUv.x-0.5), abs(glyphUv.y-0.5))>=0.5 ) {