mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 07:50:04 +00:00
Draw a radial. This needs some cleanup, and some MVP matrix tweaking.
This commit is contained in:
parent
ace3aeb460
commit
516983ab09
10 changed files with 506 additions and 4 deletions
13
scwx-qt/gl/radar.frag
Normal file
13
scwx-qt/gl/radar.frag
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#version 330 core
|
||||
|
||||
// Lower the default precision to medium
|
||||
precision mediump float;
|
||||
|
||||
uniform sampler2D uTexture;
|
||||
|
||||
in vec2 texCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = vec4(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
}
|
||||
17
scwx-qt/gl/radar.vert
Normal file
17
scwx-qt/gl/radar.vert
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#version 330 core
|
||||
|
||||
layout (location = 0) in vec2 aPosition;
|
||||
layout (location = 1) in vec2 aTexCoord;
|
||||
|
||||
uniform mat4 uMVPMatrix;
|
||||
|
||||
out vec2 texCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
// Pass the texture coordinate to the fragment shader
|
||||
texCoord = aTexCoord;
|
||||
|
||||
// Transform the position to screen coordinates
|
||||
gl_Position = uMVPMatrix * vec4(aPosition, 0.0f, 1.0f);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue