summaryrefslogtreecommitdiff
path: root/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/TessellationParentNode.cs
blob: be14febc345dd545c5dd2c6c4e8e9850aec435d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
namespace AmplifyShaderEditor
{
	public class TessellationParentNode : ParentNode
	{

		protected override void CommonInit( int uniqueId )
		{
			base.CommonInit( uniqueId );
			m_useInternalPortData = true;
		}


		public override string GenerateShaderForOutput( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar )
		{
			if ( dataCollector.PortCategory != MasterNodePortCategory.Tessellation )
			{
				UIUtils.ShowMessage( UniqueId, m_nodeAttribs.Name + " can only be used on Master Node Tessellation port" );
				return "(-1)";
			}

			return BuildTessellationFunction( ref dataCollector );
		}

		protected virtual string BuildTessellationFunction( ref MasterNodeDataCollector dataCollector )
		{
			return string.Empty;
		}
	}
}