Tech ENABLE_GL_IMGUI_SHADERS - Render imgui using shaders
This commit is contained in:
parent
3dddfa919a
commit
d0d89a4d5b
7 changed files with 182 additions and 7 deletions
11
resources/shaders/imgui.fs
Normal file
11
resources/shaders/imgui.fs
Normal file
|
@ -0,0 +1,11 @@
|
|||
#version 110
|
||||
|
||||
uniform sampler2D Texture;
|
||||
|
||||
varying vec2 Frag_UV;
|
||||
varying vec4 Frag_Color;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = Frag_Color * texture2D(Texture, Frag_UV.st);
|
||||
}
|
17
resources/shaders/imgui.vs
Normal file
17
resources/shaders/imgui.vs
Normal file
|
@ -0,0 +1,17 @@
|
|||
#version 110
|
||||
|
||||
uniform mat4 ProjMtx;
|
||||
|
||||
attribute vec2 Position;
|
||||
attribute vec2 UV;
|
||||
attribute vec4 Color;
|
||||
|
||||
varying vec2 Frag_UV;
|
||||
varying vec4 Frag_Color;
|
||||
|
||||
void main()
|
||||
{
|
||||
Frag_UV = UV;
|
||||
Frag_Color = Color;
|
||||
gl_Position = ProjMtx * vec4(Position.xy, 0.0, 1.0);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue