Added missing .0, and shader dumping
This commit is contained in:
@@ -6,6 +6,9 @@ import me.cortex.voxy.common.Logger;
|
|||||||
import me.cortex.voxy.common.util.TrackedObject;
|
import me.cortex.voxy.common.util.TrackedObject;
|
||||||
import org.lwjgl.opengl.GL20C;
|
import org.lwjgl.opengl.GL20C;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Path;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -177,8 +180,12 @@ public class Shader extends TrackedObject {
|
|||||||
|
|
||||||
if (result != GL20C.GL_TRUE) {
|
if (result != GL20C.GL_TRUE) {
|
||||||
GL20C.glDeleteShader(shader);
|
GL20C.glDeleteShader(shader);
|
||||||
|
try {
|
||||||
throw new RuntimeException("Shader compilation failed of type " + type.name() + ", see log for details");
|
Files.writeString(Path.of("SHADER_DUMP.txt"), src);
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
throw new RuntimeException("Shader compilation failed of type " + type.name() + ", see log for details, dumped shader");
|
||||||
}
|
}
|
||||||
|
|
||||||
return shader;
|
return shader;
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ bool isCulledByHiz() {
|
|||||||
miplevel = ceil(miplevel);
|
miplevel = ceil(miplevel);
|
||||||
miplevel = clamp(miplevel, 0, 20);
|
miplevel = clamp(miplevel, 0, 20);
|
||||||
|
|
||||||
if (miplevel >= 10f) {//Level 9 or 10// TODO: FIX THIS JANK SHIT
|
if (miplevel >= 10.0f) {//Level 9 or 10// TODO: FIX THIS JANK SHIT
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user