Page 1 of 1

World Transform Params doesn't seem to work correctly

PostPosted: Fri Feb 22, 2019 6:55 pm
by tonycoculuzzi
The World Transform Params (http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/World_Transform_Params) doesn't seem to work correctly.

The X,Y,Z values don't seem to return anything, when it seems like they should be returning the object's pivot/world position.

(To be clear, this should be the object's position Vector3, NOT the position of a vertex or pixel or fragment)

Image

Re: World Transform Params doesn't seem to work correctly

PostPosted: Tue Feb 26, 2019 4:39 pm
by Amplify_Borba
Hello, this node simply returns Unity's unity_WorldTransformParams global var, which outputs only through its fourth component, the w port, values of either 1.0, or -1.0 for odd-negative scale transforms.

The following was taken from Unity's built-in shaders:

Code: Select all
float4 unity_WorldTransformParams; // w is usually 1.0, or -1.0 for odd-negative scale transforms