• 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 Johan 4 · Mar 25, 2011 at 10:25 AM · shaderlabname

Shader object names? Where can I get a list of them

Where can I get the full list of default shader object names like _MainTex _BumpMap and so on...

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

Answer by Jessy · Mar 25, 2011 at 01:07 PM

The two you mentioned, _Cube, and _Color are the only properties that we've been told are reliable. If you want to make some kind of system that depends on naming, you can open the shaders you care about, look for the other common properties you care about, and use them. Just don't count on it being future-proof (if anything does break in the future, you can always do a find/replace in the shader to make it work again, though.)

Comment
Add comment · Show 4 · 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 Johan 4 · Mar 25, 2011 at 01:23 PM 0
Share

Where are the default shaders stored? I can't find any

avatar image Jessy · Mar 25, 2011 at 01:34 PM 0
Share

http://forum.unity3d.com/forums/16-ShaderLab http://unity3d.com/support/resources/assets/built-in-shaders

avatar image Bunny83 · Mar 25, 2011 at 01:49 PM 1
Share

I agree, but there are shaders that don't even have a _Color property. All particle shaders uses _TintColor. That's why material.color will fail on particla shaders. A Shader in general is not required to have any property at all but most built-in shaders have those common properties. With $$anonymous$$aterial.HasProperty you can check if the shader have a certain property.

avatar image Jessy · Mar 25, 2011 at 02:47 PM 0
Share

For as opaque as Unity makes shaders out to be, I'd call that a bug. I only use custom shaders, and I always use the _Color convention, if I need at least one color, but this ought to be reported.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Find a child with a name, how to?? 5 Answers

Get object name from raycast. 1 Answer

Multiplayer Chat Script (Problem : mixed names) 1 Answer

How do I use current List Object [i] as the string name? 3 Answers

OnConnected doesn't show my name 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