added random seed
This commit is contained in:
@@ -14,13 +14,14 @@ float4 shadeVideo(ShaderContext context)
|
||||
float safeScale = max(scale, 0.001);
|
||||
float safeRingRadius = max(ringRadius, 0.001);
|
||||
float safeTightness = max(tightness, 0.001);
|
||||
float time = context.time * speed;
|
||||
float seed = context.startupRandom;
|
||||
float time = context.time * speed + seed * 37.0;
|
||||
|
||||
float2 p = (fragCoord + fragCoord - resolution) / resolution.y / safeScale;
|
||||
p -= center;
|
||||
p -= center + float2(sin(seed * 6.2831853), cos(seed * 6.2831853)) * 0.035;
|
||||
|
||||
float iterator = 0.2;
|
||||
float2 diagonal = float2(-1.0, 1.0);
|
||||
float2 diagonal = normalize(float2(-1.0 + seed * 0.5, 1.0 - seed * 0.35));
|
||||
float2 blackholeCenter = p - iterator * diagonal;
|
||||
float gravity = iterator * strength / max(dot(blackholeCenter, blackholeCenter), 0.0001);
|
||||
float2 skew = diagonal / (0.1 + gravity);
|
||||
|
||||
Reference in New Issue
Block a user