Shader Class
This commit is contained in:
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);
|
||||
}
|
||||
Reference in New Issue
Block a user