Bicubic Precompute.asset 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. %YAML 1.1
  2. %TAG !u! tag:unity3d.com,2011:
  3. --- !u!114 &11400000
  4. MonoBehaviour:
  5. m_ObjectHideFlags: 0
  6. m_CorrespondingSourceObject: {fileID: 0}
  7. m_PrefabInstance: {fileID: 0}
  8. m_PrefabAsset: {fileID: 0}
  9. m_GameObject: {fileID: 0}
  10. m_Enabled: 1
  11. m_EditorHideFlags: 0
  12. m_Script: {fileID: 11500000, guid: 78b2425a2284af743826c689403a4924, type: 3}
  13. m_Name: Bicubic Precompute
  14. m_EditorClassIdentifier:
  15. m_functionInfo: "// Made with Amplify Shader Editor v1.9.1\n// Available at the
  16. Unity Asset Store - http://u3d.as/y3X \n/*ASEBEGIN\nVersion=19100\nNode;AmplifyShaderEditor.FunctionInput;5;-931.3976,161.7528;Inherit;False;UV;2;0;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.FunctionInput;55;-937.6257,292.313;Inherit;False;Texel
  17. Size;4;1;False;1;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0\nNode;AmplifyShaderEditor.CustomExpressionNode;2;-712.9393,184.7253;Inherit;False;UV
  18. = UV * TexelSize.zw - 0.5@$float2 f = frac( UV )@$UV -= f@$$float4 xn = float4(
  19. 1.0, 2.0, 3.0, 4.0 ) - f.xxxx@$float4 yn = float4( 1.0, 2.0, 3.0, 4.0 ) - f.yyyy@$$float4
  20. xs = xn * xn * xn@$float4 ys = yn * yn * yn@$$float3 xv = float3( xs.x, xs.y
  21. - 4.0 * xs.x, xs.z - 4.0 * xs.y + 6.0 * xs.x )@$float3 yv = float3( ys.x, ys.y
  22. - 4.0 * ys.x, ys.z - 4.0 * ys.y + 6.0 * ys.x )@$float4 xc = float4( xv.xyz, 6.0
  23. - xv.x - xv.y - xv.z )@$float4 yc = float4( yv.xyz, 6.0 - yv.x - yv.y - yv.z
  24. )@$$float4 c = float4( UV.x - 0.5, UV.x + 1.5, UV.y - 0.5, UV.y + 1.5 )@$float4
  25. s = float4( xc.x + xc.y, xc.z + xc.w, yc.x + yc.y, yc.z + yc.w )@$$float w0 =
  26. s.x / ( s.x + s.y )@$float w1 = s.z / ( s.z + s.w )@$$Offsets = ( c + float4(
  27. xc.y, xc.w, yc.y, yc.w ) / s ) * TexelSize.xyxy@$Weights = float2( w0, w1 )@$;7;Create;4;True;UV;FLOAT2;0,0;In;;Float;False;True;TexelSize;FLOAT4;0,0,0,0;In;;Inherit;False;True;Offsets;FLOAT4;0,0,0,0;Out;;Float;False;True;Weights;FLOAT2;0,0;Out;;Float;False;Stochastic
  28. Tiling;False;False;0;;False;5;0;FLOAT;0;False;1;FLOAT2;0,0;False;2;FLOAT4;0,0,0,0;False;3;FLOAT4;0,0,0,0;False;4;FLOAT2;0,0;False;3;FLOAT;0;FLOAT4;4;FLOAT2;5\nNode;AmplifyShaderEditor.FunctionOutput;34;-379.6704,177.7769;Inherit;False;True;-1;Offsets;0;False;1;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0\nNode;AmplifyShaderEditor.FunctionOutput;54;-378.9186,285.9598;Inherit;False;False;-1;Weights;1;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0\nWireConnection;2;1;5;0\nWireConnection;2;2;55;0\nWireConnection;34;0;2;4\nWireConnection;54;0;2;5\nASEEND*/\n//CHKSM=70F859E1E6F17A459ACAB17CBF74FCF051F334E4"
  29. m_functionName:
  30. m_description: 'Precomputation step (1 of 2) for bicubic sampling.
  31. IMPORTANT
  32. This node only precomputes data that is fed into the "Bicubic Sample" nodes using
  33. Fetch sampling mode. All textures sharing the same precomputation step must also
  34. share the same size and UV coordinates. '
  35. m_additionalIncludes:
  36. m_additionalIncludes: []
  37. m_outsideIncludes: []
  38. m_additionalPragmas:
  39. m_additionalPragmas: []
  40. m_outsidePragmas: []
  41. m_additionalDirectives:
  42. m_validData: 0
  43. m_isDirty: 1
  44. m_moduleName: ' Additional Directives'
  45. m_independentModule: 1
  46. m_customEdited: 0
  47. m_additionalDirectives: []
  48. m_shaderFunctionDirectives: []
  49. m_nativeDirectives: []
  50. m_nativeDirectivesIndex: -1
  51. m_nativeDirectivesFoldout: 0
  52. m_directivesSaveItems: []
  53. m_nodeCategory: 12
  54. m_headerStyle: 1
  55. m_headerColor: {r: 1, g: 0.4, b: 0, a: 1}
  56. m_customNodeCategory: Rust
  57. m_previewPosition: 0
  58. m_hidden: 0
  59. m_url: