summaryrefslogtreecommitdiffstats
path: root/cwd/assets/altcraft/shaders
diff options
context:
space:
mode:
authorLaG1924 <lag1924@gmail.com>2021-11-17 09:11:36 +0100
committerLaG1924 <lag1924@gmail.com>2021-11-18 07:23:29 +0100
commitda9cff10a320b2ee144cb34a281a116f1d2f49cf (patch)
tree8c00dea491179646b219d788b28694b83cf7c6a0 /cwd/assets/altcraft/shaders
parentChanged entities rendering to Gal (diff)
downloadAltCraft-da9cff10a320b2ee144cb34a281a116f1d2f49cf.tar
AltCraft-da9cff10a320b2ee144cb34a281a116f1d2f49cf.tar.gz
AltCraft-da9cff10a320b2ee144cb34a281a116f1d2f49cf.tar.bz2
AltCraft-da9cff10a320b2ee144cb34a281a116f1d2f49cf.tar.lz
AltCraft-da9cff10a320b2ee144cb34a281a116f1d2f49cf.tar.xz
AltCraft-da9cff10a320b2ee144cb34a281a116f1d2f49cf.tar.zst
AltCraft-da9cff10a320b2ee144cb34a281a116f1d2f49cf.zip
Diffstat (limited to 'cwd/assets/altcraft/shaders')
-rw-r--r--cwd/assets/altcraft/shaders/entity.json3
-rw-r--r--cwd/assets/altcraft/shaders/frag/entity.fs11
-rw-r--r--cwd/assets/altcraft/shaders/vert/entity.vs17
3 files changed, 13 insertions, 18 deletions
diff --git a/cwd/assets/altcraft/shaders/entity.json b/cwd/assets/altcraft/shaders/entity.json
index 0b65c72..33a32e9 100644
--- a/cwd/assets/altcraft/shaders/entity.json
+++ b/cwd/assets/altcraft/shaders/entity.json
@@ -3,8 +3,7 @@
"frag": "/altcraft/shaders/frag/entity",
"uniforms": [
"color",
- "view",
- "projection",
+ "projView",
"model"
]
} \ No newline at end of file
diff --git a/cwd/assets/altcraft/shaders/frag/entity.fs b/cwd/assets/altcraft/shaders/frag/entity.fs
index 6a11c96..06d5759 100644
--- a/cwd/assets/altcraft/shaders/frag/entity.fs
+++ b/cwd/assets/altcraft/shaders/frag/entity.fs
@@ -1,10 +1,9 @@
#version 330 core
-uniform vec3 color;
-in vec2 uvPos;
out vec4 fragColor;
-void main(){
- //if (uvPos.x < 0.9 && uvPos.x > 0.1 && uvPos.y < 0.9 && uvPos.y > 0.1) discard;
- fragColor = vec4(color,1);
-} \ No newline at end of file
+uniform vec3 color;
+
+void main() {
+ fragColor = vec4(color, 1);
+}
diff --git a/cwd/assets/altcraft/shaders/vert/entity.vs b/cwd/assets/altcraft/shaders/vert/entity.vs
index baa25e5..e38c54c 100644
--- a/cwd/assets/altcraft/shaders/vert/entity.vs
+++ b/cwd/assets/altcraft/shaders/vert/entity.vs
@@ -1,13 +1,10 @@
#version 330 core
-uniform mat4 view;
-uniform mat4 projection;
-uniform mat4 model;
-layout (location = 0) in vec3 position;
-layout (location = 1) in vec2 uvPosition;
-out vec2 uvPos;
+in vec3 position;
-void main(){
- uvPos = uvPosition;
- gl_Position = projection*view*model*vec4(position,1);
-} \ No newline at end of file
+uniform mat4 projView;
+uniform mat4 model;
+
+void main() {
+ gl_Position = projView * model * vec4(position, 1);
+}