1
\$\begingroup\$

I've made a shader shown below which essentially acts as a "world bend / curve" shader by "bending" objects depending on their position from camera. It's a subgraph that outputs value for vertex position.

It works, but I am seeing strange behaviour on some items, they seem to bend much more than others despite being in a same position. After some digging around I figured out that it is due to some items having different scales. For example object with scale of 1,1,1 bends correctly where as object with scale like 1,0.2,0.5 bends either more extremely or less.

Is there a way to edit this shader so that it takes different scales into account and bends all objects in same manner despite their scales?

Parameters here are

CurveX - How much to curve in x axis CurveY - How much to curve in y axis Curve Start Distance - How far from camera should curving effect start from

enter image description here

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

Choose 'Inverse Model' in 'Transformation Matrix' node instead of 'Model' in your shader and hit the 'Save Asset' button.

\$\endgroup\$
1
  • \$\begingroup\$ Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. \$\endgroup\$
    – liggiorgio
    Feb 13, 2023 at 13:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .