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

@@ -20,14 +20,15 @@ float4 shadeVideo(ShaderContext context)
float2 resolution = max(context.outputResolution, float2(1.0, 1.0));
float2 fragCoord = context.uv * resolution;
float2 p = fragCoord / resolution.y - offset;
float time = context.time * speed;
float seed = context.startupRandom;
float time = context.time * speed + seed * 41.0;
float3 color = float3(0.0, 0.0, 0.0);
float d = depth;
for (int i = 0; i <= 5; ++i)
{
float3 rayPosition = float3(0.0, 0.0, 5.0) + normalize(float3(p, -1.0)) * d;
float3 rayPosition = float3(seed * 0.7 - 0.35, 0.23 - seed * 0.46, 5.0) + normalize(float3(p, -1.0)) * d;
float rz = etherMap(rayPosition, time);
float f = clamp((rz - etherMap(rayPosition + float3(0.1, 0.1, 0.1), time)) * 0.5, -0.1, 1.0);
float3 light = baseColor.rgb + energyColor.rgb * 5.0 * f;