mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 07:50:04 +00:00
Generate multiple texture atlases when first atlas is full
This commit is contained in:
parent
7198d1c7af
commit
9766e02f32
10 changed files with 205 additions and 141 deletions
|
|
@ -8,14 +8,14 @@
|
|||
|
||||
layout (location = 0) in vec2 aLatLong;
|
||||
layout (location = 1) in vec2 aXYOffset;
|
||||
layout (location = 2) in vec2 aTexCoord;
|
||||
layout (location = 2) in vec3 aTexCoord;
|
||||
layout (location = 3) in vec4 aModulate;
|
||||
|
||||
uniform mat4 uMVPMatrix;
|
||||
uniform mat4 uMapMatrix;
|
||||
uniform vec2 uMapScreenCoord;
|
||||
|
||||
smooth out vec2 texCoord;
|
||||
smooth out vec3 texCoord;
|
||||
smooth out vec4 color;
|
||||
|
||||
vec2 latLngToScreenCoordinate(in vec2 latLng)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
layout (location = 0) in vec2 aLatLong;
|
||||
layout (location = 1) in vec2 aXYOffset;
|
||||
layout (location = 2) in vec2 aTexCoord;
|
||||
layout (location = 2) in vec3 aTexCoord;
|
||||
layout (location = 3) in vec4 aModulate;
|
||||
layout (location = 4) in float aAngleDeg;
|
||||
layout (location = 5) in int aThreshold;
|
||||
|
|
@ -21,11 +21,11 @@ uniform vec2 uMapScreenCoord;
|
|||
out VertexData
|
||||
{
|
||||
int threshold;
|
||||
vec2 texCoord;
|
||||
vec3 texCoord;
|
||||
vec4 color;
|
||||
} vsOut;
|
||||
|
||||
smooth out vec2 texCoord;
|
||||
smooth out vec3 texCoord;
|
||||
smooth out vec4 color;
|
||||
|
||||
vec2 latLngToScreenCoordinate(in vec2 latLng)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ uniform vec2 uMapScreenCoord;
|
|||
out VertexData
|
||||
{
|
||||
int threshold;
|
||||
vec2 texCoord;
|
||||
vec3 texCoord;
|
||||
vec4 color;
|
||||
} vsOut;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@ precision mediump float;
|
|||
|
||||
uniform sampler2DArray uTexture;
|
||||
|
||||
smooth in vec2 texCoord;
|
||||
smooth in vec3 texCoord;
|
||||
smooth in vec4 color;
|
||||
|
||||
layout (location = 0) out vec4 fragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
fragColor = texture(uTexture, vec3(texCoord, 0.0)) * color;
|
||||
fragColor = texture(uTexture, texCoord) * color;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ uniform float uMapDistance;
|
|||
in VertexData
|
||||
{
|
||||
int threshold;
|
||||
vec2 texCoord;
|
||||
vec3 texCoord;
|
||||
vec4 color;
|
||||
} gsIn[];
|
||||
|
||||
smooth out vec2 texCoord;
|
||||
smooth out vec3 texCoord;
|
||||
smooth out vec4 color;
|
||||
|
||||
void main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue