Added fading between states

This commit is contained in:
grayson committed 2021-09-07 01:08:37 -05:00
1 parent c78abf303e
commit 7ea56370d6
10 files changed
+146 -18

No files matched your search

@@ -0,0 +1,10 @@
#version 330 core
uniform float opacity;
out vec4 color;
void main() {
color = vec4(0.0, 0.0, 0.0, opacity);
}
@@ -0,0 +1,8 @@
#version 330 core
layout(location = 0) in vec2 pos;
void main() {
gl_Position = vec4(pos.xy, 0.0, 1.0);
}
@@ -8,7 +8,7 @@ uniform float opacity;
out vec4 color;
void main() {
vec3 texColor = texture(tex, texCoord).rgb;
vec4 texColor = texture(tex, texCoord);
color = vec4(texColor.rgb, opacity);
color = vec4(texColor.rgb, texColor.a * opacity);
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 937 KiB