I’m rendering decoded data from a video stream to a texture and doing the YUV to RGB
conversion on a shader.
Everything works great apart from a weird green line that seems to be
appearing on the top, bottom, and left hand side of the texture.
(It doesn’t appear on the right hand side).
Not sure if it’s a UV issue or what is causing this…Does anyone have any ideas?
(Wish I knew how to attach a screen shot…although I don’t think it would help all that much).
The video overlay might be a green surface.
Or your texture border color?
I’d would look at the wrap modes and/or texture coordinates.
Linear filtering on the texture? Use GL_CLAMP_TO_EDGE.
Let the uv-coordinates run from corner to corner, 0.0 to 1.0 or (0, 0) to (width, height) for TEXTURE_RECTANGLE. The OpenGL rasterization takes care for the sample point interpolation.
If that’s not it you’d need to post your OpenGL code.
for the exact formula of linear filtering read Chapter 3 Rasterization formula (3.26) on page 176. Image 3.10 explains the alpha and beta values in that formula.