Initial commit
BIN
assets/app.ico
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
assets/fonts/Anonymous Pro.ttf
Normal file
BIN
assets/fonts/Consolas.ttf
Normal file
BIN
assets/fonts/OpenSans-Bold.ttf
Normal file
BIN
assets/fonts/OpenSans-BoldItalic.ttf
Normal file
BIN
assets/fonts/OpenSans-ExtraBold.ttf
Normal file
BIN
assets/fonts/OpenSans-ExtraBoldItalic.ttf
Normal file
BIN
assets/fonts/OpenSans-Italic.ttf
Normal file
BIN
assets/fonts/OpenSans-Light.ttf
Normal file
BIN
assets/fonts/OpenSans-LightItalic.ttf
Normal file
BIN
assets/fonts/OpenSans-Regular.ttf
Normal file
BIN
assets/fonts/OpenSans-Semibold.ttf
Normal file
BIN
assets/fonts/OpenSans-SemiboldItalic.ttf
Normal file
11
assets/shaders/standard.frag.glsl
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#version 330 core
|
||||
|
||||
uniform sampler2D u_tex0;
|
||||
|
||||
in vec4 vColor; // Vertex color.
|
||||
in vec2 vTexCoord; // Texture coordinate.
|
||||
out vec4 fragColor;
|
||||
|
||||
void main() {
|
||||
fragColor = vColor * texture2D(u_tex0, vTexCoord);
|
||||
}
|
||||
21
assets/shaders/standard.vert.glsl
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#version 330 core
|
||||
|
||||
uniform mat4 u_MVP;
|
||||
|
||||
layout(location = 0) in vec3 in_pos;
|
||||
layout(location = 3) in vec3 in_color;
|
||||
layout(location = 8) in vec2 in_texcoord;
|
||||
|
||||
out vec4 vColor;
|
||||
out vec2 vTexCoord;
|
||||
|
||||
void main(void) {
|
||||
|
||||
gl_Position = u_MVP * vec4(in_pos, 1.0);
|
||||
|
||||
vColor = vec4(in_color, 1.0);
|
||||
|
||||
// in_texcoord is defined with (0,0) at top-left (same as in_pos)
|
||||
// however, sampling in OpenGL expects bottom-left. So we must flip Y.
|
||||
vTexCoord = vec2(in_texcoord.x, 1.0 - in_texcoord.y);
|
||||
}
|
||||
13
assets/shaders/text.frag.glsl
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#version 330 core
|
||||
|
||||
uniform sampler2D u_tex0;
|
||||
|
||||
in vec2 vTexCoords; // Texture coordinates (normalized)
|
||||
in vec4 vColor; // Vertex color
|
||||
out vec4 fragColor; // Output frag color.
|
||||
|
||||
void main() {
|
||||
// Sample texture red component as alpha value.
|
||||
vec4 sampled = vec4(1.0f, 1.0, 1.0, texture(u_tex0, vTexCoords).r);
|
||||
fragColor = vColor * sampled;
|
||||
}
|
||||
21
assets/shaders/text.vert.glsl
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#version 330 core
|
||||
|
||||
uniform mat4 u_MVP;
|
||||
uniform sampler2D u_tex0;
|
||||
|
||||
layout (location = 0) in vec2 in_pos;
|
||||
layout (location = 3) in vec3 in_color;
|
||||
layout (location = 8) in vec2 in_texCoords;
|
||||
|
||||
out vec2 vTexCoords;
|
||||
out vec4 vColor;
|
||||
|
||||
void main() {
|
||||
|
||||
gl_Position = u_MVP * vec4(in_pos, 0.0f, 1.0f);
|
||||
|
||||
// Texture coordinates are in pixels.
|
||||
// Need to convert into UV space before passing to fragment shader.
|
||||
vTexCoords = in_texCoords / textureSize(u_tex0, 0);
|
||||
vColor = vec4(in_color, 1.0);
|
||||
}
|
||||
BIN
assets/textures/Stripes0078_1_S.jpg
Normal file
|
After Width: | Height: | Size: 584 KiB |
BIN
assets/textures/WoodPlanksClean0089_4_S.jpg
Normal file
|
After Width: | Height: | Size: 507 KiB |
BIN
assets/textures/box_wood_256.jpg
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
assets/textures/debug.png
Normal file
|
After Width: | Height: | Size: 542 B |
BIN
assets/textures/debug_1channel.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/textures/debug_8.png
Normal file
|
After Width: | Height: | Size: 954 B |
BIN
assets/textures/debug_alpha.png
Normal file
|
After Width: | Height: | Size: 335 B |
BIN
assets/textures/debug_backdrop.jpg
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
assets/textures/debug_checkboard.jpg
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
assets/textures/floor1_1024.jpg
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
assets/textures/floor1_256.jpg
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
assets/textures/soil_sand.jpg
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
BIN
assets/textures/soil_sand_256.jpg
Normal file
|
After Width: | Height: | Size: 80 KiB |
BIN
assets/textures/wood_planks_512x1024.jpg
Normal file
|
After Width: | Height: | Size: 360 KiB |