EmaMaker
e7c4b2d56b
lib: add dearimgui lib
2023-09-20 12:42:05 +02:00
EmaMaker
a6a419fdff
hud: crosshair with fragment shader
2023-09-20 12:42:05 +02:00
EmaMaker
3f61a6a753
renderer: screenshot by saving render texture to file
2023-09-20 12:37:32 +02:00
EmaMaker
00a4b8e1e2
renderer: properly handle framebuffer resizing
2023-09-20 12:37:32 +02:00
EmaMaker
4b723d58fa
libs: import stb_image_write
2023-09-20 12:37:32 +02:00
EmaMaker
1c0ee1315f
renderer: render scene to a texture
...
And then render the texture onto a quad that fills the screen
The screen-filled quad upon which the texture is rendered must never be rendered in wireframe. Rendering in wireframe only makes sense when rendering the world on the texture
2023-09-20 12:37:32 +02:00
EmaMaker
6670f3b41c
shader: make geometry shader not mandatory
2023-09-20 12:37:32 +02:00
EmaMaker
41275486a6
blockpicking: eventually mesh nearby chunks when destroying a block
...
this prevents stray floating quads when destroy a block near the chunk border
2023-08-12 08:44:46 +02:00
EmaMaker
3d0d8b7593
chunkmgr: chunk can be meshed if all neighbors are generated
...
(Restores seemless chunk borders)
2023-08-08 17:54:20 +02:00
EmaMaker
8d160c3239
Merge pull request 'Responsive block picking during generation and meshing' ( #7 ) from better-generation into main
...
Reviewed-on: #7
2023-07-30 12:30:31 +02:00
EmaMaker
ca04afcc89
Merge pull request 'Better World Generation' ( #6 ) from better-generation into main
...
Reviewed-on: #6
2023-07-30 12:28:59 +02:00
EmaMaker
1bea6c835c
separate mesh and generation threads, with priority queues for input
...
Allows blockpicking while the world is generating, without hiccups
2023-07-30 12:17:51 +02:00
EmaMaker
83f0aafba0
give leaves a sprinkle of color
2023-07-30 12:17:51 +02:00
EmaMaker
b0cf413baf
generator: add comments + a bit of refactor
2023-07-30 12:17:48 +02:00
EmaMaker
baa8d14bb3
generator: optimize leaves generation routine with LUT
2023-07-30 12:17:00 +02:00
EmaMaker
381cd698c7
Initial tree generation
...
Still very slow because multiple noise evaluations are needed
2023-07-30 12:16:32 +02:00
EmaMaker
9bc5bab3b2
mountain terrain with multiple octaves of noise
2023-07-30 12:13:08 +02:00
EmaMaker
8313ee97bc
Merge pull request 'Use Geometry Shader to generate the Mesh' ( #5 ) from vram-reduce into main
...
Reviewed-on: #5
2023-07-19 13:19:18 +02:00
EmaMaker
4fa89fd2f5
gamma correction
2023-07-19 13:06:01 +02:00
EmaMaker
950c43b163
refactor chunk meshing routine
2023-07-19 12:56:55 +02:00
EmaMaker
54c7fa172f
generate mesh from points using geometry shader
2023-07-19 12:42:45 +02:00
EmaMaker
e7fc35ec47
create chunk mesh as cloud of points
2023-07-19 12:42:23 +02:00
EmaMaker
ea036f403c
shader.hpp: add geometry shader support
2023-07-19 12:41:44 +02:00
EmaMaker
bff9e6ad4f
move normal data to own array
2023-07-18 21:18:12 +02:00
EmaMaker
a7b4671517
toggle wireframe with F
2023-07-18 20:12:25 +02:00
EmaMaker
4ada24e0d5
chunkmesher: check for NULLBLK to avoid holes at chunkborders
2023-07-18 20:02:37 +02:00
EmaMaker
73f38e5d2f
Merge pull request 'Seamless chunk borders' ( #4 ) from chunkborders into main
...
Reviewed-on: #4
2023-06-01 21:37:17 +02:00
EmaMaker
393e5ca9b2
chunkmesher: seamless chunkborders by checking neighbouring chunks
2023-06-01 21:31:18 +02:00
EmaMaker
f798575cac
chunkmanager: add function getBlockAtPos, returns block at world pos
...
Returns Block::NULLBLK only to signal an invalid position
2023-06-01 21:31:18 +02:00
EmaMaker
0ebbb897dc
chunk: handle special cases for getBlocks
...
Returning Block::AIR when chunk is not yet generated (CHUNK_STATE_GENERATED set to false) is also a way to avoid thread-unsafe concurrent
access to the IntervalMaps data structure, since CHUNK_STATE_GENERATED is set to false before
generating the Chunk and set again to true after generation is complete
2023-06-01 21:31:18 +02:00
EmaMaker
32d0475dbf
Merge pull request 'multithread blockpicking' ( #2 ) from multithread into main
...
Reviewed-on: #2
2023-06-01 17:47:48 +02:00
EmaMaker
095ebfa70d
Merge branch 'main' into multithread
2023-06-01 17:47:38 +02:00
EmaMaker
105fff0029
write number of triangles to Chunk only when sending to GPU
...
previously the current number of vertices was stored in the chunk, and the same variable got later reused for the number of triangles. This modification increases clarity and avoid glitches when blockpicking
2023-05-26 23:07:04 +02:00
EmaMaker
6113886117
multithreaded blockpicking
2023-05-26 23:03:18 +02:00
EmaMaker
802257abe3
Merge pull request 'multithread' ( #1 ) from multithread into main
...
Reviewed-on: #1
2023-05-20 22:33:56 +02:00
EmaMaker
2f9b7cebcd
chunk: make chunk size 32
...
slight increase in fps with no great increase in ram usage, with greater render distance
2023-05-20 22:15:32 +02:00
EmaMaker
0acb8c7c1e
free chunks from memory
2023-05-20 22:15:32 +02:00
EmaMaker
e225babb0c
chunkmesher: external queue of chunk mesh data
...
instead of every chunk having its own queue
This decreases usage of ram
2023-05-20 22:15:32 +02:00
EmaMaker
78e3bc11e6
initial update and render with concurrent DS
2023-05-20 22:15:15 +02:00
EmaMaker
1d3132cf3c
use oneTBB library
2023-04-29 14:54:09 +02:00
EmaMaker
52537715ef
chunks: make chunk state atomic
2023-04-23 16:28:36 +02:00
EmaMaker
3daf994ac3
opengl: disable vsync
...
This way I can better watch how changes affect FPS/frame times, rather than have it capped at
60FPS/16.6ms
Does not introduce visible tearing.
The engine runs at about 170 FPS on my Tesla M40, and so does minecraft. It never goes past that, I think this is a
limitation of using prime offloading. Runs at 300FPS on average on the Radeon HD6850 to which I
normally offload the Tesla to
2023-04-10 00:45:25 +02:00
EmaMaker
47543c9101
intervalmap: use updated upper_bound when checking removal of next node
2023-04-10 00:30:28 +02:00
EmaMaker
1a4412c5b1
renderer: initial texture support via ArrayTextures
...
totally stolen textures from minecraft
2023-04-10 00:30:28 +02:00
EmaMaker
2b1991ff2b
separate rendering in a dedicated file
2023-04-10 00:30:24 +02:00
EmaMaker
b4f3bdad06
experimental 3d generation
...
a cave-like effect
2023-03-29 21:39:53 +02:00
EmaMaker
40fec8a649
actual random generation
2023-03-29 21:39:53 +02:00
emamaker
179bd20aba
update .gitignore
2023-03-27 21:10:45 +02:00
emamaker
a039ced6cf
gamma correction
2023-03-27 21:10:45 +02:00
EmaMaker
44b027c3e2
Blinn-Phong lighting
2023-03-27 21:10:45 +02:00