Initial commit

This commit is contained in:
Riyyi
2021-02-20 01:07:10 +01:00
commit 57c16ef187
46 changed files with 7496 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
#version 130
out vec4 FragColor;
in vec3 color;
void main()
{
FragColor = vec4(color, 1.0f);
}
+16
View File
@@ -0,0 +1,16 @@
#version 130
in vec3 aPos;
in vec3 aColor;
out vec3 color;
uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;
void main()
{
// Vclip = Mprojection ⋅ Mview ⋅ Mmodel ⋅ Vlocal
gl_Position = projection * view * model * vec4(aPos, 1.0);
color = aColor;
}
+14
View File
@@ -0,0 +1,14 @@
#version 130
in vec2 textCoord;
out vec4 fragColor;
uniform vec3 color;
uniform sampler2D texture1;
void main()
{
// Sample sets the alpha channel to either 0 / 1
vec4 sampled = vec4(1.0f, 1.0f, 1.0f, texture(texture1, textCoord).r);
fragColor = vec4(color, 1.0f) * sampled;
}
+12
View File
@@ -0,0 +1,12 @@
#version 130
in vec4 postex; // <vec2 position, vec2 texture>
out vec2 textCoord;
uniform mat4 projection;
void main()
{
gl_Position = projection * vec4(postex.xy, 0.0f, 1.0f);
textCoord = postex.zw;
}
+13
View File
@@ -0,0 +1,13 @@
#version 130
in vec2 textCoord;
out vec4 FragColor;
uniform vec4 color;
uniform sampler2D texture1;
void main()
{
// FragColor = color;
FragColor = texture(texture1, textCoord) * color;
}
+16
View File
@@ -0,0 +1,16 @@
#version 130
in vec3 aPos;
in vec2 aTextCoord;
out vec2 textCoord;
uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;
void main()
{
// Vclip = Mprojection ⋅ Mview ⋅ Mmodel ⋅ Vlocal
gl_Position = projection * view * model * vec4(aPos, 1.0);
textCoord = aTextCoord;
}