A
This commit is contained in:
@@ -152,8 +152,8 @@ public class VoxelCore {
|
|||||||
|
|
||||||
this.renderer.renderFarAwayOpaque(viewport);
|
this.renderer.renderFarAwayOpaque(viewport);
|
||||||
|
|
||||||
//Compute the SSAO of the rendered terrain, TODO: fix it breaking depth
|
//Compute the SSAO of the rendered terrain, TODO: fix it breaking depth or breaking _something_ am not sure what
|
||||||
//this.postProcessing.computeSSAO(projection, matrices);
|
this.postProcessing.computeSSAO(projection, matrices);
|
||||||
|
|
||||||
//We can render the translucent directly after as it is the furthest translucent objects
|
//We can render the translucent directly after as it is the furthest translucent objects
|
||||||
this.renderer.renderFarAwayTranslucent(viewport);
|
this.renderer.renderFarAwayTranslucent(viewport);
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ public class SaveLoadSystem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int nonEmptyBlockCount = 0;
|
int nonEmptyBlockCount = 0;
|
||||||
for (int i = 0; i < section.data.length; i++) {
|
for (int i = 0; i < WorldSection.SECTION_VOLUME; i++) {
|
||||||
long state = lut[MemoryUtil.memGetShort(ptr)]; ptr += 2; if (VERIFY_MEMORY_ACCESS && data.size<=(ptr-data.address)) throw new IllegalStateException("Memory access OOB");
|
long state = lut[MemoryUtil.memGetShort(ptr)]; ptr += 2; if (VERIFY_MEMORY_ACCESS && data.size<=(ptr-data.address)) throw new IllegalStateException("Memory access OOB");
|
||||||
nonEmptyBlockCount += Mapper.isAir(state)?0:1;
|
nonEmptyBlockCount += Mapper.isAir(state)?0:1;
|
||||||
section.data[z2lin(i)] = state;
|
section.data[z2lin(i)] = state;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||||||
//Represents a loaded world section at a specific detail level
|
//Represents a loaded world section at a specific detail level
|
||||||
// holds a 32x32x32 region of detail
|
// holds a 32x32x32 region of detail
|
||||||
public final class WorldSection {
|
public final class WorldSection {
|
||||||
|
public static final int SECTION_VOLUME = 32*32*32;
|
||||||
public static final boolean VERIFY_WORLD_SECTION_EXECUTION = VoxyCommon.isVerificationFlagOn("verifyWorldSectionExecution");
|
public static final boolean VERIFY_WORLD_SECTION_EXECUTION = VoxyCommon.isVerificationFlagOn("verifyWorldSectionExecution");
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,9 @@ vec4 uint2vec4RGBA(uint colour) {
|
|||||||
|
|
||||||
vec4 getFaceSize(uint faceData) {
|
vec4 getFaceSize(uint faceData) {
|
||||||
float EPSILON = 0.001f;
|
float EPSILON = 0.001f;
|
||||||
|
|
||||||
vec4 faceOffsetsSizes = extractFaceSizes(faceData);
|
vec4 faceOffsetsSizes = extractFaceSizes(faceData);
|
||||||
|
|
||||||
//Expand the quads by a very small amount
|
//Expand the quads by a very small amount
|
||||||
faceOffsetsSizes.xz -= vec2(EPSILON);
|
faceOffsetsSizes.xz -= vec2(EPSILON);
|
||||||
faceOffsetsSizes.yw += vec2(EPSILON);
|
faceOffsetsSizes.yw += vec2(EPSILON);
|
||||||
|
|||||||
Reference in New Issue
Block a user