242 Commits

Author SHA1 Message Date
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
IntegratedQuantum
d0c1f03fb3 Update zig version to 0.11.0-dev.4246+71dfce31b 2023-07-26 18:39:18 +02:00
IntegratedQuantum
248691d54d Store key names at runtime instead of at compile time.
Reduces code complexity and binary size.
2023-07-24 11:36:45 +02:00
IntegratedQuantum
460adcba4b Quality of life improvements to the gui system:
Some windows like the inventory now hide when ungrabbing the mouse, making it easier to leave the inventory.
The top right corner of a window (containing the close and resize buttons) won't go out of bounds anymore.
2023-07-23 14:24:56 +02:00
IntegratedQuantum
a5763f7307 Some uncommited small change that was lying around for a couple months. 2023-07-23 10:53:57 +02:00
IntegratedQuantum
8581a17c48 A couple of changes related to block placing and transparency:
Allow emissive transparent blocks (such as uranium glass (ok to be precise that's actually flourescence))
Allow selecting the inventory slot with mouse wheel.
Render item preview for transparent blocks (I don't really like how it looks yet)
Fix some bugs.
2023-07-22 18:56:51 +02:00
IntegratedQuantum
d19e69d141 Block placing. 2023-07-21 22:00:32 +02:00
IntegratedQuantum
7597b8c5ff Add transparency sorting using a O(n) algorithm. 2023-07-19 16:40:36 +02:00
IntegratedQuantum
a65aba58d9 Add glass. 2023-07-17 22:07:42 +02:00
IntegratedQuantum
190c21ed6b Remove the far clipping plane. 2023-07-16 19:09:44 +02:00
IntegratedQuantum
5ca4ab6a9d Fake reflections and transparency (both absorptive and regular transparency are possible) 2023-07-16 14:09:18 +02:00
IntegratedQuantum
7cb347ce3c Update zig to 0.11.0-dev.3990+f2d433a19 2023-07-14 11:24:18 +02:00
IntegratedQuantum
6928041259 Reduce comptime code duplication of logging, improving compile-time by 10%. 2023-07-14 10:23:46 +02:00
IntegratedQuantum
6009b26929 Fix some audio file issues.
I decided to ignore the sample rate for now. A little bit of distortion is definitely better than a crash.
2023-07-07 17:45:19 +02:00
IntegratedQuantum
10b4431964 Some performance improvements.
Less allocations.
Work around another of Zig's performance bugs by removing a work-around for an older, now fixed performance bug.
2023-07-07 12:16:55 +02:00
IntegratedQuantum
f5220cfe9f More random fixes.
Note to self: Zig is cursed https://github.com/ziglang/zig/issues/16311
2023-07-03 22:12:52 +02:00