(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:
- removing some textures on our shader seem to fix the problem
- turning off shadows fixes the problem
- this problem is only directX - OpenGL on OSX is fine
This is very limiting, our shader needs
Self Illum/Other special purposes Map
And Cubemap for reflections
Removing one of these maps seems to fix the problem, but would require changing our art.
Addendum : reported bug
(Case 481853) Bad texcoord index errors and crashes
still waiting to hear back
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 )
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 )
link: Unity - Manual: Surface Shader examples
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.
and all same calculations based on worldRefl with this:
texCUBE(_Cube, WorldReflectionVector (IN, o.Normal))