Vectors always showing as Vector4 in inspector

Node-based Shader Editor

Vectors always showing as Vector4 in inspector

Postby AndrewMyriad » Tue Nov 13, 2018 10:21 am

Not sure if this is a known issue, did a quick forum search but pretty common term. Is there a reason why regardless of if you create a Vector2, Vector3 or Vector4 node and make it a property, it always shows X, Y, Z and W values in the inspector?
AndrewMyriad
 
Posts: 9
Joined: Wed Aug 08, 2018 1:57 am

Re: Vectors always showing as Vector4 in inspector

Postby Amplify_Borba » Tue Nov 13, 2018 10:59 am

Hello, vector2 and vector3 properties displaying as a vector4 is an expected behavior, the reason behind this is due to the way that Unity handles shaders, as it only receives single float or float4 values.

This means that the last two values for the Vector2 and the last value for the Vector3 are ignored and do nothing.

Please let me know if you have any further questions, thanks!
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

Re: Vectors always showing as Vector4 in inspector

Postby AndrewMyriad » Fri Nov 16, 2018 4:54 am

That makes sense! Thanks!
AndrewMyriad
 
Posts: 9
Joined: Wed Aug 08, 2018 1:57 am

Re: Vectors always showing as Vector4 in inspector

Postby Amplify_Borba » Fri Nov 16, 2018 9:20 am

Glad to help, don't hesitate to get back in touch if you have any further questions!
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 0 guests