enable camera frustum culling for bsp rendering

This commit is contained in:
asrael 2025-11-10 10:24:27 -06:00
parent 704b14b2a0
commit ac8ab8d60d
No known key found for this signature in database
GPG key ID: 2786557804DFAE24
4 changed files with 36 additions and 82 deletions

View file

@ -114,10 +114,6 @@
target-y (+ eye-y (math.sin cam-pitch))
target-z (+ cam-z forward-z)]
(pxl8.text (.. "Pos: " (string.format "%.0f" cam-x) ","
(string.format "%.0f" cam-y) ","
(string.format "%.0f" cam-z)) 10 25 12)
(pxl8.clear_zbuffer)
(pxl8.set_backface_culling true)
(pxl8.set_wireframe false)
@ -134,7 +130,11 @@
(pxl8.set_model (pxl8.mat4_identity))
(pxl8.set_affine_textures affine)
(pxl8.world_render world [cam-x eye-y cam-z]))
(pxl8.world_render world [cam-x eye-y cam-z])
(pxl8.text (.. "Pos: " (string.format "%.0f" cam-x) ","
(string.format "%.0f" cam-y) ","
(string.format "%.0f" cam-z)) 10 25 12))
(let [new-state (debug-ui.render {:show-debug-ui show-debug-ui
:fps fps