World Transform Params doesn't seem to work correctly

Node-based Shader Editor
Post Reply
tonycoculuzzi
Posts: 5
Joined: Fri May 18, 2018 9:41 pm

World Transform Params doesn't seem to work correctly

Post by tonycoculuzzi »

The World Transform Params (http://wiki.amplify.pt/index.php?title= ... orm_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
User avatar
Amplify_Borba
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

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

Post 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
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Post Reply