TessellationParentNode.cs 763 B

1234567891011121314151617181920212223242526272829
  1. namespace AmplifyShaderEditor
  2. {
  3. public class TessellationParentNode : ParentNode
  4. {
  5. protected override void CommonInit( int uniqueId )
  6. {
  7. base.CommonInit( uniqueId );
  8. m_useInternalPortData = true;
  9. }
  10. public override string GenerateShaderForOutput( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar )
  11. {
  12. if ( dataCollector.PortCategory != MasterNodePortCategory.Tessellation )
  13. {
  14. UIUtils.ShowMessage( UniqueId, m_nodeAttribs.Name + " can only be used on Master Node Tessellation port" );
  15. return "(-1)";
  16. }
  17. return BuildTessellationFunction( ref dataCollector );
  18. }
  19. protected virtual string BuildTessellationFunction( ref MasterNodeDataCollector dataCollector )
  20. {
  21. return string.Empty;
  22. }
  23. }
  24. }