ProgressBar.java added, can be used to represent healthbar ;o)
This commit is contained in:
19
shaders/StylishShaders/BasicNoTexVert.glsl
Normal file
19
shaders/StylishShaders/BasicNoTexVert.glsl
Normal file
@ -0,0 +1,19 @@
|
||||
#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 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);
|
||||
fragCoord = aPos.xy;
|
||||
}
|
21
shaders/StylishShaders/ProgressBarFrag.glsl
Normal file
21
shaders/StylishShaders/ProgressBarFrag.glsl
Normal file
@ -0,0 +1,21 @@
|
||||
#version 410
|
||||
|
||||
in vec4 color;
|
||||
in vec2 fragCoord;
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
uniform float time;
|
||||
uniform float fill;
|
||||
|
||||
void main()
|
||||
{
|
||||
if (fill > fragCoord.x){
|
||||
FragColor = color;
|
||||
}
|
||||
else {
|
||||
FragColor = vec4(color.xyz, 0f);
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user