-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Game not starting. Says that GLSL is not supported #55
Comments
Could I know what OS you're running on and what your graphics adapter is? |
My OS is FreeBSD 13.0-RELEASE-p4, my graphics adapter is intel integrated gpu. Minecraft 1.18 runs on about 100fps |
That's odd, if your GPU can run Mine raft (which uses GLSL 150, which is GL 3.2), how come it doesn't support GLSL 330 ? (Which is merely one version away) |
I need you to be a bit more specific than that. Either way, I believe I know what the issue is, and it isn't really an "issue" per se, but rather just a simple incompatibility. You can work around this by replacing #version 300 es
precision mediump float; This should convert your shaders to OpenGL ES shaders, which your drivers seems to support. I don't have the necessary hardware nearby to test this right now, so you might still get a few errors (in which case do send them). |
shader.Shader_error: b'0:2(1): preprocessor error: Illegal non-directive after #\n' |
Could you send your full shader source? |
Full shader source? |
I think he means the whole shader file. |
vert.glsl: #version 300 es
#percision mediump float;
layout(location = 0) in vec3 vertex_position;
layout(location = 1) in vec3 tex_coords;
layout(location = 2) in float shading_value;
out vec3 local_position;
out vec3 interpolated_tex_coords;
out float interpolated_shading_value;
uniform mat4 matrix;
void main(void) {
local_position = vertex_position;
interpolated_tex_coords = tex_coords;
interpolated_shading_value = shading_value;
gl_Position = matrix * vec4(vertex_position, 1.0);
} frag.glsl: #version 300 es
#precision mediump float;
out vec4 fragment_colour;
uniform sampler2DArray texture_array_sampler;
in vec3 local_position;
in vec3 interpolated_tex_coords;
in float interpolated_shading_value;
void main(void) {
vec4 texture_colour = texture(texture_array_sampler, interpolated_tex_coords);
fragment_colour = texture_colour * interpolated_shading_value;
if (texture_colour.a == 0.0) { // discard if texel's alpha component is 0 (texel is transparent)
discard;
}
} |
You didn't copy the snippet I sent over correctly. |
|
Now this appears |
Ah yes, I forgot the precision specifier for precision lowp sampler2DArray; Again sorry for all this back and forth; I don't have a system to test this on right now. |
Thanks!!! Now everything works! |
Great! |
Why is this still pinned? |
Because it seems to be a relatively common issue. |
The text was updated successfully, but these errors were encountered: