• 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
Question by LMan · Jun 07, 2014 at 04:56 PM · shadersparticleseffectsadditive

Is it possible to make my additive-shaded particles only add to each other?

I would like to add some sparkly particle effects to my High Score table, but I seem to have run into a problem.

Below you see the particle system in question, it's from the standard assets, and has the additive particle shader applied.

alt text

The issue is that when I have the particles render over the top of my background sprite, it adds the sprite as well, which causes the sparkles to appear white.

alt text

Is there a way that I can get those particles to only add to each other and ignore the sprite when they render?

shader troubles.png (136.5 kB)
shader troubles2.png (73.5 kB)
Comment

People who like this

0 Show 1
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 LMan · Jun 08, 2014 at 12:16 AM 0
Share

Is this not a thing? It seems like this would be invaluable for GUI effects and such.

2 Replies

  • Sort: 
avatar image

Answer by Louis-N-D · Sep 04, 2014 at 10:56 AM

I get the problem you are having, but, unfortunately, the solution you are proposing doesn't really make sense. When additively blending a pixel, one needs to have a source colour to add to, that colour is, of course, whatever colour the pixel already is. I guess if the particles were rendered to a separate render texture, and that texture had an alpha channel, then perhaps it could be alpha blended onto the scene. But, even then it would be very difficult to get the right fill colour for that render texture to avoid a halo effect around the translucent parts of your effect.

The simple fact is, additive blending can look really cool, but it's always pretty tricky. If you know the exact situations in which the effect will be used, and have a pretty good idea which colours the effect will blend over (Say, the blue of your sprite, above) then you can colour your particles accordingly to compensate by darkening them a lot so they don't blow out over the background. And, of course, additive blending over light colours will always blow out as there's no head room to blend any lighter.

Comment

People who like this

0 Show 0 · 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

Answer by LaireonGames · Apr 24, 2019 at 03:00 PM

Ancient thread but I still stumbled across it easily with a quick google. The best way I found to do this is with multiple cameras.

So you render your particles on a layer/camera where only they render and then you render that camera over the first and then you get consistent results regardless of background.

In my case I already had multiple cameras setup so this had no performance cost for me but worth being aware this of course requires an extra rendering pass for the second camera.

Comment

People who like this

0 Show 0 · 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

Unity Answers is in Read-Only mode

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta by June 9. Please note, Unity Answers is now in read-only so we can prepare for the final data migration.

For more information and updates, please read our full announcement thread in the Unity Forum.

Follow this Question

Answers Answers and Comments

23 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

Related Questions

special fx on iphone 1 Answer

Shader Material in Game view 0 Answers

Mask particles inside an object with a transparent shader 0 Answers

Unity inbuilt distorsion shader? 1 Answer

What's the best method for showing different shader-effects on objects that have materials? 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