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 eXeler0 · Dec 02, 2010 at 05:30 PM · shadercustom-shader

Shader Fusion (Detail-map, how to)

Hello, just purchased ShaderFusion so I'm a noob at it, but I got some shaders working with diffuse, normal, darkmaps etc.. However, I'm now trying to create a shader that uses a "detail-map" but I can't figure out how to do it. I need a diffusemap + detailmap + lighmap + normalmap etc.. but its the "detail-map" part I cant figure out. The blending mode of a detailmap is like "overlay" in photoshop where values over 128 get brighter and values under get darker.. but how do I achieve this result in Shader Fusion? Anyone?

Advice is greatly appreciated. /eX

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

Answer by skovacs1 · Dec 02, 2010 at 06:15 PM

This is a source for answers about Unity. Support for a Unity extension such as ShaderFusion will be hit-or-miss. I have no intention of teaching you how to use ShaderFusion or graph-based shader editors in general as that's not what UnityAnswers is for. For specific answers about that product, you should request further information from either the ShaderFusion blog or the person who made ShaderFusion.

I will answer this as more of a general "what sort of blending function should I use?" question. Detail maps are usually multiplied onto your diffuse map.: See the shader examples. The scaled multiplication you describe would be something like multiplying by (detailTex - 0.5) * 2.0. You might also consider lerping on the alpha of the detail texture to use that for opacity of your detail texture. You might also consider multiplying/adding your detail's rgb components separately and keeping the alpha of your diffuse untouched, but whatever blend function you use is really up to you.

I don't have ShaderFusion, but I would imagine to multiply, you would do something like create a texture node for your detail map, pass it to a uv1 node and then pass both of your textures' uv1 nodes into a multiply node, passing that into albedo.

To create a scaled multiplication as you describe, I imagine you would pass a Vector4 node of 0.5,0.5,0.5,0.0 to the B of a subtract node and the uv1 of your detail texture to the A of the subtract node and then pass the subtract node into the A of a multiply node and a number node of 2 to the B of the multiply node and then pass the multiply node into an addition node with the uv1 of your diffuse, passing the result into albedo.

Comment
Add comment · Show 1 · 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 eXeler0 · Dec 06, 2010 at 08:14 AM 0
Share

I realize asking questions about 3rd party products will be hit or miss, but seeing the limited documentation on the official shader fusion site and considering 100% of SF users are likely to be Unity users I felt it's worth a try ;-) Thanx for your time and help, it's greatly appreciated.

/eX

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

No one has followed this question yet.

Related Questions

How can I pass world position to a custom lighting function for a surface shader? 1 Answer

Creating a fogless version of a built-in shader 1 Answer

Strange, triangle shaped holes appearing in my applied shader. 1 Answer

Custom shader dissappear on mobile 0 Answers

What's faster? Two draw calls or a black/white alpha blend? 2 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