Fixes ordering for z & x loops (proper array increment order)
The ordering before would skip about in the ids and metadata arrays. This runs linearly and should improve performance. Done live on github
This commit is contained in:
parent
e8aaf81627
commit
17151718aa
|
@ -86,9 +86,9 @@
|
||||||
+
|
+
|
||||||
+ for (int y = 0; y < max; ++y)
|
+ for (int y = 0; y < max; ++y)
|
||||||
+ {
|
+ {
|
||||||
+ for (int x = 0; x < 16; ++x)
|
+ for (int z = 0; z < 16; ++z)
|
||||||
+ {
|
+ {
|
||||||
+ for (int z = 0; z < 16; ++z)
|
+ for (int x = 0; x < 16; ++x)
|
||||||
+ {
|
+ {
|
||||||
+ int idx = y << 8 | z << 4 | x;
|
+ int idx = y << 8 | z << 4 | x;
|
||||||
+ int id = ids[idx] & 0xFFFFFF;
|
+ int id = ids[idx] & 0xFFFFFF;
|
||||||
|
|
Loading…
Reference in New Issue