feat: add Cornell Box scene with orbit camera
- gfx::pipeline gains bind_vec3/bind_float for passing arbitrary uniforms to shaders (used for light position/color) - scene base gains on_mouse_drag virtual hook; cuber.cpp polls left-mouse delta each frame and forwards it to the active scene - cornell_box scene: 5-wall room (red/green/white), two pre-rotated white boxes with proportions from the original paper, an unlit ceiling light panel, and a point-light Lambert shader - left-click drag orbits the camera around the scene origin; pitch is clamped to ±80° to prevent gimbal flip - key 3 / --scene cornell_box selects the scene
This commit is contained in:
@@ -39,6 +39,8 @@ The project is split into static libraries:
|
||||
- **`cbt_scene`** — Base scene class
|
||||
- **`scenes_cube`** — Spinning cube scene implementation
|
||||
- **`scenes_sphere`** — Cube-to-sphere mapped mesh with diffuse lighting
|
||||
- **`scenes_cornell_box`** — Classic Cornell Box with Lambert shading and
|
||||
a ceiling area light
|
||||
|
||||
### CMake Module Path
|
||||
|
||||
@@ -89,6 +91,7 @@ to the custom scripts instead of system-installed packages.
|
||||
- Use conventional commit prefixes (`feat:`, `fix:`, `docs:`, `chore:`,
|
||||
etc.)
|
||||
- Separate subject from body with a blank line
|
||||
- Do **not** add a `Co-Authored-By` trailer or any agent/AI attribution
|
||||
|
||||
Example:
|
||||
|
||||
@@ -140,6 +143,8 @@ cuber/
|
||||
cube.cpp # Cube scene implementation
|
||||
sphere.hpp # Cube-to-sphere mapped mesh
|
||||
sphere.cpp # Sphere scene implementation
|
||||
cornell_box.hpp # Cornell Box scene
|
||||
cornell_box.cpp # Cornell Box scene implementation
|
||||
deps/ # Custom Find*.cmake scripts
|
||||
Findfmt.cmake # fmt library
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user