Shader Class
This commit is contained in:
parent
15cc550bf9
commit
c085fdbf5a
5 changed files with 144 additions and 64 deletions
8
shaders/rgbPulseFrag.glsl
Normal file
8
shaders/rgbPulseFrag.glsl
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#version 330 core
|
||||
out vec4 FragColor;
|
||||
in vec3 color;
|
||||
uniform float u_time;
|
||||
void main()
|
||||
{
|
||||
FragColor = vec4(color,0.0)*(sin(u_time)/2.0+0.5);
|
||||
}
|
||||
9
shaders/rgbPulseVert.glsl
Normal file
9
shaders/rgbPulseVert.glsl
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#version 330 core
|
||||
layout (location = 0) in vec3 aPos;
|
||||
layout (location = 1) in vec3 aColor;
|
||||
out vec3 color;
|
||||
void main()
|
||||
{
|
||||
color = aColor;
|
||||
gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue