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 DeadKenny · Feb 12, 2014 at 03:30 AM · shadertexturealphablendblood

render Alpha only on another Alpha

I need to get a texture to only render/show on the alpha cutout part of another texture on an object.

Explain using an example:

I have this 2D car right and then some blood objects instantiate on top of it. What I need is for that instantiated blood to only show on alpha channel/cutout part of the car.

Hope you understand.

Comment
Add comment · Show 6
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 whydoidoit · Feb 12, 2014 at 09:08 AM 0
Share

This would be easiest/cheapest if it was combined in the same shader so you could sample both textures at the same time. Otherwise you'd need a Grab pass. Is that what you are after?

avatar image DeadKenny · Feb 12, 2014 at 09:17 AM 0
Share

Are there any shaders that do that already?

Its very hard for me to find info on this. I am busy checking grab pass now.

avatar image whydoidoit · Feb 12, 2014 at 09:19 AM 0
Share

Not that I know of but it would be reasonably easy to write as a surface shader. Grab passes might cause you issues because they use everything that came before. Sounds like a job for a custom shader to me. They aren't so hard to write - did a short course over on http://unitygems.com

avatar image DeadKenny · Feb 12, 2014 at 09:33 AM 0
Share

Wait wait this might cause me another problem. Because theres blood on the floor and when the alpha on the texture of the car passes over it will hide it won't it?

... and yes grab pass looks nasty lol.

avatar image whydoidoit · Feb 12, 2014 at 09:37 AM 0
Share

It depends what's rendering the blood on the floor. If it's another object then no - it will already be rendered and the car alpha won't do much about it.

Show more comments

0 Replies

· Add your reply
  • Sort: 

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

19 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

Related Questions

Add transparency to this shader? 0 Answers

Blend two texture diffuse shader with alpha 0 Answers

Decal Alpha Blend 0 Answers

Shader: separate alpha texture, independent offset 1 Answer

Do alpha cut off with seperate texture? 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