Vertex normals swizzle depending on position/orientation of camera and other objects

Hi all,

When experimenting with a shader that maps local normal and position to UV coordinates, I found that, for some models, the normal’s Y and Z components somehow switch places depending on camera position and orientation (and on position of other objects / scene bounds).
The glitch affects the icosahedron and the cylinder I made in Blender; Unity’s default objects don’t seem to be affected.

Does anyone have any idea why this happens (and how to fix it)?

I’ve attached a test project with a shader that visualizes normals as colors.
1362984--67952--$A2.png 1362984--67953--$B2.png

I’ve tested it on WinXP workstation and Win7 laptop (shadermodel 3.0- and 2.0-capable GPUs, respectively).

1362984–67945–$NormalGlitch.zip (1.44 MB)

Hmm, after further testing I found that Unity’s default meshes are affected too (cube, plane. cylinder).

Submitted a bug report.

The batching procedure, transform normals to the batched object transform matrix.
It’s not error at all )

Oh! Thanks, that solved the problem. Silly me ^_^"