Moritz Zwerger
25e8fbbde8
shaders: add lowp or mediump when possible
...
This allows the gpu to use less bits for the floats when it is not needed at all, thus using less resources.
2025-03-26 16:47:18 +01:00
Moritz Zwerger
866a03728e
entity ticking: lock or skip ticking
...
This avoids deadlocking
2025-03-25 20:39:44 +01:00
Moritz Zwerger
89c8e43e65
skeletal transform packing: don't copy every single float from mat4
...
Its batched now, the byte buffer can optimize this call.
2025-03-25 20:26:09 +01:00
Moritz Zwerger
1d742f4dff
solid mesher: fix heightmap sky light setting
2025-03-25 20:20:51 +01:00
Moritz Zwerger
d2d45008b0
heightmap: use section height
...
index is prune to errors and not very natural
2025-03-25 20:19:22 +01:00
Moritz Zwerger
dc43b0c266
light tracing: create neighbour section if not exists
2025-03-25 19:44:07 +01:00
Moritz Zwerger
aeda72d4b4
section mesher: some cleanup
2025-03-21 21:56:33 +01:00
Moritz Zwerger
649895fe00
light: propagate from neighbours
2025-03-21 21:24:17 +01:00
Moritz Zwerger
3826f5d1aa
bump dependencies
2025-03-18 17:54:41 +01:00
Moritz Zwerger
79be571e11
bump gradle
2025-03-18 17:49:19 +01:00
Moritz Zwerger
4cfd312272
check light propagation directions
2025-03-13 23:34:59 +01:00
Moritz Zwerger
b7e4ec42cc
border light tracing
2025-03-13 00:01:11 +01:00
Moritz Zwerger
65799bb081
server light receiving
...
This feature is disabled anyways, because it might not be correct and minosofts light engine is fast enough.
2025-03-12 18:45:45 +01:00
Moritz Zwerger
fccc1e2782
light update firing
...
Events base there again, cleaner than before. Contains some cleanup too.
2025-03-12 18:40:40 +01:00
Moritz Zwerger
4a081056c5
basic light tracing
2025-03-11 20:17:45 +01:00
Moritz Zwerger
8b2640bb9a
some more light cleanup
2025-03-10 20:54:39 +01:00
Moritz Zwerger
939ee6f58e
split chunk and chunk packet util
2025-03-10 20:25:09 +01:00
Moritz Zwerger
81d6647074
occlusion tracer: only store path by axis
...
Its not possible that 2 different direction on the same axis are stored at the same position. Halves the temporary memory.
2025-03-10 15:49:22 +01:00
Moritz Zwerger
01ad5be5f8
remove old light engine
2025-03-10 01:01:18 +01:00
Moritz Zwerger
102887cdf7
entity color: multiply damage tint
...
Otherwise entities appear bright as the sun in the dark.
2025-03-10 00:51:22 +01:00
Moritz Zwerger
74e59142a1
ci: hopefully fix gradle cache path
2025-03-10 00:34:51 +01:00
Moritz Zwerger
25dc621806
disable verify
...
A lot faster
2025-03-10 00:34:33 +01:00
Moritz Zwerger
14a3257092
some shader improvements
2025-03-10 00:34:00 +01:00
Moritz Zwerger
fd0974055d
on chunk create: calculate heightmap
...
Otherwise chunk light is broken, it always thinks the light level is above the heightmap
2025-03-10 00:33:46 +01:00
Moritz Zwerger
9f324ba7ba
entity: synchronize ticking
...
Now we can not tick multiple times at the same time (this caused lag for the camera entity)
2025-03-09 22:53:49 +01:00
Moritz Zwerger
755bf8295d
render loop: get delta time correctly
2025-03-09 22:53:13 +01:00
Moritz Zwerger
6fca18a475
optimize render loop a bit
2025-03-09 22:45:51 +01:00
Moritz Zwerger
e37426f2a9
memory optimize aabb occlusion culling
...
no allocations anymore and probably faster.
2025-03-09 22:12:26 +01:00
Moritz Zwerger
17b5373501
occlusion culling: don't trace if already traced from same origin direction
...
This fixes the too agressive culling
2025-03-09 20:35:50 +01:00
Moritz Zwerger
165fe226d7
occlusion culling: only trace in one direction
2025-03-09 18:47:50 +01:00
Moritz Zwerger
611e250540
section occlusion: only add valid regions to sides
2025-03-09 15:38:51 +01:00
Moritz Zwerger
3d59cf4d0a
section occlusion: calculate side regions in same step as flood filling
...
No need to iterate over all sides again.
2025-03-09 15:34:30 +01:00
Moritz Zwerger
5160ad3160
section occlusion: check if side blocks are set
...
Otherwise skip flood filling and tracing.
2025-03-09 15:27:43 +01:00
Moritz Zwerger
31fa6a809d
occlusion: skip calculating if less then 256 blocks set in chunk
...
When there are less than 256 blocks set, you will always be able to look from one side to another.
2025-03-09 15:24:38 +01:00
Moritz Zwerger
58a36aa454
section occlusion: don't trace inner regions
...
They are not needed and thrown away anyways. This makes performance better, because when the section is full, we only need to start 1536 blocks tracing and not all 4096
2025-03-09 15:23:08 +01:00
Moritz Zwerger
8b5e27a47f
OcclusionTracer: use SVec3
...
Preparations...
2025-03-08 19:41:20 +01:00
Moritz Zwerger
bc41eca59a
SVec3
...
3x10bit integer vector
Can be used as a replacement for any vec3i if the values don't get too big (-511..511)
2025-03-08 19:36:07 +01:00
Moritz Zwerger
84d71cdd37
position tests: skip verify test if position verify is off
...
It will fail.
2025-03-08 19:35:15 +01:00
Moritz Zwerger
ab51cb4b37
some occlusion notes
2025-03-08 14:58:52 +01:00
Moritz Zwerger
39af4f75fb
some light level fixes, light level tests
2025-03-08 14:52:20 +01:00
Moritz Zwerger
f0d70af460
some light cleanup, datatype: light level (inlined)
2025-03-08 14:37:32 +01:00
Moritz Zwerger
d6223cf873
cleanup solid mesher a bit, fix light heightmap
...
Might be a little bit slower now...
2025-03-07 23:46:06 +01:00
Moritz Zwerger
8b0ac1944f
chunk meshing: also prioritize direct neighbours
2025-03-07 23:17:04 +01:00
Moritz Zwerger
ea98f3275d
solid mesher: don't crash when chunk neighbour does not exist anymore
...
This is a race condition, it should exist, but a chunk that is just getting meshed is getting unloaded, either meshing is too slow, something weird happens or the server is doing shit.
2025-03-07 22:30:31 +01:00
Moritz Zwerger
534352400b
chunk mesher: properly cleanup tasks, requeue on interrupt
2025-03-07 22:23:51 +01:00
Moritz Zwerger
37c3c81d83
chunk meshing: don't interrupt whole chunk when only section changes
2025-03-07 22:23:31 +01:00
Moritz Zwerger
6f8eca6a30
fix wrong entity chunk position
2025-03-07 21:52:42 +01:00
Moritz Zwerger
1576fcdcb3
improve entity position info, handle invalid positions
...
BlockPosition has only 12 bits for the y coordinate, it must not exceed it (even though it is a valid entity position)
2025-03-07 20:27:11 +01:00
Moritz Zwerger
9ae0b5c278
integration test: don't depend on block tests, get full opaque blocks during setup
2025-03-07 15:44:34 +01:00
Moritz Zwerger
301e5d9df1
chunk neighbour block tracing test
2025-03-07 15:43:15 +01:00