SeparateChannels ( GLTexture2D currentTexture ) : void |
Perform Color separation in one pass. There are a total of 4 texture objects involved, a RenderTarget, and fragment shader. The source texture, is assumed to be the video texture. That is what will be rendered as a quad into the RenderTarget. The Y, Cr, and Cb textures have been attached to the color buffer attachment points of the RenderTarget. The shader program simply takes the source fragment, and performs the Y, Cr, Cb separation calculations and places the output into the appropriate color buffers. And the end, the Y, Cr, Cb texture objects contain the results. All done in one pass, using a shader program, in the time that it takes to render a single quad into an offscreen buffer. |
|