499 Commits

Author SHA1 Message Date
careeoki
80a54a8727
Colour Balancing & Texture Changes (#314)
* Colour balancing / texture changes

Slight changes to block colours to look nicer.
- Oak leaves are darker than grass. Oak woods are less saturated
- Sand is darker and more yellow
- Stone and soil are both slightly lighter

Texture changes:
- Sand tiles better
- Gravel tiles better

* Cont. colour balancing and texture changes

Essentially a more polished version of last commit. 
Soil is more textured, with a new highlight colour
New log is higher contrast
New planks texture that is less contrasty

* New grass plant texture

* Edit sand.json to reflect texture changes

* Delete misplaced texture

* New grass plant texture

* Fix line endings

---------

Co-authored-by: IntegratedQuantum <jahe788@gmail.com>
2024-04-11 13:43:20 +02:00
IntegratedQuantum
5d079c706e Fix incorrect assert which produced false positives. 2024-04-10 15:14:23 +02:00
IntegratedQuantum
0ab706c184 Fix stair model uvs
fixes #312
2024-04-08 17:12:03 +02:00
IntegratedQuantum
0a6521ff3e Fix texture brightness in game
Fixes #313
2024-04-08 15:35:50 +02:00
IntegratedQuantum
293100305c
Update the link to the java version. 2024-04-06 14:06:43 +02:00
IntegratedQuantum
63be36dfb3 I accidentally commited debug code that disabled occlusion culling in my previous commit. 2024-04-05 20:47:25 +02:00
IntegratedQuantum
f7cd5e4c9c Fix more errors at the integer limit.
Fixes #309
2024-04-05 11:44:42 +02:00
IntegratedQuantum
0b11301910 Some fixes for terrain generation at the world border.
Terrain generation no longer crashes which is a step a step towards #309
Also fixed #286 which I found along the way.
2024-04-04 18:58:33 +02:00
IntegratedQuantum
0acb0e2c80 Update zig
This one was annoying.
2024-04-03 13:57:38 +02:00
IntegratedQuantum
2dfbe98844 Add texture hot-reloading for Linux and Windows.
Closes #106
2024-04-02 16:47:32 +02:00
IntegratedQuantum
114888110d Fix the menu background capturing. 2024-04-01 11:38:21 +02:00
IntegratedQuantum
f4a8de00ba RotationModes can now change the selection based on the item.
Also make water unselectable.

Closes #292
2024-03-31 16:36:51 +02:00
IntegratedQuantum
5fea779e37 Undo the performance regression of the previous commit by adding a special case for air blocks. 2024-03-30 22:54:48 +01:00
IntegratedQuantum
4ab40cc85b Better occlusion and lighting for non-cube models.
Full faces of non-cube models now block light and occlude neighbor faces, whereas the others will let light through.
This does make light propapagation significantly (~40%) slower though due to the extra logic involved.

Closes #295
2024-03-30 22:13:55 +01:00
IntegratedQuantum
0bee580059 Add temporary chisel texture and recipe. 2024-03-30 15:58:27 +01:00
IntegratedQuantum
d1a81cfa93 Make light values more consistent at T-junctions inside of a model.
Fixes #291
2024-03-30 10:13:15 +01:00
IntegratedQuantum
6473362c6e Add the chisel to make stairs.
fixes #69
2024-03-28 21:11:46 +01:00
IntegratedQuantum
8418202df8 Store and update 3 color channels at once instead of treating them all seperately. This makes lighting ~twice as fast. 2024-03-26 21:23:21 +01:00
IntegratedQuantum
fce29ed4a0 Fix problem with the top fence uvs. 2024-03-25 21:57:49 +01:00
IntegratedQuantum
662ef94d0c Add a terrain border between caves and the ocean floor.
Fixes #282
Also fixes #281 by making water degradable
2024-03-25 20:55:31 +01:00
IntegratedQuantum
92b38a526e Add the torch model and rotation mode.
Resolves #70
2024-03-25 17:52:24 +01:00
IntegratedQuantum
44a786165d Properly handle closing the game menu.
Fixes #37
Fixes #248
Fixes #283
2024-03-25 14:17:37 +01:00
IntegratedQuantum
b6cffba122 Some small UI improvements
Fixes #245
Fixes #262
Fixes #284
Fixes #285
2024-03-24 20:00:21 +01:00
IntegratedQuantum
16f0e4d37f Add stairs as a rotation mode and generate all 2⁸ possible stair models.
A step towards #69, still missing a more convenient way to produce stairs.
2024-03-23 23:46:32 +01:00
IntegratedQuantum
c321bd927c RotationModes can now change block data on neighbor updates. This allows connecting fences on placement.
Closes #68
There is still some remaining functionality from the java version that's not implemented, but things like collision detection should be performed on the model directly instead of the rotation mode.
2024-03-22 23:00:35 +01:00
IntegratedQuantum
0159b65e51 Remove the Permutation and generate all variants of the fence model.
Progess towards #68
2024-03-22 21:27:10 +01:00
IntegratedQuantum
e248d85e1c Rotated block placement 2024-03-21 10:48:50 +01:00
IntegratedQuantum
3c7bd89be5 Create the base fence model. 2024-03-20 21:56:53 +01:00
IntegratedQuantum
69e1fe2f15 Allow rotation modes to create rotated versions of given block models.
A step towards #68
2024-03-20 15:25:19 +01:00
IntegratedQuantum
899083569d Remove redundant window ids. They were asserted to be equal to the file name, now they are initialized to the file name, removing the need for setting it manually.
This makes adding new windows simpler, also affects #273.
2024-03-19 22:17:46 +01:00
IntegratedQuantum
4ea46a6cde Remove the permutation code from the vertex shader, improving performance by 1.5 ms ≈ 10%
The entire permutation stuff was a bad idea. It makes more sense to do these calculations during meshing, using pre-rotated models.
Closes #121
2024-03-19 20:22:15 +01:00
IntegratedQuantum
1f78bde24f Rework meshing to support arbitrary quad models. Add some X-shaped grass to demonstrate that this system works. 2024-03-19 16:28:11 +01:00
IntegratedQuantum
21f2ab084a Light data can now be sampled for arbitrary models. Also remove unnecessarily complex code in transparency sorting.
Again preparing for #134
2024-03-13 20:55:00 +01:00
IntegratedQuantum
a1ddb6755d Pass the texture instead of the block to the GPU.
The block doesn't need to be known for rendering, all the info is in the texture now.
This is another step towards arbitrary models #134
2024-03-12 21:38:38 +01:00
IntegratedQuantum
80a4d2d35a The fog data is now part of the texture.
This is not really optimal, as this doesn't ensure that all textures of a block have the same fog, but this is an important step towards not storing the block id on the GPU and additionally this allows changing the fog of a block in future resource packs.
2024-03-12 11:45:38 +01:00
IntegratedQuantum
a164ee6794 Revert "Use instanced rendering to allow for an unlimited number of faces per chunk (previously it was limited by the size of the index buffer)."
Instanced rendering caused a 3× slowdown on an intel iGPU.

This reverts commit 45422f8be7b158385486666bd951bbcaddc5eb7c.
2024-03-11 21:04:10 +01:00
IntegratedQuantum
a682169562 Add absorption textures - previously absorption was constant throughout the block. 2024-03-11 21:02:56 +01:00
IntegratedQuantum
45422f8be7 Use instanced rendering to allow for an unlimited number of faces per chunk (previously it was limited by the size of the index buffer). 2024-03-11 15:50:54 +01:00
IntegratedQuantum
c4e76d060c Make the biome-type tree more stable when adding new biomes.
fixes #158
2024-03-10 20:25:34 +01:00
IntegratedQuantum
d0c805e0a1 Change how the face data is loaded in the vertex shader in preparation for arbitrary quad models #134
Also makes the shader a bit more readable and even slightly faster.
2024-03-10 16:33:47 +01:00
careeoki
494e46d993
Texture Update (#276)
* Add files via upload

Updated textures

* Add files via upload

* New & more saturated iterations

* New textures

* New and more saturated. Slightly less saturated than last commit

* New sand textures

* Tweak sand blocks, new ice texture

* New mossy cobble, tweaks to other textures

* Update block jsons to reflect texture changes

* Revert line endings

---------

Co-authored-by: IntegratedQuantum <jahe788@gmail.com>
2024-03-10 11:37:08 +01:00
IntegratedQuantum
53657292d7 Add reflectivity mapping and allow opaque blocks to be reflective. 2024-03-08 22:37:55 +01:00
Encrypted
12a85cc0d7 Fixed spelling mistake :) 2024-03-07 23:18:42 +01:00
IntegratedQuantum
fa641e57e4 Fix flipped textures and incorrect item textures.
Another problem caused by switching to z-up
2024-03-03 21:02:22 +01:00
IntegratedQuantum
3ae9921de8 Update Zig 2024-03-03 13:14:18 +01:00
IntegratedQuantum
dcb63fe175 Make surface biomes reach deeper underground in lod to avoid sampling the wrong biome.
Fixes #185
Fixes lod5 terrain, which previously was mostly stone.
2024-02-28 13:56:05 +01:00
IntegratedQuantum
500d997126 Use glClear to wait on vsync.
Otherwise this would happen when first rendering to the screen buffer, which blocks mesh uploading.
Fixes #269
2024-02-28 13:10:17 +01:00
IntegratedQuantum
b21164144d Fix item texture for transparent blocks - it was sorted incorrectly
The fog blocks are very faint, but that's fine.
Fixes #271
2024-02-28 12:32:49 +01:00
IntegratedQuantum
9f87f68f03 Fix some mistakes made while switching to z-up 2024-02-28 11:10:43 +01:00
IntegratedQuantum
1cc6410ef6 z is now up
Closes #272
2024-02-26 17:31:42 +01:00