use tiled atlas texture sampling, increase shader speed using inv sqrt
This commit is contained in:
parent
e92748c2d9
commit
c4226b36fe
34 changed files with 1045 additions and 520 deletions
|
|
@ -353,10 +353,10 @@
|
|||
|
||||
(pxl8.push_target)
|
||||
(pxl8.begin_frame_3d camera lights {
|
||||
:ambient 30
|
||||
:ambient 25
|
||||
:fog_density 0.0
|
||||
:celestial_dir [0.5 -0.8 0.3]
|
||||
:celestial_intensity 0.5})
|
||||
:celestial_intensity 0.3})
|
||||
(pxl8.clear_depth)
|
||||
|
||||
(sky.update-gradient 1 2 6 6 10 18)
|
||||
|
|
@ -364,7 +364,7 @@
|
|||
(sky.render-stars smooth-cam-x eye-y smooth-cam-z 1.0 last-dt)
|
||||
(pxl8.clear_depth)
|
||||
|
||||
(world:set_wireframe (menu.is-wireframe))
|
||||
(pxl8.set_wireframe (menu.is-wireframe))
|
||||
(world:render [smooth-cam-x eye-y smooth-cam-z])
|
||||
|
||||
(when chunk
|
||||
|
|
|
|||
|
|
@ -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)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue