added random seed
All checks were successful
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 1m33s
CI / Windows Release Package (push) Successful in 2m11s

This commit is contained in:
2026-05-08 13:38:27 +10:00
parent 5eff189bbf
commit 7035cde8c8
10 changed files with 35 additions and 29 deletions

View File

@@ -29,7 +29,8 @@ float4 shadeVideo(ShaderContext context)
float2 velocityPx = float2(
max(20.0, bounceSpeed * minDimension * 1.00),
max(24.0, bounceSpeed * minDimension * 0.77));
float2 motionPx = context.time * velocityPx;
float seed = context.startupRandom;
float2 motionPx = (float2(context.time, context.time) + float2(seed * 32.7, seed * 40.3)) * velocityPx;
float2 centerPx = minCenterPx + float2(
pingPong(motionPx.x, travelPx.x),
pingPong(motionPx.y, travelPx.y));
@@ -38,7 +39,7 @@ float4 shadeVideo(ShaderContext context)
int yHits = int(floor(motionPx.y / max(travelPx.y, 1.0)));
int totalHits = max(0, xHits + yHits);
float hue = frac(0.09 + float(totalHits) * 0.173);
float hue = frac(0.09 + seed * 0.71 + float(totalHits) * 0.173);
float3 badgeColor = hsvToRgb(float3(hue, 0.86, 1.0));
float3 glowColor = hsvToRgb(float3(frac(hue + 0.06), 0.72, 1.0));