Instant Crash when using 330 core.

I was following the tutorial in the iris docs, but converted it to using 330 core, and now it crashes on successful load. I only have composite and textured shaders currently.
5 Replies
Allium
Allium4d ago
Do you want to upload this file to mclo.gs?
mclo.gs is a website that allows users to share minecraft logs through public posts. It's easier for the mobile users to view the file on mclo.gs, do you want it to be uploaded?
Uploaded by dragonmoffon
DragonMoffon
DragonMoffonOP4d ago
composite
#version 330 core

uniform mat4 textureMatrix;
uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;

in vec3 vaPosition;
in vec2 vaUV0;

out vec2 vs_uv;

void main() {
gl_Position = projectionMatrix * modelViewMatrix * vec4(vaPosition, 1.0);
vs_uv = (textureMatrix * vec4(vaUV0, 0.0, 1.0)).xy;
}
#version 330 core

uniform mat4 textureMatrix;
uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;

in vec3 vaPosition;
in vec2 vaUV0;

out vec2 vs_uv;

void main() {
gl_Position = projectionMatrix * modelViewMatrix * vec4(vaPosition, 1.0);
vs_uv = (textureMatrix * vec4(vaUV0, 0.0, 1.0)).xy;
}
#version 330 core

uniform sampler2D colortex0;

in vec2 vs_uv;

/* RENDERTARGETS: 0 */
layout(location = 0) out vec4 fs_colour;

void main() {
fs_colour = texture(colortex0, vs_uv);
}
#version 330 core

uniform sampler2D colortex0;

in vec2 vs_uv;

/* RENDERTARGETS: 0 */
layout(location = 0) out vec4 fs_colour;

void main() {
fs_colour = texture(colortex0, vs_uv);
}
terrain
#version 330 core

const mat4 TEXTURE_MATRIX_2 = mat4(vec4(0.00390625, 0.0, 0.0, 0.0), vec4(0.0, 0.00390625, 0.0, 0.0), vec4(0.0, 0.0, 0.00390625, 0.0), vec4(0.03125, 0.03125, 0.03125, 1.0));

uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;
uniform mat4 textureMatrix;

uniform mat3 normalMatrix;

uniform vec3 chunkOffset;

in vec4 vaColor;
in vec3 vaPosition;
in vec3 vaNormal;
in vec2 vaUV0;
in vec2 vaUV2;

out vec2 vs_lm;
out vec2 vs_uv;
out vec3 vs_normal;
out vec4 vs_colour;

void main() {
gl_Position = projectionMatrix * modelViewMatrix * vec4(vaPosition + chunkOffset, 1.0);
vs_uv = (textureMatrix * vec4(vaUV0, 0.0, 1.0)).xy;
vs_lm = (TEXTURE_MATRIX_2 * vec4(vaUV2, 0.0, 1.0)).xy;
vs_colour = vaColor;
vs_normal = normalMatrix * vaNormal;
}
#version 330 core

const mat4 TEXTURE_MATRIX_2 = mat4(vec4(0.00390625, 0.0, 0.0, 0.0), vec4(0.0, 0.00390625, 0.0, 0.0), vec4(0.0, 0.0, 0.00390625, 0.0), vec4(0.03125, 0.03125, 0.03125, 1.0));

uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;
uniform mat4 textureMatrix;

uniform mat3 normalMatrix;

uniform vec3 chunkOffset;

in vec4 vaColor;
in vec3 vaPosition;
in vec3 vaNormal;
in vec2 vaUV0;
in vec2 vaUV2;

out vec2 vs_lm;
out vec2 vs_uv;
out vec3 vs_normal;
out vec4 vs_colour;

void main() {
gl_Position = projectionMatrix * modelViewMatrix * vec4(vaPosition + chunkOffset, 1.0);
vs_uv = (textureMatrix * vec4(vaUV0, 0.0, 1.0)).xy;
vs_lm = (TEXTURE_MATRIX_2 * vec4(vaUV2, 0.0, 1.0)).xy;
vs_colour = vaColor;
vs_normal = normalMatrix * vaNormal;
}
#version 330 core

uniform sampler2D gtexture;

uniform float alphaTestRef = 0.1;

in vec2 vs_lm;
in vec2 vs_uv;
in vec3 vs_normal;
in vec4 vs_colour;

/* RENDERTARGETS: 0,1,2 */
layout(location = 0) out vec4 fs_colour;
layout(location = 1) out vec4 fs_lighting;
layout(location = 2) out vec4 fs_normal;

void main() {
fs_colour = texture(gtexture, vs_uv);
fs_colour.rgb *= vs_colour.rgb * vs_colour.a;
if (fs_colour.a < alphaTestRef) {
discard;
}
fs_lighting = vec4(vs_lm, 0.0, 1.0);
fs_normal = vec4(vs_normal * 0.5 + 0.5, 1.0);
}
#version 330 core

uniform sampler2D gtexture;

uniform float alphaTestRef = 0.1;

in vec2 vs_lm;
in vec2 vs_uv;
in vec3 vs_normal;
in vec4 vs_colour;

/* RENDERTARGETS: 0,1,2 */
layout(location = 0) out vec4 fs_colour;
layout(location = 1) out vec4 fs_lighting;
layout(location = 2) out vec4 fs_normal;

void main() {
fs_colour = texture(gtexture, vs_uv);
fs_colour.rgb *= vs_colour.rgb * vs_colour.a;
if (fs_colour.a < alphaTestRef) {
discard;
}
fs_lighting = vec4(vs_lm, 0.0, 1.0);
fs_normal = vec4(vs_normal * 0.5 + 0.5, 1.0);
}
Oh i've also got separatreAo=true but it was crashing before I added that anyway Its specifcally something wrong with the terrain shaders If I exclude them and just use the composite shaders everything runs fine
Slooshie
Slooshie4d ago
@IMS might have an answer
IMS
IMS4d ago
yeah core patching sucks
DragonMoffon
DragonMoffonOP4d ago
is there a reason why the patching is so bad it hard crashes?

Did you find this page helpful?