Log in or register to post comments

Fading video background render

March 12, 2014 - 8:57am #1

Hi,

I'm currently looking to fade in/out the drawn video background texture and am trying to determine the most optimal way to proceed. Ideally I'd like to call 'QCAR::Renderer::getInstance().bindVideoBackground' then draw my own overlay using that texture, that I can fade in and out using alpha blending - similar to the 'Background Texture Access' sample intends.

I believe the issue I'm facing is that 'bindVideoBackground' actually binds two textures and vertex/fragment shaders for YUV rendering on the platform I'm currently testing so I'd need to replicate those shaders and adjust as desired to proceed. I understand that different platforms may use different methods though, i.e. just binding an RGB(A) texture instead. Is this a correct assumption or can I guarantee the same setup on all platforms?

Obviously I could render another overlay of my own over the video to control its fade level but I'd prefer not to have to do another full-screen pass if at all possible.

Any thoughts/advice on this? I'm thinking a parameter to control the colour/alpha of 'QCAR::Renderer::getInstance().drawVideoBackground' or access to raw video data with format information would be nice.

Cheers,
Richard

Fading video background render

March 13, 2014 - 6:24am #3

Hi Nalin,

I've gone with that approach for now. My only concern really was the extra fill-rate eaten up, especially on the higher resolution/retina devices as the intention is to be rendering quite a lot.

Just seems that if there's an overlay already being drawn then it would be nice to be able to control it directly.

Cheers,
Richard

Fading video background render

March 13, 2014 - 4:22am #2

Obviously I could render another overlay of my own over the video to control its fade level but I'd prefer not to have to do another full-screen pass if at all possible.

Any reason why not?  as this would be the simplest and most effective solution - though I guess it does depend how much time you have.

I would have thought from a hardware perspective there would be no real issue here regarding performance.

 

N

Log in or register to post comments