summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/image/blocks.pngbin7481 -> 0 bytes
-rw-r--r--res/image/grass.pngbin0 -> 6160 bytes
-rw-r--r--res/image/scaly.pngbin3227705 -> 0 bytes
-rw-r--r--res/image/texture.pngbin1338368 -> 0 bytes
-rwxr-xr-xres/shaders/simple_shader.frag10
-rwxr-xr-xres/shaders/simple_shader.vert8
6 files changed, 6 insertions, 12 deletions
diff --git a/res/image/blocks.png b/res/image/blocks.png
deleted file mode 100644
index 24f734a..0000000
--- a/res/image/blocks.png
+++ /dev/null
Binary files differ
diff --git a/res/image/grass.png b/res/image/grass.png
new file mode 100644
index 0000000..48823f2
--- /dev/null
+++ b/res/image/grass.png
Binary files differ
diff --git a/res/image/scaly.png b/res/image/scaly.png
deleted file mode 100644
index cefdd5f..0000000
--- a/res/image/scaly.png
+++ /dev/null
Binary files differ
diff --git a/res/image/texture.png b/res/image/texture.png
deleted file mode 100644
index e1db6c1..0000000
--- a/res/image/texture.png
+++ /dev/null
Binary files differ
diff --git a/res/shaders/simple_shader.frag b/res/shaders/simple_shader.frag
index f3ae526..102ac22 100755
--- a/res/shaders/simple_shader.frag
+++ b/res/shaders/simple_shader.frag
@@ -2,6 +2,7 @@
layout (location = 0) in vec3 fragColor;
layout (location = 1) in vec2 fragUv;
+layout (location = 2) in float fragTex;
layout (location = 0) out vec4 outColor;
@@ -10,12 +11,7 @@ layout (binding = 0) uniform GlobalUbo {
vec3 directionToLight;
} ubo;
-layout (binding = 2) uniform Deez {
- mat4 projectionViewMatrix;
- vec3 directionToLight;
-} deez;
-
-layout (binding = 1) uniform sampler2D texSampler;
+layout (binding = 1) uniform sampler2D texSampler[2];
layout(push_constant) uniform Push {
mat4 transform;
@@ -23,5 +19,5 @@ layout(push_constant) uniform Push {
} push;
void main() {
- outColor = mix(texture(texSampler, fragUv), vec4(fragColor, 1.0), .1);
+ outColor = mix(texture(texSampler[int(fragTex)], fragUv), vec4(fragColor, 1.0), .1);
} \ No newline at end of file
diff --git a/res/shaders/simple_shader.vert b/res/shaders/simple_shader.vert
index 30e7a79..8a28a59 100755
--- a/res/shaders/simple_shader.vert
+++ b/res/shaders/simple_shader.vert
@@ -3,20 +3,17 @@
layout (location = 0) in vec3 position;
layout (location = 1) in vec3 normal;
layout (location = 2) in vec2 uv;
+layout (location = 3) in float tex;
layout (location = 0) out vec3 fragColor;
layout (location = 1) out vec2 fragUv;
+layout (location = 2) out float fragTex;
layout (binding = 0) uniform GlobalUbo {
mat4 projectionViewMatrix;
vec3 directionToLight;
} ubo;
-layout (binding = 2) uniform Deez {
- mat4 projectionViewMatrix;
- vec3 directionToLight;
-} deez;
-
layout (push_constant) uniform Push {
mat4 modelMatrix;
mat4 normalMatrix;
@@ -33,4 +30,5 @@ void main() {
fragColor = lightIntensity * vec3(1);
fragUv = uv;
+ fragTex = tex;
} \ No newline at end of file