+2

V1.26 Can't multiply matrix an appended Vector4 (xyz+w) to a 4x4 matrix

Alon Tako 8 years ago 0

If I take an exposed vector 4, append its xyz to its w to get an output of 4 floats, and use a multiply matrix to multiply it with a 4x4 matrix - the shader will compile but once I open it again, it'll throw an error:

Invalid input in Matrix multiply

UnityEngine.Debug:LogError(Object)
ShaderForge.SFNCG_MatrixMultiply:Refresh()
ShaderForge.SF_NodeConnector:LinkTo(SF_NodeConnector, LinkingMethod, Boolean)
ShaderForge.SF_Link:Establish(SF_Editor, LinkingMethod)
ShaderForge.SF_Parser:LoadFromNodeData(String, Single, String&)
ShaderForge.SF_Parser:ParseNodeDataFromShader(SF_Editor, Shader)
ShaderForge.SF_Editor:InitializeInstance(Shader)
ShaderForge.SF_Editor:Init(Shader)
ShaderForgeMaterialInspector:OnInspectorGUI() (at Assets/ShaderForge/Editor/InternalResources/Inspectors/ShaderForgeMaterialInspector.cs:85)
UnityEditor.DockArea:OnGUI()


HOWEVER:

If I additionally pass the appended vector through a component mask, it'll compile and throw no errors.


Seems like a bug, but maybe I'm missing something here.