![]() ![]() This is my renderer code: static class MyRenderer implements GLSurfaceView.Renderer (Got some black screens or GL_INVALID_OPERATION and etc').Īlso, another (optional) performance tweak that I don't know how to deal with (if it's possible) is to combined somehow these 3 textures (Y_tex, U_tex and V_tex) to a single texture which be uniformed to the shader as a single sampler and then I can make just one texture2D() call in the shader in order to get the current YUV values and convert them to RGB values. I've found out some tutorials and similar questions here how to achieve that, but unfortunately I've got no luck with that. ![]() So basically I need first to render the frame and processing it in a frameBuffer (FBO) with that original size and then (after the shader's work done) scale it to the fullscreen size using viewport (1080x1920 mostly), And it means that the "heavy" processing work would be applied on much less fragments. The original frame resolution is 480圆40 pixels, and I noticed that if I'm setting the viewport to this original size (instead of fullscreen size) it is working good and fluently. My fragment shader is a bit heavy because it has many textur2D() calls. I have a NV21 (YUV420) camera video which I'm applying on it a fragment shader in order to get some filter effects and YUV to RGB convertion as well.Įverything is working except the bad performance.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |