mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 07:50:04 +00:00
Use GL_TEXTURE_2D_ARRAY to enable multiple texture atlases
This commit is contained in:
parent
922e875b07
commit
7198d1c7af
8 changed files with 36 additions and 15 deletions
16
scwx-qt/gl/texture2d_array.frag
Normal file
16
scwx-qt/gl/texture2d_array.frag
Normal 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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue