voxelcore/doc/ru/scripting/builtins
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
..
libanimation.md add initial animation docs (test) 2026-09-08 21:08:28 +03:00
libapp.md update doc/*/scripting/builtins/libapp.md 2026-11-01 17:33:51 +03:00
libassets.md Merge branch 'main' into dev 2026-10-16 01:30:13 +03:00
libbase64.md Improved docs (#708) 2025-12-18 12:58:39 +03:00
libblock.md update doc/*/scripting/builtins 2026-10-31 17:19:42 +03:00
libbyteutil.md fix docs typos and other trash 2026-10-16 00:20:25 +03:00
libcameras.md fix docs typos and other trash 2026-10-16 00:20:25 +03:00
libcompression.md fix docs typos and other trash 2026-10-16 00:20:25 +03:00
libcrypto.md update crypto docs 2026-08-22 17:47:59 +07:00
libctypes.md fix docs typos and other trash 2026-10-16 00:20:25 +03:00
libentities.md update doc/*/entity-properties.md, doc/*/scripting/builtins/libentities.md 2026-10-19 21:53:03 +03:00
libfile.md fix docs typos and other trash 2026-10-16 00:20:25 +03:00
libgfx-blockwraps.md update doc/*/scripting/builtins/libgfx-blockwraps.md 2025-12-21 16:46:36 +03:00
libgfx-posteffects.md render the world relative to an origin near the camera 2026-11-12 10:05:06 +03:00
libgfx-skeletons.md update doc/*/scripting/ecs.md, doc/*/scripting/builtins/libgfx-skeletons.md 2026-10-18 14:46:31 +03:00
libgfx-weather.md fix docs typos and other trash 2026-10-16 00:20:25 +03:00
libgui.md fix docs typos and other trash 2026-10-16 00:20:25 +03:00
libhud.md Merge pull request #1043 from ostermine/feat/hotbar-control 2026-10-18 11:38:10 +03:00
libinput.md fix docs typos and other trash 2026-10-16 00:20:25 +03:00
libinventory.md fix docs typos and other trash 2026-10-16 00:20:25 +03:00
libitem.md Improved docs (#708) 2025-12-18 12:58:39 +03:00
libmat4.md fix docs typos and other trash 2026-10-16 00:20:25 +03:00
libnetwork.md fix docs typos and other trash 2026-10-16 00:20:25 +03:00
libpack.md fix docs typos and other trash 2026-10-16 00:20:25 +03:00
libpathfinding.md update doc/*/scripting/builtins/libpathfinding.md 2026-11-01 18:42:58 +03:00
libplayer.md Merge pull request #1043 from ostermine/feat/hotbar-control 2026-10-18 11:38:10 +03:00
libquat.md fix docs typos and other trash 2026-10-16 00:20:25 +03:00
librandom.md fix docs typos and other trash 2026-10-16 00:20:25 +03:00
librules.md fix docs typos and other trash 2026-10-16 00:20:25 +03:00
libsession.md add doc/ru/scripting/builtins/libsession.md 2026-03-18 22:08:42 +03:00
libtime.md add precise_utc_time function 2026-08-18 21:57:51 +05:00
libutf8.md fix docs typos and other trash 2026-10-16 00:20:25 +03:00
libvecn.md fix docs typos and other trash 2026-10-16 00:20:25 +03:00
libworld.md Merge branch 'main' into dev 2026-10-16 01:30:13 +03:00