You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
889 B

  1. // Amplify Shader Editor - Visual Shader Editing Tool
  2. // Copyright (c) Amplify Creations, Lda <info@amplify.pt>
  3. namespace AmplifyShaderEditor
  4. {
  5. [System.Serializable]
  6. [NodeAttributes( "FWidth", "Math Operators", "Sum of approximate window-space partial derivatives magnitudes" )]
  7. public sealed class FWidthOpNode : SingleInputOp
  8. {
  9. protected override void CommonInit( int uniqueId )
  10. {
  11. base.CommonInit( uniqueId );
  12. m_opName = "fwidth";
  13. m_previewShaderGUID = "81ea481faaef9c8459a555479ba64df7";
  14. m_inputPorts[ 0 ].CreatePortRestrictions( WirePortDataType.OBJECT,
  15. WirePortDataType.FLOAT ,
  16. WirePortDataType.FLOAT2,
  17. WirePortDataType.FLOAT3,
  18. WirePortDataType.FLOAT4,
  19. WirePortDataType.COLOR ,
  20. WirePortDataType.INT);
  21. //m_inputPorts[ 0 ].ChangeType( WirePortDataType.FLOAT4, false );
  22. }
  23. }
  24. }