Commit graph

273 commits

Author SHA1 Message Date
ostermine
89bdadd6aa render the world relative to an origin near the camera
World coordinates were passed to GPU as floats: u_model of a chunk and
of a model had the world translation, vertices of translucent blocks,
particles, precipitation, block wrappers, lines and 3D texts were built
in the world space, and the camera position was subtracted in shaders.
The float step grows with the distance from the world origin (6 cm at
1M blocks, 2 m at 30M): blocks got skewed, then stuck together.

Camera::getOrigin() is an integer point near the camera (X and Z are
rounded to 1024 blocks, Y is 0). Camera::getView() is relative to it,
and every position passed to GPU is "world - origin" calculated on CPU,
so the shaders keep working with small numbers and do not change:
u_cameraPos, a_modelpos, u_inverseView and the shadows matrices are in
the same space as before, shifted by the origin. Matrices of a shadow
map are converted from the origin of its camera to the origin of the
player camera. The clouds shader gets the origin wrapped by the period
of its waves, the waves stay bound to the world.

Vertices of translucent blocks are local to the chunk now, as vertices
of opaque ones, and drawn with u_model of the chunk.
2026-11-12 10:05:06 +03:00
MihailRis
835521e734 update doc/*/scripting/builtins/libpathfinding.md 2026-11-01 18:42:58 +03:00
MihailRis
98cd85f4f6 Merge branch 'dev' into pathfinding-update 2026-11-01 18:37:28 +03:00
MihailRis
db8c684855 update doc/*/scripting/builtins/libpathfinding.md 2026-11-01 18:09:03 +03:00
MihailRis
e196086ec3 update doc/*/scripting/builtins/libapp.md 2026-11-01 17:33:51 +03:00
MihailRis
3ae9e42883 update doc/*/scripting/builtins 2026-10-31 17:19:42 +03:00
MihailRis
aab363cfb7 update doc/*/entity-properties.md, doc/*/scripting/builtins/libentities.md 2026-10-19 21:53:03 +03:00
MihailRis
ddf8395d85 update doc/*/scripting/ecs.md, doc/*/scripting/builtins/libgfx-skeletons.md 2026-10-18 14:46:31 +03:00
MihailRis
bb73e3f354
Merge pull request #1043 from ostermine/feat/hotbar-control
make hotbar size and layout configurable
2026-10-18 11:38:10 +03:00
ostermine
40e2814f9e docs: describe hotbar keys by topic and hotbar size from server side 2026-10-16 14:06:08 +03:00
MihailRis
35e3d80f35 Merge branch 'main' into dev 2026-10-16 01:30:13 +03:00
MihailRis
ef61e28f50 fix docs typos and other trash 2026-10-16 00:20:25 +03:00
ostermine
aa670f3c9d make hotbar size and layout configurable
Add hotbar-size, hotbar-layout and inventory-layout to config/defaults.toml,
player.get_hotbar_size / player.set_hotbar_size and
hud.is_hotbar_visible / hud.set_hotbar_visible.
2026-10-15 15:58:56 +03:00
MihailRis
4354896008
Merge pull request #1040 from MihailRis/world-logic-configuration
world logic configuration
2026-10-15 12:12:33 +03:00
MihailRis
2e476a8164 update doc/*/scripting/builtins/libworld.md 2026-10-14 19:42:07 +03:00
MihailRis
8a8119e0c2 update doc/*/scripting/builtins/libassets.md 2026-10-14 13:03:05 +03:00
MihailRis
3dccc13a88 update doc/*/scripting/builtins/libapp.md 2026-10-12 22:11:55 +03:00
MihailRis
8962042627 complete the rename of voxelengine to voxelcore 2026-10-10 10:54:36 +03:00
MihailRis
e8a83423d8 fix outdated doc/*/scripting/builtins/libgfx-skeletons.md
Some checks failed
x86-64 AppImage / build-appimage (ubuntu-22.04) (push) Has been cancelled
Build / Build (push) Has been cancelled
Macos Build / build-dmg (push) Has been cancelled
Windows Build (CLang) / build-windows (clang, windows-latest) (push) Has been cancelled
MSVC Build / build-windows (windows-2022) (push) Has been cancelled
2026-10-09 00:09:48 +03:00
MihailRis
2f2da3b56a update doс/*/scripting/builtins/libfile.md 2026-09-20 17:45:41 +03:00
MihailRis
507f32f1e5
Merge pull request #976 from MihailRis/screenshot-function
add gui.screenshot function
2026-09-18 00:43:29 +03:00
MihailRis
71368836c8 update doc/*/scripting/builtins/libgui.md 2026-09-17 22:12:11 +03:00
MihailRis
ef4bd4f594
Merge pull request #941 from boolean-false/crypto-library
Crypto library
2026-09-17 20:41:32 +03:00
MihailRis
38da5c89f5 fix 2026-09-14 20:07:34 +03:00
MihailRis
817092fef4 update doc/*/scripting/builtins/libnetwork.md 2026-09-14 20:06:09 +03:00
MihailRis
bd9f3d86ca add initial animation docs (test) 2026-09-08 21:08:28 +03:00
MihailRis
8c37d0860c update doc/*/scripting/builtins/libassets.md 2026-09-08 19:42:09 +03:00
MihailRis
968528c706
Merge pull request #964 from Xertis/main
Implementation of socket:peek
2026-09-04 00:09:56 +03:00
MihailRis
c2a77509f7
Merge pull request #965 from MihailRis/update-headless-sub-instances
add project arguments table passing in app.start_background_instance
2026-09-03 22:58:48 +03:00
MihailRis
fb20db047d update doc/*/scripting/builtins/libapp.md 2026-09-03 22:31:28 +03:00
Xertis
9dacf7038f Implementation of socket:peek 2026-09-03 19:32:49 +03:00
dagger
c83a73102e add input.get_mouse_scroll() 2026-09-01 20:11:31 +07:00
dagger
5391be4b8a update crypto docs 2026-08-22 17:47:59 +07:00
dagger
a23c4d4159 add crypto library 2026-08-22 15:22:55 +07:00
MihailRis
2c6cffcf19
Merge pull request #940 from MihailRis/fix-assets-pipeline
update assets pipeline (moving to animation branch)
2026-08-22 00:35:47 +03:00
MihailRis
4b234eb661 update doc/en/scripting/builtins/libapp.md 2026-08-21 22:12:38 +03:00
MihailRis
aac9b850c1 update doc/*/scripting/builtins/libapp.md 2026-08-21 21:54:50 +03:00
neveix
dfcc3e913d add precise_utc_time function 2026-08-18 21:57:51 +05:00
neveix
305dab7ead remove duplicated 2026-08-15 14:58:09 +05:00
neveix
22b70b701e add quaternion mul* docs 2026-08-15 14:01:46 +05:00
neveix
6a486af6ab add docs for get_exchange_inventory 2026-08-14 01:46:35 +05:00
MihailRis
fe69d31f97 feat: it's not breaking change if it never worked 2026-08-11 22:38:12 +03:00
MihailRis
4a381ec2f4 add ctypes docs (minimal) 2026-08-04 20:24:58 +03:00
MihailRis
6bbc78098d add app.is_instance_alive & rename app.terminate to app.terminate_instance 2026-08-02 18:32:54 +03:00
MihailRis
466f515ea9 update doc/*/scripting/builtins/libapp.md 2026-08-02 18:27:19 +03:00
MihailRis
2b5acfde62 update doc/*/libworld.md & update doc/*/entity-properties.md 2026-07-27 21:38:27 +03:00
MihailRis
4295af15cc
Merge pull request #847 from MihailRis/client-side-tests
client-side `--script`, `--test` support (part 1)
2026-07-25 21:59:10 +03:00
Onran
f539ddf9e0 docs update 2026-07-24 03:34:28 +09:00
MihailRis
3c7b7a9318 update doc/*/scripting/builtins/libentities.md 2026-07-21 22:53:22 +03:00
MihailRis
e829bf7912 update doc/*/scripting/builtins/libentities.md 2026-07-21 22:49:38 +03:00