Commit Graph

1308 Commits (master)

Author SHA1 Message Date
Quentin Bazin b2735fccb7 [GameKit] Updated. 2022-08-07 16:10:44 +02:00
Quentin Bazin 3b83399843 [CMakeLists.txt] Splitted into two new files.
- One for `external` folder
- One for `tests` folder
2022-08-07 16:10:44 +02:00
Quentin Bazin e62b94beab [FastNoiseLite] Added, replaced FastNoise. 2022-08-07 16:10:44 +02:00
Quentin Bazin 3b13b36fd4 Fixed a bug preventing loading of incompatible save files.
More error checking has to be performed here, along with a prompt for the user to ensure everything loads how he wants to.
2022-03-04 14:07:19 +01:00
Quentin Bazin 7e52b422ca [external/lua] Updated. 2022-03-04 13:45:55 +01:00
Quentin Bazin d385b29540 [external/gamekit] Updated.
[Vector3] Small fix.
2021-06-28 17:55:53 +02:00
Quentin Bazin e2f288cc86 [external/gamekit] Updated. Fixed build for MSVC (VS2019).
Also fixed a lot of warning from MSVC.
2021-06-23 16:28:38 +02:00
Quentin Bazin 029d8baa0b [BlockMesher] Renamed 'addCube' to 'addBlock'. 2021-06-17 22:21:56 +02:00
Quentin Bazin 89369ee335 [ChunkMeshBuilder] Splitted into multiple files. 2021-06-17 21:36:52 +02:00
Quentin Bazin 7d375ac843 [game.f.glsl] Now using normal for face shading.
Also inverted south/north and west/east shading.
2021-06-17 18:21:06 +02:00
Quentin Bazin 90e2d38c33 [Vertex] Default AO value is now 4. 2021-06-17 18:10:45 +02:00
Quentin Bazin 341e8fa2e0 [ChunkMeshBuilder] Fixed liquid rendering. 2021-06-17 16:41:53 +02:00
Quentin Bazin b227e254eb [HUD] Only displaying profiler window when debug overlay is hidden.
Added a message in DebugOverlay that is displayed when profiler is enabled.
2021-06-12 15:16:24 +02:00
Quentin Bazin 791e41ce36 [ChunkRenderer] Frustum culling implemented thanks to pgimeno's work.
See https://git.unarelith.net/Unarelith/OpenMiner/pulls/39
2021-06-12 14:01:14 +02:00
Quentin Bazin 26fbc8737c [DebugOverlay] Added "Chunks rendered" + "Chunk draw calls".
They show their value per tick, and those values are computed from last second.
2021-06-12 13:30:44 +02:00
Quentin Bazin 7da33916d9 [external/gamekit] Updated. 2021-06-12 12:33:57 +02:00
Quentin Bazin d21f8bffdd Small fixes.
- [SliderWidget] Rounds current value on mouse release since it only returns integers.
- [SettingsMenuState] Renamed "Fast" AO to "Basic" and "Fancy" AO to "Lighting based" + added a FIXME.
- [ChunkMeshBuilder] Uncommented light approximation fix.
2021-06-12 04:53:32 +02:00
Quentin Bazin 4ac3ac38ee [ClientPlayer] Small fixes related to view bobbing. 2021-06-11 15:44:44 +02:00
Quentin Bazin 0988d80256 Now using a VAO to render the chunks.
`apitrace` measurements (without HUD) for 2103 chunks loaded (`-s` parameter without moving):
   → 35611 OpenGL calls per frame initially
   → 7891 with VAO
   → 6353 with uniform location caching
2021-06-11 07:39:37 +02:00
Quentin Bazin af2f8007f6 [ClientChunk] Now using a single VBO per chunk. 2021-06-11 06:59:26 +02:00
Quentin Bazin 677992d93c [external/gamekit] Vertex attr layout is now handled by VertexBuffer. 2021-06-11 05:26:12 +02:00
Quentin Bazin c001308ae9 [ClientWorld] No longer handles chunk renderering.
All of it is handled by ChunkRenderer now.
2021-06-10 18:44:38 +02:00
Quentin Bazin a5de07c03b [ClientProfilerWindow] Added. 2021-06-10 15:05:55 +02:00
Quentin Bazin 669cbf70f9 Improved support for Clang.
Fixed most of the new warnings.
2021-06-10 02:04:14 +02:00
Quentin Bazin 54b0bdcaba [ClientPlayer] Added optional view bobbing. 2021-06-09 23:35:50 +02:00
Quentin Bazin 8bc6be20d5 [ChunkRenderer] No longer setting model matrix is the chunk is empty. 2021-06-09 19:52:13 +02:00
Quentin Bazin 72f0d81df1 [DebugLightmapViewer] Reduced the amount of Text objects created. 2021-06-09 19:51:40 +02:00
Quentin Bazin 475ff62018 [ChunkRenderer] Added.
For now I just moved the code from ClientChunk::draw there, while trying to optimize a bit the OpenGL setup for each draw.
2021-06-09 18:39:30 +02:00
Quentin Bazin 3b1855f10c [BlockCursor] Small fixes. 2021-06-09 18:38:13 +02:00
Quentin Bazin 60535e3fab [gamekit] Updated. 2021-06-09 18:37:53 +02:00
Quentin Bazin d5f5082bb0 Added -Wconversion and fixed warnings.
This mostly forces the casts to be explicit.
2021-06-09 04:36:26 +02:00
Quentin Bazin 7d3d231d3f [game.v.glsl] Tweaked AO values. 2021-06-06 23:05:40 +02:00
Quentin Bazin b7c9658ac3 [ChunkMeshBuilder] Small optimisation for getBlockState. 2021-06-05 17:23:13 +02:00
Quentin Bazin 5ff8f9b78b Fixed lighting issues. 2021-06-05 17:23:13 +02:00
Quentin Bazin 2bdc999294 [ClientWorld] Removing neighbour creation seems to improve performance. 2021-06-05 17:23:13 +02:00
Quentin Bazin f30f2ca727 Small optimizations. 2021-06-05 17:23:13 +02:00
Quentin Bazin a9657751ed [external/sol2] Updated. 2021-06-05 17:23:13 +02:00
Quentin Bazin 10b5235a42 [ClientWorld] Small improvement. 2021-06-05 17:23:13 +02:00
Quentin Bazin d73cb5e274 Small optimizations. 2021-06-05 17:23:13 +02:00
Quentin Bazin 9c4199bcb7 Chunk meshing is no longer limited by framerate. 2021-06-05 17:23:13 +02:00
Quentin Bazin 33847538ba [ChunkBuilder] Removed. 2021-06-05 17:23:13 +02:00
Quentin Bazin 39bb2c949a [ChunkMeshBuilder] Comment added. 2021-06-05 17:23:13 +02:00
Quentin Bazin 7b6ea921f8 [TextureAtlas] Some functions are private now. 2021-06-05 17:23:13 +02:00
Quentin Bazin 4bef97c3cf [ChunkMeshBuilder] Changed method, fixed lighting bugs. 2021-06-05 17:23:13 +02:00
Quentin Bazin c76f944132 [ChunkMeshBuilder] Direct surrounding chunks are now handled. 2021-06-05 17:23:13 +02:00
Quentin Bazin 2496f2e9ee Mesh building is now asynchronous.
- Added ChunkMeshBuilder to replace ChunkBuilder
- Added ThreadPool

Note: Surrounding chunks are not handled yet.
2021-06-05 17:23:13 +02:00
Quentin Bazin b41739146e Fixed server crash when two players tried to connect with same name. 2021-05-23 02:43:18 +02:00
Quentin Bazin d738e0cb7a [DebugOverlay] Use Shift+F3 to show OpenGL-related info. 2021-05-23 02:24:41 +02:00
Quentin Bazin 127d20009e [EngineConfig] Changed to 0.0.10. 2021-05-22 21:16:05 +02:00
Quentin Bazin 451fc714ed [BlockCursor] Fixed right-click holding. 2021-05-22 20:23:12 +02:00