1307 Commits

Author SHA1 Message Date
IntegratedQuantum
54337f17fd Add a run.sh file that automatically downloads or updates zig and runs the game.
This is a step towards #103
2023-09-26 22:06:35 +02:00
IntegratedQuantum
6c896e2e93 I found a perfect workaround to the compiler regression #17289 2023-09-26 21:21:48 +02:00
IntegratedQuantum
86ab8ef782 Remove portaudio submodule, getting it through the zig package manager instead.
Resolves #103
2023-09-26 17:42:54 +02:00
IntegratedQuantum
6e43ec3d40 Update zig version to 0.12.0-dev.596+2adb932ad
I also had to add some workarounds for a new regression in the zig compiler: https://github.com/ziglang/zig/issues/17289
2023-09-26 17:15:55 +02:00
IntegratedQuantum
257c7d7a3b
Update README.md with a note about required -dev packages on Linux 2023-09-24 11:09:09 +02:00
IntegratedQuantum
3c638017f9 Fix small mistake that messed up texturing. 2023-09-22 11:55:04 +02:00
IntegratedQuantum
3d19feae42 Add dithering when transitioning to raymarching lod. 2023-09-22 11:52:21 +02:00
IntegratedQuantum
f0b5ba3249 Improve the voxel raymarching bound detection.
Now it breaks at the true bound of the model instead of marching into the empty space beyond it.
2023-09-22 11:19:33 +02:00
IntegratedQuantum
c2a499183d Apply dithering if opaque geometry gets partially transparent pixels from mipmapping. 2023-09-21 17:00:59 +02:00
IntegratedQuantum
c73e25a26a Some refactoring to random.nextFloat calls. 2023-09-19 18:42:33 +02:00
IntegratedQuantum
72e27e8500 Render bloom at ¹⁄₄ resolution improving frame time by 3 ms.
Also fix a bug with fog calculation in the bloom shader.
2023-09-19 12:02:16 +02:00
IntegratedQuantum
ba56b78192 Fix a small mistake that caused unnecessary realloc calls during transparency sorting.
Realloc calls, even if the size doesn't change, can have high latency.

fixes #94
2023-09-18 17:45:05 +02:00
IntegratedQuantum
b60feb211c Remove debug code that was slowing done the creative inventory. 2023-09-18 17:14:20 +02:00
IntegratedQuantum
1c72240036 Reduce the amount of dynamic allocation for transparency sorting.
Additionally reduce the data transfer by outputing the face data(8 byte per face) instead of the index data(24 byte per face)
2023-09-18 17:10:23 +02:00
IntegratedQuantum
e7c5635048 Update mach-freetype, it got easier to set up. 2023-09-18 15:40:41 +02:00
IntegratedQuantum
1b2ed56e3c Update zig version to 0.12.0-dev.389+61b70778b and display debug times in µs instead of ns. 2023-09-16 20:21:02 +02:00
IntegratedQuantum
1a3a16c852 Improve performance by storing the noise-based fake reflection in a cube map 2023-09-16 12:13:54 +02:00
IntegratedQuantum
1951416317 Revert reverse-z-buffer commits, which significantly slowed down the game. 2023-09-13 11:38:04 +02:00
IntegratedQuantum
9a64dc1e6f
Merge pull request #58 from PixelGuys/volumetric_fog
Volumetric Fog.
2023-09-12 21:51:13 +02:00
IntegratedQuantum
31e5526b14 Fix fog when the world isn't fully loaded. 2023-09-12 18:36:13 +02:00
IntegratedQuantum
4a84b862b5 The fog now uses the correct distance instead of only using the z component. 2023-09-12 18:25:42 +02:00
IntegratedQuantum
a4bef7d4be Fix backface textures. 2023-09-12 17:01:48 +02:00
IntegratedQuantum
196645c853 Don't draw the backface for non-foggy transparent materials. 2023-09-12 12:21:21 +02:00
IntegratedQuantum
43d5f29066 Some small performance improvements. 2023-09-12 11:34:30 +02:00
IntegratedQuantum
1b7b213c5a Render the air-fog through the same mechanism to ensure that they work well together. 2023-09-11 18:07:41 +02:00
IntegratedQuantum
6aa9acdc4c Fix the block selection outline. 2023-09-11 11:58:26 +02:00
IntegratedQuantum
65f27902b2 Reactivate the old transparency effects. 2023-09-11 11:13:51 +02:00
IntegratedQuantum
2e5910a9cc Handle the case that the player is inside the fog. 2023-09-08 20:18:04 +02:00
IntegratedQuantum
50946c352b Cleanup the fragment shader. 2023-09-08 17:06:25 +02:00
IntegratedQuantum
5628b05876 Fix bloom upscaling. 2023-09-08 16:58:10 +02:00
IntegratedQuantum
86a5bdded5 Fix item texture rendering. (It now includes the fog effect)
The background is not yet transparent, but I think it's good enough for now.
2023-09-06 22:59:39 +02:00
IntegratedQuantum
6269356a42 Remove the old chunk sorting code, which is no longer needed and was causing some issues due to using a different sorting scheme. 2023-09-06 19:38:52 +02:00
IntegratedQuantum
418f568f10 Allow configuring the fog strength per block. 2023-09-06 19:16:51 +02:00
IntegratedQuantum
345e36c030 Handle backfaces when placing blocks. 2023-09-06 17:20:46 +02:00
IntegratedQuantum
876fb77b1c Fix sorting when there is two different transparent blocks next to each other. 2023-09-06 11:19:58 +02:00
IntegratedQuantum
f21231bc52 Fix LOD mesh borders by storing backfaces seperately from frontfaces (This increases the number of faces drawn, but in the future this can be optimized out). 2023-09-05 22:13:00 +02:00
IntegratedQuantum
6aa11ec1b8 Volumetric Fog. First draft. 2023-09-01 10:42:10 +02:00
IntegratedQuantum
fb5b6768bc Fix transparency sorting and improve performance queries. 2023-08-31 11:45:44 +02:00
IntegratedQuantum
c38b987a01 Fix the value range of the floating point depth buffer.
Now I can make the near plane tiny without causing any z-fighting.
2023-08-28 21:17:11 +02:00
IntegratedQuantum
4327a50c5e Add a secret option that allows skipping the menu and automatically entering a world. 2023-08-27 17:39:54 +02:00
IntegratedQuantum
7d4d110b03 Use mach-freetype with the package manager and update zig version to 0.12.0-dev.163+6780a6bbf 2023-08-24 09:47:13 +02:00
IntegratedQuantum
840d62177c Switch to f16 frame buffers in preparation for volumetric fog.
Also display some performance data using OpenGL's queries.
2023-08-21 09:41:41 +02:00
IntegratedQuantum
0d69e9965c Fix visibility issues with the new occlusion culling when moving too fast. 2023-08-16 19:41:16 +02:00
IntegratedQuantum
a703cb6c6a Occlusion culling 2023-08-15 21:11:40 +02:00
IntegratedQuantum
83e8d52120 Cleanup some TODOs. 2023-08-05 22:27:06 +02:00
IntegratedQuantum
64ec48840d Fix memory leaks and cleanup. 2023-08-05 21:04:27 +02:00
IntegratedQuantum
dbbda05022 Some improvements to the log function. 2023-08-05 12:51:35 +02:00
IntegratedQuantum
3fb17e24b9 A small change regarding the rotation mode ids.
These cannot be modded, so it doesn't make sense to add "cubyz:" in front of the id.
2023-07-31 21:42:45 +02:00
IntegratedQuantum
3f73c81de3 Goodbye beaches
Replacement biomes are no longer supported. Ocean now go a bit higher, which makes beaches appear naturally.

Also removed the old terrain generator which was no longer compatible anyways.
2023-07-26 21:26:46 +02:00
IntegratedQuantum
555838e369 Better biome interpolation. 2023-07-26 21:19:12 +02:00