diff --git a/gui/resources/shaders/overlayShader.frag b/gui/resources/shaders/overlayShader.frag new file mode 100644 index 0000000000000000000000000000000000000000..d22dee503cce63f9e15860e0c385cfc114ee57b6 --- /dev/null +++ b/gui/resources/shaders/overlayShader.frag @@ -0,0 +1,12 @@ +#version 410 core + +out vec4 FragColor; + +in vec2 tex_coord; + +uniform sampler2D imTexture; + +void main(){ + FragColor = texture(imTexture, tex_coord); + FragColor.a = 1.f; +} \ No newline at end of file diff --git a/gui/resources/shaders/overlayShader.vert b/gui/resources/shaders/overlayShader.vert new file mode 100644 index 0000000000000000000000000000000000000000..07f50374b5ab4734f1051372a8d715af2152edb0 --- /dev/null +++ b/gui/resources/shaders/overlayShader.vert @@ -0,0 +1,21 @@ +#version 410 core + +layout (location = 0) in vec2 pos; +layout (location = 1) in vec2 texuv; + +uniform mat4 model; +uniform mat4 view; +uniform mat4 projection; + +uniform float opacity; +uniform float radians; +uniform vec2 offset; +uniform float scale; + +out vec2 tex_coord; + +void main(){ + vec2 pos_adjusted = scale * pos + offset; + gl_Position = projection*view*model*vec4(pos_adjusted[0], pos_adjusted[1], 0.f, 1.f); + tex_coord = texuv; +} \ No newline at end of file