Пример #1
0
        public override string GenerateShaderForOutput(int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar)
        {
            dataCollector.ForceNormal = true;

            dataCollector.AddToInput(UniqueId, UIUtils.GetInputDeclarationFromType(m_currentPrecisionType, AvailableSurfaceInputs.WORLD_NORMAL), true);
            dataCollector.AddToInput(UniqueId, Constants.InternalData, false);

            string worldBitangent = GeneratorUtils.GenerateWorldBitangent(ref dataCollector, UniqueId);

            return(GetOutputVectorItem(0, outputId, worldBitangent));
        }
Пример #2
0
        public override string GenerateShaderForOutput(int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar)
        {
            if (dataCollector.IsTemplate)
            {
                return(GetOutputVectorItem(0, outputId, dataCollector.TemplateDataCollectorInstance.GetWorldBinormal()));
            }

            if (dataCollector.PortCategory == MasterNodePortCategory.Fragment || dataCollector.PortCategory == MasterNodePortCategory.Debug)
            {
                dataCollector.ForceNormal = true;

                dataCollector.AddToInput(UniqueId, UIUtils.GetInputDeclarationFromType(m_currentPrecisionType, AvailableSurfaceInputs.WORLD_NORMAL), true);
                dataCollector.AddToInput(UniqueId, Constants.InternalData, false);
            }

            string worldBitangent = GeneratorUtils.GenerateWorldBitangent(ref dataCollector, UniqueId);

            return(GetOutputVectorItem(0, outputId, worldBitangent));
        }
Пример #3
0
        public override string GenerateShaderForOutput(int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar)
        {
            if (dataCollector.IsTemplate)
            {
                return(GetOutputVectorItem(0, outputId, dataCollector.TemplateDataCollectorInstance.GetWorldBinormal(m_currentPrecisionType)));
            }

            if (dataCollector.PortCategory == MasterNodePortCategory.Fragment || dataCollector.PortCategory == MasterNodePortCategory.Debug)
            {
                dataCollector.ForceNormal = true;

                dataCollector.AddToInput(UniqueId, SurfaceInputs.WORLD_NORMAL, m_currentPrecisionType);
                dataCollector.AddToInput(UniqueId, SurfaceInputs.INTERNALDATA, addSemiColon: false);
            }

            string worldBitangent = GeneratorUtils.GenerateWorldBitangent(ref dataCollector, UniqueId);

            return(GetOutputVectorItem(0, outputId, worldBitangent));
        }