]> git.sesse.net Git - ffmpeg/blobdiff - libavdevice/opengl_enc_shaders.h
Merge commit '67f2a688143b644f99360565a9f36c61a5f052e9'
[ffmpeg] / libavdevice / opengl_enc_shaders.h
index 66104e03cba187d5734044ee5444eb6ccedbacbe..ed8b3d30413898f997b9d361af934451695aee2f 100644 (file)
@@ -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).r;"
+        "gl_FragColor = vec4(c, c, c, 1.0);"
+    "}";
+
 #endif /* AVDEVICE_OPENGL_SHADERS_H */