mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 07:20:49 +00:00
e0b19decca
Replaces #4018, sorry DanyalZia :)
17 lines
343 B
GLSL
17 lines
343 B
GLSL
// Simple grayscale shader
|
|
|
|
#ifdef GL_ES
|
|
precision mediump float;
|
|
precision mediump int;
|
|
#endif
|
|
|
|
uniform sampler2D sampler0;
|
|
varying vec2 v_texcoord0;
|
|
|
|
void main() {
|
|
vec3 rgb = texture2D(sampler0, v_texcoord0.xy).xyz;
|
|
float luma = dot(rgb, vec3(0.299, 0.587, 0.114));
|
|
gl_FragColor.rgb = vec3(luma, luma, luma);
|
|
gl_FragColor.a = 1.0;
|
|
}
|