Scale World Position According to Object Size?

Started by
0 comments, last by Shem_Namo 2 years, 8 months ago

Hi everyone, how are you doing?

I am working an a Tri-Planar Map shader and it uses the object space world position to create uv maps.

I ran into a little issue that if I scale the object to be larger the tiling of the texture is effected.

Is there any way to scale the position according to the size of the object?

The goal is for the position to always be between -1 and 1.

I would assume that I need to scale the position by components of one of the scene matrices, but I don't know which one.

Can someone please point me in the right direction?

Thanks in advance.

This topic is closed to new replies.

Advertisement