Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 snakeylake · Aug 02, 2012 at 09:03 PM · shadersgraphicstexturesshadowsdirectx

Help! Bad texcoord index!!!?

(Still happening in 3.5.5f3 - this is an unresolved issue )

Starting with unity3.5.3 ( I don't know the exact update, but the update before 3.5.4f1 ) We have a problem with "Bad texcoord index" errors and crashes

With Some clues from: http://forum.unity3d.com/threads/23924-more-than-four-textures-in-one-pass

  1. removing some textures on our shader seem to fix the problem

  2. turning off shadows fixes the problem

  3. this problem is only directX - OpenGL on OSX is fine

This is very limiting, our shader needs Color Map Self Illum/Other special purposes Map NormalMap And Cubemap for reflections

Removing one of these maps seems to fix the problem, but would require changing our art.

Please Help

Thanks

Addendum : reported bug (Case 481853) Bad texcoord index errors and crashes still waiting to hear back

Comment
Add comment · Show 3
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 ScroodgeM · Aug 02, 2012 at 09:16 PM 0
Share

just to don't use some texcoords. use for example for bumpmap and selfillum textures mapping from main texture.

avatar image snakeylake · Aug 02, 2012 at 09:45 PM 0
Share

we're just using float2 uv_$$anonymous$$ainTex; float2 uv_Bump$$anonymous$$ap;

dropping down to uv_$$anonymous$$ainTex doesn't fix the issue

any other ideas? Thanks!

avatar image ScroodgeM · Aug 02, 2012 at 09:46 PM 0
Share

can you post shader?

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by snakeylake · Aug 02, 2012 at 11:10 PM

Shaders attached. I've confirmed that the issue does NOT happen in 3.5.2f2.

The issue goes away if I disable vertex lighting. ( comment out #define VERTEX_COLOR_LIGHTING )


uber.shader.txt (1.5 kB)
common.cginc.txt (5.9 kB)
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 ScroodgeM · Aug 03, 2012 at 06:45 AM 0
Share

shader compiles ok with both

#define VERTEX_COLOR_LIGHTING

and

//#define VERTEX_COLOR_LIGHTING

Unity version 3.5.4f1

how can i reproduce the error?

avatar image
0

Answer by snakeylake · Aug 03, 2012 at 06:28 PM

Scroodge, Thanks for you interest! the error doesn't happen on shader compile here is an untextured project with the error ( open the test scene and make sure shadows are enabled an you should see an error - I couldn't upload textures on this post because it says there isn't enough space... the same error happens when it is textured )

The issue may be related to how the mesh was created... ( maybe the vertex colors in the mesh allow it to happen, stock unity sphere don't seem to cause the error )


test.zip (55.7 kB)
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 ScroodgeM · Aug 04, 2012 at 10:52 AM

link: http://docs.unity3d.com/Documentation/Components/SL-SurfaceShaderExamples.html

citation: If you want to do reflections that are affected by normal maps, it needs to be slightly more involved: INTERNAL_DATA needs to be added to the Input structure, and WorldReflectionVector function used to compute per-pixel reflection vector after you've written the Normal output.

solution:

replace this:

texCUBE(_Cube, IN.worldRefl)

and all same calculations based on worldRefl with this:

texCUBE(_Cube, WorldReflectionVector (IN, o.Normal))
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

8 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Strange shadow/texture issue on Save Scene 0 Answers

Best way to add a simple smudge effect? 0 Answers

Shader to transition between lit and shadowed area 0 Answers

Is the final look of a model,in-game work done in a modeling software or inside unity? 2 Answers

Make triplanar mapped textures stay in place? 1 Answer


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