Skip to content

Commit

Permalink
implement wonky fix
Browse files Browse the repository at this point in the history
  • Loading branch information
FreddyFunk committed Jan 17, 2024
1 parent dd23257 commit 323028d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/apps/ray_marching_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -698,13 +698,14 @@ impl RayMarchingRenderer {
let threshold: f32 = self.threshold;
let sample_step_length = self.sample_step_length;

let ray_origin = (self.view_matrix.inverse() * glam::vec4(0.0, 0.0, 2.0, 0.0)).truncate();
let camera_position = glam::Vec3::new(0.0, 0.0, 2.0);

// TODO: understand why camera_position + cube/with is required for z
let ray_origin = (self.view_matrix.inverse() * glam::vec4(0.0, 0.0, 3.0, 0.0)).truncate();

let top_aabb = self.extent;
let bottom_aabb = -self.extent;

let camera_position = glam::Vec3::new(0.0, 0.0, 2.0);

// The callback function for WGPU is in two stages: prepare, and paint.
//
// The prepare callback is called every frame before paint and is given access to the wgpu
Expand Down

0 comments on commit 323028d

Please sign in to comment.