summaryrefslogtreecommitdiff
path: root/src/effects
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 /src/effects
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 'src/effects')
-rw-r--r--src/effects/shaders.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/effects/shaders.cc b/src/effects/shaders.cc
index 7a68e5f..a6c1b64 100644
--- a/src/effects/shaders.cc
+++ b/src/effects/shaders.cc
@@ -35,6 +35,7 @@ void InitShaderComposer() {
register_if_exists("math/common_utils",
AssetId::ASSET_SHADER_MATH_COMMON_UTILS);
register_if_exists("math/noise", AssetId::ASSET_SHADER_MATH_NOISE);
+ register_if_exists("math/normal", AssetId::ASSET_SHADER_MATH_NORMAL);
register_if_exists("render/shadows", AssetId::ASSET_SHADER_RENDER_SHADOWS);
register_if_exists("render/scene_query_bvh",
AssetId::ASSET_SHADER_RENDER_SCENE_QUERY_BVH);