Finished OpenGL rewrite§
This commit is contained in:
parent
86468a9ce4
commit
f634d70a2f
448 changed files with 111254 additions and 127 deletions
8
shaders/grid.frag
Normal file
8
shaders/grid.frag
Normal 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
13
shaders/grid.vert
Normal 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
16
shaders/plot.frag
Normal 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
16
shaders/plot.vert
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue