Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 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
Add comment · 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

· Add your reply
  • Sort: 
avatar image
0

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
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
avatar image
0

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
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

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

Behaviour of SetActive seems to have changed. Re-firing effects now interrupts itself, breaks my effect system. 1 Answer

Smooth text disappear after erased like in old monitors. 1 Answer

Unitys Particle System wont work like i want 0 Answers

Multitouch water ripple shader - Need help!!! 0 Answers

Fading out the edges of a mesh without using a material 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