diff options
| author | skal <pascal.massimino@gmail.com> | 2026-03-10 21:47:56 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-03-10 21:47:56 +0100 |
| commit | 58112b4fbc95d188ce2c001f84a810b2c57fe3c2 (patch) | |
| tree | c2486e67e077100a7415bf6257e59d94c6115f5a /src/effects | |
| parent | 3e9c66284b7a0f09a747c52cf9334c39c14b71de (diff) | |
change dither_c64() signature to take 'dimension' directly
Diffstat (limited to 'src/effects')
| -rw-r--r-- | src/effects/rotating_cube.wgsl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/effects/rotating_cube.wgsl b/src/effects/rotating_cube.wgsl index abd584c..fcb4774 100644 --- a/src/effects/rotating_cube.wgsl +++ b/src/effects/rotating_cube.wgsl @@ -89,6 +89,7 @@ fn get_cube_normal(vid: u32) -> vec3f { let ambient = 0.3; let lighting = ambient + diffuse * 0.7; - let color = object.color.rgb * lighting; - return rgba_to_luma_chroma_phase(vec4f(color, 1.0), screen_uv.y, 264.); + var color = object.color * lighting; + color = dither_c64(color, screen_uv, uniforms.resolution / 2.); + return rgba_to_luma_chroma_phase(color, screen_uv.y, 264.); } |
