Why is the input UV a Vector4?

The Tiling and Offset Node takes in a Vector2 for the UV. We’re plugging a Vector4 in it. I kind of get that it’s because we’ll be sending UV0, which does export a Vector 4, but it feels like this will be squashed all the same (presumably only using the first two coordinates). I get get that UV coordinates could involve higher dimensions, but here, we’re only building for two, and there’s no real explanation for why we’re bringing in four.

It’s a Vector4 because under the hood, these UV coordinates are transformed by the graphics engine via matrix transforms as the point on the texture is mapped from 2D space into 3D space. To keep data consistent, the UV is passed around internally as a Vector4 (Quaternion) for data simplicity.

For our purposes, we’ll only ever use the first two value (UV) of the four values in the Vector4.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms