-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Mapblock mesh LOD #16594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Handmade9485
wants to merge
126
commits into
luanti-org:master
Choose a base branch
from
Handmade9485:convex_hull
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+647
−78
Draft
Mapblock mesh LOD #16594
Changes from 107 commits
Commits
Show all changes
126 commits
Select commit
Hold shift + click to select a range
b34a5ba
lod tests
9c6c08e
trying lod stuff
50a34d3
trying lod stuff
cee817b
trying lod stuff
fb5479e
Merge branch 'master' of https://github.com/minetest/minetest
89acd64
lod experiments
68aad86
corrected merge conflicts
0367966
added bandaid lods
7bb2524
exponential size scaling for lods reduced to linear
01de3d1
added client side lod meshes
749d251
fixed lod lighting
2b71caf
merged luanti 5.11.0
e429bd8
fixed edge cases
c8ceb27
improved lod performance through refactoring
121a94f
fixed lod lighting in caves
206cf4c
fixed lod UVs; changed the default settings
c8985b1
re enabled lod multithreading
78e81fc
added blocky lods
baefe7c
some code clean up
27007d0
fixed holes in lods
a792a8a
fixed lod lighting
07ecadb
fixed lod uvs
7cba51d
added lod slanted setting
5dd28c8
re added leaves to render on slantes lods
9317582
1x1x1 lods are shown again to avoid holes in the world
333265a
removed duplicate multithreading from lods
8118817
correctly centered lods on current pos if using larger mesh sizes
c26cf7b
minor lod fixes
93de028
fixed water rendering as wrong kind of lod
3a0a4f1
skipped rendering small quads on larger lods
1b55794
changed slanted threshold and fixed skipping of still large enough lods
8300153
Fixed simple leaves not showing on lods
e00b7f7
Added minimum lod setting
f15c601
Added minimum lod setting
0a6daa2
Changed LOD defaults
ca2a874
Changed near LOD calcs to facilitate future greedy meshing
04270ca
Fixed lod overflow issues
abfb28e
Some cleanup and removed traces of materialless branch
fd6fc0b
More LOD cleanup and performance improvement for close up water
55ceb90
Added greedy meshing to lods
6b91853
Monoblocks: optimize blocks that contain a single type of node
lhofhansl da4ff12
Check for mono-block after copyTo
lhofhansl 5d9ce24
Make sure monoblocks account for all node params
lhofhansl 3d3854d
Review comments
lhofhansl 5a7caa5
speed up getNode memory access
lhofhansl a374f32
getBlockNodeIdMapping signature
lhofhansl 06d9e33
track memory correctly
lhofhansl fa46f50
style
lhofhansl 80f871c
loose ends and a unit test
lhofhansl 22569a0
slight improvement
lhofhansl f5a5f8c
address review
lhofhansl 5277ae7
Use unique_ptr and std::copy
lhofhansl a04c00c
allow copy to vmanip directly from a mono-block
lhofhansl 7054cc1
hoist is_mono_block out of serialization loop
lhofhansl a27046d
Start every block as monoblock, and set m_is_mono_block in reallocate
lhofhansl d5bb8e1
minor cleanups
lhofhansl 8c961f7
test fix/improvement
lhofhansl 14026bc
alignment
lhofhansl 13aa2e1
review comments
lhofhansl ad60bcd
start blocks out a expanded block (not monoblocks)
lhofhansl 980f01f
slight improvements, shrink also when deserializing from network
lhofhansl c8c5ca9
more greedy meshing attempts
0ceaaa6
greedy mesher uses u64 instead of bitsets now
abbd4f7
attempted but failed lighting on greedy meshes
3e58ba9
Merge tag '5.12.0' of https://github.com/minetest/minetest into conve…
2d74406
fixed overflow on mesh grid size 16
6cf9ebc
merge monoblocks
f99f6a3
fixed overflow on mesh grid size 16 part 2
e6241eb
added lod resolution
d50fd7c
increased view range to 8k
c80f3f5
moved greedy lod generation to its own function
dc06267
moved greedy lod generation to its own function yet again
6e24dc8
greedy mesher only draws most common node types
81e99f7
used u64 instead of std::bitset
5227e2a
further progress using u64 instead of std::bitset
c8ff66c
finished switching to u64 for bitsets
0a07d39
i dont remember what i did here
0eb1e80
lod generation simplified
6cfe22e
fixed lod lighting
93c207a
fixed sides of lod not rendering
8d842ec
more lod sampling and profiling
a25aa3d
actually added profiling
d935e97
excluded padding node in lod generation, only generate minimap for no…
f93b28d
Merge tag '5.14.0' of https://github.com/minetest/minetest into conve…
c15577e
flattened some datastructures
5d67514
fixed segfault due to getNodeUnsafe, simplified some multiplications …
f2cdc91
calc decimal places on mesh gen duration
ca7e818
more minor lod improvements
0cf0cba
removed slanted lods
231a9b7
started mono material lods
a51c750
mono material lod depend on node color
a6f34c5
removed space formatting
9a2f7fa
added lod mono material setting
fd4d2ce
minor clean ups and naming conventions
bb6e699
Merge branch 'master' of https://github.com/minetest/minetest into co…
346b6f3
Moved lod mesh gen to its own file
43016c2
removed merge error
8053da1
fixed textureless lighting by extending the shader/materials
81a4b01
fixed incorrect indent and removed unused code
8ff0789
added tile colors for use in textureless lod meshes that dont depend …
d9652b0
reordered lod directions to be in line with the rest of the engine
5c65474
replaced magic number with a constant
386b17d
fixed some nuclear level brain farts
7e82666
added some comments
89f800c
moved lod calculation outside of mesh gen thread
085f2dc
reimplemented std::__countr_zero in software to support other compilers
3b1cedd
used __builtin_ctzll instead
fe7e122
fixed lods not being aligned with chunks
a6c648c
fixed typo
2839bd1
Merge branch 'master' of https://github.com/minetest/minetest into co…
7be62a3
removed textureless material
13fb67a
always include glasslikes in lods to be more consistent
00ac531
hopefully be portable. dont have all the compilers to test, so have t…
7151710
added mesh nodes to lods as regular nodes
731e4b5
renamed mono material to textureless to be more consistent
d95655e
added a setting to enable/disable LODs altogether
f2b6d47
replaced spaces with tabs
59de5e6
fixed wrong whitespace and removed unused code
8fdf597
fixed usage of _BitScanForward64
885b0b9
fixed even more wrong indents
92a9bfe
Merge branch 'master' of https://github.com/minetest/minetest into co…
40e338c
fixed a whole lot of merge mistakes
25c3c65
even more wrong whitespace
3445571
even more wrong whitespace
0f158fb
even more wrong whitespace
4902bb7
hope and pray i finally used _BitScanForward64 correctly
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can pass this as a shader parameter, don't add a new material.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I think i got a pretty ok idea of what this entails, but just wanna confirm it before putting in too much work.
Is this how its done or am i overlooking something simpler?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
way too complicated.
look into how
ContentFeatures::updateTexturesusesIShaderSource::getShaderto pass the "use an array texture or not" information to the shader.the textureless property can work exactly the same way.