Added initial engine
This commit is contained in:
commit
79787f6525
30 changed files with 1914 additions and 0 deletions
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