optimisations from gemini (not tested)

This commit is contained in:
DeMuenu
2026-03-24 15:45:31 +01:00
parent 9f986c3eb1
commit a1e808ad92
12 changed files with 231 additions and 117 deletions

View File

@@ -1,7 +1,7 @@
#ifndef Lambert
#define Lambert(q ,i, N) \
float3 L = normalize(q - i.worldPos); /* q = light position */ \
float NdotL = saturate(dot(N, L) * 0.5 + 0.5); /* one-sided Lambert */ \
/* 'L' is inherited from InLoopSetup, avoiding an expensive normalize() */ \
half NdotL = saturate(dot(N, L) * 0.5 + 0.5); /* one-sided Lambert */ \
if (NdotL <= 0) continue; \
#endif