WavyTextVert.glsl + support des shaders dans UIElementText.java
This commit is contained in:
@ -7,7 +7,6 @@ in vec2 fragCoord;
|
||||
in vec2 texCoord;
|
||||
|
||||
uniform sampler2D texture1;
|
||||
uniform int index;
|
||||
|
||||
void main(){
|
||||
vec3 black = vec3(0.0f, 0.0f , 0.0f);
|
||||
|
27
shaders/StylishShaders/WavyTextVert.glsl
Normal file
27
shaders/StylishShaders/WavyTextVert.glsl
Normal file
@ -0,0 +1,27 @@
|
||||
#version 410 core
|
||||
|
||||
layout (location = 0) in vec3 aPos;
|
||||
layout (location = 1) in vec3 aColor;
|
||||
layout (location = 2) in vec2 aTexCoord;
|
||||
|
||||
out vec2 fragCoord;
|
||||
out vec2 texCoord;
|
||||
out vec4 color;
|
||||
|
||||
uniform mat4 projection;
|
||||
uniform mat4 view;
|
||||
uniform mat4 transform;
|
||||
uniform int index;
|
||||
uniform float time;
|
||||
|
||||
void main()
|
||||
{
|
||||
float speed = 10f;
|
||||
float amplitude = 4f;
|
||||
vec3 newPos = aPos;
|
||||
newPos.y = newPos.y + (sin((time + index * 10f + newPos.x) * speed) * amplitude);
|
||||
gl_Position = projection * view * transform * vec4(newPos, 1.0);
|
||||
color = vec4(aColor, 1.0f);
|
||||
texCoord = aTexCoord;
|
||||
fragCoord = aPos.xy;
|
||||
}
|
Reference in New Issue
Block a user