add color to shader

This commit is contained in:
Piotr Goszczyński committed 2025-03-21 12:53:54 +01:00
1 parent 7316b0fd78
commit 5dee957f0b
1 file changed
+1 -3
@@ -111,13 +111,11 @@ void main() {
float grainSize = 3.0 + 4.0 * sin(time);
vec3 g = vec3(grain(vUv, resolution / grainSize, time));
float luminance = luma(stackedColor);
vec3 desaturated = vec3(luminance);
vec3 noiseColor = blendSoftLight(vec3(0.2,0.2,0.2), g);
float grainStrength = 0.02;
stackedColor = vec4(
mix(desaturated, noiseColor, grainStrength),
mix(stackedColor.rgb, noiseColor, grainStrength),
stackedColor.a
);