feat: add sphere scene with fixed cube-to-sphere mapping

Added scenes/sphere.{hpp,cpp} using the cube-to-sphere
approach from nrz.cpp, but with corrected math: vertices
are simply normalized to project onto the unit sphere
(the original used a broken formula with p=50.0 as an
exponent).

The sphere uses indexed geometry with position, normal,
and UV attributes, plus a simple diffuse lighting shader.

Press 1/2 to switch between cube and sphere scenes.
Updated .gitignore to exclude generated PNG screenshots.
This commit is contained in:
2026-05-05 23:54:48 +02:00
parent 4a88c8cc06
commit 78d0515e8b
5 changed files with 264 additions and 5 deletions
+3
View File
@@ -43,3 +43,6 @@ imgui.ini
# Compiled shaders
*.spv
# Screenshots
*.png