
commit bb3be793ca5db3df43679f2d6c34c75f768047a1 Author: SAIPO <grasste0403@hotmail.com> Date: Wed Dec 22 07:46:07 2021 +0800 修改佛教Boss关卡和伊斯兰Boss关卡的粒子特效 commit 1987a63954402be8894f9cc9805545432afefa18 Author: SAIPO <grasste0403@hotmail.com> Date: Tue Dec 21 20:55:05 2021 +0800 任务:编写shader,完善数据库类 1.完善了PlayerInfo类,用以数据库功能 1) 编写GetSqlData()函数,使用多线程获取用户信息,使用前请先设置公关变量name。 2) 编写CreateUser(string username)函数,在用户表内创建一个用户。 3) 编写hasName(string _searchName)函数,判断是否存在这个用户。 4) 编写GetBoardInfo(int WorldId)函数,获取指定世界的留言板链表。 5) 编写GetDeadInfo(int WorldId)函数,获取指定世界的死亡信息链表。 6) 编写CreateDead(int WorldId, Vector2 postion)函数,创建一条死亡信息。 7) 编写CreateBoard(int WorldId, Vector2 postion,string text)函数,创建一条留言信息。 8) 编写UpdatePlayerInfo()函数,将类里储存的信息上传到数据库。 2.实装相关Shader 1)完善以撒关卡的屏幕后特效,使其可以在发怒场景发出红色辉光。 2)完善以撒鬼魂的粒子,并且颜色和发怒与否关联。 3)实装以撒关卡的窗户辉光效果。 4)实装伊斯兰Boss关卡炸弹弹反的粒子特效。 5)实装伊斯兰Boss关卡的尘土特效(需要重做) 6)实装佛教Boss关卡的敲钟声波特效。 7)实装佛教Boss关卡的钟声受击灰尘(需要重做) 3.目前发现的bug 1)当人物恰好调到角落里会卡动画。 2)伊斯兰Boss关卡,特洛伊木马吐出的炸弹落到特效小怪上会闪退。 commit c06b842382051bc260d9f509491c683a41ca2a4c Author: SAIPO <grasste0403@hotmail.com> Date: Tue Dec 21 14:08:06 2021 +0800 Squashed commit of the following: commit e7dcdec1d9913e283f42d42f72f1030f0c8b6fda Author: Roman <1325980292@qq.com> Date: Tue Dec 21 00:45:50 2021 +0800 任务:搭建前置关卡,编写演出逻辑 1.流程化游戏 (1.制作转移器,内含字典,根据玩家的静态属性“阶段”来决定到转移点后将会移动到哪一个场景 (2.制作转场器,水平方向从左到右 下班 commit 74f926815ec8d00fa051192eb3b978ff4b3c01a6 Author: Roman <1325980292@qq.com> Date: Mon Dec 20 23:33:14 2021 +0800 任务:搭建前置关卡,编写演出逻辑 1.编写基督前置关卡 (1.放置平台、怪物和男童 (2.修改男童类,外加OnSaveEvent,OnSave时若有事件则触发该Event (3.编写开幕演出,与yi前置类似 (4.编写男童解救演出 ((1.触发Fungus对话 ((2.对话结束后,开启通往上层的门 2.搭建村场景 (1.放置平台和元素 (2.为可动元素制作动画 3.为玩家添加static属性,进度。0:刚开,1进村,2通佛,3通伊,4.通基 4.制作死亡重开功能 (1.当玩家生命值降到0及以下,触发死亡事件 (2.死亡后reload当前场景,并设记录员,关闭某些事件和演出不再执行 *优化和修复 (1.尝试制作击中卡肉效果,目前打击感太弱。也可以尝试粒子效果 *至此,全部前置关卡搭建完毕,村场景搭建完毕。 *明天可以完成流程化,接下来就是填充剧情、UI、死亡标记和留言板等系统了 下班 commit f257b40d10373a13380e9c395fe94d6559a82a0f Author: Roman <1325980292@qq.com> Date: Sun Dec 19 23:57:44 2021 +0800 任务:搭建前置关卡,编写演出逻辑 1.编写佛教前置关开场演出 (*.休整地形,使得左边多出一块地面,方便演出正常运作 (*.项目后期再通过逻辑触发该演出,目前先用调试方式触发演出 (1.关闭空气墙 (2.修改玩家inputDir使玩家从屏幕外冲进到屏幕内部 (3.等待一段时间 (4.此时玩家应该走到某个合适的位置,停止玩家的inputDir (5.等待一小段时间给玩家反应 (6.修改相机offset,使其对准对话的两个小怪 (7.等待一小段时间给玩家反应 (8.触发Fungus对话 (9.Fungus对话结束后,返回标记命令演出Main继续执行 *.修改NormalEnemy,添加标识isInFoStage,在Update中判断,若是,使该怪物水平方向上追踪玩家,可以参考爱欲品的Seek (10.修改左边小怪的isInFoStage (11.开启右边小怪的Path动画,表现其慌忙逃跑 (12.Invoke一个延时,等右边小怪逃出视野后删除它 (13.触发善后和结束事件 (14.重写善后事件,重新开启空气墙 2.搭建伊斯兰前置关卡 3.创建伊斯兰前置关卡演出 (1.关闭空气墙 (2.修改玩家inputDir使玩家从屏幕外冲进到屏幕内部 (3.等待一段时间 (4.此时玩家应该走到某个合适的位置,停止玩家的inputDir (5.等待一小段时间给玩家反应 (6.触发善后与结束事件 4.创建玩家隔间触发事件 (1.是进入式触发器对象 (2.触发时Call隔间演出 5.编写隔间演出逻辑 (1.表现关门 (2.左右晃一下镜头,中心移动到左右门处,表示门被关闭 (3.镜头回到玩家处,同时压缩相机可移动范围更窄 (4.打开隔间墙壁的空气墙 (5.设置EndEvent为伊斯兰事件 6.编写召唤伊斯兰事件 (1.摘自木马的召唤攻击,稍作修改 (2.当召唤的伊斯兰全部挂了,触发隔间结束事件 7.编写隔间结束事件 (1.表现开门 (2.关闭隔间的空气墙 (3.重设相机移动范围 8.搭建基督前置关卡 *.至此,第一关、第二关前置关卡的逻辑基本开发完毕 *.明天能做完所有前置关,顺便应该能搭完村场景,后天可以开始搭建新系统,目前还差留言、死亡标记等系统等待编写 下班 commit cd22966ad7637a84c0f08c3a716d5ec549699749 Author: Roman <1325980292@qq.com> Date: Sun Dec 19 14:12:05 2021 +0800 Squashed commit of the following: commit 26aff356971bdc2c2a6a3bd444eeb50c4bf7ec14 Author: SAIPO <grasste0403@hotmail.com> Date: Sun Dec 19 02:20:44 2021 +0800 导入近期制作的一些Shader 1.合并分支 2.完成了人物描边的流动shader制作,并且可以对Bloom屏幕后处理产生反应。 3.完成了基督教boss关卡,彩色窗户辉光的shader制作,可以对Bloom产生反应。 4.完成了伊斯兰教弹反的炸弹拖尾粒子shader的制作。 5.完成了火焰粒子shader的制作(可以用在基督教的以撒鬼魂上)。 6.完成了灰尘粒子像素化的shader制作。 7.完成了边缘扭曲的shader制作,可以用在一些树木上,让画面产生动感。 明天制作敲钟的声波Shader # Conflicts: # UserSettings/EditorUserSettings.asset commit 26aff356971bdc2c2a6a3bd444eeb50c4bf7ec14 Author: SAIPO <grasste0403@hotmail.com> Date: Sun Dec 19 02:20:44 2021 +0800 导入近期制作的一些Shader 1.合并分支 2.完成了人物描边的流动shader制作,并且可以对Bloom屏幕后处理产生反应。 3.完成了基督教boss关卡,彩色窗户辉光的shader制作,可以对Bloom产生反应。 4.完成了伊斯兰教弹反的炸弹拖尾粒子shader的制作。 5.完成了火焰粒子shader的制作(可以用在基督教的以撒鬼魂上)。 6.完成了灰尘粒子像素化的shader制作。 7.完成了边缘扭曲的shader制作,可以用在一些树木上,让画面产生动感。 明天制作敲钟的声波Shader # Conflicts: # Assets/Scenes/TeLuoYiStageTest.unity # Assets/Shader/火焰粒子shader/particle.shadergraph # Assets/Shader/灰尘粒子用shader/Pixel_My.shader # Assets/Shader/灰尘粒子用shader/Unlit_Pixel_My 1.mat # Assets/Shader/灰尘粒子用shader/Unlit_Pixel_My 2.mat # Assets/Shader/灰尘粒子用shader/Unlit_Pixel_My.mat # Logs/ApiUpdaterCheck.txt # UserSettings/EditorUserSettings.asset
820 lines
36 KiB
C#
820 lines
36 KiB
C#
// Amplify Shader Editor - Visual Shader Editing Tool
|
|
// Copyright (c) Amplify Creations, Lda <info@amplify.pt>
|
|
|
|
using System;
|
|
using System.Text.RegularExpressions;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace AmplifyShaderEditor
|
|
{
|
|
public enum TemplateModuleDataType
|
|
{
|
|
ModuleShaderModel,
|
|
ModuleBlendMode,
|
|
ModuleBlendMode1,
|
|
ModuleBlendMode2,
|
|
ModuleBlendMode3,
|
|
ModuleBlendOp,
|
|
ModuleBlendOp1,
|
|
ModuleBlendOp2,
|
|
ModuleBlendOp3,
|
|
ModuleAlphaToMask,
|
|
ModuleCullMode,
|
|
ModuleColorMask,
|
|
ModuleColorMask1,
|
|
ModuleColorMask2,
|
|
ModuleColorMask3,
|
|
ModuleStencil,
|
|
ModuleZwrite,
|
|
ModuleZTest,
|
|
ModuleZOffset,
|
|
ModuleTag,
|
|
ModuleGlobals,
|
|
ModuleSRPBatcher,
|
|
ModuleFunctions,
|
|
ModulePragma,
|
|
ModulePragmaBefore,
|
|
ModulePass,
|
|
ModuleInputVert,
|
|
ModuleInputFrag,
|
|
PassVertexFunction,
|
|
PassFragmentFunction,
|
|
PassVertexData,
|
|
PassInterpolatorData,
|
|
PassNameData,
|
|
AllModules,
|
|
VControl,
|
|
ControlData,
|
|
DomainData,
|
|
ModuleRenderPlatforms
|
|
//EndPass
|
|
}
|
|
|
|
public enum TemplateSRPType
|
|
{
|
|
BuiltIn,
|
|
HD,
|
|
Lightweight
|
|
}
|
|
|
|
[Serializable]
|
|
public class TemplateModulesData
|
|
{
|
|
[SerializeField]
|
|
TemplateRenderPlatformHelper m_renderPlatformHelper;
|
|
|
|
[SerializeField]
|
|
private TemplateBlendData m_blendData = new TemplateBlendData();
|
|
|
|
[SerializeField]
|
|
private TemplateBlendData m_blendData1 = new TemplateBlendData();
|
|
|
|
[SerializeField]
|
|
private TemplateBlendData m_blendData2 = new TemplateBlendData();
|
|
|
|
[SerializeField]
|
|
private TemplateBlendData m_blendData3 = new TemplateBlendData();
|
|
|
|
[SerializeField]
|
|
private TemplateAlphaToMaskData m_alphaToMaskData = new TemplateAlphaToMaskData();
|
|
|
|
[SerializeField]
|
|
private TemplateCullModeData m_cullModeData = new TemplateCullModeData();
|
|
|
|
[SerializeField]
|
|
private TemplateColorMaskData m_colorMaskData = new TemplateColorMaskData();
|
|
|
|
[SerializeField]
|
|
private TemplateColorMaskData m_colorMaskData1 = new TemplateColorMaskData();
|
|
|
|
[SerializeField]
|
|
private TemplateColorMaskData m_colorMaskData2 = new TemplateColorMaskData();
|
|
|
|
[SerializeField]
|
|
private TemplateColorMaskData m_colorMaskData3 = new TemplateColorMaskData();
|
|
|
|
[SerializeField]
|
|
private TemplateStencilData m_stencilData = new TemplateStencilData();
|
|
|
|
[SerializeField]
|
|
private TemplateDepthData m_depthData = new TemplateDepthData();
|
|
|
|
[SerializeField]
|
|
private TemplateTagsModuleData m_tagData = new TemplateTagsModuleData();
|
|
|
|
[SerializeField]
|
|
private TemplateTagData m_globalsTag = new TemplateTagData( TemplatesManager.TemplateGlobalsTag, true );
|
|
|
|
[SerializeField]
|
|
private TemplateTagData m_srpBatcherTag = new TemplateTagData( TemplatesManager.TemplateSRPBatcherTag, true );
|
|
|
|
[SerializeField]
|
|
private TemplateTagData m_allModulesTag = new TemplateTagData( TemplatesManager.TemplateAllModulesTag, true );
|
|
|
|
[SerializeField]
|
|
private TemplateTagData m_functionsTag = new TemplateTagData( TemplatesManager.TemplateFunctionsTag, true );
|
|
|
|
[SerializeField]
|
|
private TemplateTagData m_pragmaTag = new TemplateTagData( TemplatesManager.TemplatePragmaTag, true );
|
|
|
|
[SerializeField]
|
|
private TemplateTagData m_pragmaBeforeTag = new TemplateTagData( TemplatesManager.TemplatePragmaBeforeTag, true );
|
|
|
|
[SerializeField]
|
|
private TemplateTagData m_passTag = new TemplateTagData( TemplatesManager.TemplatePassTag, true );
|
|
|
|
[SerializeField]
|
|
private TemplateTagData m_inputsVertTag = new TemplateTagData( TemplatesManager.TemplateInputsVertParamsTag, false );
|
|
|
|
[SerializeField]
|
|
private TemplateTagData m_inputsFragTag = new TemplateTagData( TemplatesManager.TemplateInputsFragParamsTag, false );
|
|
|
|
[SerializeField]
|
|
private TemplateShaderModelData m_shaderModel = new TemplateShaderModelData();
|
|
|
|
[SerializeField]
|
|
private TemplateSRPType m_srpType = TemplateSRPType.BuiltIn;
|
|
|
|
[SerializeField]
|
|
private bool m_srpIsPBR = false;
|
|
|
|
[SerializeField]
|
|
private string m_uniquePrefix;
|
|
|
|
[SerializeField]
|
|
private TemplateIncludePragmaContainter m_includePragmaContainer = new TemplateIncludePragmaContainter();
|
|
|
|
[SerializeField]
|
|
private bool m_allModulesMode = false;
|
|
|
|
[SerializeField]
|
|
private string m_passUniqueName = string.Empty;
|
|
|
|
public void Destroy()
|
|
{
|
|
m_renderPlatformHelper.Destroy();
|
|
m_renderPlatformHelper = null;
|
|
|
|
m_blendData = null;
|
|
m_blendData1 = null;
|
|
m_blendData2 = null;
|
|
m_blendData3 = null;
|
|
m_alphaToMaskData = null;
|
|
m_cullModeData = null;
|
|
m_colorMaskData = null;
|
|
m_colorMaskData1 = null;
|
|
m_colorMaskData2 = null;
|
|
m_colorMaskData3 = null;
|
|
m_stencilData = null;
|
|
m_depthData = null;
|
|
m_tagData.Destroy();
|
|
m_tagData = null;
|
|
m_globalsTag = null;
|
|
m_srpBatcherTag = null;
|
|
m_allModulesTag = null;
|
|
m_functionsTag = null;
|
|
m_pragmaTag = null;
|
|
m_pragmaBeforeTag = null;
|
|
m_passTag = null;
|
|
m_inputsVertTag = null;
|
|
m_inputsFragTag = null;
|
|
m_includePragmaContainer.Destroy();
|
|
m_includePragmaContainer = null;
|
|
}
|
|
|
|
public void ConfigureCommonTag( TemplateTagData tagData, TemplatePropertyContainer propertyContainer, TemplateIdManager idManager, string uniquePrefix, int offsetIdx, string subBody )
|
|
{
|
|
int id = subBody.IndexOf( tagData.Id );
|
|
if ( id >= 0 )
|
|
{
|
|
tagData.StartIdx = offsetIdx + id;
|
|
idManager.RegisterId( tagData.StartIdx, uniquePrefix + tagData.Id, tagData.Id );
|
|
propertyContainer.AddId( subBody, tagData.Id, tagData.SearchIndentation );
|
|
}
|
|
}
|
|
|
|
public TemplateModulesData( TemplateOptionsContainer optionsContainer, TemplateIdManager idManager, TemplatePropertyContainer propertyContainer, string uniquePrefix, int offsetIdx, string subBody, bool isSubShader )
|
|
{
|
|
if ( string.IsNullOrEmpty( subBody ) )
|
|
return;
|
|
|
|
m_uniquePrefix = uniquePrefix;
|
|
|
|
//RENDERING PLATFORMS
|
|
m_renderPlatformHelper = new TemplateRenderPlatformHelper();
|
|
TemplateHelperFunctions.FillRenderingPlatform( m_renderPlatformHelper , subBody );
|
|
if( m_renderPlatformHelper.IsValid )
|
|
{
|
|
m_renderPlatformHelper.Index = offsetIdx + m_renderPlatformHelper.Index;
|
|
idManager.RegisterId( m_renderPlatformHelper.Index , uniquePrefix + m_renderPlatformHelper.ID , m_renderPlatformHelper.ID );
|
|
}
|
|
|
|
//PRAGMAS AND INCLUDES
|
|
TemplateHelperFunctions.CreatePragmaIncludeList( subBody, m_includePragmaContainer );
|
|
|
|
//COMMON TAGS
|
|
ConfigureCommonTag( m_globalsTag, propertyContainer, idManager, uniquePrefix, offsetIdx, subBody );
|
|
ConfigureCommonTag( m_srpBatcherTag, propertyContainer, idManager, uniquePrefix, offsetIdx, subBody );
|
|
ConfigureCommonTag( m_functionsTag, propertyContainer, idManager, uniquePrefix, offsetIdx, subBody );
|
|
ConfigureCommonTag( m_pragmaTag, propertyContainer, idManager, uniquePrefix, offsetIdx, subBody );
|
|
ConfigureCommonTag( m_pragmaBeforeTag, propertyContainer, idManager, uniquePrefix, offsetIdx, subBody );
|
|
if( !TemplateHelperFunctions.GetPassUniqueId( m_passTag, propertyContainer, idManager, uniquePrefix, offsetIdx, subBody, ref m_passUniqueName ) )
|
|
{
|
|
ConfigureCommonTag( m_passTag, propertyContainer, idManager, uniquePrefix, offsetIdx, subBody );
|
|
}
|
|
ConfigureCommonTag( m_inputsVertTag, propertyContainer, idManager, uniquePrefix, offsetIdx, subBody );
|
|
ConfigureCommonTag( m_inputsFragTag, propertyContainer, idManager, uniquePrefix, offsetIdx, subBody );
|
|
|
|
// If Options are enabled then remove them so they won't influence Regex matches
|
|
if( optionsContainer.Enabled && optionsContainer.EndIndex > 0 )
|
|
{
|
|
offsetIdx += optionsContainer.EndIndex;
|
|
subBody = subBody.Substring( optionsContainer.EndIndex );
|
|
}
|
|
//BlEND MODE
|
|
{
|
|
Match blendModeMatch = Regex.Match( subBody, TemplateHelperFunctions.BlendModePattern1 );
|
|
if( blendModeMatch.Success )
|
|
{
|
|
int blendModeIdx = blendModeMatch.Index;
|
|
int end = blendModeMatch.Length + blendModeIdx;
|
|
string blendParams = subBody.Substring( blendModeIdx, end - blendModeIdx );
|
|
m_blendData1.BlendModeId = blendParams;
|
|
m_blendData1.BlendModeStartIndex = offsetIdx + blendModeIdx;
|
|
idManager.RegisterId( m_blendData1.BlendModeStartIndex, uniquePrefix + m_blendData1.BlendModeId, m_blendData1.BlendModeId );
|
|
|
|
TemplateHelperFunctions.CreateBlendMode( blendParams, ref m_blendData1, TemplateHelperFunctions.BlendModePattern1 );
|
|
if( m_blendData1.ValidBlendMode )
|
|
{
|
|
propertyContainer.AddId( subBody, blendParams, false );
|
|
}
|
|
}
|
|
}
|
|
{
|
|
Match blendModeMatch = Regex.Match( subBody, TemplateHelperFunctions.BlendModePattern2 );
|
|
if( blendModeMatch.Success )
|
|
{
|
|
int blendModeIdx = blendModeMatch.Index;
|
|
int end = blendModeMatch.Length + blendModeIdx;
|
|
string blendParams = subBody.Substring( blendModeIdx, end - blendModeIdx );
|
|
m_blendData2.BlendModeId = blendParams;
|
|
m_blendData2.BlendModeStartIndex = offsetIdx + blendModeIdx;
|
|
idManager.RegisterId( m_blendData2.BlendModeStartIndex, uniquePrefix + m_blendData2.BlendModeId, m_blendData2.BlendModeId );
|
|
|
|
TemplateHelperFunctions.CreateBlendMode( blendParams, ref m_blendData2, TemplateHelperFunctions.BlendModePattern2 );
|
|
if( m_blendData2.ValidBlendMode )
|
|
{
|
|
propertyContainer.AddId( subBody, blendParams, false );
|
|
}
|
|
}
|
|
}
|
|
{
|
|
Match blendModeMatch = Regex.Match( subBody, TemplateHelperFunctions.BlendModePattern3 );
|
|
if( blendModeMatch.Success )
|
|
{
|
|
int blendModeIdx = blendModeMatch.Index;
|
|
int end = blendModeMatch.Length + blendModeIdx;
|
|
string blendParams = subBody.Substring( blendModeIdx, end - blendModeIdx );
|
|
m_blendData3.BlendModeId = blendParams;
|
|
m_blendData3.BlendModeStartIndex = offsetIdx + blendModeIdx;
|
|
idManager.RegisterId( m_blendData3.BlendModeStartIndex, uniquePrefix + m_blendData3.BlendModeId, m_blendData3.BlendModeId );
|
|
|
|
TemplateHelperFunctions.CreateBlendMode( blendParams, ref m_blendData3, TemplateHelperFunctions.BlendModePattern3 );
|
|
if( m_blendData3.ValidBlendMode )
|
|
{
|
|
propertyContainer.AddId( subBody, blendParams, false );
|
|
}
|
|
}
|
|
}
|
|
{
|
|
string pattern = TemplateHelperFunctions.BlendModePattern;
|
|
Match blendModeMatch = Regex.Match( subBody, pattern );
|
|
if( !blendModeMatch.Success && !m_blendData1.ValidBlendMode && !m_blendData2.ValidBlendMode && !m_blendData3.ValidBlendMode )
|
|
{
|
|
pattern = TemplateHelperFunctions.BlendModePatternFirst;
|
|
blendModeMatch = Regex.Match( subBody, pattern );
|
|
}
|
|
if( blendModeMatch.Success )
|
|
{
|
|
int blendModeIdx = blendModeMatch.Index;
|
|
int end = blendModeMatch.Length + blendModeIdx;
|
|
string blendParams = subBody.Substring( blendModeIdx, end - blendModeIdx );
|
|
m_blendData.BlendModeId = blendParams;
|
|
m_blendData.BlendModeStartIndex = offsetIdx + blendModeIdx;
|
|
idManager.RegisterId( m_blendData.BlendModeStartIndex, uniquePrefix + m_blendData.BlendModeId, m_blendData.BlendModeId );
|
|
|
|
TemplateHelperFunctions.CreateBlendMode( blendParams, ref m_blendData, pattern );
|
|
if( m_blendData.ValidBlendMode )
|
|
{
|
|
propertyContainer.AddId( subBody, blendParams, false );
|
|
}
|
|
|
|
}
|
|
}
|
|
//BLEND OP
|
|
{
|
|
Match blendOpMatch = Regex.Match( subBody, TemplateHelperFunctions.BlendOpPattern1 );
|
|
if( blendOpMatch.Success )
|
|
{
|
|
int blendOpIdx = blendOpMatch.Index;
|
|
int end = blendOpMatch.Length + blendOpIdx;
|
|
string blendOpParams = subBody.Substring( blendOpIdx, end - blendOpIdx );
|
|
m_blendData1.BlendOpId = blendOpParams;
|
|
m_blendData1.BlendOpStartIndex = offsetIdx + blendOpIdx;
|
|
idManager.RegisterId( m_blendData1.BlendOpStartIndex, uniquePrefix + m_blendData1.BlendOpId, m_blendData1.BlendOpId );
|
|
TemplateHelperFunctions.CreateBlendOp( blendOpParams, ref m_blendData1, TemplateHelperFunctions.BlendOpPattern1 );
|
|
if( m_blendData1.ValidBlendOp )
|
|
{
|
|
propertyContainer.AddId( subBody, blendOpParams, false );
|
|
}
|
|
}
|
|
|
|
m_blendData1.DataCheck = ( m_blendData1.ValidBlendMode || m_blendData1.ValidBlendOp ) ? TemplateDataCheck.Valid : TemplateDataCheck.Invalid;
|
|
}
|
|
{
|
|
Match blendOpMatch = Regex.Match( subBody, TemplateHelperFunctions.BlendOpPattern2 );
|
|
if( blendOpMatch.Success )
|
|
{
|
|
int blendOpIdx = blendOpMatch.Index;
|
|
int end = blendOpMatch.Length + blendOpIdx;
|
|
string blendOpParams = subBody.Substring( blendOpIdx, end - blendOpIdx );
|
|
m_blendData2.BlendOpId = blendOpParams;
|
|
m_blendData2.BlendOpStartIndex = offsetIdx + blendOpIdx;
|
|
idManager.RegisterId( m_blendData2.BlendOpStartIndex, uniquePrefix + m_blendData2.BlendOpId, m_blendData2.BlendOpId );
|
|
TemplateHelperFunctions.CreateBlendOp( blendOpParams, ref m_blendData2, TemplateHelperFunctions.BlendOpPattern2 );
|
|
if( m_blendData2.ValidBlendOp )
|
|
{
|
|
propertyContainer.AddId( subBody, blendOpParams, false );
|
|
}
|
|
}
|
|
|
|
m_blendData2.DataCheck = ( m_blendData2.ValidBlendMode || m_blendData2.ValidBlendOp ) ? TemplateDataCheck.Valid : TemplateDataCheck.Invalid;
|
|
}
|
|
{
|
|
Match blendOpMatch = Regex.Match( subBody, TemplateHelperFunctions.BlendOpPattern3 );
|
|
if( blendOpMatch.Success )
|
|
{
|
|
int blendOpIdx = blendOpMatch.Index;
|
|
int end = blendOpMatch.Length + blendOpIdx;
|
|
string blendOpParams = subBody.Substring( blendOpIdx, end - blendOpIdx );
|
|
m_blendData3.BlendOpId = blendOpParams;
|
|
m_blendData3.BlendOpStartIndex = offsetIdx + blendOpIdx;
|
|
idManager.RegisterId( m_blendData3.BlendOpStartIndex, uniquePrefix + m_blendData3.BlendOpId, m_blendData3.BlendOpId );
|
|
TemplateHelperFunctions.CreateBlendOp( blendOpParams, ref m_blendData3, TemplateHelperFunctions.BlendOpPattern3 );
|
|
if( m_blendData3.ValidBlendOp )
|
|
{
|
|
propertyContainer.AddId( subBody, blendOpParams, false );
|
|
}
|
|
}
|
|
|
|
m_blendData3.DataCheck = ( m_blendData3.ValidBlendMode || m_blendData3.ValidBlendOp ) ? TemplateDataCheck.Valid : TemplateDataCheck.Invalid;
|
|
}
|
|
{
|
|
string pattern = TemplateHelperFunctions.BlendOpPattern;
|
|
Match blendOpMatch = Regex.Match( subBody, pattern );
|
|
if( !blendOpMatch.Success && !m_blendData1.ValidBlendOp && !m_blendData2.ValidBlendOp && !m_blendData3.ValidBlendOp )
|
|
{
|
|
pattern = TemplateHelperFunctions.BlendOpPatternFirst;
|
|
blendOpMatch = Regex.Match( subBody, pattern );
|
|
}
|
|
|
|
if( blendOpMatch.Success )
|
|
{
|
|
int blendOpIdx = blendOpMatch.Index;
|
|
int end = blendOpMatch.Length + blendOpIdx;
|
|
string blendOpParams = subBody.Substring( blendOpIdx, end - blendOpIdx );
|
|
m_blendData.BlendOpId = blendOpParams;
|
|
m_blendData.BlendOpStartIndex = offsetIdx + blendOpIdx;
|
|
idManager.RegisterId( m_blendData.BlendOpStartIndex, uniquePrefix + m_blendData.BlendOpId, m_blendData.BlendOpId );
|
|
TemplateHelperFunctions.CreateBlendOp( blendOpParams, ref m_blendData, pattern );
|
|
if( m_blendData.ValidBlendOp )
|
|
{
|
|
propertyContainer.AddId( subBody, blendOpParams, false );
|
|
}
|
|
}
|
|
|
|
m_blendData.DataCheck = ( m_blendData.ValidBlendMode || m_blendData.ValidBlendOp ) ? TemplateDataCheck.Valid : TemplateDataCheck.Invalid;
|
|
}
|
|
|
|
//ALPHA TO MASK
|
|
{
|
|
Match alphaToMaskMatch = Regex.Match( subBody, TemplateHelperFunctions.AlphaToMaskPattern );
|
|
if( alphaToMaskMatch.Success )
|
|
{
|
|
int alphaIdx = alphaToMaskMatch.Index;
|
|
int end = subBody.IndexOf( TemplatesManager.TemplateNewLine, alphaIdx );
|
|
string alphaParams = subBody.Substring( alphaIdx, end - alphaIdx );
|
|
m_alphaToMaskData.AlphaToMaskId = alphaParams;
|
|
m_alphaToMaskData.StartIdx = offsetIdx + alphaIdx;
|
|
idManager.RegisterId( m_alphaToMaskData.StartIdx, uniquePrefix + m_alphaToMaskData.AlphaToMaskId, m_alphaToMaskData.AlphaToMaskId );
|
|
TemplateHelperFunctions.CreateAlphaToMask( alphaParams, ref m_alphaToMaskData );
|
|
if( m_alphaToMaskData.DataCheck == TemplateDataCheck.Valid )
|
|
propertyContainer.AddId( subBody, alphaParams, false, string.Empty );
|
|
}
|
|
}
|
|
|
|
//CULL MODE
|
|
{
|
|
Match cullMatch = Regex.Match( subBody, TemplateHelperFunctions.CullWholeWordPattern );
|
|
if( cullMatch.Success )
|
|
{
|
|
int cullIdx = cullMatch.Index;
|
|
int end = subBody.IndexOf( TemplatesManager.TemplateNewLine, cullIdx );
|
|
string cullParams = subBody.Substring( cullIdx, end - cullIdx );
|
|
m_cullModeData.CullModeId = cullParams;
|
|
m_cullModeData.StartIdx = offsetIdx + cullIdx;
|
|
idManager.RegisterId( m_cullModeData.StartIdx, uniquePrefix + m_cullModeData.CullModeId, m_cullModeData.CullModeId );
|
|
TemplateHelperFunctions.CreateCullMode( cullParams, ref m_cullModeData );
|
|
if( m_cullModeData.DataCheck == TemplateDataCheck.Valid )
|
|
propertyContainer.AddId( subBody, cullParams, false, string.Empty );
|
|
|
|
}
|
|
}
|
|
//COLOR MASK
|
|
{
|
|
Match colorMaskMatch = Regex.Match( subBody, TemplateHelperFunctions.ColorMask1Pattern );
|
|
if( colorMaskMatch.Success )
|
|
{
|
|
int colorMaskIdx = colorMaskMatch.Index;
|
|
int end = colorMaskMatch.Length + colorMaskIdx;// subBody.IndexOf( TemplatesManager.TemplateNewLine, colorMaskIdx );
|
|
string colorMaskParams = subBody.Substring( colorMaskIdx, end - colorMaskIdx );
|
|
m_colorMaskData1.ColorMaskId = colorMaskParams;
|
|
m_colorMaskData1.StartIdx = offsetIdx + colorMaskIdx;
|
|
idManager.RegisterId( m_colorMaskData1.StartIdx, uniquePrefix + m_colorMaskData1.ColorMaskId, m_colorMaskData1.ColorMaskId );
|
|
TemplateHelperFunctions.CreateColorMask( colorMaskParams, ref m_colorMaskData1, TemplateHelperFunctions.ColorMask1Pattern );
|
|
if( m_colorMaskData1.DataCheck == TemplateDataCheck.Valid )
|
|
propertyContainer.AddId( subBody, colorMaskParams, false );
|
|
|
|
}
|
|
}
|
|
{
|
|
Match colorMaskMatch = Regex.Match( subBody, TemplateHelperFunctions.ColorMask2Pattern );
|
|
if( colorMaskMatch.Success )
|
|
{
|
|
int colorMaskIdx = colorMaskMatch.Index;
|
|
int end = colorMaskMatch.Length + colorMaskIdx;// subBody.IndexOf( TemplatesManager.TemplateNewLine, colorMaskIdx );
|
|
string colorMaskParams = subBody.Substring( colorMaskIdx, end - colorMaskIdx );
|
|
m_colorMaskData2.ColorMaskId = colorMaskParams;
|
|
m_colorMaskData2.StartIdx = offsetIdx + colorMaskIdx;
|
|
idManager.RegisterId( m_colorMaskData2.StartIdx, uniquePrefix + m_colorMaskData2.ColorMaskId, m_colorMaskData2.ColorMaskId );
|
|
TemplateHelperFunctions.CreateColorMask( colorMaskParams, ref m_colorMaskData2, TemplateHelperFunctions.ColorMask2Pattern );
|
|
if( m_colorMaskData2.DataCheck == TemplateDataCheck.Valid )
|
|
propertyContainer.AddId( subBody, colorMaskParams, false );
|
|
|
|
}
|
|
}
|
|
{
|
|
Match colorMaskMatch = Regex.Match( subBody, TemplateHelperFunctions.ColorMask3Pattern );
|
|
if( colorMaskMatch.Success )
|
|
{
|
|
int colorMaskIdx = colorMaskMatch.Index;
|
|
int end = colorMaskMatch.Length + colorMaskIdx;// subBody.IndexOf( TemplatesManager.TemplateNewLine, colorMaskIdx );
|
|
string colorMaskParams = subBody.Substring( colorMaskIdx, end - colorMaskIdx );
|
|
m_colorMaskData3.ColorMaskId = colorMaskParams;
|
|
m_colorMaskData3.StartIdx = offsetIdx + colorMaskIdx;
|
|
idManager.RegisterId( m_colorMaskData3.StartIdx, uniquePrefix + m_colorMaskData3.ColorMaskId, m_colorMaskData3.ColorMaskId );
|
|
TemplateHelperFunctions.CreateColorMask( colorMaskParams, ref m_colorMaskData3, TemplateHelperFunctions.ColorMask3Pattern );
|
|
if( m_colorMaskData3.DataCheck == TemplateDataCheck.Valid )
|
|
propertyContainer.AddId( subBody, colorMaskParams, false );
|
|
|
|
}
|
|
}
|
|
{
|
|
string pattern = TemplateHelperFunctions.ColorMaskPattern;
|
|
Match colorMaskMatch = Regex.Match( subBody, pattern );
|
|
if( !colorMaskMatch.Success && m_colorMaskData1.DataCheck == TemplateDataCheck.Invalid && m_colorMaskData2.DataCheck == TemplateDataCheck.Invalid && m_colorMaskData3.DataCheck == TemplateDataCheck.Invalid )
|
|
{
|
|
pattern = TemplateHelperFunctions.ColorMaskPatternFirst;
|
|
colorMaskMatch = Regex.Match( subBody, pattern );
|
|
}
|
|
|
|
if( colorMaskMatch.Success )
|
|
{
|
|
int colorMaskIdx = colorMaskMatch.Index;
|
|
int end = colorMaskMatch.Length + colorMaskIdx; //subBody.IndexOf( TemplatesManager.TemplateNewLine, colorMaskIdx );
|
|
string colorMaskParams = subBody.Substring( colorMaskIdx, end - colorMaskIdx );
|
|
m_colorMaskData.ColorMaskId = colorMaskParams;
|
|
m_colorMaskData.StartIdx = offsetIdx + colorMaskIdx;
|
|
idManager.RegisterId( m_colorMaskData.StartIdx, uniquePrefix + m_colorMaskData.ColorMaskId, m_colorMaskData.ColorMaskId );
|
|
TemplateHelperFunctions.CreateColorMask( colorMaskParams, ref m_colorMaskData, pattern );
|
|
if( m_colorMaskData.DataCheck == TemplateDataCheck.Valid )
|
|
propertyContainer.AddId( subBody, colorMaskParams, false );
|
|
|
|
}
|
|
}
|
|
//STENCIL
|
|
{
|
|
Match stencilMatch = Regex.Match( subBody, TemplateHelperFunctions.StencilWholeWordPattern );
|
|
if( stencilMatch.Success )
|
|
{
|
|
int stencilIdx = stencilMatch.Index;
|
|
int stencilEndIdx = subBody.IndexOf( "}", stencilIdx );
|
|
if( stencilEndIdx > 0 )
|
|
{
|
|
string stencilParams = subBody.Substring( stencilIdx, stencilEndIdx + 1 - stencilIdx );
|
|
m_stencilData.StencilBufferId = stencilParams;
|
|
m_stencilData.StartIdx = offsetIdx + stencilIdx;
|
|
idManager.RegisterId( m_stencilData.StartIdx, uniquePrefix + m_stencilData.StencilBufferId, m_stencilData.StencilBufferId );
|
|
TemplateHelperFunctions.CreateStencilOps( stencilParams, ref m_stencilData );
|
|
if( m_stencilData.DataCheck == TemplateDataCheck.Valid )
|
|
{
|
|
propertyContainer.AddId( subBody, stencilParams, true );
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
int stencilTagIdx = subBody.IndexOf( TemplatesManager.TemplateStencilTag );
|
|
if( stencilTagIdx > -1 )
|
|
{
|
|
m_stencilData.SetIndependentDefault();
|
|
m_stencilData.StencilBufferId = TemplatesManager.TemplateStencilTag;
|
|
m_stencilData.StartIdx = offsetIdx + stencilTagIdx;
|
|
idManager.RegisterId( m_stencilData.StartIdx, uniquePrefix + m_stencilData.StencilBufferId, m_stencilData.StencilBufferId );
|
|
propertyContainer.AddId( subBody, m_stencilData.StencilBufferId, true );
|
|
}
|
|
}
|
|
}
|
|
//ZWRITE
|
|
{
|
|
Match zWriteMatch = Regex.Match( subBody, TemplateHelperFunctions.ZWriteWholeWordPattern );
|
|
if( zWriteMatch.Success )
|
|
{
|
|
int zWriteOpIdx = zWriteMatch.Index;
|
|
int zWriteEndIdx = subBody.IndexOf( TemplatesManager.TemplateNewLine, zWriteOpIdx );
|
|
if( zWriteEndIdx > 0 )
|
|
{
|
|
m_depthData.ZWriteModeId = subBody.Substring( zWriteOpIdx, zWriteEndIdx + 1 - zWriteOpIdx );
|
|
m_depthData.ZWriteStartIndex = offsetIdx + zWriteOpIdx;
|
|
idManager.RegisterId( m_depthData.ZWriteStartIndex, uniquePrefix + m_depthData.ZWriteModeId, m_depthData.ZWriteModeId );
|
|
TemplateHelperFunctions.CreateZWriteMode( m_depthData.ZWriteModeId, ref m_depthData );
|
|
if( m_depthData.DataCheck == TemplateDataCheck.Valid )
|
|
{
|
|
propertyContainer.AddId( subBody, m_depthData.ZWriteModeId, true );
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
//ZTEST
|
|
{
|
|
Match zTestMatch = Regex.Match( subBody, TemplateHelperFunctions.ZTestWholeWordPattern );
|
|
if( zTestMatch.Success )
|
|
{
|
|
int zTestOpIdx = zTestMatch.Index;
|
|
int zTestEndIdx = subBody.IndexOf( TemplatesManager.TemplateNewLine, zTestOpIdx );
|
|
if( zTestEndIdx > 0 )
|
|
{
|
|
m_depthData.ZTestModeId = subBody.Substring( zTestOpIdx, zTestEndIdx + 1 - zTestOpIdx );
|
|
m_depthData.ZTestStartIndex = offsetIdx + zTestOpIdx;
|
|
idManager.RegisterId( m_depthData.ZTestStartIndex, uniquePrefix + m_depthData.ZTestModeId, m_depthData.ZTestModeId );
|
|
TemplateHelperFunctions.CreateZTestMode( m_depthData.ZTestModeId, ref m_depthData );
|
|
if( m_depthData.DataCheck == TemplateDataCheck.Valid )
|
|
{
|
|
propertyContainer.AddId( subBody, m_depthData.ZTestModeId, true );
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
//ZOFFSET
|
|
{
|
|
Match zOffsetMatch = Regex.Match( subBody, TemplateHelperFunctions.ZOffsetWholeWordPattern );
|
|
if( zOffsetMatch.Success )
|
|
{
|
|
int zOffsetIdx = zOffsetMatch.Index;
|
|
int zOffsetEndIdx = subBody.IndexOf( TemplatesManager.TemplateNewLine, zOffsetIdx );
|
|
if( zOffsetEndIdx > 0 )
|
|
{
|
|
m_depthData.OffsetId = subBody.Substring( zOffsetIdx, zOffsetEndIdx + 1 - zOffsetIdx );
|
|
m_depthData.OffsetStartIndex = offsetIdx + zOffsetIdx;
|
|
idManager.RegisterId( m_depthData.OffsetStartIndex, uniquePrefix + m_depthData.OffsetId, m_depthData.OffsetId );
|
|
TemplateHelperFunctions.CreateZOffsetMode( m_depthData.OffsetId, ref m_depthData );
|
|
if( m_depthData.DataCheck == TemplateDataCheck.Valid )
|
|
{
|
|
propertyContainer.AddId( subBody, m_depthData.OffsetId, true );
|
|
}
|
|
}
|
|
}
|
|
m_depthData.SetDataCheck();
|
|
}
|
|
//TAGS
|
|
{
|
|
Match tagsMatch = Regex.Match( subBody, TemplateHelperFunctions.TagsWholeWordPattern );
|
|
if ( tagsMatch.Success )
|
|
{
|
|
int tagsIdx = tagsMatch.Index;
|
|
int tagsEndIdx = subBody.IndexOf( "}", tagsIdx );
|
|
if ( tagsEndIdx > -1 )
|
|
{
|
|
m_tagData.Reset();
|
|
m_tagData.TagsId = subBody.Substring( tagsIdx, tagsEndIdx + 1 - tagsIdx );
|
|
m_tagData.StartIdx = offsetIdx + tagsIdx;
|
|
idManager.RegisterId( m_tagData.StartIdx, uniquePrefix + m_tagData.TagsId, m_tagData.TagsId );
|
|
m_srpType = TemplateHelperFunctions.CreateTags( ref m_tagData, isSubShader );
|
|
|
|
propertyContainer.AddId( subBody, m_tagData.TagsId, false );
|
|
m_tagData.DataCheck = TemplateDataCheck.Valid;
|
|
}
|
|
else
|
|
{
|
|
m_tagData.DataCheck = TemplateDataCheck.Invalid;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
m_tagData.DataCheck = TemplateDataCheck.Invalid;
|
|
}
|
|
}
|
|
|
|
//SHADER MODEL
|
|
{
|
|
Match match = Regex.Match( subBody, TemplateHelperFunctions.ShaderModelPattern );
|
|
if ( match != null && match.Groups.Count > 1 )
|
|
{
|
|
if ( TemplateHelperFunctions.AvailableInterpolators.ContainsKey( match.Groups[ 1 ].Value ) )
|
|
{
|
|
m_shaderModel.Id = match.Groups[ 0 ].Value;
|
|
m_shaderModel.StartIdx = offsetIdx + match.Index;
|
|
m_shaderModel.Value = match.Groups[ 1 ].Value;
|
|
m_shaderModel.InterpolatorAmount = TemplateHelperFunctions.AvailableInterpolators[ match.Groups[ 1 ].Value ];
|
|
m_shaderModel.DataCheck = TemplateDataCheck.Valid;
|
|
idManager.RegisterId( m_shaderModel.StartIdx, uniquePrefix + m_shaderModel.Id, m_shaderModel.Id );
|
|
}
|
|
else
|
|
{
|
|
m_shaderModel.DataCheck = TemplateDataCheck.Invalid;
|
|
}
|
|
}
|
|
}
|
|
|
|
// ALL MODULES
|
|
int allModulesIndex = subBody.IndexOf( TemplatesManager.TemplateAllModulesTag );
|
|
if( allModulesIndex > 0 )
|
|
{
|
|
//ONLY REGISTER MISSING TAGS
|
|
ConfigureCommonTag( m_allModulesTag, propertyContainer, idManager, uniquePrefix, offsetIdx, subBody );
|
|
m_allModulesMode = true;
|
|
|
|
m_blendData.SetAllModulesDefault();
|
|
|
|
if( !m_alphaToMaskData.IsValid )
|
|
m_alphaToMaskData.SetAllModulesDefault();
|
|
|
|
if( !m_cullModeData.IsValid )
|
|
m_cullModeData.SetAllModulesDefault();
|
|
|
|
if( !m_colorMaskData.IsValid )
|
|
m_colorMaskData.SetAllModulesDefault();
|
|
|
|
if( !m_stencilData.IsValid )
|
|
m_stencilData.SetAllModulesDefault();
|
|
|
|
if( !m_depthData.IsValid )
|
|
m_depthData.SetAllModulesDefault();
|
|
|
|
if( !m_shaderModel.IsValid )
|
|
m_shaderModel.SetAllModulesDefault();
|
|
}
|
|
}
|
|
|
|
public void TestPropertyInternalName( string name, ref List<TemplateShaderPropertyData> availableShaderProperties, ref Dictionary<string, TemplateShaderPropertyData> duplicatesHelper )
|
|
{
|
|
if( !string.IsNullOrEmpty( name ) && !duplicatesHelper.ContainsKey( name ))
|
|
{
|
|
TemplateShaderPropertyData newData = new TemplateShaderPropertyData( -1, string.Empty, string.Empty, name, name, WirePortDataType.INT, PropertyType.Property,-1,-1 );
|
|
availableShaderProperties.Add( newData );
|
|
duplicatesHelper.Add( newData.PropertyName , newData );
|
|
}
|
|
}
|
|
|
|
public void RegisterInternalUnityInlines( ref List<TemplateShaderPropertyData> availableShaderProperties, ref Dictionary<string, TemplateShaderPropertyData> duplicatesHelper )
|
|
{
|
|
TestPropertyInternalName( m_depthData.ZWriteInlineValue, ref availableShaderProperties , ref duplicatesHelper);
|
|
TestPropertyInternalName( m_depthData.ZTestInlineValue, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_depthData.OffsetFactorInlineValue, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_depthData.OffsetUnitsInlineValue, ref availableShaderProperties, ref duplicatesHelper );
|
|
|
|
TestPropertyInternalName( m_blendData.SourceFactorRGBInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_blendData.DestFactorRGBInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_blendData.SourceFactorAlphaInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_blendData.DestFactorAlphaInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_blendData.BlendOpRGBInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_blendData.BlendOpAlphaInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
|
|
TestPropertyInternalName( m_blendData1.SourceFactorRGBInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_blendData1.DestFactorRGBInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_blendData1.SourceFactorAlphaInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_blendData1.DestFactorAlphaInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_blendData1.BlendOpRGBInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_blendData1.BlendOpAlphaInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
|
|
TestPropertyInternalName( m_blendData2.SourceFactorRGBInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_blendData2.DestFactorRGBInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_blendData2.SourceFactorAlphaInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_blendData2.DestFactorAlphaInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_blendData2.BlendOpRGBInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_blendData2.BlendOpAlphaInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
|
|
TestPropertyInternalName( m_blendData3.SourceFactorRGBInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_blendData3.DestFactorRGBInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_blendData3.SourceFactorAlphaInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_blendData3.DestFactorAlphaInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_blendData3.BlendOpRGBInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_blendData3.BlendOpAlphaInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
|
|
TestPropertyInternalName( m_alphaToMaskData.InlineData, ref availableShaderProperties, ref duplicatesHelper );
|
|
|
|
TestPropertyInternalName( m_stencilData.ReferenceInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_stencilData.ReadMaskInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_stencilData.WriteMaskInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_stencilData.ComparisonFrontInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_stencilData.PassFrontInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_stencilData.FailFrontInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_stencilData.ZFailFrontInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_stencilData.ComparisonBackInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_stencilData.PassBackInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_stencilData.FailBackInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_stencilData.ZFailBackInline, ref availableShaderProperties, ref duplicatesHelper );
|
|
|
|
TestPropertyInternalName( m_cullModeData.InlineData, ref availableShaderProperties, ref duplicatesHelper );
|
|
|
|
TestPropertyInternalName( m_colorMaskData.InlineData, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_colorMaskData1.InlineData, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_colorMaskData2.InlineData, ref availableShaderProperties, ref duplicatesHelper );
|
|
TestPropertyInternalName( m_colorMaskData3.InlineData, ref availableShaderProperties, ref duplicatesHelper );
|
|
}
|
|
|
|
public void SetPassUniqueNameIfUndefined( string value )
|
|
{
|
|
if( string.IsNullOrEmpty( m_passUniqueName ) )
|
|
m_passUniqueName = value;
|
|
}
|
|
|
|
public bool HasValidData
|
|
{
|
|
get
|
|
{
|
|
return m_blendData.DataCheck == TemplateDataCheck.Valid ||
|
|
m_blendData1.DataCheck == TemplateDataCheck.Valid ||
|
|
m_blendData2.DataCheck == TemplateDataCheck.Valid ||
|
|
m_blendData3.DataCheck == TemplateDataCheck.Valid ||
|
|
m_alphaToMaskData.DataCheck == TemplateDataCheck.Valid ||
|
|
m_cullModeData.DataCheck == TemplateDataCheck.Valid ||
|
|
m_colorMaskData.DataCheck == TemplateDataCheck.Valid ||
|
|
m_colorMaskData1.DataCheck == TemplateDataCheck.Valid ||
|
|
m_colorMaskData2.DataCheck == TemplateDataCheck.Valid ||
|
|
m_colorMaskData3.DataCheck == TemplateDataCheck.Valid ||
|
|
m_stencilData.DataCheck == TemplateDataCheck.Valid ||
|
|
m_depthData.DataCheck == TemplateDataCheck.Valid ||
|
|
m_tagData.DataCheck == TemplateDataCheck.Valid ||
|
|
m_shaderModel.DataCheck == TemplateDataCheck.Valid ||
|
|
m_globalsTag.IsValid ||
|
|
m_srpBatcherTag.IsValid ||
|
|
m_allModulesTag.IsValid ||
|
|
m_functionsTag.IsValid ||
|
|
m_pragmaTag.IsValid ||
|
|
m_pragmaBeforeTag.IsValid ||
|
|
m_passTag.IsValid ||
|
|
m_inputsVertTag.IsValid ||
|
|
m_inputsFragTag.IsValid ||
|
|
m_renderPlatformHelper.IsValid;
|
|
}
|
|
}
|
|
|
|
public TemplateBlendData BlendData { get { return m_blendData; } }
|
|
public TemplateBlendData BlendData1 { get { return m_blendData1; } }
|
|
public TemplateBlendData BlendData2 { get { return m_blendData2; } }
|
|
public TemplateBlendData BlendData3 { get { return m_blendData3; } }
|
|
public TemplateAlphaToMaskData AlphaToMaskData { get { return m_alphaToMaskData; } }
|
|
public TemplateCullModeData CullModeData { get { return m_cullModeData; } }
|
|
public TemplateColorMaskData ColorMaskData { get { return m_colorMaskData; } }
|
|
public TemplateColorMaskData ColorMaskData1 { get { return m_colorMaskData1; } }
|
|
public TemplateColorMaskData ColorMaskData2 { get { return m_colorMaskData2; } }
|
|
public TemplateColorMaskData ColorMaskData3 { get { return m_colorMaskData3; } }
|
|
public TemplateStencilData StencilData { get { return m_stencilData; } }
|
|
public TemplateDepthData DepthData { get { return m_depthData; } }
|
|
public TemplateTagsModuleData TagData { get { return m_tagData; } }
|
|
public TemplateTagData GlobalsTag { get { return m_globalsTag; } }
|
|
public TemplateTagData SRPBatcherTag { get { return m_srpBatcherTag; } }
|
|
public TemplateTagData AllModulesTag { get { return m_allModulesTag; } }
|
|
public TemplateTagData FunctionsTag { get { return m_functionsTag; } }
|
|
public TemplateTagData PragmaTag { get { return m_pragmaTag; } }
|
|
public TemplateTagData PragmaBeforeTag { get { return m_pragmaBeforeTag; } }
|
|
public TemplateTagData PassTag { get { return m_passTag; } }
|
|
public TemplateTagData InputsVertTag { get { return m_inputsVertTag; } }
|
|
public TemplateTagData InputsFragTag { get { return m_inputsFragTag; } }
|
|
public TemplateShaderModelData ShaderModel { get { return m_shaderModel; } }
|
|
public TemplateSRPType SRPType { get { return m_srpType; } set { m_srpType = value; } }
|
|
public bool SRPIsPBR { get { return m_srpIsPBR; } set { m_srpIsPBR = value; } }
|
|
public bool SRPIsPBRHD { get { return m_srpIsPBR && m_srpType == TemplateSRPType.HD; } }
|
|
public string UniquePrefix { get { return m_uniquePrefix; } }
|
|
public string PassUniqueName { get { return m_passUniqueName; } }
|
|
public bool HasPassUniqueName { get { return !string.IsNullOrEmpty( m_passUniqueName ); } }
|
|
public TemplateIncludePragmaContainter IncludePragmaContainer { get { return m_includePragmaContainer; } }
|
|
public TemplateRenderPlatformHelper RenderPlatformHelper { get { return m_renderPlatformHelper; } }
|
|
public bool AllModulesMode { get { return m_allModulesMode; } }
|
|
}
|
|
}
|