amélioration de la portabilité des nuanceurs

This commit is contained in:
papush! 2021-09-24 23:03:30 +02:00
parent c4e7bb140a
commit df2c318429

View File

@ -5,12 +5,10 @@
const GLchar *vertex_shader_source = R"glsl(
#version 150 core
attribute vec3 pos;
attribute vec3 col;
in vec3 pos;
in vec3 col;
out vec3 frag_col;
varying vec3 frag_col;
uniform mat4 proj;
uniform mat4 view;
@ -23,10 +21,7 @@ void main() {
)glsl";
const GLchar *fragment_shader_source = R"glsl(
#version 150 core
in vec3 frag_col;
out vec4 final_col;
varying vec3 frag_col;
uniform vec3 wf_col;
uniform bool wireframe;
@ -34,9 +29,9 @@ uniform float alpha;
void main() {
if (wireframe)
final_col = vec4(wf_col, alpha);
gl_FragColor = vec4(wf_col, alpha);
else
final_col = vec4(frag_col, alpha);
gl_FragColor = vec4(frag_col, alpha);
}
)glsl";