Textures almost working, fixed up the mesher being a dumbass

This commit is contained in:
mcrcortex
2024-01-25 12:46:16 +10:00
parent c2f7712448
commit a391f34ab7
8 changed files with 121 additions and 58 deletions

View File

@@ -1,8 +1,9 @@
#version 460 core
layout(location = 0) in flat vec4 colour;
layout(binding = 0) uniform sampler2D blockModelAtlas;
layout(location = 0) in vec2 uv;
layout(location = 0) out vec4 outColour;
void main() {
//TODO: randomly discard the fragment with respect to the alpha value
vec2 uv = mod(uv, vec2(1));
outColour = colour;
outColour = texture(blockModelAtlas, uv);
}