mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 07:50:04 +00:00
Add icons for (x, y) placement on the map
This commit is contained in:
parent
e889af2419
commit
9c8d851cf3
8 changed files with 909 additions and 73 deletions
26
scwx-qt/gl/texture2d_array.vert
Normal file
26
scwx-qt/gl/texture2d_array.vert
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#version 330 core
|
||||
|
||||
#define DEG2RAD 0.0174532925199432957692369055556f
|
||||
|
||||
layout (location = 0) in vec2 aVertex;
|
||||
layout (location = 1) in vec2 aXYOffset;
|
||||
layout (location = 2) in vec3 aTexCoord;
|
||||
layout (location = 3) in vec4 aModulate;
|
||||
layout (location = 4) in float aAngleDeg;
|
||||
|
||||
uniform mat4 uMVPMatrix;
|
||||
|
||||
smooth out vec3 texCoord;
|
||||
smooth out vec4 color;
|
||||
|
||||
void main()
|
||||
{
|
||||
// Rotate clockwise
|
||||
float angle = aAngleDeg * DEG2RAD;
|
||||
mat2 rotate = mat2(cos(angle), -sin(angle),
|
||||
sin(angle), cos(angle));
|
||||
|
||||
gl_Position = uMVPMatrix * vec4(aVertex + rotate * aXYOffset, 0.0f, 1.0f);
|
||||
texCoord = aTexCoord;
|
||||
color = aModulate;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue