Hoping someone can help me out here.
I’ve adjusted my main game scene to use a separate camera with a frame buffer so I can do post processing effects, but I’ve noticed that during scene transitions the screen is whatever I’ve set the clear color to be (default black) before popping in once they’re done. I figure it’s just because the sprite it’s rendering to is empty and therefore black, but as it is it kinda defeats the purpose of having a scene transition.
Does anyone have any suggestions for how to fix this? Note how the screen goes black while the UI fades.
When I set the postProcess sprite to not be visible it functions as you would expect, but that’s a problem if I set the sprite to do some post processing because, well, even if I set it to be visible after the transition is done, the effect will then “pop in”.
tempLayer = Layer::create();
auto frameBuffer = cocos2d::experimental::FrameBuffer::create(0, size.width, size.height);
cocos2d::experimental::RenderTarget* renderTarget = cocos2d::experimental::RenderTarget::create(size.width, size.height);
auto depth = cocos2d::experimental::RenderTargetDepthStencil::create(size.width, size.height);
cocos2d::Texture2D* texture = frameBuffer->getRenderTarget()->getTexture();
postProcess = cocos2d::Sprite::createWithTexture(texture);
cocos2d::Camera* camera = cocos2d::Camera::create();
Thanks for any help.