Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 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 valentin-simian · Jul 30, 2015 at 11:41 PM · shaderperformancestandardcutout

Are the polygons that fall within the alpha range of the Cutout Standard Shader rendered?

For example, I take a cube, make one of its faces transparent, and assign the Cutout Standard Shader to it. Is that face still being rendered?

If so, how expensive is the performance compared to the cube's all other faces?

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
1

Answer by Bunny83 · Jul 31, 2015 at 12:12 AM

Yes it is still rendered and has almost the same overhead. You might save a bit fillrate since the cutout shader won't write to the frame buffer when a fragment is discarded. However every fragment(pixel) is still processed.

Comment
Add comment · Show 3 · 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 valentin-simian · Jul 31, 2015 at 01:18 AM 0
Share

Scene complexity can be increased by overdrawing, which happens when "an object is drawn to the frame buffer, and then another object (such as a wall) is drawn on top of it, covering it up. The time spent drawing the first object was wasted because it isn't visible."

Then I am correct to assume that the alpha portion of the material with the cutout shader applied will not be drawn on top of another object (since there's nothing to draw) ?

avatar image Bunny83 · Jul 31, 2015 at 01:38 AM 0
Share

Not really. It depends on what you ment by "drawn". The fragment shader has to be executed for each pixel in order to deter$$anonymous$$e if a fragment can be discarded or not. As i said, the only thing that might be saved is fillrate as those fragments don't write to the framebuffer. The triangle however is still rendered and rasterized. The shader can't know if a part of a triangle will be visible or not until it actually rendered each fragment.

Depending on your hardware the discard / clip instruction might even have a negative impact on performance as it messes up the pipeline and prediction.

avatar image valentin-simian · Jul 31, 2015 at 01:45 AM 0
Share

Hmm, I see. Thanks for the thorough response.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Does emission on standard shader reduce performance? 0 Answers

How to manage shader with script 1 Answer

Making a cutout semi-transparent? 1 Answer

Transparency issue on iOS 1 Answer

Best Practice For Shader Complexity + IOS 1 Answer


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