Migrated changes to WebGPU

This commit is contained in:
Rezmason
2022-09-16 21:08:00 -07:00
parent ab280a95d3
commit 9ab9924294
15 changed files with 181 additions and 179 deletions

View File

@@ -24,11 +24,11 @@ vec4 getBrightness(vec2 uv) {
void main() {
vec3 color = texture2D(stripes, vUV).rgb;
// Combine the texture and bloom
vec4 brightness = getBrightness(vUV);
// Dither: subtract a random value from the brightness
brightness = brightness - rand( gl_FragCoord.xy, time ) * ditherMagnitude;
brightness -= rand( gl_FragCoord.xy, time ) * ditherMagnitude;
gl_FragColor = vec4(
color * brightness.r