Added initial engine
This commit is contained in:
commit
79787f6525
30 changed files with 1914 additions and 0 deletions
BIN
res/img/player-ship.png
Normal file
BIN
res/img/player-ship.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 553 B |
9
res/shaders/s2c/frag.gls
Normal file
9
res/shaders/s2c/frag.gls
Normal file
|
@ -0,0 +1,9 @@
|
|||
#version 330 core
|
||||
|
||||
uniform vec4 iColor = vec4(0, 0.6, 0.9, 1);
|
||||
|
||||
out vec4 color;
|
||||
|
||||
void main() {
|
||||
color = iColor;
|
||||
}
|
9
res/shaders/s2c/vert.gls
Normal file
9
res/shaders/s2c/vert.gls
Normal file
|
@ -0,0 +1,9 @@
|
|||
#version 330 core
|
||||
|
||||
uniform mat4 mvp;
|
||||
|
||||
layout (location = 0) in vec3 vertices;
|
||||
|
||||
void main() {
|
||||
gl_Position = mvp * vec4(vertices, 1);
|
||||
}
|
21
res/shaders/s2t/frag.gls
Normal file
21
res/shaders/s2t/frag.gls
Normal file
|
@ -0,0 +1,21 @@
|
|||
#version 330 core
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
13
res/shaders/s2t/vert.gls
Normal file
13
res/shaders/s2t/vert.gls
Normal file
|
@ -0,0 +1,13 @@
|
|||
#version 330 core
|
||||
|
||||
uniform mat4 mvp;
|
||||
|
||||
layout (location = 0) in vec3 vertices;
|
||||
layout (location = 1) in vec2 itexCoords;
|
||||
|
||||
out vec2 texCoords;
|
||||
|
||||
void main() {
|
||||
texCoords = itexCoords;
|
||||
gl_Position = mvp * vec4(vertices, 1);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue