Commit Graph

157 Commits

Author SHA1 Message Date
Jarrod Doyle 23ea18c3de
Extract handling of requested brickmap to method 2024-03-23 11:20:31 +00:00
Jarrod Doyle ba973a7306
Reorder feedback buffer processing logic 2024-03-23 11:06:21 +00:00
Jarrod Doyle cbc95df5cb
Use buffer extension trait to get feedback buffer 2024-03-23 10:56:21 +00:00
Jarrod Doyle f5c503a3aa
Add buffer extension trait 2024-03-23 10:55:54 +00:00
Jarrod Doyle 132bc99540
Move shading table to own module 2024-03-23 10:28:24 +00:00
Jarrod Doyle 10f3950e8d
Begin separating brickmap into brickworld module 2024-03-23 10:25:42 +00:00
Jarrod Doyle c0a859b180
Move to mod.rs definitions for cleaner folder structure 2024-03-23 10:21:40 +00:00
Jarrod Doyle 015dec9133
Better error propagation 2024-03-23 10:18:38 +00:00
Jarrod Doyle 93a38db840
Remove commented code 2024-03-23 10:14:49 +00:00
Jarrod Doyle 5d463daa1e
Make things return errors where relevant 2024-03-23 10:14:18 +00:00
Jarrod Doyle 704f3519ef
Add anyhow 2024-03-23 09:35:34 +00:00
Jarrod Doyle 12e110744d
Remove unneeded unsafe. Fix unused result return 2024-03-22 12:01:12 +00:00
Jarrod Doyle 881de4e3b9
Fix errors with new versions 2024-03-22 11:59:32 +00:00
Jarrod Doyle 010921f4fa
Update crates and dependencies 2024-03-22 11:59:06 +00:00
Jarrod Doyle 6c5e37b02f
Don't consume window resize events in context 2023-10-20 12:15:14 +01:00
Jarrod Doyle 6e2762eb5c
Resize camera projection on window resize 2023-10-20 12:12:46 +01:00
Jarrod Doyle afb4e2d8d8
Remove unused imports 2023-10-20 12:05:28 +01:00
Jarrod Doyle 2a6bee18a6
Move more event handling to the render context 2023-10-20 11:37:24 +01:00
Jarrod Doyle 9a4bd5d1a0
Move some of the window event handling to the render context 2023-10-20 11:24:44 +01:00
Jarrod Doyle 7fd3897964
Resize the window surface when the window is resized 2023-10-20 11:15:11 +01:00
Jarrod Doyle 8c53a2d7b7
Add window surface resizing function 2023-10-20 11:05:38 +01:00
Jarrod Doyle ae298d8ca2
Give render context ownership of the window 2023-10-20 11:04:59 +01:00
Jarrod Doyle 08e819a938
Add optimisations to debug builds 2023-10-20 11:01:26 +01:00
Jarrod Doyle 13fad676ad
Remove unused import and variable 2023-09-08 16:02:26 +01:00
Jarrod Doyle a5ec013001
Add uninitialised buffer support to builder
Also uses this support in brickmap
2023-09-08 16:00:11 +01:00
Jarrod Doyle 6706d58016
Remove uneccesary mut 2023-09-08 15:40:46 +01:00
Jarrod Doyle 2e7c82c03d
Remove unused import 2023-09-08 15:40:19 +01:00
Jarrod Doyle e85023858c
Rename bufferbuilder usage setter 2023-09-08 15:39:05 +01:00
Jarrod Doyle d2de478096
Use buffer builder in brickmap 2023-09-08 15:37:46 +01:00
Jarrod Doyle 017883e205
Add a bulk buffer building helper 2023-09-08 15:32:14 +01:00
Jarrod Doyle 1098c418f1
Rename render module to gfx 2023-09-08 14:33:33 +01:00
Jarrod Doyle e3a00341bc
Rename currently unused brickgrid flags 2023-09-08 14:24:30 +01:00
Jarrod Doyle 7731acfad2
Extracted raycast DDA setup and step to functions 2023-07-29 12:35:24 +01:00
Jarrod Doyle 0f668084d3
Fixed issue with incorrect raycasts by changing ray-box algorithm and applying normal offset 2023-07-28 17:04:48 +01:00
Jarrod Doyle 404c7875bf
Increase brickmap parameters 2023-07-28 14:28:28 +01:00
Jarrod Doyle a91b48bf46
Move neighbour block getting into the brickmap culling function 2023-07-28 12:21:19 +01:00
Jarrod Doyle 7cdca0a406
Slight refactor to Chunk get_block and gen_block 2023-07-28 11:55:05 +01:00
Jarrod Doyle 081ce7ec77
Renamed chunk get_block pos argument to block_pos 2023-07-28 11:48:00 +01:00
Jarrod Doyle e1d621f573
Extract chunk block generation out to it's own function 2023-07-28 11:45:24 +01:00
Jarrod Doyle 42fdf48660
Consider neighbouring brickmaps when doing non-surface voxel culling 2023-07-28 11:03:32 +01:00
Jarrod Doyle ea84b43158
Fix surface voxel detection logic 2023-07-27 22:09:26 +01:00
Jarrod Doyle 34bcae4693
grid_pos_to_world_pos now handles negative grid positions 2023-07-27 21:34:38 +01:00
Jarrod Doyle 26f66813dd
Simplified brickmap grid_pos_to_world_pos 2023-07-27 21:14:52 +01:00
Jarrod Doyle ca7a894ff5
Make function perform more accurate to it's name 2023-07-27 21:04:31 +01:00
Jarrod Doyle e7eda73d98
Increase max buffer size 2023-07-27 19:12:24 +01:00
Jarrod Doyle 997de994e5
Make upload and feedback buffer max counts parameterised 2023-07-27 19:07:52 +01:00
Jarrod Doyle 1cdabc0854
Make brickmap cache and shading table bucket sizes parameterised 2023-07-27 18:59:46 +01:00
Jarrod Doyle de0f845cb6
Added labels to all relevant WGPU constructs 2023-07-05 15:34:23 +01:00
Jarrod Doyle 8d74443e17
Display more realtime framerate in title 2023-07-05 14:34:24 +01:00
Jarrod Doyle 9d4223a1cc
Made unpack buffer size variable and increased the max element count to 512 2023-07-05 14:11:11 +01:00