Use GL_TEXTURE_2D_ARRAY to enable multiple texture atlases

This commit is contained in:
Dan Paulat 2023-09-02 13:44:56 -05:00
parent 922e875b07
commit 7198d1c7af
8 changed files with 36 additions and 15 deletions

View file

@ -0,0 +1,16 @@
#version 330 core
// Lower the default precision to medium
precision mediump float;
uniform sampler2DArray uTexture;
smooth in vec2 texCoord;
smooth in vec4 color;
layout (location = 0) out vec4 fragColor;
void main()
{
fragColor = texture(uTexture, vec3(texCoord, 0.0)) * color;
}