Added parallax background, ship, and firing. Collision is WIP

This commit is contained in:
Gnarwhal 2024-08-07 05:04:16 +00:00
parent 79787f6525
commit 0605e4d91b
Signed by: Gnarwhal
GPG key ID: 0989A73D8C421174
28 changed files with 588 additions and 150 deletions

View file

@ -2,20 +2,12 @@
uniform sampler2D sampler;
uniform vec4 iColor = vec4(1, 1, 1, 1);
uniform float alpha = 1;
uniform float amount = 1;
in vec2 texCoords;
out vec4 color;
void main() {
vec4 texColor = texture(sampler, texCoords);
if(texColor.a == 0)
discard;
else {
color = mix(iColor, texColor, amount);
color.a = color.a * alpha;
}
color = texture(sampler, texCoords);
if (color.a == 0)
discard;
}