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 Silva · Nov 17, 2011 at 03:05 AM · shadereditormappingparallaxstrumpy

Strumpy Parallax Shader

Would anyone with more shader programming experience help me make a parallax shader with Strumpy Shader Editor: Here's what i've got so far: http://imageshack.us/photo/my-images/193/graphpf.jpg/

Now the results look weird...Maybe theres some nodes missing...Any help would be appreciated

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by SimAtanasov · Jan 15, 2012 at 04:40 PM

I know this question is old, but since it's unanswered, I thought I'd give it a go.

First thing is, apparently since Unity 3, every time a normal map texture is set to normal map at import, the alpha channel is erased. The parallax offset in SSE still requires an alpha channel to be able to calculate the height map. This can be your starting point. I personally haven't gotten much further, but I have some positive results.

What you can do is create two texture inputs - one for a normal map (who's "RGBA" goes in to the "view" port of the parallax map block, and one height map, which is a plane texture, with the height data added to an alpha channel (who's "A" goes into the "height" port of the parallax map block). This should do for the parallax.

Next up is how to fit that into the "normal" port of the master. Well instead of Tex2DNormal block, use an Add block and send the "RGBA" of your Normal map texture input to "Arg1" of the Add block and the "result" from the Parallax block to "Arg2" of the Add block.

UVs from the parallax or normal maps, don't really need to be sent to the diffuse, since to achieve any good effect, you should be using proper co-responding textures, where the UVs should match by default.

Hope this helps!

IMPORTANT EDIT - please read ------------------------------

Ok, after a little research, I found out that in fact you do have to share the result from the parallax offset to the UVs to both diffuse and Normal. Do that by using Add and mixing the UV from the original Sampler2Ds and the Parallax result.

Another important thing is to use ViewDirection block in to the "view" port of the parallax block, instead of the RGBA of the Normal map. The reason for that is that the shader needs to calculate the parallax offset according the view and since the Normal Map is static, there won't be any difference when you change the view. So if you use ViewDirection, it actually takes the view position to calculate the parallax offset.

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 Jack2g · Sep 24, 2012 at 12:07 PM

Can you post an image of your setup please?

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Help Fixing Warnings in this Shader? 2 Answers

2sided Shader - Strumpy Shader Editor 1 Answer

Strumpy shaders... Y U NO dynamic batch ?? 0 Answers

Shader Errors Strumpy Shader Editor 2 Answers

Strumpy Shader working in editor but not in build. 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