From a64ce13649a01b1b793f3de3b6ef50bf30ce1717 Mon Sep 17 00:00:00 2001 From: skal Date: Fri, 20 Feb 2026 15:11:20 +0100 Subject: feat(scene1): replace ad-hoc camera with CameraParams uniform MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/effects/scene1_effect.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/effects/scene1_effect.h') 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 camera_params_; }; -- cgit v1.2.3