diff options
| -rw-r--r-- | doc/CODING_STYLE.md | 18 | ||||
| -rw-r--r-- | src/effects/ntsc.wgsl | 2 |
2 files changed, 20 insertions, 0 deletions
diff --git a/doc/CODING_STYLE.md b/doc/CODING_STYLE.md index ba3fcb5..7d45027 100644 --- a/doc/CODING_STYLE.md +++ b/doc/CODING_STYLE.md @@ -166,6 +166,24 @@ Three-line header for all source files. ## WGSL Shader Style +### File Header (Required) + +Every `.wgsl` file must start with a 2-line comment header: + +```wgsl +// Line 1: What the shader/snippet does (one sentence). +// Line 2: Role, main outputs, or public API surface. +``` + +Example: +```wgsl +// NTSC post-process effect: fisheye distortion, scanlines, and color bleeding. +// Produces a retro CRT/NTSC look using YIQ color space and C64-style dithering. +``` + +--- + + ### Return vs Pointer Parameters **Rule:** Prefer return values over pointer parameters for small structs (≤16 bytes). diff --git a/src/effects/ntsc.wgsl b/src/effects/ntsc.wgsl index ea2fb59..e0182f3 100644 --- a/src/effects/ntsc.wgsl +++ b/src/effects/ntsc.wgsl @@ -1,3 +1,5 @@ +// NTSC post-process effect: fisheye distortion, scanlines, and color bleeding. +// Produces a retro CRT/NTSC look using YIQ color space and C64-style dithering. #include "sequence_uniforms" #include "render/fullscreen_uv_vs" #include "math/noise" |
