Finished OpenGL rewrite§

This commit is contained in:
Robert 2020-09-04 20:29:55 +02:00
parent 86468a9ce4
commit f634d70a2f
448 changed files with 111254 additions and 127 deletions

8
shaders/grid.frag Normal file
View file

@ -0,0 +1,8 @@
#version 460 core
out vec4 fragColor;
void main()
{
fragColor = vec4(0.1f, 0.1f, 0.1f, 1.0f);
}

13
shaders/grid.vert Normal file
View file

@ -0,0 +1,13 @@
#version 460 core
layout (location = 0) in vec3 aPos;
layout (location = 1) in float aArg;
uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;
void main()
{
gl_Position = projection * view * model * vec4(aPos, 1.0f);
}

16
shaders/plot.frag Normal file
View file

@ -0,0 +1,16 @@
#version 460 core
in float vertexArg;
out vec4 fragmentColor;
vec3 hsv2rgb(vec3 c)
{
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
}
void main()
{
fragmentColor = vec4(hsv2rgb(vec3(vertexArg, 1.0f, 1.0f)), 1.0f);
}

16
shaders/plot.vert Normal file
View file

@ -0,0 +1,16 @@
#version 460 core
layout (location = 0) in vec3 aPos;
layout (location = 1) in float aArg;
out float vertexArg;
uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;
void main()
{
gl_Position = projection * view * model * vec4(aPos, 1.0f);
vertexArg = aArg;
}