24 lines
434 B
GLSL
24 lines
434 B
GLSL
|
#version 430 core
|
||
|
|
||
|
uniform float progress;
|
||
|
uniform vec3 activeColor;
|
||
|
|
||
|
in vec3 worldPos;
|
||
|
in vec2 texCoord;
|
||
|
in vec3 color;
|
||
|
|
||
|
out vec4 outColor;
|
||
|
void main()
|
||
|
{
|
||
|
vec4 inactiveColor = vec4(0.5, 0.5, 0.5, 1.0);
|
||
|
|
||
|
if (texCoord.x > progress) {
|
||
|
outColor = inactiveColor; // Ustawienie koloru dla obszaru nieaktywnego
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
outColor = vec4(activeColor,1.0); // Ustawienie koloru dla obszaru aktywnego
|
||
|
|
||
|
|
||
|
|
||
|
}
|