Commit Graph

22 Commits

Author SHA1 Message Date
Matthew Gordon 3d29a93885 Replace ambient coefficient with a no-shadow fill light 2025-01-21 20:14:52 -04:00
Matthew Gordon e1aab75ab8 Still a mess but performance and visual quality improved 2025-01-10 16:05:21 -04:00
Matthew Gordon 103cd1bdc2 It's a mess but it works. 2025-01-10 14:33:57 -04:00
Matthew Gordon 91a66e3bb4 Add antialiasing 2025-01-06 11:18:43 -04:00
Matthew Gordon 53221856aa Add hard shadows, although there are bad artifacts 2025-01-06 09:54:21 -04:00
Matthew Gordon 171ffa180b Switch to nicer default scale 2025-01-03 21:40:54 -04:00
Matthew Gordon 9348c6021b Calculate normals and apply lambertian lighting 2025-01-03 21:40:34 -04:00
Matthew Gordon c822264329 Raycasting works! 2025-01-03 15:46:37 -04:00
Matthew Gordon 4e08d2b8fd Break up shader into multiple files 2024-12-23 11:39:56 -04:00
Matthew Gordon f2bd9a92fc Move dem_renderer module into subdirectory 2024-11-29 20:32:51 -04:00
Matthew Gordon f7603661c1 Add non-working raycasting code
Implemented basic raycasting but it doesn't work; I'll check this in and
then add GPU unit tests.
2024-11-29 20:28:20 -04:00
Matthew Gordon 5e3b97ed61 Load DEM BVH into texture 2024-11-22 21:42:37 -04:00
Matthew Gordon ab2e366e7f Factor out DEM texture creation into separate function 2024-11-22 20:40:56 -04:00
Matthew Gordon e7180e57bf Fix issues found by `cargo clippy`, including bugs 2024-11-22 20:32:15 -04:00
Matthew Gordon a4503c3dbf Load DEM texture 2024-11-22 20:20:06 -04:00
Matthew Gordon 8906f6e47a Build BVH Quadtree for DEM 2024-11-16 15:03:16 -04:00
Matthew Gordon e26af202ef Render volume of DEM instead of cube
Instead of a +/-1 cube, draw the AABB of the DEM
2024-11-15 10:07:04 -04:00
Matthew Gordon e89c1e4c3d Make the cube rotate 2024-11-14 22:08:23 -04:00
Matthew Gordon 35785dbf01 Redraw continuously instead of busy-waiting at 100% CPU
Previously, Pteropus would only redraw when the window was resized, but
it would continuously poll for events, keeping a CPU core at 100% even
when not doing anything.

It now automatically queues a new RedrawRequested event after each draw
finishes. The view() call will also limit the frame rate to the video
refresh rate and block when there are more than three frames queued up,
so we're not busywaiting any more.
2024-11-14 20:51:23 -04:00
Matthew Gordon b870e03812 Draw unlit cube when DEM is loaded
Reconfigure the pipeline to draw an unlit (solid colour silhouette) cube
when a DEM is loaded. The fragment shader of this cube will be what
raytraces the DEM.
2024-11-14 12:51:24 -04:00
Matthew Gordon 71b05c31a2 Load f32 tiff into DEM, started BVH, other changes 2024-11-13 17:14:44 -04:00
Matthew Gordon 5dfdd3e927 Stub in basic wgpu framework; just draw triangle right now
Start again using WGPU with both native and WebAssembly. Just draws a
triangle right now.
2024-07-12 17:27:27 -03:00