summaryrefslogtreecommitdiff
path: root/libavdevice/opengl_enc_shaders.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavdevice/opengl_enc_shaders.h')
-rw-r--r--libavdevice/opengl_enc_shaders.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavdevice/opengl_enc_shaders.h b/libavdevice/opengl_enc_shaders.h
index 66104e03cb..6378dfb8cc 100644
--- a/libavdevice/opengl_enc_shaders.h
+++ b/libavdevice/opengl_enc_shaders.h
@@ -173,4 +173,16 @@ static const char * const FF_OPENGL_FRAGMENT_SHADER_YUVA_PLANAR =
"1.5958, -0.81290, 0.0) * yuv, texture2D(u_texture3, texture_coordinate).r), 0.0, 1.0);"
"}";
+static const char * const FF_OPENGL_FRAGMENT_SHADER_GRAY =
+#if defined(GL_ES_VERSION_2_0)
+ "precision mediump float;"
+#endif
+ "uniform sampler2D u_texture0;"
+ "varying vec2 texture_coordinate;"
+ "void main()"
+ "{"
+ "float c = texture2D(u_texture0, texture_coordinate);"
+ "gl_FragColor = vec4(c, c, c, 1.0);"
+ "}";
+
#endif /* AVDEVICE_OPENGL_SHADERS_H */