1d simple perlin noise
This commit is contained in:
@ -1,21 +0,0 @@
|
||||
#version 410
|
||||
|
||||
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 colorPoweredUp = abs(vec4(color.xyz * sin(fragCoord.y + time*20), 1.0));
|
||||
vec4 tex = texture(texture1, texCoord);
|
||||
if (tex.a == 0.0){
|
||||
FragColor = tex;
|
||||
} else{
|
||||
FragColor = mix(tex, colorPoweredUp, 0.5);
|
||||
}
|
||||
}
|
31
shaders/StylishShaders/PerlinNoise.glsl
Normal file
31
shaders/StylishShaders/PerlinNoise.glsl
Normal file
@ -0,0 +1,31 @@
|
||||
#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);
|
||||
perlinNoise = mix(perlinNoise,color,0.5f);
|
||||
|
||||
vec4 tex = texture(texture1, texCoord);
|
||||
if (tex.a == 0.0){
|
||||
FragColor = tex;
|
||||
} else{
|
||||
FragColor = mix(tex, perlinNoise, 0.5);
|
||||
FragColor.a = 1.0f;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user