%YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!114 &11400000 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 78b2425a2284af743826c689403a4924, type: 3} m_Name: CotangentFrame m_EditorClassIdentifier: m_functionInfo: "// Made with Amplify Shader Editor v1.9.1\n// Available at the Unity Asset Store - http://u3d.as/y3X \n/*ASEBEGIN\nVersion=19100\nNode;AmplifyShaderEditor.FunctionInput;2;-613.4943,-271.5543;Inherit;False;View Dir;3;1;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.FunctionInput;1;-608.4943,-157.5543;Inherit;False;UV;2;2;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.FunctionInput;4;-592.4943,-397.5543;Inherit;False;World Normal;3;0;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.CustomExpressionNode;3;-421.4942,-290.5543;Float;False;float3 dp1 = ddx ( position )@$float3 dp2 = ddy ( position )@$float2 duv1 = ddx ( uv )@$float2 duv2 = ddy ( uv )@$float3 dp2perp = cross ( dp2, normal )@$float3 dp1perp = cross ( normal, dp1 )@$float3 tangent = dp2perp * duv1.x + dp1perp * duv2.x@$float3 bitangent = dp2perp * duv1.y + dp1perp * duv2.y@$float invmax = rsqrt ( max ( dot ( tangent, tangent ), dot ( bitangent, bitangent ) ) )@$tangent *= invmax@$bitangent *= invmax@$return float3x3 (\ttangent.x, bitangent.x, normal.x,$\t\t\t\t\ttangent.y, bitangent.y, normal.y,$\t\t\t\t\ttangent.z, bitangent.z, normal.z )@;5;Create;3;True;normal;FLOAT3;0,0,0;In;;Float;False;True;position;FLOAT3;0,0,0;In;;Float;False;True;uv;FLOAT2;0,0;In;;Float;False;CotangentFrame;False;False;0;;False;3;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT2;0,0;False;1;FLOAT3x3;0\nNode;AmplifyShaderEditor.FunctionOutput;5;-204.4942,-327.5543;Inherit;False;True;-1;TBN;0;False;1;0;FLOAT3x3;0,0,0,0,1,0,0,0,1;False;1;FLOAT3x3;0\nWireConnection;3;0;4;0\nWireConnection;3;1;2;0\nWireConnection;3;2;1;0\nWireConnection;5;0;3;0\nASEEND*/\n//CHKSM=5EE0BA25B2053DE91C0A959056A63C7A46710D01" m_functionName: m_description: 'Calculating Cotangent frame without precomputed data http://www.thetenthplanet.de/archives/1180' m_additionalIncludes: m_additionalIncludes: [] m_outsideIncludes: [] m_additionalPragmas: m_additionalPragmas: [] m_outsidePragmas: [] m_additionalDirectives: m_validData: 0 m_isDirty: 0 m_moduleName: ' Additional Directives' m_independentModule: 1 m_customEdited: 0 m_additionalDirectives: [] m_shaderFunctionDirectives: [] m_nativeDirectives: [] m_nativeDirectivesIndex: -1 m_nativeDirectivesFoldout: 0 m_directivesSaveItems: [] m_nodeCategory: 3 m_headerStyle: 1 m_headerColor: {r: 1, g: 0.4, b: 0, a: 1} m_customNodeCategory: m_previewPosition: 0 m_hidden: 0 m_url: