-
Notifications
You must be signed in to change notification settings - Fork 816
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add removable tree and forest system for supporting the out-of-graph …
…fallback and for use in iris. Now that there's a fallback, we don't need to accept using invalid trees if there's no other trees available. fix tree isValid test for wide trees. rename the trees field on RSM since it's misleading (it's actually forests, and they're cull results)
- Loading branch information
Showing
8 changed files
with
333 additions
and
48 deletions.
There are no files selected for viewing
This file contains 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 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
25 changes: 25 additions & 0 deletions
25
...a/net/caffeinemc/mods/sodium/client/render/chunk/lists/FallbackVisibleChunkCollector.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package net.caffeinemc.mods.sodium.client.render.chunk.lists; | ||
|
||
import it.unimi.dsi.fastutil.longs.Long2ReferenceMap; | ||
import net.caffeinemc.mods.sodium.client.render.chunk.RenderSection; | ||
import net.caffeinemc.mods.sodium.client.render.chunk.region.RenderRegionManager; | ||
import net.caffeinemc.mods.sodium.client.render.viewport.Viewport; | ||
|
||
public class FallbackVisibleChunkCollector extends FrustumTaskCollector { | ||
private final VisibleChunkCollectorAsync renderListCollector; | ||
|
||
public FallbackVisibleChunkCollector(Viewport viewport, float buildDistance, Long2ReferenceMap<RenderSection> sectionByPosition, RenderRegionManager regions, int frame) { | ||
super(viewport, buildDistance, sectionByPosition); | ||
this.renderListCollector = new VisibleChunkCollectorAsync(regions, frame); | ||
} | ||
|
||
public SortedRenderLists createRenderLists() { | ||
return this.renderListCollector.createRenderLists(); | ||
} | ||
|
||
@Override | ||
public void visit(int x, int y, int z) { | ||
super.visit(x, y, z); | ||
this.renderListCollector.visit(x, y, z); | ||
} | ||
} |
This file contains 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 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
5 changes: 5 additions & 0 deletions
5
...on/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/tree/RemovableForest.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package net.caffeinemc.mods.sodium.client.render.chunk.tree; | ||
|
||
public interface RemovableForest extends TraversableForest { | ||
void remove(int x, int y, int z); | ||
} |
Oops, something went wrong.