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 migi0027 · Mar 28, 2015 at 05:02 PM · unity 5shaderuvstandard

Unity 5, uv not working in standard shader

So in my shader I got the following:

 struct Input
 {
     float2 uv_MainTex;
 };
 
 
 void surf (inInput IN, inout SurfaceOutputStandard o) {
 ...
 o.Albedo = IN.uv_MainTex.xyy;
 }

However the result is a pure black surface. Now I'm sure that the actual uv coordinates are correct, as when applying another shader that was made in unity 4 the uv is working.

Did unity 5 introduce a new uv system for the standard shader or what could the issue be?

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

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Animatics_3D · Jun 02, 2015 at 05:57 AM

Are you using standard material ? you can check UV set in secondry Map some time uv is assign on UV 1 thats why this problems come correct uv set is UV 0 for texture .

if this is good then check your material color into white because when you are importing some assets in unity then texture is unlink and its material slots come black siply you can change it to white problem solve.

3rd option is with your uv normal map problems- when you are importing your model into fbx or obj somtime its normal if flip that why your model look black in unity so you can correct normal and get the solution.

just check all the option you are definitely get the solution .

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 SmilingCatEntertainment · Feb 17, 2016 at 04:55 AM

When this happened to me, I found that the issue was that my uv coordinate was not named after a texture parameter on the shader. For example, if you have a single texture parameter named _Tiles, then your texture coordinate has to be named uv_Tiles for some reason, otherwise things do not get mapped properly and the uv's come as (0,0).

I think this is a bug and it has been reported as such, for 2 reasons:

  1. Either we should be able to name the texture coordinate whatever we want, or the restrictions should be clearly documented.

  2. What about shaders that don't use textures, but still use texture coordinates procedurally? The current state of things forces those shaders to declare a dummy, unused texture parameter.

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 Taylor-Libonati · Mar 24, 2016 at 11:58 PM

Could it be because you are using IN.uv_MainTex.xyy ? instead of In.uv_MainTex.xy?

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Reflection probes overriding roughness 0 Answers

Unity 5 RC3 Standard Shader Problem 0 Answers

Modifing the Standard Shader (specular setup) and Multiple UV set. 1 Answer

Shader worked in Unity 4.5, now Unity 5 kills it. 1 Answer

Sprites consisting of two packed textures 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