-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
You need to change texture2D( on this line to texture(:
| Out_Color = Frag_Color * texture2D(Texture, Frag_UV.st); |
Correct shader:
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);
}
""";
Fixed:

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels