Luminance 'y' value of surface texture
<p>For my opengl video player app, I am using surface texture bound to GL_TEXTURE_EXTERNAL_OES</p>

<p>source : <a href="https://github.com/crossle/MediaPlayerSurface/blob/master/src/me/crossle/demo/surfacetexture/VideoSurfaceView.java" rel="nofollow">https://github.com/crossle/MediaPlayerSurface/blob/master/src/me/crossle/demo/surfacetexture/VideoSurfaceView.java</a></p>

<p>In my fragment shader, I want luminance value to be taken for 3x3 block.</p>

<pre><code>vec2 tex00 = vec2(vTextureCoord.x-xmargin, vTextureCoord.y-ymargin)
vec4 p00 = texture2D(sTexture, tex00)

... etc for 3x3
</code></pre>

<p>and then calculate luminance of each texel : ie: p00 by doing dot of p00.rgb with vec3 of (0.3,0.59,0.11).</p>

<p>Instead is it possible to directly use p00.y ? Will it give luminance value?</p>