public override string GenerateShaderForOutput( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar )
{
if( dataCollector.MasterNodeCategory != AvailableShaderTypes.Template )
{
UIUtils.ShowMessage( "Template Fragmment Data node is only intended for templates use only" );
return m_outputPorts[ 0 ].ErrorValue;
}
if( !dataCollector.IsFragmentCategory )
{
UIUtils.ShowMessage( "Template Fragment Data node node is only intended for fragment use use only" );
return m_outputPorts[ 0 ].ErrorValue;
}
if( m_multiPassMode )
{
if( dataCollector.TemplateDataCollectorInstance.MultipassSubshaderIdx != SubShaderIdx ||
dataCollector.TemplateDataCollectorInstance.MultipassPassIdx != PassIdx
)
{
UIUtils.ShowMessage( string.Format( "{0} is only intended for subshader {1} and pass {2}", m_dataLabels[ m_currentDataIdx ], SubShaderIdx, PassIdx ) );
return m_outputPorts[ outputId ].ErrorValue;
}
}
return GetOutputVectorItem( 0, outputId, m_inVarName + m_dataName );
}