summaryrefslogtreecommitdiff
path: root/src/effects/scene1_effect.h
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-20 15:11:20 +0100
committerskal <pascal.massimino@gmail.com>2026-02-20 15:11:20 +0100
commita64ce13649a01b1b793f3de3b6ef50bf30ce1717 (patch)
treecbd86d7ff70ee39f7f8d35f1ef16cdf1cc1522c5 /src/effects/scene1_effect.h
parent850388bcaabf057beed8f126002b7b663183b2d8 (diff)
feat(scene1): replace ad-hoc camera with CameraParams uniform
Build camera via mat4::look_at + inverse in scene1_effect.cc, upload as CameraParams at binding 3. Shader uses getCameraRay() from camera_common. Enable camera_common snippet registration in shaders.cc. handoff(Claude): Scene1 camera now driven by CameraParams uniform; fov=TAU/6 (60° vFOV) matches original tan(PI/3) parameterization. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'src/effects/scene1_effect.h')
-rw-r--r--src/effects/scene1_effect.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/effects/scene1_effect.h b/src/effects/scene1_effect.h
index 781cbae..0d5d9d1 100644
--- a/src/effects/scene1_effect.h
+++ b/src/effects/scene1_effect.h
@@ -2,6 +2,7 @@
#pragma once
+#include "gpu/camera_params.h"
#include "gpu/effect.h"
#include "gpu/uniform_helper.h"
#include "gpu/wgpu_resource.h"
@@ -18,4 +19,5 @@ class Scene1 : public Effect {
private:
RenderPipeline pipeline_;
BindGroup bind_group_;
+ UniformBuffer<CameraParams> camera_params_;
};