diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-08 17:04:42 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-08 17:04:42 +0100 |
| commit | 5301e00826da6ff935bd42649f153d109eaef3b6 (patch) | |
| tree | bdff91a1bda4a19d106599f1a825aed06e2f8406 /scripts/gemini_start.sh | |
| parent | afb04da1fc4780eed271064649377cf3e08d391f (diff) | |
feat(shaders): Add optimized 4-sample SDF normal estimation
Adds get_normal_fast() variant using tetrahedral gradient approximation.
Performance improvement:
- 4 SDF evaluations (vs 6 in get_normal_basic)
- ~33% fewer distance field samples
- Tetrahedron pattern: k.xyy, k.yyx, k.yxy, k.xxx where k=(1,-1)
Trade-off:
- Slightly less accurate than central differences method
- Good for real-time rendering where performance matters
- Same sphere optimization (analytical normal for obj_type == 1.0)
Parameters:
- epsilon: 0.0001 (vs 0.001 in basic method)
- Same interface: takes position and object params
Use case: Fast lighting calculations, performance-critical shaders
Diffstat (limited to 'scripts/gemini_start.sh')
0 files changed, 0 insertions, 0 deletions
