22 lines
441 B
Plaintext
22 lines
441 B
Plaintext
|
#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);
|
||
|
}
|
||
|
}
|