[Add] All in one shader
This commit is contained in:
+65
@@ -0,0 +1,65 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AllIn13DShader
|
||||
{
|
||||
public static class EffectProfileCreatorFromShaderVariant
|
||||
{
|
||||
private const string REGEX_EFFECTS_ENABLED_IN_SHADER_VARIANT = @"\/\/<ALLIN1_EFFECTS>((?:\s+#define\s\w+)*\s+)\/\/<\/ALLIN1_EFFECTS>";
|
||||
|
||||
public static EffectsProfile Create(Shader shaderVariant, string shaderVariantPath, PropertiesConfig propertiesConfig, EffectsProfileCollection effectsProfileCollection)
|
||||
{
|
||||
EffectsProfile res = effectsProfileCollection.CreateNewProfile(shaderVariant.name);
|
||||
res.InitFromOtherProfile(effectsProfileCollection.generalProfile);
|
||||
|
||||
res.shaderGUID = AssetDatabase.AssetPathToGUID(shaderVariantPath);
|
||||
|
||||
string shaderText = File.ReadAllText(shaderVariantPath);
|
||||
|
||||
MatchCollection matchCollection = Regex.Matches(shaderText, REGEX_EFFECTS_ENABLED_IN_SHADER_VARIANT);
|
||||
|
||||
|
||||
List<string> enabledKeywordsList = new List<string>();
|
||||
if(matchCollection.Count > 0)
|
||||
{
|
||||
string matchText = matchCollection[0].Groups[1].Value;
|
||||
|
||||
string[] linesSplitted = matchText.Split("\n");
|
||||
|
||||
for (int i = 0; i < linesSplitted.Length; i++)
|
||||
{
|
||||
string lineProcessed = linesSplitted[i];
|
||||
lineProcessed = lineProcessed.Replace("#define", string.Empty);
|
||||
lineProcessed = lineProcessed.Trim();
|
||||
|
||||
if (!string.IsNullOrEmpty(lineProcessed))
|
||||
{
|
||||
enabledKeywordsList.Add(lineProcessed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string[] enabledKeywordsArray = enabledKeywordsList.ToArray();
|
||||
|
||||
List<AllIn13DEffectConfig> allEffects = propertiesConfig.GetAllEffects();
|
||||
for(int i = 0; i < allEffects.Count; i++)
|
||||
{
|
||||
AllIn13DEffectConfig effect = allEffects[i];
|
||||
|
||||
if (effect.ContainsSomeKeywordFromList(enabledKeywordsArray))
|
||||
{
|
||||
res.EnableEffect(effect, enabledKeywordsArray);
|
||||
}
|
||||
else
|
||||
{
|
||||
res.DisableEffect(effect);
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6457f0108812aea4291267d576eda7ef
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 316173
|
||||
packageName: All In 1 3D-Shader
|
||||
packageVersion: 2.72
|
||||
assetPath: Assets/Plugins/AllIn13DShader/Editor/Effects Profiles/EffectProfileCreatorFromShaderVariant.cs
|
||||
uploadId: 865720
|
||||
@@ -0,0 +1,338 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AllIn13DShader
|
||||
{
|
||||
[System.Serializable]
|
||||
public class EffectsProfile
|
||||
{
|
||||
public string id;
|
||||
public string profileName;
|
||||
|
||||
public string shaderGUID;
|
||||
public List<EffectsProfileGroup> groups;
|
||||
|
||||
public EffectsProfile(string id, string profileName)
|
||||
{
|
||||
this.id = id;
|
||||
|
||||
this.profileName = profileName;
|
||||
FormatProfileName();
|
||||
|
||||
this.shaderGUID = string.Empty;
|
||||
this.groups = new List<EffectsProfileGroup>();
|
||||
}
|
||||
|
||||
private void FormatProfileName()
|
||||
{
|
||||
this.profileName = this.profileName.Replace("\\", "_");
|
||||
this.profileName = this.profileName.Replace("/", "_");
|
||||
}
|
||||
|
||||
public void InitFromOtherProfile(EffectsProfile copyFrom)
|
||||
{
|
||||
this.groups = new List<EffectsProfileGroup>(copyFrom.groups.Count);
|
||||
for (int i = 0; i < copyFrom.groups.Count; i++)
|
||||
{
|
||||
this.groups.Add(new EffectsProfileGroup(copyFrom.groups[i]));
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsEffectEnabled(string effectID)
|
||||
{
|
||||
EffectsProfileEntry entry = GetEntryByEffectID(effectID);
|
||||
|
||||
bool res = entry.isEnabled;
|
||||
return res;
|
||||
}
|
||||
|
||||
public bool IsKeywordEnabled(string effectID, string keyword)
|
||||
{
|
||||
EffectsProfileEntry entry = GetEntryByEffectID(effectID);
|
||||
|
||||
bool res = entry.IsKeywordEnabled(keyword);
|
||||
return res;
|
||||
}
|
||||
|
||||
public EffectsProfileEntry GetEntryByEffectID(string effectID)
|
||||
{
|
||||
EffectsProfileEntry res = null;
|
||||
|
||||
for(int i = 0; i < groups.Count; i++)
|
||||
{
|
||||
EffectsProfileGroup group = groups[i];
|
||||
for (int j = 0; j < group.entries.Count; j++)
|
||||
{
|
||||
if (group.entries[j].effectID == effectID)
|
||||
{
|
||||
res = group.entries[j];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public EffectsProfileGroup GetEffectProfileGroupByID(string groupID)
|
||||
{
|
||||
EffectsProfileGroup res = null;
|
||||
|
||||
for(int i = 0; i < groups.Count; i++)
|
||||
{
|
||||
if (groups[i].effectGroupConfig.groupID == groupID)
|
||||
{
|
||||
res = groups[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public void CreateDefault(PropertiesConfigCollection propertiesConfigCollection)
|
||||
{
|
||||
groups = new List<EffectsProfileGroup>();
|
||||
|
||||
PropertiesConfig propertiesConfig = propertiesConfigCollection.FindPropertiesConfigByShader(Shader.Find("AllIn13DShader/AllIn13DShader"));
|
||||
|
||||
for (int i = 0; i < propertiesConfig.effectsGroups.Length; i++)
|
||||
{
|
||||
EffectGroup effectGroup = propertiesConfig.effectsGroups[i];
|
||||
|
||||
EffectsProfileGroup effectsProfileGroup = new EffectsProfileGroup(effectGroup);
|
||||
groups.Add(effectsProfileGroup);
|
||||
}
|
||||
}
|
||||
|
||||
public List<EffectsProfileEntry> GetEnabledEntriesFlatList()
|
||||
{
|
||||
List<EffectsProfileEntry> res = new List<EffectsProfileEntry>();
|
||||
|
||||
for(int i = 0; i < groups.Count; i++)
|
||||
{
|
||||
for(int j = 0; j < groups[i].entries.Count; j++)
|
||||
{
|
||||
if (groups[i].entries[j].isEnabled)
|
||||
{
|
||||
res.Add(groups[i].entries[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public List<ShaderPassConfig> GetShaderPasses(ShaderPassCollection shaderPassCollection, RenderPipelineEnum renderPipeline)
|
||||
{
|
||||
List<EffectsProfileEntry> enabledEntries = GetEnabledEntriesFlatList();
|
||||
List<AllIn13DPassType> passesTypeList = new List<AllIn13DPassType>();
|
||||
|
||||
List<ShaderPassConfig> res = new List<ShaderPassConfig>();
|
||||
res.Add(shaderPassCollection.GetShaderPassConfig(AllIn13DPassType.MAIN));
|
||||
|
||||
for (int i = 0; i < enabledEntries.Count; i++)
|
||||
{
|
||||
AllIn13DPassType[] extraPasses = enabledEntries[i].GetExtraPasses();
|
||||
for (int j = 0; j < extraPasses.Length; j++)
|
||||
{
|
||||
if (extraPasses[j] == AllIn13DPassType.FORWARD_ADD && renderPipeline == RenderPipelineEnum.URP) { continue; }
|
||||
|
||||
ShaderPassConfig shaderPassConfig = shaderPassCollection.GetShaderPassConfig(extraPasses[j]);
|
||||
if (!res.Contains(shaderPassConfig))
|
||||
{
|
||||
res.Add(shaderPassConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (renderPipeline == RenderPipelineEnum.URP)
|
||||
{
|
||||
res.Add(shaderPassCollection.GetShaderPassConfig(AllIn13DPassType.DEPTH_NORMALS));
|
||||
res.Add(shaderPassCollection.GetShaderPassConfig(AllIn13DPassType.DEPTH_ONLY));
|
||||
res.Add(shaderPassCollection.GetShaderPassConfig(AllIn13DPassType.META));
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public void SetEnableAllEffects(bool enabled)
|
||||
{
|
||||
for (int i = 0; i < groups.Count; i++)
|
||||
{
|
||||
EffectsProfileGroup group = groups[i];
|
||||
for (int j = 0; j < group.entries.Count; j++)
|
||||
{
|
||||
EffectsProfileEntry entry = group.entries[j];
|
||||
entry.isEnabled = enabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void EnableAllEffects()
|
||||
{
|
||||
SetEnableAllEffects(true);
|
||||
}
|
||||
|
||||
public void DisableAllEffects()
|
||||
{
|
||||
SetEnableAllEffects(false);
|
||||
}
|
||||
|
||||
public List<string> GetKeywordsEnabled()
|
||||
{
|
||||
List<string> res = new List<string>();
|
||||
|
||||
for(int i = 0; i < groups.Count; i++)
|
||||
{
|
||||
EffectsProfileGroup group = groups[i];
|
||||
group.CollectKeywords(res);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public void EnableEffect(AllIn13DEffectConfig effectConfig, string[] enabledKeywords)
|
||||
{
|
||||
EffectsProfileEntry effectProfileEntry = GetEntryByEffectID(effectConfig.effectName);
|
||||
|
||||
effectProfileEntry.isEnabled = true;
|
||||
|
||||
if (effectConfig.keywords.Count > 1)
|
||||
{
|
||||
int enabledKeywordIndex = -1;
|
||||
for (int i = 0; i < enabledKeywords.Length; i++)
|
||||
{
|
||||
enabledKeywordIndex = effectConfig.GetKeywordIndex(enabledKeywords[i]);
|
||||
if (enabledKeywordIndex >= 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
effectProfileEntry.kwEnabledIndex = enabledKeywordIndex;
|
||||
}
|
||||
|
||||
for (int i = 0; i < effectConfig.effectProperties.Count; i++)
|
||||
{
|
||||
EffectProperty effectProperty = effectConfig.effectProperties[i];
|
||||
|
||||
if (effectProperty.IsPropertyWithKeywords())
|
||||
{
|
||||
int enabledIndex = 0;
|
||||
bool isPropertyEnabled = AllIn13DEffectConfig.IsEffectPropertyEnabled(effectProperty, ref enabledIndex, enabledKeywords);
|
||||
|
||||
if (isPropertyEnabled)
|
||||
{
|
||||
if (effectProperty.IsEnumProperty())
|
||||
{
|
||||
SubkeywordEntryEnum subkeywordEntryEnum = effectProfileEntry.FindEntryEnumByPropertyName(effectProperty.propertyName);
|
||||
subkeywordEntryEnum.kwIndexEnabled = effectProperty.GetEnabledKeywordIndex(enabledKeywords);
|
||||
}
|
||||
else if (effectProperty.IsToggleProperty())
|
||||
{
|
||||
SubkeywordEntryToggle entryToggle = effectProfileEntry.FindEntryToggleByKeyword(effectProperty.fullKeywordNames[0]);
|
||||
entryToggle.isEnabled = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
effectProfileEntry.DisableSubEntry(effectProperty);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void EnableEffect(AllIn13DEffectConfig effectConfig, AbstractMaterialInfo matInfo)
|
||||
{
|
||||
EffectsProfileEntry effectProfileEntry = GetEntryByEffectID(effectConfig.effectName);
|
||||
|
||||
effectProfileEntry.isEnabled = true;
|
||||
|
||||
if(effectConfig.keywords.Count > 1)
|
||||
{
|
||||
effectProfileEntry.kwEnabledIndex = matInfo.GetEnabledKeywordIndexByEffect(effectConfig);
|
||||
}
|
||||
|
||||
for(int i = 0; i < effectConfig.effectProperties.Count; i++)
|
||||
{
|
||||
EffectProperty effectProperty = effectConfig.effectProperties[i];
|
||||
|
||||
if (effectProperty.IsPropertyWithKeywords())
|
||||
{
|
||||
int enabledIndex = 0;
|
||||
bool isPropertyEnabled = AllIn13DEffectConfig.IsEffectPropertyEnabled(effectProperty, ref enabledIndex, matInfo);
|
||||
|
||||
if (isPropertyEnabled)
|
||||
{
|
||||
if (effectProperty.IsEnumProperty())
|
||||
{
|
||||
SubkeywordEntryEnum entryEnum = effectProfileEntry.FindEntryEnumByPropertyName(effectProperty.propertyName);
|
||||
entryEnum.kwIndexEnabled = matInfo.GetEnabledKeywordIndexByEffectProperty(effectProperty);
|
||||
}
|
||||
else if (effectProperty.IsToggleProperty())
|
||||
{
|
||||
SubkeywordEntryToggle entryToggle = effectProfileEntry.FindEntryToggleByKeyword(effectProperty.fullKeywordNames[0]);
|
||||
entryToggle.isEnabled = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
effectProfileEntry.DisableSubEntry(effectProperty);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Shader FindShader()
|
||||
{
|
||||
string shaderPath = AssetDatabase.GUIDToAssetPath(shaderGUID);
|
||||
Shader res = AssetDatabase.LoadAssetAtPath<Shader>(shaderPath);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public void DisableEffect(AllIn13DEffectConfig effectConfig)
|
||||
{
|
||||
EffectsProfileEntry effectProfileEntry = GetEntryByEffectID(effectConfig.effectName);
|
||||
effectProfileEntry.Disable();
|
||||
}
|
||||
|
||||
public void BindEffectConfigs(PropertiesConfig propertiesConfig)
|
||||
{
|
||||
for(int i = 0; i < groups.Count; i++)
|
||||
{
|
||||
for(int j = 0; j < groups[i].entries.Count; j++)
|
||||
{
|
||||
EffectsProfileEntry effectProfileEntry = groups[i].entries[j];
|
||||
AllIn13DEffectConfig effectConfig = propertiesConfig.FindEffectConfigByID(effectProfileEntry.effectID);
|
||||
|
||||
effectProfileEntry.BindEffectConfig(effectConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<EffectsProfileGroup> GetEnabledEffectsGroups()
|
||||
{
|
||||
List<EffectsProfileGroup> res = new List<EffectsProfileGroup>();
|
||||
|
||||
for(int i = 0; i < groups.Count; i++)
|
||||
{
|
||||
if (groups[i].HasEffectsEnabled())
|
||||
{
|
||||
res.Add(groups[i]);
|
||||
}
|
||||
}
|
||||
|
||||
EffectsProfileGroup uvGroup = GetEffectProfileGroupByID(Constants.EFFECT_GROUP_ID_UV_EFFECTS);
|
||||
EffectsProfileEntry triplanarEntry = GetEntryByEffectID(Constants.EFFECT_ID_TRIPLANAR_MAPPING);
|
||||
if (triplanarEntry.isEnabled && !uvGroup.HasEffectsEnabled())
|
||||
{
|
||||
res.Add(uvGroup);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5dab02bb72175f34db48e4348c5a766d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 316173
|
||||
packageName: All In 1 3D-Shader
|
||||
packageVersion: 2.72
|
||||
assetPath: Assets/Plugins/AllIn13DShader/Editor/Effects Profiles/EffectsProfile.cs
|
||||
uploadId: 865720
|
||||
@@ -0,0 +1,196 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AllIn13DShader
|
||||
{
|
||||
public class EffectsProfileCollection : ScriptableObject
|
||||
{
|
||||
public static string ASSET_NAME = "EffectsProfileCollection";
|
||||
|
||||
public EffectsProfile generalProfile;
|
||||
public List<EffectsProfile> profiles;
|
||||
|
||||
public static EffectsProfileCollection CreateAsset(PropertiesConfigCollection propertiesConfigCollection)
|
||||
{
|
||||
EffectsProfileCollection res = EffectsProfileCollection.CreateInstance<EffectsProfileCollection>();
|
||||
|
||||
res.profiles = new List<EffectsProfile>();
|
||||
|
||||
EffectsProfile effectsProfile = new EffectsProfile(string.Empty, string.Empty);
|
||||
effectsProfile.CreateDefault(propertiesConfigCollection);
|
||||
res.generalProfile = effectsProfile;
|
||||
|
||||
string path = Path.Combine(GlobalConfiguration.GetDefaultConfigFolderPath(), ASSET_NAME + ".asset");
|
||||
AssetDatabase.CreateAsset(res, path);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public EffectsProfile FindEffectProfileByGUID(string guid)
|
||||
{
|
||||
EffectsProfile res = null;
|
||||
|
||||
for (int i = 0; i < profiles.Count; i++)
|
||||
{
|
||||
if (profiles[i].shaderGUID == guid)
|
||||
{
|
||||
res = profiles[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public EffectsProfile FindEffectProfileByShader(Shader shader)
|
||||
{
|
||||
EffectsProfile res = null;
|
||||
|
||||
string assetPath = AssetDatabase.GetAssetPath(shader);
|
||||
string guid = AssetDatabase.AssetPathToGUID(assetPath);
|
||||
|
||||
res = FindEffectProfileByGUID(guid);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public bool RemoveEffectsProfileByShader(Shader shader)
|
||||
{
|
||||
bool res = false;
|
||||
EffectsProfile effectProfile = FindEffectProfileByShader(shader);
|
||||
if(effectProfile != null)
|
||||
{
|
||||
res = profiles.Remove(effectProfile);
|
||||
}
|
||||
|
||||
if (res)
|
||||
{
|
||||
EditorUtility.SetDirty(this);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public void ConfigureEffectProfileByMaterialInfo(EffectsProfile target, EffectsProfile activeEffectsList, AbstractMaterialInfo matInfo, PropertiesConfig propertiesConfig)
|
||||
{
|
||||
List<AllIn13DEffectConfig> effectConfigs = propertiesConfig.GetAllEffects();
|
||||
for(int i = 0; i < effectConfigs.Count; i++)
|
||||
{
|
||||
bool effectEnabled = AllIn13DEffectConfig.IsEffectEnabled(effectConfigs[i], matInfo) &&
|
||||
effectConfigs[i].AreDependenciesMet(propertiesConfig, matInfo) &&
|
||||
activeEffectsList.IsEffectEnabled(effectConfigs[i].effectName);
|
||||
|
||||
if (effectEnabled)
|
||||
{
|
||||
target.EnableEffect(effectConfigs[i], matInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
target.DisableEffect(effectConfigs[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public EffectsProfile CreateNewProfile(string profileName)
|
||||
{
|
||||
System.Guid guid = System.Guid.NewGuid();
|
||||
string id = $"{guid.ToString()}";
|
||||
|
||||
EffectsProfile res = new EffectsProfile(id, profileName);
|
||||
|
||||
profiles.Add(res);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public void BindEffectConfigs(PropertiesConfig propertiesConfig)
|
||||
{
|
||||
generalProfile.BindEffectConfigs(propertiesConfig);
|
||||
|
||||
for(int i = 0; i < profiles.Count; i++)
|
||||
{
|
||||
profiles[i].BindEffectConfigs(propertiesConfig);
|
||||
}
|
||||
}
|
||||
|
||||
public void CleanInvalidProfiles()
|
||||
{
|
||||
List<EffectsProfile> profilesToRemove = new List<EffectsProfile>();
|
||||
|
||||
for (int i = 0; i < profiles.Count - 1; i++)
|
||||
{
|
||||
bool removeThisProfile = false;
|
||||
|
||||
if (profiles[i] == null)
|
||||
{
|
||||
removeThisProfile = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Shader shader = profiles[i].FindShader();
|
||||
if(shader == null)
|
||||
{
|
||||
removeThisProfile = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (removeThisProfile)
|
||||
{
|
||||
profilesToRemove.Add(profiles[i]);
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < profilesToRemove.Count; i++)
|
||||
{
|
||||
profiles.Remove(profilesToRemove[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public void CheckBakedShadersFolder(string folderPath, PropertiesConfig propertiesConfig)
|
||||
{
|
||||
if (AssetDatabase.IsValidFolder(folderPath))
|
||||
{
|
||||
string[] files = Directory.GetFiles(folderPath, "*.shader", SearchOption.AllDirectories);
|
||||
|
||||
for (int i = 0; i < files.Length; i++)
|
||||
{
|
||||
Shader shader = (Shader)AssetDatabase.LoadAssetAtPath(files[i], typeof(Shader));
|
||||
|
||||
EffectsProfile effectProfile = FindEffectProfileByShader(shader);
|
||||
|
||||
if (effectProfile == null)
|
||||
{
|
||||
EffectProfileCreatorFromShaderVariant.Create(shader, files[i], propertiesConfig, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void CheckBakedShadersFolder(PropertiesConfig propertiesConfig)
|
||||
{
|
||||
string shaderVariantsFolderPath = ShaderVariantCreator.GetShaderVariantsFolderPath();
|
||||
CheckBakedShadersFolder(shaderVariantsFolderPath, propertiesConfig);
|
||||
|
||||
if (AssetDatabase.IsValidFolder(Constants.DEMO_SHADERS_BAKED_FOLDER_PATH))
|
||||
{
|
||||
CheckBakedShadersFolder(Constants.DEMO_SHADERS_BAKED_FOLDER_PATH, propertiesConfig);
|
||||
}
|
||||
}
|
||||
|
||||
public void CheckRemovedShader(string removedPath)
|
||||
{
|
||||
string guid = AssetDatabase.AssetPathToGUID(removedPath);
|
||||
|
||||
EffectsProfile effectsProfileToRemove = FindEffectProfileByGUID(guid);
|
||||
|
||||
if(effectsProfileToRemove != null)
|
||||
{
|
||||
profiles.Remove(effectsProfileToRemove);
|
||||
}
|
||||
|
||||
EditorUtility.SetDirty(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e9adb408486385f4db34ebf41514603e
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 316173
|
||||
packageName: All In 1 3D-Shader
|
||||
packageVersion: 2.72
|
||||
assetPath: Assets/Plugins/AllIn13DShader/Editor/Effects Profiles/EffectsProfileCollection.cs
|
||||
uploadId: 865720
|
||||
@@ -0,0 +1,255 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
|
||||
namespace AllIn13DShader
|
||||
{
|
||||
[System.Serializable]
|
||||
public class EffectsProfileEntry
|
||||
{
|
||||
public string effectID;
|
||||
public string displayName;
|
||||
public bool isEnabled;
|
||||
public int kwEnabledIndex;
|
||||
|
||||
public SubkeywordEntryEnum[] subkeywordEntriesEnum;
|
||||
public SubkeywordEntryToggle[] subkeywordEntriesToggle;
|
||||
|
||||
private AllIn13DEffectConfig effectConfig;
|
||||
|
||||
public bool IsToggleEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
bool res = effectConfig.keywords.Count == 1;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsEnumEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
bool res = effectConfig.keywords.Count > 1;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
public string[] KeywordsDisplayNames
|
||||
{
|
||||
get
|
||||
{
|
||||
string[] res = effectConfig.keywordsDisplayNames;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
public List<EffectKeywordData> ParentKeywords
|
||||
{
|
||||
get
|
||||
{
|
||||
return effectConfig.keywords;
|
||||
}
|
||||
}
|
||||
|
||||
public List<EffectProperty> EffectProperties
|
||||
{
|
||||
get
|
||||
{
|
||||
return effectConfig.effectProperties;
|
||||
}
|
||||
}
|
||||
|
||||
public EffectsProfileEntry(string effectID, string displayName, bool isEnabled)
|
||||
{
|
||||
this.effectID = effectID;
|
||||
this.displayName = displayName;
|
||||
this.isEnabled = isEnabled;
|
||||
|
||||
subkeywordEntriesEnum = new SubkeywordEntryEnum[0];
|
||||
subkeywordEntriesToggle = new SubkeywordEntryToggle[0];
|
||||
}
|
||||
|
||||
public EffectsProfileEntry(EffectsProfileEntry copyFrom)
|
||||
{
|
||||
this.effectConfig = copyFrom.effectConfig;
|
||||
|
||||
this.effectID = copyFrom.effectID;
|
||||
this.displayName = copyFrom.displayName;
|
||||
this.isEnabled = copyFrom.isEnabled;
|
||||
this.kwEnabledIndex = copyFrom.kwEnabledIndex;
|
||||
|
||||
this.subkeywordEntriesEnum = new SubkeywordEntryEnum[copyFrom.subkeywordEntriesEnum.Length];
|
||||
for(int i = 0; i < copyFrom.subkeywordEntriesEnum.Length; i++)
|
||||
{
|
||||
this.subkeywordEntriesEnum[i] = new SubkeywordEntryEnum(copyFrom.subkeywordEntriesEnum[i]);
|
||||
}
|
||||
|
||||
this.subkeywordEntriesToggle = new SubkeywordEntryToggle[copyFrom.subkeywordEntriesToggle.Length];
|
||||
for (int i = 0; i < copyFrom.subkeywordEntriesToggle.Length; i++)
|
||||
{
|
||||
this.subkeywordEntriesToggle[i] = new SubkeywordEntryToggle(copyFrom.subkeywordEntriesToggle[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public void AddSubkeywordEntries(EffectProperty effectProperty)
|
||||
{
|
||||
if (effectProperty.IsEnumProperty())
|
||||
{
|
||||
SubkeywordEntryEnum subkeywordEntryEnum = new SubkeywordEntryEnum(0, effectProperty.propertyKeywords, effectProperty.fullKeywordNames, effectProperty.propertyName);
|
||||
ArrayUtility.Add(ref subkeywordEntriesEnum, subkeywordEntryEnum);
|
||||
}
|
||||
else if (effectProperty.IsToggleProperty())
|
||||
{
|
||||
SubkeywordEntryToggle subkeywordEntryToggle = new SubkeywordEntryToggle(false, effectProperty.fullKeywordNames[0], effectProperty.displayName);
|
||||
ArrayUtility.Add(ref subkeywordEntriesToggle, subkeywordEntryToggle);
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasSubkeywords()
|
||||
{
|
||||
bool res = subkeywordEntriesEnum.Length != 0 || subkeywordEntriesToggle.Length != 0;
|
||||
return res;
|
||||
}
|
||||
|
||||
public void BindEffectConfig(AllIn13DEffectConfig effectConfig)
|
||||
{
|
||||
this.effectConfig = effectConfig;
|
||||
}
|
||||
|
||||
public List<string> GetParentKeywordsEnabled()
|
||||
{
|
||||
List<string> res = new List<string>();
|
||||
|
||||
if (IsToggleEffect)
|
||||
{
|
||||
if (isEnabled)
|
||||
{
|
||||
res.Add(effectConfig.keywords[0].keyword);
|
||||
}
|
||||
}
|
||||
else if(IsEnumEffect)
|
||||
{
|
||||
res.Add(effectConfig.keywords[kwEnabledIndex].keyword);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public AllIn13DPassType[] GetExtraPasses()
|
||||
{
|
||||
return effectConfig.extraPasses;
|
||||
}
|
||||
|
||||
public bool IsKeywordEnabled(string keyword)
|
||||
{
|
||||
bool res = false;
|
||||
|
||||
if (isEnabled)
|
||||
{
|
||||
if (IsToggleEffect)
|
||||
{
|
||||
res = true;
|
||||
}
|
||||
else if (IsEnumEffect)
|
||||
{
|
||||
res = effectConfig.keywords[kwEnabledIndex].keyword == keyword;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
public void CollectKeywords(List<string> res)
|
||||
{
|
||||
res.Add(effectConfig.keywords[kwEnabledIndex].keyword);
|
||||
|
||||
for(int i = 0; i < subkeywordEntriesEnum.Length; i++)
|
||||
{
|
||||
res.Add(subkeywordEntriesEnum[i].GetKeywordEnabled());
|
||||
}
|
||||
|
||||
for(int i = 0; i < subkeywordEntriesToggle.Length; i++)
|
||||
{
|
||||
if (subkeywordEntriesToggle[i].isEnabled)
|
||||
{
|
||||
res.Add(subkeywordEntriesToggle[i].keyword);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int GetDisplayIndex()
|
||||
{
|
||||
return effectConfig.displayIndex;
|
||||
}
|
||||
|
||||
public void Disable()
|
||||
{
|
||||
isEnabled = false;
|
||||
DisableSubEntries();
|
||||
}
|
||||
|
||||
public void DisableSubEntries()
|
||||
{
|
||||
for(int i = 0; i < subkeywordEntriesEnum.Length; i++)
|
||||
{
|
||||
subkeywordEntriesEnum[i].kwIndexEnabled = 0;
|
||||
}
|
||||
|
||||
for (int i = 0; i < subkeywordEntriesToggle.Length; i++)
|
||||
{
|
||||
subkeywordEntriesToggle[i].isEnabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void DisableSubEntry(EffectProperty effectProperty)
|
||||
{
|
||||
if (effectProperty.IsEnumProperty())
|
||||
{
|
||||
SubkeywordEntryEnum entryEnum = FindEntryEnumByPropertyName(effectProperty.propertyName);
|
||||
if (entryEnum != null)
|
||||
{
|
||||
entryEnum.kwIndexEnabled = 0;
|
||||
}
|
||||
}
|
||||
else if (effectProperty.IsToggleProperty())
|
||||
{
|
||||
SubkeywordEntryToggle entryToggle = FindEntryToggleByKeyword(effectProperty.fullKeywordNames[0]);
|
||||
if (entryToggle != null)
|
||||
{
|
||||
entryToggle.isEnabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public SubkeywordEntryEnum FindEntryEnumByPropertyName(string propertyName)
|
||||
{
|
||||
SubkeywordEntryEnum res = null;
|
||||
|
||||
for(int i = 0; i < subkeywordEntriesEnum.Length; i++)
|
||||
{
|
||||
if (subkeywordEntriesEnum[i].propertyName == propertyName)
|
||||
{
|
||||
res = subkeywordEntriesEnum[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public SubkeywordEntryToggle FindEntryToggleByKeyword(string keyword)
|
||||
{
|
||||
SubkeywordEntryToggle res = null;
|
||||
|
||||
for (int i = 0; i < subkeywordEntriesToggle.Length; i++)
|
||||
{
|
||||
if (subkeywordEntriesToggle[i].keyword == keyword)
|
||||
{
|
||||
res = subkeywordEntriesToggle[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 26ed4d8c5c2e86041bc69ba28df977be
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 316173
|
||||
packageName: All In 1 3D-Shader
|
||||
packageVersion: 2.72
|
||||
assetPath: Assets/Plugins/AllIn13DShader/Editor/Effects Profiles/EffectsProfileEntry.cs
|
||||
uploadId: 865720
|
||||
@@ -0,0 +1,73 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AllIn13DShader
|
||||
{
|
||||
[System.Serializable]
|
||||
public class EffectsProfileGroup
|
||||
{
|
||||
public EffectGroupGlobalConfig effectGroupConfig;
|
||||
public List<EffectsProfileEntry> entries;
|
||||
|
||||
public EffectsProfileGroup(EffectGroup effectGroup)
|
||||
{
|
||||
this.effectGroupConfig = effectGroup.effectGroupConfig;
|
||||
|
||||
this.entries = new List<EffectsProfileEntry>();
|
||||
|
||||
for(int i = 0; i < effectGroup.effects.Length; i++)
|
||||
{
|
||||
AllIn13DEffectConfig effectConfig = effectGroup.effects[i];
|
||||
EffectsProfileEntry entry = new EffectsProfileEntry(effectConfig.effectName, effectConfig.displayName, true);
|
||||
|
||||
for (int j = 0; j < effectConfig.effectProperties.Count; j++)
|
||||
{
|
||||
EffectProperty effectProperty = effectConfig.effectProperties[j];
|
||||
|
||||
if (effectProperty.IsPropertyWithKeywords())
|
||||
{
|
||||
entry.AddSubkeywordEntries(effectProperty);
|
||||
}
|
||||
}
|
||||
|
||||
entries.Add(entry);
|
||||
}
|
||||
}
|
||||
|
||||
public EffectsProfileGroup(EffectsProfileGroup copyFrom)
|
||||
{
|
||||
this.effectGroupConfig = copyFrom.effectGroupConfig;
|
||||
this.entries = new List<EffectsProfileEntry>(copyFrom.entries.Count);
|
||||
for(int i = 0; i < copyFrom.entries.Count; i++)
|
||||
{
|
||||
this.entries.Add(new EffectsProfileEntry(copyFrom.entries[i]));
|
||||
}
|
||||
}
|
||||
|
||||
public void CollectKeywords(List<string> res)
|
||||
{
|
||||
for(int i = 0; i < entries.Count; i++)
|
||||
{
|
||||
if (entries[i].isEnabled)
|
||||
{
|
||||
entries[i].CollectKeywords(res);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasEffectsEnabled()
|
||||
{
|
||||
bool res = false;
|
||||
|
||||
for(int i = 0; i < entries.Count; i++)
|
||||
{
|
||||
if (entries[i].isEnabled)
|
||||
{
|
||||
res = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2a964695b8859f743be3d79f364142ad
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 316173
|
||||
packageName: All In 1 3D-Shader
|
||||
packageVersion: 2.72
|
||||
assetPath: Assets/Plugins/AllIn13DShader/Editor/Effects Profiles/EffectsProfileGroup.cs
|
||||
uploadId: 865720
|
||||
@@ -0,0 +1,88 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
|
||||
namespace AllIn13DShader
|
||||
{
|
||||
public static class ShaderFeaturesFileCreator
|
||||
{
|
||||
private const string KEYWORD_FOG = "_FOG_ON";
|
||||
private const string SHADER_FEATURE_FILE_ENTRY = @"#pragma shader_feature_local {0}";
|
||||
private static string TEMPLATE_PATH = GlobalConfiguration.GetRootPluginFolderPath() + "/Editor/Effects Profiles/Templates/ShaderFeaturesTemplate.allin1template";
|
||||
private static string DST_PATH = GlobalConfiguration.GetRootPluginFolderPath() + "/Shaders/ShaderLibrary/AllIn13DShader_ShaderFeatures.hlsl";
|
||||
|
||||
public static void CreateFile(EffectsProfile effectsProfile)
|
||||
{
|
||||
string txtGeneratedFile = File.ReadAllText(TEMPLATE_PATH);
|
||||
string txtContent = string.Empty;
|
||||
for (int i = 0; i < effectsProfile.groups.Count; i++)
|
||||
{
|
||||
EffectsProfileGroup group = effectsProfile.groups[i];
|
||||
for (int j = 0; j < group.entries.Count; j++)
|
||||
{
|
||||
EffectsProfileEntry effectProfileEntry = group.entries[j];
|
||||
if (!effectProfileEntry.isEnabled) { continue; }
|
||||
|
||||
txtContent = ProcessEffectConfig(txtContent, effectProfileEntry);
|
||||
}
|
||||
}
|
||||
|
||||
txtContent = AddFogEntry(txtContent);
|
||||
|
||||
txtGeneratedFile = txtGeneratedFile.Replace("<Content>", txtContent);
|
||||
txtGeneratedFile = txtGeneratedFile.Replace("<EffectsProfileID>", effectsProfile.id);
|
||||
|
||||
txtGeneratedFile = EditorUtils.UnifyEOL(txtGeneratedFile);
|
||||
File.WriteAllText(DST_PATH, txtGeneratedFile);
|
||||
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
|
||||
private static string ProcessEffectConfig(string input, EffectsProfileEntry entry)
|
||||
{
|
||||
string res = input;
|
||||
|
||||
List<EffectKeywordData> parentKeywords = entry.ParentKeywords;
|
||||
List<EffectProperty> effectProperties = entry.EffectProperties;
|
||||
|
||||
for (int i = 0; i < parentKeywords.Count; i++)
|
||||
{
|
||||
string fileEntry = string.Format(SHADER_FEATURE_FILE_ENTRY, parentKeywords[i].keyword);
|
||||
res += fileEntry;
|
||||
res += "\n";
|
||||
}
|
||||
|
||||
for (int i = 0; i < effectProperties.Count; i++)
|
||||
{
|
||||
EffectProperty effectProperty = effectProperties[i];
|
||||
|
||||
for (int j = 0; j < effectProperty.propertyKeywords.Length; j++)
|
||||
{
|
||||
if (effectProperty.IsEnumProperty())
|
||||
{
|
||||
res += string.Format(SHADER_FEATURE_FILE_ENTRY, effectProperty.fullKeywordNames[j]);
|
||||
}
|
||||
else
|
||||
{
|
||||
res += string.Format(SHADER_FEATURE_FILE_ENTRY, effectProperty.propertyKeywords[j]);
|
||||
}
|
||||
|
||||
res += "\n";
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
private static string AddFogEntry(string fileContent)
|
||||
{
|
||||
string res = fileContent;
|
||||
|
||||
res += string.Format(SHADER_FEATURE_FILE_ENTRY, KEYWORD_FOG);
|
||||
res += "\n";
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5fe0720354f0da947a8fd419d3d70fc5
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 316173
|
||||
packageName: All In 1 3D-Shader
|
||||
packageVersion: 2.72
|
||||
assetPath: Assets/Plugins/AllIn13DShader/Editor/Effects Profiles/ShaderFeaturesFileCreator.cs
|
||||
uploadId: 865720
|
||||
@@ -0,0 +1,265 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AllIn13DShader
|
||||
{
|
||||
public static class ShaderVariantCreator
|
||||
{
|
||||
private const string INCLUDE_LINE_FORMAT = @"#include ""{0}""";
|
||||
|
||||
private const string TAG_VARIANT_NAME = @"<VARIANT_NAME>";
|
||||
private const string TAG_SHADER_PROPERTIES = @"<SHADER_PROPERTIES>";
|
||||
|
||||
private const string TAG_SHADER_PASSES_URP = @"<SHADER_PASSES_URP>";
|
||||
private const string TAG_SHADER_PASSES_BIRP = @"<SHADER_PASSES_BIRP>";
|
||||
|
||||
//
|
||||
private const string TAG_PASS_NAME = @"<PASS_NAME>";
|
||||
private const string TAG_LIGHT_MODE = @"<LIGHT_MODE>";
|
||||
private const string TAG_BLEND_COMMAND = @"<BLEND_COMMAND>";
|
||||
private const string TAG_CULL_COMMAND = @"<CULL_COMMAND>";
|
||||
|
||||
|
||||
private const string TAG_Z_WRITE_COMMAND = @"<Z_WRITE_COMMAND>";
|
||||
|
||||
private const string TAG_Z_TEST_COMMAND = @"<Z_TEST_COMMAND>";
|
||||
|
||||
private const string TAG_COLOR_MASK_COMMAND = @"<COLOR_MASK_COMMAND>";
|
||||
|
||||
|
||||
private const string TAG_STENCIL_BLOCK = @"<STENCIL_BLOCK>";
|
||||
private const string TAG_FEATURES_URP_DEFINES = @"<FEATURES_URP_DEFINES>";
|
||||
private const string TAG_FEATURES_URP_LIBRARY = @"<FEATURES_URP_LIBRARY>";
|
||||
private const string TAG_VERTEX_PROGRAM_NAME = @"<VERTEX_PROGRAM_NAME>";
|
||||
private const string TAG_FRAGMENT_PROGRAM_NAME = @"<FRAGMENT_PROGRAM_NAME>";
|
||||
private const string TAG_ALL_IN_1_FEATURES = @"<ALLIN1_FEATURES>";
|
||||
private const string TAG_PIPELINE_PASS_SYMBOL = @"<PIPELINE_PASS_SYMBOL>";
|
||||
private const string TAG_THIS_PASS_SYMBOL = @"<THIS_PASS_SYMBOL>";
|
||||
private const string TAG_INCLUDE_PIPELINE_HELPER = @"<INCLUDE_PIPELINE_HELPER>";
|
||||
private const string TAG_INCLUDE_EFFECT_LIBRARIES = @"<INCLUDE_EFFECT_LIBRARIES>";
|
||||
private const string TAG_INCLUDE_PASS = @"<INCLUDE_PASS>";
|
||||
private const string TAG_EXTRA_PRAGMA_LINES = @"<EXTRA_PRAGMA_LINES>";
|
||||
|
||||
private const string TAG_INCLUDE_ALL_IN_SHADER_FEATURES = @"<INCLUDE_ALL_IN_1_SHADER_FEATURES>";
|
||||
private const string TAG_INCLUDE_ALL_IN_1_SHADER_LIGHT = @"<INCLUDE_ALL_IN_1_SHADER_LIGHT>";
|
||||
private const string TAG_INCLUDE_CORE_LIBRARY = @"<INCLUDE_CORE_LIBRARY>";
|
||||
private const string TAG_INCLUDE_COMMON_FUNCTIONS = @"<INCLUDE_COMMON_FUNCTIONS>";
|
||||
private const string TAG_INCLUDE_COMMON_STRUCTS = @"<INCLUDE_COMMON_STRUCTS>";
|
||||
//
|
||||
|
||||
private static string TEMPLATE_PATH = GlobalConfiguration.GetRootPluginFolderPath() + "/Editor/Effects Profiles/Templates/ShaderTemplate.allin1template";
|
||||
private static string SHADER_PROPERTIES_PATH = GlobalConfiguration.GetRootPluginFolderPath() + "/Editor/Templates/AllIn13DShader_ShaderProperties.allIn13DData";
|
||||
private static string SHADER_PASS_URP_TAMPLATE_PATH = GlobalConfiguration.GetRootPluginFolderPath() + "/Editor/Effects Profiles/Templates/PassTemplate_URP.allin1template";
|
||||
private static string SHADER_PASS_BIRP_TAMPLATE_PATH = GlobalConfiguration.GetRootPluginFolderPath() + "/Editor/Effects Profiles/Templates/PassTemplate_BIRP.allin1template";
|
||||
|
||||
|
||||
public static string SHADER_VARIANTS_FOLDER_NAME = "Baked Variants";
|
||||
private static string SHADER_VARIANT_FILE_NAME = "AllIn13D_BakedEffects_{0}.shader";
|
||||
|
||||
public static Shader CreateVariantByMaterialInfo(PropertiesConfig propertiesConfig, AbstractMaterialInfo matInfo, string profileName)
|
||||
{
|
||||
EffectsProfileCollection effectsProfileCollection = GlobalConfiguration.instance.effectsProfileCollection;
|
||||
|
||||
EffectsProfile effectsProfile = effectsProfileCollection.CreateNewProfile(profileName);
|
||||
|
||||
effectsProfile.InitFromOtherProfile(effectsProfileCollection.generalProfile);
|
||||
effectsProfileCollection.ConfigureEffectProfileByMaterialInfo(
|
||||
target: effectsProfile,
|
||||
activeEffectsList: effectsProfileCollection.generalProfile,
|
||||
matInfo: matInfo,
|
||||
propertiesConfig: propertiesConfig);
|
||||
|
||||
string folderPath = GlobalConfiguration.instance.BakedShaderSavePath;
|
||||
Shader res = CreateVariant(effectsProfile, effectsProfileCollection, folderPath, false);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public static Shader CreateVariant(EffectsProfileCollection effectsProfileCollection, string profileName)
|
||||
{
|
||||
EffectsProfile effectProfile = effectsProfileCollection.CreateNewProfile(profileName);
|
||||
effectProfile.InitFromOtherProfile(effectsProfileCollection.generalProfile);
|
||||
|
||||
string folderPath = GlobalConfiguration.instance.BakedShaderSavePath;
|
||||
Shader res = CreateVariant(effectProfile, effectsProfileCollection, folderPath, false);
|
||||
return res;
|
||||
}
|
||||
|
||||
public static Shader CreateVariant(EffectsProfile effectsProfile, EffectsProfileCollection effectsProfileCollection, string folderPath, bool overwrite)
|
||||
{
|
||||
string txtShaderVariant = File.ReadAllText(TEMPLATE_PATH);
|
||||
|
||||
txtShaderVariant = ConfigureVariantName(txtShaderVariant, effectsProfile.profileName);
|
||||
txtShaderVariant = ConfigureShaderProperties(txtShaderVariant);
|
||||
|
||||
ShaderPassCollection shaderPassCollection = GlobalConfiguration.instance.shaderPassCollection;
|
||||
|
||||
string urpPassesEntry = GetShaderPassesEntry(effectsProfile, shaderPassCollection, RenderPipelineEnum.URP, folderPath);
|
||||
txtShaderVariant = txtShaderVariant.Replace(TAG_SHADER_PASSES_URP, urpPassesEntry);
|
||||
|
||||
string birpPassesEntry = GetShaderPassesEntry(effectsProfile, shaderPassCollection, RenderPipelineEnum.BIRP, folderPath);
|
||||
txtShaderVariant = txtShaderVariant.Replace(TAG_SHADER_PASSES_BIRP, birpPassesEntry);
|
||||
|
||||
|
||||
string filePath;
|
||||
if (overwrite)
|
||||
{
|
||||
Shader shader = effectsProfile.FindShader();
|
||||
filePath = AssetDatabase.GetAssetPath(shader);
|
||||
}
|
||||
else
|
||||
{
|
||||
string fileName = string.Format(SHADER_VARIANT_FILE_NAME, effectsProfile.profileName);
|
||||
filePath = Path.Combine(folderPath, fileName);
|
||||
|
||||
filePath = AssetDatabase.GenerateUniqueAssetPath(filePath);
|
||||
}
|
||||
|
||||
effectsProfile.shaderGUID = AssetDatabase.AssetPathToGUID(filePath);
|
||||
|
||||
|
||||
txtShaderVariant = EditorUtils.UnifyEOL(txtShaderVariant);
|
||||
SaveFile(filePath, txtShaderVariant);
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
Shader res = AssetDatabase.LoadAssetAtPath(filePath, typeof(Shader)) as Shader;
|
||||
EditorUtility.SetDirty(effectsProfileCollection);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
private static void SaveFile(string filePath, string txtFile)
|
||||
{
|
||||
File.WriteAllText(filePath, txtFile);
|
||||
}
|
||||
|
||||
private static string ConfigureVariantName(string input, string variantName)
|
||||
{
|
||||
string res = input.Replace(TAG_VARIANT_NAME, variantName);
|
||||
return res;
|
||||
}
|
||||
|
||||
private static string ConfigureShaderProperties(string input)
|
||||
{
|
||||
string res = input;
|
||||
|
||||
string shaderPropertiesTxt = EditorUtils.ReadFileTextWithTabs(SHADER_PROPERTIES_PATH, 2);
|
||||
res = res.Replace(TAG_SHADER_PROPERTIES, shaderPropertiesTxt);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
private static string GetShaderPassesEntry(EffectsProfile effectsProfile, ShaderPassCollection shaderPassCollection, RenderPipelineEnum renderPipeline, string shaderFolderPath)
|
||||
{
|
||||
string shaderPassTemplateTxt = EditorUtils.ReadFileTextWithTabs(GetTemplatePathByRenderPipeline(renderPipeline), 2);
|
||||
|
||||
List<ShaderPassConfig> shaderPasses = effectsProfile.GetShaderPasses(shaderPassCollection, renderPipeline);
|
||||
|
||||
bool hasStencilBlock = false;
|
||||
for(int i = 0; i < shaderPasses.Count; i++)
|
||||
{
|
||||
if (shaderPasses[i].passType == AllIn13DPassType.OUTLINE)
|
||||
{
|
||||
hasStencilBlock = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
string res = string.Empty;
|
||||
for (int i = 0; i < shaderPasses.Count; i++)
|
||||
{
|
||||
string currentPass = shaderPassTemplateTxt;
|
||||
currentPass = ConfigureShaderPass(effectsProfile, currentPass, shaderPasses[i], renderPipeline, hasStencilBlock, shaderFolderPath);
|
||||
|
||||
res += currentPass;
|
||||
res += "\n";
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
private static string ConfigureShaderPass(EffectsProfile effectsProfile,
|
||||
string templatePass, ShaderPassConfig shaderPass, RenderPipelineEnum renderPipeline, bool hasStencilBlock,
|
||||
string shaderFolderPath)
|
||||
{
|
||||
string res = templatePass;
|
||||
|
||||
res = res.Replace(TAG_PASS_NAME, shaderPass.GetPassName(renderPipeline));
|
||||
|
||||
res = res.Replace(TAG_LIGHT_MODE, shaderPass.GetLightModeShaderEntry(renderPipeline));
|
||||
|
||||
res = res.Replace(TAG_BLEND_COMMAND, shaderPass.blendCommand.GetShaderEntry());
|
||||
|
||||
res = res.Replace(TAG_CULL_COMMAND, shaderPass.cullCommand.GetShaderEntry());
|
||||
res = res.Replace(TAG_Z_WRITE_COMMAND, shaderPass.zWriteCommand.GetShaderEntry());
|
||||
res = res.Replace(TAG_Z_TEST_COMMAND, shaderPass.zTestCommand.GetShaderEntry());
|
||||
res = res.Replace(TAG_COLOR_MASK_COMMAND, shaderPass.colorMaskCommand.GetShaderEntry());
|
||||
|
||||
if (hasStencilBlock)
|
||||
{
|
||||
res = res.Replace(TAG_STENCIL_BLOCK, shaderPass.GetStencilBlockShaderEntry(effectsProfile));
|
||||
}
|
||||
else
|
||||
{
|
||||
res = res.Replace(TAG_STENCIL_BLOCK, string.Empty);
|
||||
}
|
||||
|
||||
res = res.Replace(TAG_FEATURES_URP_DEFINES, shaderPass.GetPipelineFeaturesDefinesShaderEntry(renderPipeline, shaderFolderPath));
|
||||
res = res.Replace(TAG_FEATURES_URP_LIBRARY, shaderPass.GetPipelineFeaturesLibraryShaderEntry(renderPipeline, shaderFolderPath));
|
||||
|
||||
res = res.Replace(TAG_VERTEX_PROGRAM_NAME, shaderPass.vertexProgramName);
|
||||
res = res.Replace(TAG_FRAGMENT_PROGRAM_NAME, shaderPass.fragmentProgramName);
|
||||
|
||||
res = res.Replace(TAG_INCLUDE_PIPELINE_HELPER, string.Format(INCLUDE_LINE_FORMAT, shaderPass.GetHelperLibraryPath(renderPipeline, shaderFolderPath)));
|
||||
|
||||
string effectsLibraries = shaderPass.GetEffectsLibrariesShaderEntry(effectsProfile, shaderFolderPath);
|
||||
res = res.Replace(TAG_INCLUDE_EFFECT_LIBRARIES, effectsLibraries);
|
||||
|
||||
res = res.Replace(TAG_INCLUDE_PASS, string.Format(INCLUDE_LINE_FORMAT, shaderPass.GetPassFilePath(shaderFolderPath)));
|
||||
|
||||
List<EffectsProfileEntry> enabledEntries = effectsProfile.GetEnabledEntriesFlatList();
|
||||
string entryFeaturesTxt = ShaderPassConfig.GetAllIn1FeaturesEntries(enabledEntries);
|
||||
|
||||
res = res.Replace(TAG_ALL_IN_1_FEATURES, entryFeaturesTxt);
|
||||
|
||||
res = res.Replace(TAG_PIPELINE_PASS_SYMBOL, shaderPass.GetPipelinePassSymbolShaderEntry(renderPipeline));
|
||||
res = res.Replace(TAG_THIS_PASS_SYMBOL, shaderPass.GetPassSymbolShaderEntry());
|
||||
|
||||
res = res.Replace(TAG_EXTRA_PRAGMA_LINES, shaderPass.GetExtraPragmaLines(renderPipeline));
|
||||
|
||||
res = res.Replace(TAG_INCLUDE_ALL_IN_SHADER_FEATURES, shaderPass.GetShaderFeaturesLibraryShaderEntry(shaderFolderPath));
|
||||
res = res.Replace(TAG_INCLUDE_ALL_IN_1_SHADER_LIGHT, shaderPass.GetLightLibraryShaderEntry(shaderFolderPath));
|
||||
res = res.Replace(TAG_INCLUDE_CORE_LIBRARY, shaderPass.GetCoreLibraryShaderEntry(shaderFolderPath));
|
||||
res = res.Replace(TAG_INCLUDE_COMMON_STRUCTS, shaderPass.GetCommonStructsShaderEntry(shaderFolderPath));
|
||||
res = res.Replace(TAG_INCLUDE_COMMON_FUNCTIONS, shaderPass.GetCommonFunctionsShaderEntry(shaderFolderPath));
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
private static string GetTemplatePathByRenderPipeline(RenderPipelineEnum renderPipeline)
|
||||
{
|
||||
string res = string.Empty;
|
||||
switch (renderPipeline)
|
||||
{
|
||||
case RenderPipelineEnum.BIRP:
|
||||
res = SHADER_PASS_BIRP_TAMPLATE_PATH;
|
||||
break;
|
||||
|
||||
case RenderPipelineEnum.URP:
|
||||
res = SHADER_PASS_URP_TAMPLATE_PATH;
|
||||
break;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public static string GetShaderVariantsFolderPath()
|
||||
{
|
||||
string res = GlobalConfiguration.instance.BakedShaderSavePath;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cfa22d77b9798ec4e85780c7027525aa
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 316173
|
||||
packageName: All In 1 3D-Shader
|
||||
packageVersion: 2.72
|
||||
assetPath: Assets/Plugins/AllIn13DShader/Editor/Effects Profiles/ShaderVariantCreator.cs
|
||||
uploadId: 865720
|
||||
@@ -0,0 +1,51 @@
|
||||
namespace AllIn13DShader
|
||||
{
|
||||
[System.Serializable]
|
||||
public class SubkeywordEntryEnum
|
||||
{
|
||||
public string propertyName;
|
||||
|
||||
public int kwIndexEnabled;
|
||||
public string[] displayNames;
|
||||
public string[] keywords;
|
||||
|
||||
public SubkeywordEntryEnum(int kwIndexEnabled, string[] displayNames, string[] keywords, string propertyName)
|
||||
{
|
||||
this.propertyName = propertyName;
|
||||
|
||||
this.displayNames = new string[displayNames.Length];
|
||||
this.keywords = new string[keywords.Length];
|
||||
|
||||
for (int i = 0; i < displayNames.Length; i++)
|
||||
{
|
||||
this.displayNames[i] = displayNames[i];
|
||||
this.keywords[i] = keywords[i];
|
||||
}
|
||||
}
|
||||
|
||||
public SubkeywordEntryEnum(SubkeywordEntryEnum copyFrom)
|
||||
{
|
||||
this.kwIndexEnabled = copyFrom.kwIndexEnabled;
|
||||
|
||||
this.displayNames = new string[copyFrom.displayNames.Length];
|
||||
for(int i = 0; i < copyFrom.displayNames.Length; i++)
|
||||
{
|
||||
this.displayNames[i] = copyFrom.displayNames[i];
|
||||
}
|
||||
|
||||
this.keywords = new string[copyFrom.keywords.Length];
|
||||
for(int i = 0; i < copyFrom.keywords.Length; i++)
|
||||
{
|
||||
this.keywords[i] = copyFrom.keywords[i];
|
||||
}
|
||||
|
||||
this.propertyName = copyFrom.propertyName;
|
||||
}
|
||||
|
||||
public string GetKeywordEnabled()
|
||||
{
|
||||
string res = keywords[kwIndexEnabled];
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: db7fa625c91a86a4bad1196d616642bf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 316173
|
||||
packageName: All In 1 3D-Shader
|
||||
packageVersion: 2.72
|
||||
assetPath: Assets/Plugins/AllIn13DShader/Editor/Effects Profiles/SubkeywordEntryEnum.cs
|
||||
uploadId: 865720
|
||||
@@ -0,0 +1,26 @@
|
||||
namespace AllIn13DShader
|
||||
{
|
||||
[System.Serializable]
|
||||
public class SubkeywordEntryToggle
|
||||
{
|
||||
public string propertyName;
|
||||
|
||||
public bool isEnabled;
|
||||
public string keyword;
|
||||
public string displayName;
|
||||
|
||||
public SubkeywordEntryToggle(bool isEnabled, string keyword, string displayName)
|
||||
{
|
||||
this.isEnabled = isEnabled;
|
||||
this.keyword = keyword;
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public SubkeywordEntryToggle(SubkeywordEntryToggle copyFrom)
|
||||
{
|
||||
this.isEnabled = copyFrom.isEnabled;
|
||||
this.keyword = copyFrom.keyword;
|
||||
this.displayName = copyFrom.displayName;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1e0090a98f8b7814693852d420e4822e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 316173
|
||||
packageName: All In 1 3D-Shader
|
||||
packageVersion: 2.72
|
||||
assetPath: Assets/Plugins/AllIn13DShader/Editor/Effects Profiles/SubkeywordEntryToggle.cs
|
||||
uploadId: 865720
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fc0645fb7502dce48abc80e20c4acaa1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
Pass
|
||||
{
|
||||
Name "<PASS_NAME>"
|
||||
Tags
|
||||
{
|
||||
<LIGHT_MODE>
|
||||
}
|
||||
|
||||
<BLEND_COMMAND>
|
||||
<CULL_COMMAND>
|
||||
<Z_WRITE_COMMAND>
|
||||
<Z_TEST_COMMAND>
|
||||
<COLOR_MASK_COMMAND>
|
||||
|
||||
<STENCIL_BLOCK>
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma target 3.0
|
||||
|
||||
#pragma vertex <VERTEX_PROGRAM_NAME>
|
||||
#pragma fragment <FRAGMENT_PROGRAM_NAME>
|
||||
|
||||
<EXTRA_PRAGMA_LINES>
|
||||
|
||||
#define ALLIN1_SHADER_VARIANT
|
||||
<PIPELINE_PASS_SYMBOL>
|
||||
<THIS_PASS_SYMBOL>
|
||||
|
||||
//<ALLIN1_EFFECTS>
|
||||
<ALLIN1_FEATURES>
|
||||
//</ALLIN1_EFFECTS>
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
<INCLUDE_ALL_IN_1_SHADER_FEATURES>
|
||||
#include "AutoLight.cginc"
|
||||
#include "UnityLightingCommon.cginc"
|
||||
<INCLUDE_COMMON_STRUCTS>
|
||||
<INCLUDE_COMMON_FUNCTIONS>
|
||||
<INCLUDE_PIPELINE_HELPER>
|
||||
<INCLUDE_ALL_IN_1_SHADER_LIGHT>
|
||||
<INCLUDE_EFFECT_LIBRARIES>
|
||||
<INCLUDE_CORE_LIBRARY>
|
||||
<INCLUDE_PASS>
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0b7fd35e09faa604e81cdb0b41a5ced4
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 316173
|
||||
packageName: All In 1 3D-Shader
|
||||
packageVersion: 2.72
|
||||
assetPath: Assets/Plugins/AllIn13DShader/Editor/Effects Profiles/Templates/PassTemplate_BIRP.allin1template
|
||||
uploadId: 865720
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
Pass
|
||||
{
|
||||
Name "<PASS_NAME>"
|
||||
Tags
|
||||
{
|
||||
<LIGHT_MODE>
|
||||
}
|
||||
|
||||
<BLEND_COMMAND>
|
||||
<CULL_COMMAND>
|
||||
<Z_WRITE_COMMAND>
|
||||
<Z_TEST_COMMAND>
|
||||
<COLOR_MASK_COMMAND>
|
||||
|
||||
<STENCIL_BLOCK>
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma vertex <VERTEX_PROGRAM_NAME>
|
||||
#pragma fragment <FRAGMENT_PROGRAM_NAME>
|
||||
|
||||
#define ALLIN1_SHADER_VARIANT
|
||||
<PIPELINE_PASS_SYMBOL>
|
||||
<THIS_PASS_SYMBOL>
|
||||
|
||||
<FEATURES_URP_DEFINES>
|
||||
<FEATURES_URP_LIBRARY>
|
||||
|
||||
#ifdef ALLIN1_DOTS_INSTANCING_SUPPORT
|
||||
#pragma target 4.5
|
||||
#else
|
||||
#pragma target 3.0
|
||||
#endif
|
||||
|
||||
//<ALLIN1_EFFECTS>
|
||||
<ALLIN1_FEATURES>
|
||||
//</ALLIN1_EFFECTS>
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
|
||||
<INCLUDE_ALL_IN_1_SHADER_FEATURES>
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
|
||||
<INCLUDE_COMMON_STRUCTS>
|
||||
<INCLUDE_COMMON_FUNCTIONS>
|
||||
<INCLUDE_PIPELINE_HELPER>
|
||||
<INCLUDE_ALL_IN_1_SHADER_LIGHT>
|
||||
<INCLUDE_EFFECT_LIBRARIES>
|
||||
<INCLUDE_CORE_LIBRARY>
|
||||
<INCLUDE_PASS>
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 82e31d9f58451684ab6f3ac5a299f971
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 316173
|
||||
packageName: All In 1 3D-Shader
|
||||
packageVersion: 2.72
|
||||
assetPath: Assets/Plugins/AllIn13DShader/Editor/Effects Profiles/Templates/PassTemplate_URP.allin1template
|
||||
uploadId: 865720
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
#ifndef ALLIN13DSHADER_SHADERFEATURES_<EffectsProfileID>
|
||||
#define ALLIN13DSHADER_SHADERFEATURES_<EffectsProfileID>
|
||||
|
||||
<Content>
|
||||
|
||||
#endif //ALLIN13DSHADER_SHADERFEATURES_<EffectsProfileID>
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2c7e49c3cff475d47a9837ad32530a72
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 316173
|
||||
packageName: All In 1 3D-Shader
|
||||
packageVersion: 2.72
|
||||
assetPath: Assets/Plugins/AllIn13DShader/Editor/Effects Profiles/Templates/ShaderFeaturesTemplate.allin1template
|
||||
uploadId: 865720
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
Shader "AllIn13DShader - Baked Effects/<VARIANT_NAME>"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
<SHADER_PROPERTIES>
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
PackageRequirements
|
||||
{
|
||||
"com.unity.render-pipelines.universal" : "12.0"
|
||||
}
|
||||
|
||||
<SHADER_PASSES_URP>
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
<SHADER_PASSES_BIRP>
|
||||
}
|
||||
|
||||
CustomEditor "AllIn13DShader.AllIn13DShaderMaterialInspector"
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1008b6c26c1d5604fbea18f1f31eb1bd
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 316173
|
||||
packageName: All In 1 3D-Shader
|
||||
packageVersion: 2.72
|
||||
assetPath: Assets/Plugins/AllIn13DShader/Editor/Effects Profiles/Templates/ShaderTemplate.allin1template
|
||||
uploadId: 865720
|
||||
Reference in New Issue
Block a user