Shaders modif
This commit is contained in:
@ -2,6 +2,8 @@
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
uniform float time;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vec4(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
|
@ -4,6 +4,8 @@ in vec3 color;
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
uniform float time;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vec4(color, 1.0f);
|
||||
|
@ -1,10 +1,11 @@
|
||||
#version 330 core
|
||||
#version 410 core
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
in vec2 texCoord;
|
||||
|
||||
uniform sampler2D texture1;
|
||||
uniform float time;
|
||||
|
||||
void main()
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
#version 330 core
|
||||
#version 410 core
|
||||
|
||||
layout (location = 0) in vec3 aPos;
|
||||
layout (location = 2) in vec2 aTexCoord;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#version 330 core
|
||||
#version 410 core
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
@ -6,8 +6,14 @@ in vec4 color;
|
||||
in vec2 texCoord;
|
||||
|
||||
uniform sampler2D texture1;
|
||||
uniform float time;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = mix(texture(texture1, texCoord), color, 0.5);
|
||||
vec4 tex = texture(texture1, texCoord);
|
||||
if (tex.a == 0.0){
|
||||
FragColor = tex;
|
||||
} else{
|
||||
FragColor = mix(tex, color, 0.5);
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
#version 330 core
|
||||
#version 410 core
|
||||
|
||||
layout (location = 0) in vec3 aPos;
|
||||
layout (location = 1) in vec3 aColor;
|
||||
|
21
shaders/PowerUpShader/FragEnergyWave.glsl
Normal file
21
shaders/PowerUpShader/FragEnergyWave.glsl
Normal file
@ -0,0 +1,21 @@
|
||||
#version 410
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
in vec4 color;
|
||||
in vec4 position;
|
||||
in vec2 texCoord;
|
||||
|
||||
uniform sampler2D texture1;
|
||||
uniform float time;
|
||||
|
||||
void main()
|
||||
{ // Pas fini c'est moche
|
||||
vec4 colorPoweredUp = vec4(color.xyz * sin(position.y + time*40) * cos(position.x + time*40), 1.0);
|
||||
vec4 tex = texture(texture1, texCoord);
|
||||
if (tex.a == 0.0){
|
||||
FragColor = tex;
|
||||
} else{
|
||||
FragColor = mix(tex, colorPoweredUp, 0.5);
|
||||
}
|
||||
}
|
21
shaders/PowerUpShader/VertEnergyWave.glsl
Normal file
21
shaders/PowerUpShader/VertEnergyWave.glsl
Normal file
@ -0,0 +1,21 @@
|
||||
#version 410 core
|
||||
|
||||
layout (location = 0) in vec3 aPos;
|
||||
layout (location = 1) in vec3 aColor;
|
||||
layout (location = 2) in vec2 aTexCoord;
|
||||
|
||||
out vec4 position;
|
||||
out vec2 texCoord;
|
||||
out vec4 color;
|
||||
|
||||
uniform mat4 projection;
|
||||
uniform mat4 view;
|
||||
uniform mat4 transform;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = projection * view * transform * vec4(aPos, 1.0);
|
||||
color = vec4(aColor, 1.0f);
|
||||
texCoord = aTexCoord;
|
||||
position = vec4(aPos, 1.0);
|
||||
}
|
Reference in New Issue
Block a user