Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Drakonno · Aug 14, 2016 at 10:36 AM · shadermaterialgraphicscombinecutout

How can I merge shader effects inside Unity, not an external program?

Hello,

I am experimenting with cutout shader, after trying to resolve my earlier question. There is still a problem, but I'm closer to finding a solution.

alt text

I have such nice "texture". Color with multiply mode, on one layer, and gradient with normal mode on the second. Created in GIMP. Inside Unity I use a normal standard shader, and I'm messing with "alpha cutoff" slider. If someone is interested, can check it out. With an effect like in the picture (4).

alt text

The thing is: I want all the effects of a standard shader. Albedo, metallic, normals, heights, and such things. I can't just apply two materials (one with the standard shader, one with cutout), because it makes two draws of a single mesh, and just overwrite each other. I can, however, take each of my textures and apply gradients, what is just plain stupid on a bigger scale.

How can I achieve such effect? Merging one texture, with another, able to be put into the material, and create merging like in GIMP? Or some other way to apply cutout texture, but inside Unity?

Tutorial how to make basic effect is here.

Thank You in advance.

cutout.png (376.4 kB)
cutoutpink.png (377.1 kB)
Comment
Add comment · Show 5
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 tanoshimi · Aug 14, 2016 at 12:08 PM 0
Share

Without meaning to be facetious, the solution is simply for you to learn shader program$$anonymous$$g. I'm not quite sure that's something that can reasonably be expected to be provided to you on a Q+A site like this.

avatar image Drakonno tanoshimi · Aug 14, 2016 at 01:24 PM 0
Share

So basically, I have to take a look into Standard shader and add multiplying of my textures into its code (or well... do it in GI$$anonymous$$P hundred times)? There is no way doing such merging in a modular way, like the whole scripting in Unity is done? From what I see most of shaders are "each possibility" rather than "if I want X, I will add shader from X".

About Q+A, a question is provided, and have certain one proper answer, there would be a part of code probably. On other questions we could answer "learn C# coding", and that would be closing questions. I'm asking for other options because shaders, in my opinion, are slightly escaping the idea of components, and are getting bigger and bigger with needs.

avatar image Namey5 · Aug 16, 2016 at 08:41 AM 0
Share

I'm not really understanding what you're trying to accomplish. $$anonymous$$y interpretation is that you want a cutout shader with all the features of the standard shader, however the standard shader already does alpha-testing.

avatar image Drakonno Namey5 · Aug 16, 2016 at 09:24 PM 0
Share

Yes. It has, but I can't change cutout texture. I must merge texture and alpha texture in gimp, and then import it into unity. And i have to do it for every alpha and every texture. Ins$$anonymous$$d of just setting one texture and the other in unity editor, and letting shader do the merging work.

avatar image Namey5 Drakonno · Aug 17, 2016 at 04:49 AM 0
Share

Oh, ok, I see what you mean now. This is easy enough to do in a surface shader, just give me a bit of time.

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

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

Related Questions

Creating a Material from shader string 2 Answers

use RenderTexture on a sphere correctly? 1 Answer

How can I pan a texture to specific location on a sheet? 1 Answer

Standard material shader ignoring SetFloat property "_Mode"? 1 Answer

Material doesn't have a color property '_Color' 4 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