aboutsummaryrefslogtreecommitdiff
path: root/assets/.stationary
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2022-04-19 12:36:02 -0700
committerrtk0c <[email protected]>2022-04-19 12:36:02 -0700
commit3290bb2b2dec223f0312c6d5fc3edf71d5d6e46f (patch)
tree1293b330f07ef410b1aea22e338c99c5ca07356b /assets/.stationary
parent07e8754e4d799e44678b595177e79e6eaa621268 (diff)
Changeset: 12 Add hardcoded dependencies for IresManager, migrate Shader to Ires
Diffstat (limited to 'assets/.stationary')
-rw-r--r--assets/.stationary/Shaders/Default.glsl38
1 files changed, 38 insertions, 0 deletions
diff --git a/assets/.stationary/Shaders/Default.glsl b/assets/.stationary/Shaders/Default.glsl
new file mode 100644
index 0000000..1d93471
--- /dev/null
+++ b/assets/.stationary/Shaders/Default.glsl
@@ -0,0 +1,38 @@
+#type vertex
+#version 330 core
+
+layout(location = 0) in vec3 pos;
+layout(location = 1) in vec4 color;
+layout(location = 2) in vec2 texcoord;
+
+out Vertex2Fragmnet {
+ vec4 color;
+ vec2 texcoord;
+} v2f;
+
+// Autofill uniforms
+uniform mat4 transformation;
+
+void main() {
+ gl_Position = transformation * vec4(pos, 1.0);
+ v2f.color = color;
+ v2f.texcoord = texcoord;
+}
+
+#type fragment
+#version 330 core
+
+in Vertex2Fragmnet {
+ vec4 color;
+ vec2 texcoord;
+} v2f;
+
+out vec4 fragColor;
+
+// Material uniforms
+uniform sampler2D textureAtlas;
+uniform vec4 taint;
+
+void main() {
+ fragColor = texture(textureAtlas, v2f.texcoord) * v2f.color * taint;
+}