summaryrefslogtreecommitdiff
path: root/src/shaders/math
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-03-10 09:33:41 +0100
committerskal <pascal.massimino@gmail.com>2026-03-10 09:33:41 +0100
commit7ca40818e3d0401f97efae6fe876038df4f5bd00 (patch)
tree455d124beba7b08ffbb482bff49963ad5cdbdcbd /src/shaders/math
parentef205b6eda78f1dcf65aa696dedf1f8c0707ff30 (diff)
rotating_cube: use VSOut, and store to yiq
Diffstat (limited to 'src/shaders/math')
-rw-r--r--src/shaders/math/color_c64.wgsl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shaders/math/color_c64.wgsl b/src/shaders/math/color_c64.wgsl
index e1b142e..60fde28 100644
--- a/src/shaders/math/color_c64.wgsl
+++ b/src/shaders/math/color_c64.wgsl
@@ -1,5 +1,5 @@
// C64 palette, ordered-dither quantization, and border color animation.
-// Provides Dither() and get_border_c64() for NTSC and retro post-process effects.
+// Provides dither_c64() and get_border_c64() for NTSC and retro post-process effects.
#include "math/noise"
const NUM_COLORS : u32 = 16;
@@ -45,7 +45,7 @@ fn colorDistance(color: vec4f, c1: vec4f, c2: vec4f, frac: f32) -> f32 {
// Quantize col to the nearest C64 color pair using 8x8 Bayer dithering.
// xsize/ysize: virtual pixel grid dimensions (e.g. 54.*8., 33.*8.).
-fn Dither(col: vec4f, uv: vec2f, xsize: f32, ysize: f32) -> vec4f {
+fn dither_c64(col: vec4f, uv: vec2f, xsize: f32, ysize: f32) -> vec4f {
let ix = u32(floor(uv.x * xsize / 2.)) % 8;
let iy = u32(floor(uv.y * ysize / 2.)) % 8;
let thresh = f32(BAYER_8X8[ix + 8 * iy]) / 64.;