use tiled atlas texture sampling, increase shader speed using inv sqrt

This commit is contained in:
asrael 2026-02-04 07:37:20 -06:00
parent e92748c2d9
commit c4226b36fe
34 changed files with 1045 additions and 520 deletions

View file

@ -136,18 +136,18 @@
(set selected-item nil)))
(fn draw-gfx-panel []
(pxl8.gui_window 200 100 240 280 "GFX")
(pxl8.gui_window 200 60 240 220 "GFX")
(let [baked-label (if baked-lighting "Baked Lighting: On" "Baked Lighting: Off")]
(when (menu-button 40 215 147 210 30 baked-label)
(when (menu-button 40 215 107 210 24 baked-label)
(set baked-lighting (not baked-lighting))))
(let [dynamic-label (if dynamic-lighting "Dynamic Lighting: On" "Dynamic Lighting: Off")]
(when (menu-button 41 215 182 210 30 dynamic-label)
(when (menu-button 41 215 134 210 24 dynamic-label)
(set dynamic-lighting (not dynamic-lighting))))
(pxl8.gui_label 215 220 (.. "Render: " render-distance) 15)
(let [(changed new-val) (gui:slider_int 30 215 235 210 16 render-distance 1 8)]
(pxl8.gui_label 215 162 (.. "Render: " render-distance) 15)
(let [(changed new-val) (gui:slider_int 30 215 175 210 14 render-distance 1 8)]
(when changed
(set render-distance new-val)
(let [w (world-mod.World.get)
@ -156,14 +156,14 @@
(when n (n:set_chunk_settings new-val sim-distance)))))
(let [tex-label (if textures "Textures: On" "Textures: Off")]
(when (menu-button 42 215 260 210 30 tex-label)
(when (menu-button 42 215 194 210 24 tex-label)
(set textures (not textures))))
(let [wire-label (if wireframe "Wireframe: On" "Wireframe: Off")]
(when (menu-button 43 215 295 210 30 wire-label)
(when (menu-button 43 215 221 210 24 wire-label)
(set wireframe (not wireframe))))
(when (menu-button 32 215 340 210 30 "Back")
(when (menu-button 32 215 248 210 24 "Back")
(set current-panel :main)
(set selected-item nil)))