string vertex_shader_glsl_120 =
"""
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 = vec4(Position.xy,0,1) * ProjMtx;
}
""";
string vertex_shader_glsl_130 =
"""
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 = vec4(Position.xy,0,1) * ProjMtx;
}
""";
string vertex_shader_glsl_300_es =
"""
precision highp float;
layout(location = 0) in vec2 Position;
layout(location = 1) in vec2 UV;
layout(location = 2) in vec4 Color;
uniform mat4 ProjMtx;
out vec2 Frag_UV;
out vec4 Frag_Color;
void main()
{
Frag_UV = UV;
Frag_Color = Color;
gl_Position = vec4(Position.xy,0,1) * ProjMtx;
}
""";
string vertex_shader_glsl_410_core =
"""
layout(location = 0) in vec2 Position;
layout(location = 1) in vec2 UV;
layout(location = 2) in vec4 Color;
uniform mat4 ProjMtx;
out vec2 Frag_UV;
out vec4 Frag_Color;
void main()
{
Frag_UV = UV;
Frag_Color = Color;
gl_Position = vec4(Position.xy,0,1) * ProjMtx;
}
""";
string fragment_shader_glsl_120 =
"""
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D Texture;
varying vec2 Frag_UV;
varying vec4 Frag_Color;
void main()
{
gl_FragColor = Frag_Color * texture(Texture, Frag_UV.st);
}
""";
string fragment_shader_glsl_130 =
"""
uniform sampler2D Texture;
in vec2 Frag_UV;
in vec4 Frag_Color;
out vec4 Out_Color;
void main()
{
Out_Color = Frag_Color * texture(Texture, Frag_UV.st);
}
""";
string fragment_shader_glsl_300_es =
"""
precision mediump float;
uniform sampler2D Texture;
in vec2 Frag_UV;
in vec4 Frag_Color;
layout(location = 0) out vec4 Out_Color;
void main()
{
Out_Color = Frag_Color * texture(Texture, Frag_UV.st);
}
""";
string fragment_shader_glsl_410_core =
"""
in vec2 Frag_UV;
in vec4 Frag_Color;
uniform sampler2D Texture;
layout(location = 0) out vec4 Out_Color;
void main()
{
Out_Color = Frag_Color * texture(Texture, Frag_UV.st);
}
""";
You need to change
texture2D(on this line totexture(:ImGui.NET_OpenTK_Sample/Dear ImGui Sample/Backends/ImguiImplOpenGL3.cs
Line 459 in 86bc223
Correct shader:
Fixed: