You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
323 B
14 lines
323 B
OF_GLSL_SHADER_HEADER
|
|
precision mediump float;
|
|
|
|
uniform sampler2DRect tex0;
|
|
in vec2 varyingtexcoord;
|
|
out vec4 fragColor;
|
|
|
|
|
|
|
|
void main() {
|
|
vec4 texColor = texture(tex0, varyingtexcoord);
|
|
float gray = dot(texColor.rgb, vec3(0.299, 0.587, 0.114)); // Standard luminance formula
|
|
fragColor = vec4(vec3(gray), 1.0);
|
|
}
|