Skip to content

Commit

Permalink
debug camera position
Browse files Browse the repository at this point in the history
  • Loading branch information
FreddyFunk committed Feb 25, 2024
1 parent fc39870 commit db477e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/apps/ray_marching_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use eframe::{
egui_wgpu::{self, wgpu},
};
use egui::{epaint::Shadow, Pos2};
use glam::{vec3, Vec2};
use glam::{vec3, vec4, Vec2, Vec3, Vec4};

Check failure on line 8 in src/apps/ray_marching_renderer.rs

View workflow job for this annotation

GitHub Actions / Clippy

unused imports: `Vec4`, `vec4`

Check warning on line 8 in src/apps/ray_marching_renderer.rs

View workflow job for this annotation

GitHub Actions / Cargo Check x86_64

unused imports: `Vec4`, `vec4`

Check warning on line 8 in src/apps/ray_marching_renderer.rs

View workflow job for this annotation

GitHub Actions / Build for macOS (Intel)

unused imports: `Vec4`, `vec4`

Check warning on line 8 in src/apps/ray_marching_renderer.rs

View workflow job for this annotation

GitHub Actions / Build for macOS (arm64)

unused imports: `Vec4`, `vec4`

Check warning on line 8 in src/apps/ray_marching_renderer.rs

View workflow job for this annotation

GitHub Actions / Build for Linux x86_64 (Ubuntu)

unused imports: `Vec4`, `vec4`

Check warning on line 8 in src/apps/ray_marching_renderer.rs

View workflow job for this annotation

GitHub Actions / Unit Tests

unused imports: `Vec4`, `vec4`

Check warning on line 8 in src/apps/ray_marching_renderer.rs

View workflow job for this annotation

GitHub Actions / Build for Windows

unused imports: `Vec4`, `vec4`

struct RayMarchingRendererResources {
render_pipeline: wgpu::RenderPipeline,
Expand Down Expand Up @@ -642,7 +642,7 @@ impl RayMarchingRenderer {
impl RayMarchingRenderer {
pub fn custom_painting(&mut self, ui: &mut egui::Ui) {
let available_size = ui.available_size_before_wrap();
let (rect, _response) =
let (rect, response) =
ui.allocate_exact_size(available_size, egui::Sense::click_and_drag());

// Clone locals so we can move them into the paint callback:
Expand Down
3 changes: 2 additions & 1 deletion src/apps/slice_renderer_shader.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,6 @@ fn get_value(position: vec2<f32>) -> vec3<f32> {
fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
let position = in.tex_coords;
let value = textureSample(t_diffuse, s_diffuse, get_value(position))[0];
return vec4<f32>(value, value, value, 1.0);
//return vec4<f32>(value, value, value, 1.0);
return vec4<f32>(position.x, position.y, 0.0, 1.0);
}

0 comments on commit db477e5

Please sign in to comment.