SoundBuffer, SoundListener, SoundManager, SoundSource, Correction d'un shader qui portait pas très bien son nom.

This commit is contained in:
Antoine
2021-05-29 00:36:33 +02:00
parent bd2a338370
commit 17ca8eedb7
9 changed files with 270 additions and 36 deletions

View File

@ -0,0 +1,26 @@
#version 410
out vec4 FragColor;
in vec4 color;
in vec2 fragCoord;
in vec2 texCoord;
uniform sampler2D texture1;
uniform float time;
void main(){
vec4 flash;
flash = sin(flash + time * 15);
flash = mix(flash, color, 0.5f);
vec4 tex = texture(texture1, texCoord);
if (tex.a == 0.0){
FragColor = tex;
} else{
FragColor = mix(tex, flash, 0.5f);
FragColor.a = 1.0f;
}
}

View File

@ -1,31 +0,0 @@
#version 410
// Source = https://www.shadertoy.com/view/MlsXDr
out vec4 FragColor;
in vec4 color;
in vec2 fragCoord;
in vec2 texCoord;
uniform sampler2D texture1;
uniform float time;
void main()
{ // Pas fini c'est moche
vec4 perlinNoise;
vec2 fragCoordTemp = fragCoord;
fragCoordTemp = 8. * fragCoordTemp / fragCoordTemp.y-vec2(7,4);
perlinNoise = sin(perlinNoise + time*15);
perlinNoise = mix(perlinNoise,color,0.5f);
vec4 tex = texture(texture1, texCoord);
if (tex.a == 0.0){
FragColor = tex;
} else{
FragColor = mix(tex, perlinNoise, 0.5f);
FragColor.a = 1.0f;
}
}