Properly working MSAA and SRGB :D

This commit is contained in:
bloeys
2023-10-08 03:20:56 +04:00
parent d703a5270c
commit 81b515197d
5 changed files with 68 additions and 16 deletions

33
res/shaders/imgui.glsl Executable file
View File

@ -0,0 +1,33 @@
//shader:vertex
#version 410
uniform mat4 ProjMtx;
in vec2 Position;
in vec2 UV;
in vec4 Color;
out vec2 Frag_UV;
out vec4 Frag_Color;
void main()
{
Frag_UV = UV;
Frag_Color = Color;
gl_Position = ProjMtx * vec4(Position.xy, 0, 1);
}
//shader:fragment
#version 410
uniform sampler2D Texture;
in vec2 Frag_UV;
in vec4 Frag_Color;
out vec4 Out_Color;
void main()
{
Out_Color = vec4(Frag_Color.rgb, Frag_Color.a * texture(Texture, Frag_UV.st).r);
}