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
Moritz Zwerger
d45c80e062
chunk neighbours: fix tracing in west direction
2025-03-07 15:42:42 +01:00
Moritz Zwerger
50dfd17444
fix and cleanup BlockPosition::of
2025-03-07 15:42:14 +01:00
Moritz Zwerger
729abc11a9
section occlusion fixes and tests
2025-03-07 00:05:17 +01:00
Moritz Zwerger
a998fcd989
fog: fix color not clearing anymore
...
When you went in water the blue color never cleared
2025-03-06 23:16:21 +01:00
Moritz Zwerger
8e80d91494
rewrite occlusion culling
...
Way cleaner and less prone to errors and probably a lot faster. Not tested yet.
2025-03-06 20:41:15 +01:00
Moritz Zwerger
375bccca47
section position
2025-03-06 16:14:42 +01:00
Moritz Zwerger
8f1247d4b1
clarify the StackOverflow catch in SectionOcclusion::floodFill
2025-03-06 00:19:00 +01:00
Moritz Zwerger
97e6cd11cf
Entity: cache id
...
This workarounds ANOTHER stupid stdlib bug. While entities are ticking SOMETIMES the lock *of the sync* is not releases after acquiring the read lock and no other threads can acquire the lock. I debugged this and it is a race condition in the ReentrantReadWriteLock (or in the synchronizer) class. Pretty ironic.
2025-03-06 00:18:28 +01:00
Moritz Zwerger
7d3f8aece1
fix chunk neighbour tracing with offset
...
Produced wrong results and high spike in cpu usage for calculating fluid velocity
2025-03-05 23:22:06 +01:00
Moritz Zwerger
ca8e12a7f9
direction vector
...
inlined, reduces stack size in world visibility graph
2025-03-05 21:23:15 +01:00
Moritz Zwerger
39d97b5a40
more occlusion tests
2025-03-05 19:16:59 +01:00
Moritz Zwerger
3598cd4902
gui cache: don't finish data
...
Reduces hud allocation a lot
2025-03-05 19:16:39 +01:00
Moritz Zwerger
cf488e1dd6
fix deadlock, fix render test loader
...
No clue how this test ever passed...
2025-03-05 18:47:43 +01:00
Moritz Zwerger
5f9058e44a
some fixes
2025-03-05 17:39:57 +01:00
Moritz Zwerger
ff2de678a1
last test fixes
2025-03-05 17:28:23 +01:00
Moritz Zwerger
368f224122
fox some tests
2025-03-05 14:19:45 +01:00
Moritz Zwerger
2bb4cfc4dc
fix position encoding
2025-03-05 14:03:29 +01:00
Moritz Zwerger
3feebb8935
fix test executor, block position bounds
2025-03-04 16:39:21 +01:00
Moritz Zwerger
d70f55ad56
fix building of tests
2025-03-04 16:25:31 +01:00
Moritz Zwerger
6abc316d0d
make it build
2025-03-03 19:04:52 +01:00