summaryrefslogtreecommitdiff
path: root/workspaces
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-03-22 20:10:53 +0100
committerskal <pascal.massimino@gmail.com>2026-03-22 20:10:53 +0100
commitaa5c8e6730b03ea901ead59bc7cb1c31dac62012 (patch)
tree989378b4eeeaa568e437b9f5cc0b7c5a96e23e79 /workspaces
parent9bf9b0aa0573f77bd667e6976a8bb413153daa1d (diff)
refactor(shaders): extract oct-normal encode/decode into math/normal snippet
New src/shaders/math/normal.wgsl: oct_encode, oct_decode, oct_encode_unorm, oct_decode_unorm. Registered in InitShaderComposer as "math/normal". Removed inline copies from gbuf_raster.wgsl and gbuf_pack.wgsl. 18/18 tests passing.
Diffstat (limited to 'workspaces')
-rw-r--r--workspaces/main/assets.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/workspaces/main/assets.txt b/workspaces/main/assets.txt
index 4a71aac..d436319 100644
--- a/workspaces/main/assets.txt
+++ b/workspaces/main/assets.txt
@@ -79,6 +79,7 @@ SHADER_RENDER_FULLSCREEN_UV_VS, WGSL, ../../src/shaders/render/fullscreen_uv_vs.
SHADER_MATH_COLOR, WGSL, ../../src/shaders/math/color.wgsl, "Color Functions"
SHADER_MATH_COLOR_C64, WGSL, ../../src/shaders/math/color_c64.wgsl, "C64 Palette and Bayer Dither"
SHADER_MATH_UTILS, WGSL, ../../src/shaders/math/utils.wgsl, "Math Utilities"
+SHADER_MATH_NORMAL, WGSL, ../../src/shaders/math/normal.wgsl, "Octahedral normal encode/decode"
SHADER_RENDER_RAYMARCHING, WGSL, ../../src/shaders/render/raymarching.wgsl, "Raymarching Functions"
SHADER_RENDER_RAYMARCHING_ID, WGSL, ../../src/shaders/render/raymarching_id.wgsl, "Raymarching-ID Functions"
SHADER_VIGNETTE, WGSL, ../../src/effects/vignette.wgsl, "Vignette Shader"