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
Andrey Tazetdinov
5d6446b06a
gpu instanced entities renderer
2026-10-18 12:44:37 +02:00
MihailRis
45c97e6f1e
revert: use dithering for non translucent entities
2026-10-16 22:34:57 +03:00
MihailRis
7522016e84
feat: entity translucent pass & test layered transparency pipeline
2026-10-16 22:20:59 +03:00
MihailRis
c0c60430d6
test
2026-10-06 22:18:07 +03:00
MihailRis
2f87bbf608
optimize ssao pass
2026-10-06 18:41:26 +03:00
MihailRis
25cee0284f
update advanced render lighting model
2026-10-05 23:15:20 +03:00
MihailRis
f6a7a99a74
revert "update shadows.glsl"
...
This reverts commit 19a952a3be .
2026-10-03 11:10:56 +03:00
MihailRis
19a952a3be
update shadows.glsl
2026-09-28 01:47:23 +03:00
MihailRis
ffba11e87f
update clouds shader
2026-09-28 01:40:48 +03:00
MihailRis
8726a95a9b
fix
2026-09-27 23:23:21 +03:00
MihailRis
2b8d97a2ca
feat: color temperature compensation
2026-09-27 23:21:45 +03:00
MihailRis
771c72324c
update advanced shading
2026-09-27 23:13:45 +03:00
MihailRis
e467c85adc
add 'enable-fog' setting
2026-09-26 19:13:08 +03:00
MihailRis
ae082abaa2
feat: allow passing rgba color to entity skeletons and block wraps
2026-09-16 23:28:03 +03:00
MihailRis
9989f81196
fix weather effects render
2026-09-06 19:36:35 +03:00
MihailRis
86096553ce
fix
2026-07-18 16:20:10 +03:00
MihailRis
a6c4e9e22e
reduce fog factor for emissive geometry
2026-07-15 19:28:02 +03:00
MihailRis
db4f05cf36
update entity.glslf
2026-07-15 00:47:15 +03:00
MihailRis
08fae1a47c
fix
2026-07-15 00:38:54 +03:00
MihailRis
413004d731
test dithering solution
2026-07-15 00:27:53 +03:00
MihailRis
e037462615
add 'sky_tint', 'clouds_tint', 'min_sky_light' weather parameters
2026-02-12 20:27:29 +03:00
MihailRis
8153ddde89
add clouds shader
2026-02-12 18:19:25 +03:00
MihailRis
3055621894
improve sky lighting
2026-02-02 18:35:44 +03:00
MihailRis
58dee92c26
change 'graphics.ssao' from flag to number
2025-12-19 18:55:55 +03:00
MihailRis
14a61f7891
update main shader
2025-12-11 23:54:23 +03:00
MihailRis
4ff18fec99
fix sky shader
2025-09-23 00:51:21 +03:00
MihailRis
b8646580cc
update sky lights constants
2025-09-20 00:17:47 +03:00
MihailRis
7cf073f079
fix: skybox is not visible behind translucent blocks
2025-07-25 22:28:28 +03:00
MihailRis
705e398bc3
improve u_gamma support & update default dense-render-distance value
2025-07-25 21:21:18 +03:00
MihailRis
82f777229e
fix: sampler arrays inbdexed with non-constant / uniform-based expressions are forbidden
2025-07-21 23:36:40 +03:00
MihailRis
fdeec22515
improve lights
2025-07-18 20:27:38 +03:00
MihailRis
2831d1c963
fix emission buffer writing & fix entity shader
2025-07-12 23:28:38 +03:00
MihailRis
3f3f48eb6d
fix
2025-07-12 22:53:33 +03:00
MihailRis
668d1d522f
cleanup & fix entities sky light brightness
2025-07-12 22:38:13 +03:00
MihailRis
b04dbd5809
add 'graphics.ssao' setting
2025-07-12 21:36:27 +03:00
MihailRis
5ec9f14021
add emission gbuffer attachment
2025-07-12 21:09:23 +03:00
MihailRis
ac9772cd67
fix render advanced pipeline issues
2025-07-12 17:31:55 +03:00
MihailRis
0bd901d1a6
feat: deferred shading (day 2)
2025-07-08 23:56:22 +03:00
MihailRis
7a98f0c411
fix entities shading
2025-07-07 19:43:18 +03:00
MihailRis
85212e271d
fix
2025-07-07 02:15:59 +03:00
MihailRis
559322f70a
improve torchlight
2025-07-07 00:25:12 +03:00
MihailRis
931f0180ef
update shadows
2025-07-04 18:20:41 +03:00
MihailRis
a9652327f1
improve ssao
2025-07-03 20:12:11 +03:00
MihailRis
96a94aa33c
feat: recompiling shaders
2025-07-02 23:02:50 +03:00
MihailRis
3e66ff5924
fix ssao
2025-06-15 02:14:39 +03:00
MihailRis
e849d5e9b7
feat: deferred lighting (WIP)
2025-06-14 22:43:18 +03:00
MihailRis
436a89b066
feat: post-effects array parameters & add gfx.posteffects.set_array & make shadows opacity depending on clouds opacity
2025-06-14 20:06:05 +03:00
MihailRis
02a91e0b72
add 'advanced' post-effect load configuration
2025-06-13 23:28:16 +03:00
MihailRis
9cc59c8848
refactor shadows.glsl
2025-06-11 19:44:33 +03:00