World Transform Params doesn't seem to work correctly

Node-based Shader Editor

World Transform Params doesn't seem to work correctly

Postby tonycoculuzzi » Fri Feb 22, 2019 6:55 pm

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
tonycoculuzzi
 
Posts: 5
Joined: Fri May 18, 2018 9:41 pm

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

Postby Amplify_Borba » Tue Feb 26, 2019 4:39 pm

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!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 2 guests