Adding glyphFlip and glyphRotation parameters.

This commit is contained in:
Rezmason
2024-09-10 21:41:59 -07:00
parent f14651c2b2
commit cee10bb1de
7 changed files with 37 additions and 14 deletions

View File

@@ -21,6 +21,8 @@ uniform bool showDebugView;
uniform bool volumetric;
uniform bool isolateCursor, isolateGlint;
uniform mat2 glyphTransform;
varying vec2 vUV;
varying vec4 vRaindrop, vSymbol, vEffect;
varying float vDepth;
@@ -110,6 +112,7 @@ vec2 getSymbol(vec2 uv, float index) {
// resolve UV to cropped position of glyph in MSDF texture
uv = fract(uv * vec2(numColumns, numRows));
uv -= 0.5;
uv = glyphTransform * uv;
uv *= clamp(1. - glyphEdgeCrop, 0., 1.);
uv += 0.5;
uv = (uv + getSymbolUV(index)) / glyphTextureGridSize;