- Home /
What does "clear" mean under Camera.Render -> Drawing in the profiler
Hello,
I'm developing an android game and I've noticed a bad frame rate on my lower end device (kind of obvious). I decided to see what it was all about I have found that every second to every 2 seconds I get a spike which is causing my low frame rate. The spike is from "Camera.Render -> Drawing -> Clear". It spikes to 70% - 95% of my total CPU and takes anywhere from 50ms - 65ms.
Everything else looks reasonable, but I don't understand what clear is. Is this something I can make more efficient?
Any information on what this "clear" is would be great.
Thanks
This is just a guess, but it might be GC on the GPU???
Yeah I kinda thought maybe it was the Garbage collector as well. Nothing I can really do about it though.
Answer by trs9556 · Jun 15, 2013 at 07:36 PM
I was told that it is the same as the clearing flag in the Camera inspector settings. The reason why it takes super long on my specific device is unknown, other then poor specs.
Answer by JonasNorberg · May 21, 2015 at 11:19 PM
Make sure that your first camera clears using solidcolor. On tiled renderers not clearing at the start of the screen requires the chip to load back colors from the framebuffer to the tile-memory. This is not fast.
I am experiencing the same issue, however changing the Camera Clear Flags to Color did not have any impact on the amount of time that clearing took on the GPU (if anything it increased it by a few ms).
I am new to Unity and so was wondering if you were aware of anything else that could be causing a camera clearing issue? (batch calls are at 41, triangles 77k, verts 149.5k, setpass calls 36)
Any insight you may provide is much appreciated!
Your answer
Follow this Question
Related Questions
A bit more texture detail in Vertex Lit 1 Answer
OpenGLES error 0x0502 when TextureFormat.BGRA32 is used 0 Answers
Is there a way to limit the range of colors that can render in the scene? 1 Answer
Performance issue: Camera.Renderer - Drawing - ... - Clear needs 50% CPU ??? 2 Answers
what does Camera.targetTexture do? 1 Answer