- Home /
Unity crashes - multiple cameras with image effects and fade to black
Hello
I am working on a mobile VR game using the google vr sdk, which means I have a main camera and two child cameras : left and right camera.
I put these image effects on both cameras child: Screen Space Ambient Occlusion, global fog, bloom and vignette. I do have this warning: Tiled GPU perf. warning: RenderTexture color surface. But I looked it up and it means that these image effects are not good for the mobile fps which in my case seems not to be a problem.
"The warning only shows up when you're in mobile graphics emulation mode (so turning off the emulation under Edit -> Graphics Emulation) would get rid of it."
This is working out fine for me. But I have a script for when my player dies and it fades the camera to black. If I play the game and die unity crashes and on phone the game also crashes. Here is the script:
Color aux = fade_image.color;
while (fade_image.color.a < 1f)
{
yield return 0;
aux.a += Time.deltaTime/2;
fade_image.color = aux;
}
These crashes are not happening when the image effects on both cameras are turned off.
Who can I keep the image effects and the fade to black? What is causing this problem and why ?
Thanks
Your answer
Follow this Question
Related Questions
Best approach for alpha blending multiple webcamtexture is renderTexture? 0 Answers
Render Splitscreen to RenderTexture 0 Answers
Rendering screenshot using multiple cameras and one rendertexture 0 Answers
Displaying a RenderTexture overlayed ontop of another Camera 0 Answers
Multiple cameras blur effect problem 0 Answers