fixed shader function formatting

This commit is contained in:
Emile Clark-Boman 2025-08-02 00:19:08 +10:00
parent 6165da9875
commit f11ab29328

View file

@ -296,8 +296,7 @@ float vt220Font(vec2 p, float c) {
// smokeNoise(...) is for the main noise generation algorithm (very tunable) // smokeNoise(...) is for the main noise generation algorithm (very tunable)
// https://www.shadertoy.com/view/MsdGWn // https://www.shadertoy.com/view/MsdGWn
// //
float textLines(vec2 uvG) float textLines(vec2 uvG) {
{
float wt = 5. * (iTime + 0.5*sin(iTime*1.4) + 0.2*sin(iTime*2.9)); // wobbly time float wt = 5. * (iTime + 0.5*sin(iTime*1.4) + 0.2*sin(iTime*2.9)); // wobbly time
vec2 uvGt = uvG + vec2(0., floor(wt)); vec2 uvGt = uvG + vec2(0., floor(wt));
float ll = rand(vec2(uvGt.y, - 1.)) * ROWCOLS.x; // line length float ll = rand(vec2(uvGt.y, - 1.)) * ROWCOLS.x; // line length
@ -354,8 +353,7 @@ inline float bloom(vec2 uv2) {
* smoothstep(0., -SMOOTH*20., stdRS(uvC, -0.02)) * 0.5; * smoothstep(0., -SMOOTH*20., stdRS(uvC, -0.02)) * 0.5;
} }
void mainImage( out vec4 fragColor, in vec2 fragCoord ) void mainImage(out vec4 fragColor, in vec2 fragCoord) {
{
vec2 uv = vec2(fragCoord.x, iResolution.y - fragCoord.y); vec2 uv = vec2(fragCoord.x, iResolution.y - fragCoord.y);
vec2 uvT = ROWCOLS * FONT_SIZE * uv / iResolution.xy; vec2 uvT = ROWCOLS * FONT_SIZE * uv / iResolution.xy;
vec2 uvG = floor(ROWCOLS * uv / iResolution.xy); vec2 uvG = floor(ROWCOLS * uv / iResolution.xy);