• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
3
Question by jep7 · Sep 15, 2015 at 06:22 AM · renderingperformanceprofilerdrawingforward rendering

Performance issue: Camera.Renderer - Drawing - ... - Clear needs 50% CPU ???

Hello community,

my problem is still not solved: When using the profiler, I got this result on an android smartphone (thl 5000):alt text

What is this process Camera.Renderer -> Drawing -> Render.OpaqueGeomentry -> RenderForwardOpaque.Render -> Clear ? It needs about 50% of CPU power in each frame. If you have any ideas or answer, please tell me, I was not able to figure this out in the last days,

jep7

PS On my other phone (honor 6) everything worked fine; the 'Clear' process mentioned above only took 0.2% of CPU.

screenshot-9.png (502.1 kB)
Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Uktol · Nov 03, 2015 at 04:00 PM 0
Share

Yep, same thing happens with me. The Camera.render usually takes the most, but 50% is a lot... Still looking for a fix, i'll tell you when i got one

avatar image bart_bender · Dec 18, 2015 at 02:23 AM 0
Share

I have the same problem

alt text

2015-12-18-03-24-14.jpg (161.3 kB)
avatar image Mirk_Andy · Nov 02, 2016 at 06:13 AM 0
Share

@Uktol @bart_bender

Hi guys, i'm experiencing this same issue on Samsung Galaxy S6. Did either of you ever identify a potential optimisation technique?

avatar image fanzhi · Apr 06, 2017 at 09:44 PM 0
Share

Hi. I also meet same problem with Android Phone. In my phone, Clear need 50% of cpu. I also use VR. I use Google Cardboard, It needs 5 camera for once rendering. And clear is called 4 times. I guess it cause high cost than each camera clear his render target. But I don't know how I can fix this. How do you solve your problem? Please help me. Regards.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by aditya · Nov 03, 2016 at 07:55 AM

Following shader is for UI ... Apply it to each and every UI element and let me know if you've got any better results

 Shader "Custom/UI/Fast-Default"
 {
     Properties
     {
         [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
         _Color ("Tint", Color) = (1,1,1,1)
     }
 
     SubShader
     {
         Tags
         { 
             "Queue"="Transparent" 
             "IgnoreProjector"="True" 
             "RenderType"="Transparent" 
             "PreviewType"="Plane"
             "CanUseSpriteAtlas"="True"
         }
 
         Cull Off
         Lighting Off
         ZWrite Off
         ZTest [unity_GUIZTestMode]
         Blend SrcAlpha OneMinusSrcAlpha
 
         Pass
         {
         CGPROGRAM
             #pragma vertex vert
             #pragma fragment frag
 
             #include "UnityCG.cginc"
             #include "UnityUI.cginc"
             
             struct appdata_t
             {
                 float4 vertex   : POSITION;
                 float4 color    : COLOR;
                 float2 texcoord : TEXCOORD0;
             };
 
             struct v2f
             {
                 float4 vertex   : SV_POSITION;
                 fixed4 color    : COLOR;
                 half2 texcoord  : TEXCOORD0;
                 float4 worldPosition : TEXCOORD1;
             };
             
             fixed4 _Color;
             fixed4 _TextureSampleAdd;
             v2f vert(appdata_t IN)
             {
                 v2f OUT;
                 OUT.worldPosition = IN.vertex;
                 OUT.vertex = mul(UNITY_MATRIX_MVP, OUT.worldPosition);
 
                 OUT.texcoord = IN.texcoord;
                 
                 #ifdef UNITY_HALF_TEXEL_OFFSET
                 OUT.vertex.xy += (_ScreenParams.zw-1.0)*float2(-1,1);
                 #endif
                 
                 OUT.color = IN.color * _Color;
                 return OUT;
             }
 
             sampler2D _MainTex;
             fixed4 frag(v2f IN) : SV_Target
             {
                 return (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
             }
         ENDCG
         }
     }
 }
Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Mirk_Andy · Nov 10, 2016 at 10:48 PM 0
Share

Hi @aditya,

Thank you for your response. In my case this shader didn't help as I only had two UI elements, for my VR reticle.

Hopefully it helps the other guys who were having problems :)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

32 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Profiling: "FFWD Lights" costs 17% performance 0 Answers

Performance spikes 1 Answer

How to solve performance issue with Camera.Renderer->Drawing ? 1 Answer

How to get OpenGL frame capture under XCode in Unity4? 0 Answers

Is waitforseconds in a coroutine related to sephamore.WaitForSignal? 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges