-
Notifications
You must be signed in to change notification settings - Fork 811
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix partition tree sorting on geometry with negative dot products and…
… some refactors (#2655) * Remove vertex range because the vertex offset is never used, instead use integers and/or integer arrays. * Refactor use of default terrain render passes and material to use `#isTranslucent() instead of enum equality. * Fix partition algorithm interval encoding by using floatToComparableInt and generally fix floatToComparableInt to actually function correctly. * Remove use of -1 as null-like vertex count, refactor translucent data objects to just deal with vertex counts instead of the mesh object.
- Loading branch information
Showing
23 changed files
with
132 additions
and
169 deletions.
There are no files selected for viewing
4 changes: 0 additions & 4 deletions
4
common/src/main/java/net/caffeinemc/mods/sodium/client/gl/util/VertexRange.java
This file was deleted.
Oops, something went wrong.
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
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
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
11 changes: 5 additions & 6 deletions
11
.../main/java/net/caffeinemc/mods/sodium/client/render/chunk/data/BuiltSectionMeshParts.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 |
---|---|---|
@@ -1,22 +1,21 @@ | ||
package net.caffeinemc.mods.sodium.client.render.chunk.data; | ||
|
||
import net.caffeinemc.mods.sodium.client.gl.util.VertexRange; | ||
import net.caffeinemc.mods.sodium.client.util.NativeBuffer; | ||
|
||
public class BuiltSectionMeshParts { | ||
private final VertexRange[] ranges; | ||
private final int[] vertexCounts; | ||
private final NativeBuffer buffer; | ||
|
||
public BuiltSectionMeshParts(NativeBuffer buffer, VertexRange[] ranges) { | ||
this.ranges = ranges; | ||
public BuiltSectionMeshParts(NativeBuffer buffer, int[] vertexCounts) { | ||
this.vertexCounts = vertexCounts; | ||
this.buffer = buffer; | ||
} | ||
|
||
public NativeBuffer getVertexData() { | ||
return this.buffer; | ||
} | ||
|
||
public VertexRange[] getVertexRanges() { | ||
return this.ranges; | ||
public int[] getVertexCounts() { | ||
return this.vertexCounts; | ||
} | ||
} |
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
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
Oops, something went wrong.