added random seed
This commit is contained in:
@@ -161,15 +161,16 @@ float3 blurVhs(float2 uv, float d, int sampleCount)
|
||||
float4 shadeVideo(ShaderContext context)
|
||||
{
|
||||
float2 uv = context.uv;
|
||||
float framecount = frac(context.time * wiggleSpeed / 7.0) * 7.0;
|
||||
float time = context.time + context.startupRandom * 113.0;
|
||||
float framecount = frac(time * wiggleSpeed / 7.0) * 7.0;
|
||||
int sampleCount = int(clamp(blurSamples, 3.0, 15.0) + 0.5);
|
||||
|
||||
float d = 0.1 - round(frac(context.time / 3.0)) * 0.1;
|
||||
float d = 0.1 - round(frac(time / 3.0)) * 0.1;
|
||||
uv = jumpy(uv, framecount);
|
||||
float s = 0.0001 * -d + 0.0001 * wiggle * sin(context.time * wiggleSpeed);
|
||||
float s = 0.0001 * -d + 0.0001 * wiggle * sin(time * wiggleSpeed);
|
||||
float e = min(0.30, pow(max(0.0, cos(uv.y * 4.0 + 0.3) - 0.75) * (s + 0.5), 3.0)) * 25.0;
|
||||
float r = 250.0 * (2.0 * s);
|
||||
uv.x += abs(r * pow(min(0.003, (-uv.y + (0.01 * frac(context.time / 5.0) * 5.0))) * 3.0, 2.0)) * wiggle;
|
||||
uv.x += abs(r * pow(min(0.003, (-uv.y + (0.01 * frac(time / 5.0) * 5.0))) * 3.0, 2.0)) * wiggle;
|
||||
|
||||
d = 0.051 + abs(sin(s / 4.0));
|
||||
float c = max(0.0001, 0.002 * d) * smear;
|
||||
@@ -212,7 +213,7 @@ float4 shadeVideo(ShaderContext context)
|
||||
color = lerp(color, bloomSource, bloomAmount * 0.18);
|
||||
color += bloomSource * float3(1.0, 0.96, 0.92) * bloomMask * 0.24;
|
||||
|
||||
float3 speckle = animatedChromaGrain(context.uv, context.time, context.outputResolution, noiseSize);
|
||||
float3 speckle = animatedChromaGrain(context.uv, time, context.outputResolution, noiseSize);
|
||||
float luma = dot(color, float3(0.299, 0.587, 0.114));
|
||||
float noiseMask = lerp(0.65, 1.0, 1.0 - saturate(luma));
|
||||
float chunkiness = lerp(1.0, 2.4, saturate((noiseSize - 1.0) / 5.0));
|
||||
@@ -221,7 +222,7 @@ float4 shadeVideo(ShaderContext context)
|
||||
color.rg = lerp(color.rg, float2(color.r, color.g) + speckle.xy * noiseAmount * 0.2 * chunkiness, 0.35);
|
||||
color.b = lerp(color.b, color.b + speckle.z * noiseAmount * 0.28 * chunkiness, 0.5);
|
||||
|
||||
float3 staticNoise = analogStatic(context.uv, context.time, context.outputResolution);
|
||||
float3 staticNoise = analogStatic(context.uv, time, context.outputResolution);
|
||||
float staticMask = lerp(0.45, 1.15, 1.0 - saturate(luma));
|
||||
color += staticNoise * staticAmount * staticMask;
|
||||
color = lerp(color, color + float3(staticNoise.r * 0.22, staticNoise.g * 0.08, -staticNoise.b * 0.08), saturate(staticAmount * 2.0));
|
||||
|
||||
Reference in New Issue
Block a user