DecodeViewNormalStereoHlpNode.cs 871 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( "Decode View Normal Stereo", "Miscellaneous", "Decodes view space normal from enc4.xy" )]
  8. public sealed class DecodeViewNormalStereoHlpNode : HelperParentNode
  9. {
  10. protected override void CommonInit( int uniqueId )
  11. {
  12. base.CommonInit( uniqueId );
  13. m_funcType = "DecodeViewNormalStereo";
  14. m_inputPorts[ 0 ].ChangeType( WirePortDataType.FLOAT4, false );
  15. m_outputPorts[ 0 ].ChangeType( WirePortDataType.FLOAT3, false );
  16. m_outputPorts[ 0 ].Name = "XYZ";
  17. m_previewShaderGUID = "e996db1cc4510c84185cb9f933f916bb";
  18. }
  19. protected override void OnUniqueIDAssigned()
  20. {
  21. base.OnUniqueIDAssigned();
  22. m_localVarName = "decodeViewNormalStereo" + OutputId;
  23. }
  24. }
  25. }