From 156114359f6bb26a3cca198ac7a31bddc44381f7 Mon Sep 17 00:00:00 2001 From: rom Date: Sat, 24 Apr 2021 01:56:51 +0200 Subject: fonts --- .../builtin_res/fonts/fira_code/regular.png | Bin 0 -> 27940 bytes .../builtin_res/fonts/fira_code/regular.xml | 98 +++++++++++++++++++++ .../builtin_res/shaders/basic/fragment.glsl | 6 ++ .../builtin_res/shaders/basic/vertex.glsl | 7 ++ .../builtin_res/shaders/texture/fragment.glsl | 12 +++ .../builtin_res/shaders/texture/vertex.glsl | 12 +++ 6 files changed, 135 insertions(+) create mode 100644 txtgameengine/builtin_res/fonts/fira_code/regular.png create mode 100644 txtgameengine/builtin_res/fonts/fira_code/regular.xml create mode 100644 txtgameengine/builtin_res/shaders/basic/fragment.glsl create mode 100644 txtgameengine/builtin_res/shaders/basic/vertex.glsl create mode 100644 txtgameengine/builtin_res/shaders/texture/fragment.glsl create mode 100644 txtgameengine/builtin_res/shaders/texture/vertex.glsl (limited to 'txtgameengine/builtin_res') diff --git a/txtgameengine/builtin_res/fonts/fira_code/regular.png b/txtgameengine/builtin_res/fonts/fira_code/regular.png new file mode 100644 index 0000000..8fa2358 Binary files /dev/null and b/txtgameengine/builtin_res/fonts/fira_code/regular.png differ diff --git a/txtgameengine/builtin_res/fonts/fira_code/regular.xml b/txtgameengine/builtin_res/fonts/fira_code/regular.xml new file mode 100644 index 0000000..880f7d3 --- /dev/null +++ b/txtgameengine/builtin_res/fonts/fira_code/regular.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/txtgameengine/builtin_res/shaders/basic/fragment.glsl b/txtgameengine/builtin_res/shaders/basic/fragment.glsl new file mode 100644 index 0000000..a9dfa6f --- /dev/null +++ b/txtgameengine/builtin_res/shaders/basic/fragment.glsl @@ -0,0 +1,6 @@ +#version 330 core + +out vec4 fragColor; +void main() { + fragColor = vec4(0, 0, 1, 1); +} \ No newline at end of file diff --git a/txtgameengine/builtin_res/shaders/basic/vertex.glsl b/txtgameengine/builtin_res/shaders/basic/vertex.glsl new file mode 100644 index 0000000..92f7c97 --- /dev/null +++ b/txtgameengine/builtin_res/shaders/basic/vertex.glsl @@ -0,0 +1,7 @@ +#version 330 core + +layout(location = 0) in vec2 vertexPosition_modelspace; + +void main() { + gl_Position = vec4(vertexPosition_modelspace, 0, 1); +} diff --git a/txtgameengine/builtin_res/shaders/texture/fragment.glsl b/txtgameengine/builtin_res/shaders/texture/fragment.glsl new file mode 100644 index 0000000..d9d36fd --- /dev/null +++ b/txtgameengine/builtin_res/shaders/texture/fragment.glsl @@ -0,0 +1,12 @@ +#version 330 core + +in vec2 UV; + +out vec3 color; + +uniform sampler2D textureSampler; + +void main() { + color = texture(textureSampler, UV).rgb; +} + diff --git a/txtgameengine/builtin_res/shaders/texture/vertex.glsl b/txtgameengine/builtin_res/shaders/texture/vertex.glsl new file mode 100644 index 0000000..dd93afb --- /dev/null +++ b/txtgameengine/builtin_res/shaders/texture/vertex.glsl @@ -0,0 +1,12 @@ +#version 330 core + +layout(location=0) in vec3 vertexPosition_modelspace; +layout(location=1) in vec2 vertexUV; + +out vec2 UV; + +void main() { + gl_Position = vec4(vertexPosition_modelspace, 1); + UV = vertexUV; +} + -- cgit