Esempio n. 1
0
        public override string GenerateShaderForOutput(int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar)
        {
            if (dataCollector.IsFragmentCategory)
            {
                UIUtils.ShowMessage(ErrorMessage);
                return("0");
            }
            if (m_outputPorts[0].IsLocalValue)
            {
                return("0");
            }

            m_outputPorts[0].SetLocalValue("0");
            string vertexPosValue    = dataCollector.IsTemplate ? dataCollector.TemplateDataCollectorInstance.GetVertexPosition(WirePortDataType.FLOAT3) : "v.vertex";
            string vertexNormalValue = dataCollector.IsTemplate ? dataCollector.TemplateDataCollectorInstance.GetVertexNormal() : "v.normal";

            BillboardOpHelper.FillDataCollector(ref dataCollector, m_billboardType, m_rotationIndependent, vertexPosValue, vertexNormalValue);

            return("0");
        }