mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-18 14:19:30 -07:00
Fixing a straight up broken shader
This commit is contained in:
@@ -175,19 +175,19 @@ const glyphVariable = gpuCompute.addVariable(
|
|||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
||||||
|
vec2 uv = vUV;
|
||||||
#ifdef isPolar
|
#ifdef isPolar
|
||||||
vec2 diff = vUV - vec2(0.5, 1.25);
|
vec2 diff = vUV - vec2(0.5, 1.25);
|
||||||
float radius = length(diff);
|
float radius = length(diff);
|
||||||
float angle = atan(diff.y, diff.x) + PI;
|
float angle = atan(diff.y, diff.x) + PI;
|
||||||
vec2 uv = vec2(angle / PI, 1.0 - pow(radius * 0.75, 0.6));
|
uv = vec2(angle / PI, 1.0 - pow(radius * 0.75, 0.6));
|
||||||
#elif isSlanted
|
#endif
|
||||||
|
#ifdef isSlanted
|
||||||
float angle = PI * 0.125;
|
float angle = PI * 0.125;
|
||||||
vec2 rotation = vec2(cos(angle), sin(angle));
|
vec2 rotation = vec2(cos(angle), sin(angle));
|
||||||
vec2 uv = vec2(
|
uv = vec2(
|
||||||
(vUV.x - 0.5) * rotation.x + (vUV.y - 0.5) * rotation.y,
|
(vUV.x - 0.5) * rotation.x + (vUV.y - 0.5) * rotation.y,
|
||||||
(vUV.y - 0.5) * rotation.x - (vUV.x - 0.5) * rotation.y) * 0.75 + 0.5;
|
(vUV.y - 0.5) * rotation.x - (vUV.x - 0.5) * rotation.y) * 0.75 + 0.5;
|
||||||
#else
|
|
||||||
vec2 uv = vUV;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Unpack the values from the glyph texture
|
// Unpack the values from the glyph texture
|
||||||
|
|||||||
Reference in New Issue
Block a user