Quantcast
Channel: UGUI & TextMesh Pro
Viewing all articles
Browse latest Browse all 23263

Normals, Tangents and batching

$
0
0
I'm passing some floats to the shader encoded in the Normal and Tangent vectors.
But those values are modified by unity when batching the UI vertices.

What's the exact modifications that are applied to the vertices when batching?

I was guessing that normals and tangents are multiplied by the Transform.localToWorldMatrix to account for rotation/scaling. So, I tried multiplying by the inverse of that function so that when unity apply the matrix, the vectors recover their original values....

Normals, Tangents and batching

Viewing all articles
Browse latest Browse all 23263

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>