EncodeFloatRGHlpNode.cs 836 B

123456789101112131415161718192021222324252627
  1. // Amplify Shader Editor - Visual Shader Editing Tool
  2. // Copyright (c) Amplify Creations, Lda <info@amplify.pt>
  3. using System;
  4. namespace AmplifyShaderEditor
  5. {
  6. [Serializable]
  7. [NodeAttributes( "Encode Float RG ", "Miscellaneous", "Encodes [0..1] range float into a float2" )]
  8. public sealed class EncodeFloatRGHlpNode : HelperParentNode
  9. {
  10. protected override void CommonInit( int uniqueId )
  11. {
  12. base.CommonInit( uniqueId );
  13. m_funcType = "EncodeFloatRG ";
  14. m_inputPorts[ 0 ].ChangeType( WirePortDataType.FLOAT, false );
  15. m_outputPorts[ 0 ].ChangeType( WirePortDataType.FLOAT2, false );
  16. m_outputPorts[ 0 ].Name = "RG";
  17. m_previewShaderGUID = "a44b520baa5c39e41bc69a22ea46f24d";
  18. }
  19. protected override void OnUniqueIDAssigned()
  20. {
  21. base.OnUniqueIDAssigned();
  22. m_localVarName = "encodeFloatRG" + OutputId;
  23. }
  24. }
  25. }