Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • 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
0
Question by Shutter · May 06, 2016 at 03:41 PM · renderingshadowperformance optimizationdrawing

Performance with high number of background objects: CollectShadows expensive when no shadows are cast

In my current game, I have around 20.000 instances of an object at the background, always visible, with the same material. These objects, which are simple static quads, are all generated during runtime and their texture is simple and low resolution (shader used is Unlit/Transparent due to some corners needing transparency). The original object and its instances are all set to not cast nor receive shadows (they all do not use light probes and and have "reflection probes" off).

However, one of the greatest bottlenecks in my performance right now is in the following Drawing phase of my GPU according to the profiler: Render.OpaqueGeometry -> RenderForwardOpaque.Render -> RenderForwardOpaque.CollectShadows. Testing further, I noticed that in fact, when I either disable all these background objects, or the lights in the scene, such shadow collecting drops from around 8ms to almost zero.

My guess is that what is going on is that the engine is doing some shadow calculation regarding shadows in relation to all those thousands of simple quads in the background. What I do not understand is why that is the case if they are all set to not cast and not receive shadows. How could I proceed to make the CollectShadows skip these thousands of background objects altogether, once and for all?

PS: I tried other shaders, like the standard with no texture. The problem stays exactly the same

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by ChenQiao · Jul 14, 2016 at 04:36 AM

The background objects cast shadows. Maybe you can remove the objects from shadows casters by: 0. turn off the objects' shadow 1. use layer and Light cull 2. use ForceNoShadowCasting in your background shader

Comment
Add comment · 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

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.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How to debug or otherwise troubleshoot a specific graphics frame (not current)? 0 Answers

Dumb shadow question 2 Answers

Rectangle shadow appearing over world (Shouldn't be there) 0 Answers

How to implement stencil shadows/shadow volumes 1 Answer

[Mobile]Skinned mesh issues in perfrmance,Hi, 0 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