Add Synty asset packs (enemies + environment/FX/UI) via Git LFS

14 newly-imported Synty Polygon packs (~2.46 GB; FBX/PNG/textures stored in
Git LFS per .gitattributes). Enemy-grade characters: Werewolf, Kaiju,
FantasyHeroCharacters, Vikings, Western, HorrorCarnival, Dog. Environment:
Nature, NatureBiomes, PNB_Core, FantasyKingdom. UI/icons: Icons,
InterfaceCore, InterfaceSciFiSoldierHUD.

Werewolf + Kaiju back the DR-023 animated enemies; the rest are cataloged
for future work in Docs/Vault/06_Roadmap/Synty_Asset_Inventory.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-06 23:28:47 -07:00
parent 1e23246568
commit 5a59d8e14f
37144 changed files with 18418685 additions and 0 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 9acd276df194e8545abc11efbafe668d
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 4a6c8c23090929241b2a55476a46a9b1
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 9b98a126c8d4d7a4baeb81b16e4f7b97
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: fb4ba993f93e1a946a9edefaa6c1807a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2c8a9d9dfe36a0b409084d844fb9e9ea
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,747 @@
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using UnityEngine.Rendering;
public class SyntyFoliage_customGUI : ShaderGUI
{
bool scriptExists = false;
#region TabProperties
private int selectedTab = 0;
private string[] tabNames = { "Leaves", "Trunk", "Frosting", "Emission", "Wind" };
private bool showSurfaceType = false;
private bool checkedRenderPipe = false;
private int renderPipeType = 0;
void CheckRenderPipeline()
{
var pipelineAsset = GraphicsSettings.defaultRenderPipeline;
if (pipelineAsset == null)
{
Debug.Log("Using Built-In Render Pipeline (BIRP)");
renderPipeType = 0;
}
else if (pipelineAsset.GetType().Name.Contains("UniversalRenderPipelineAsset"))
{
Debug.Log("Using Universal Render Pipeline (URP)");
renderPipeType = 1;
}
else if (pipelineAsset.GetType().Name.Contains("HDRenderPipelineAsset"))
{
Debug.Log("Using High Definition Render Pipeline (HDRP)");
renderPipeType = 1;
}
else
{
Debug.Log("Using custom render pipeline, falling back to BIRP settings");
renderPipeType = 0;
}
checkedRenderPipe = true;
}
//Build Surface Type options BIRP
public void SurfaceOptionsBIRP(MaterialEditor materialEditor)
{
GUIStyle backdropStyle = makeBackdrop();
Material material = materialEditor.target as Material;
if (material != null)
{
EditorGUILayout.LabelField("Surface Options", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
// Surface Type Dropdown
int surfaceType = (int)material.GetFloat("_BUILTIN_Surface");
surfaceType = EditorGUILayout.Popup("Surface Type", surfaceType, new string[] { "Opaque", "Transparent" });
material.SetFloat("_BUILTIN_Surface", surfaceType);
// Transparent
if (surfaceType == 1)
{
material.SetOverrideTag("RenderType", "Transparent");
material.renderQueue = (int)RenderQueue.Transparent;
material.SetFloat("_BUILTIN_SrcBlend", (float)UnityEngine.Rendering.BlendMode.SrcAlpha);
material.SetFloat("_BUILTIN_DstBlend", (float)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
material.SetFloat("_BUILTIN_ZWrite", 0);
material.EnableKeyword("_ALPHABLEND_ON");
material.EnableKeyword("_ZWRITE_ON");
material.EnableKeyword("_BUILTIN_SURFACE_TYPE_TRANSPARENT");
}
else // Opaque
{
material.SetOverrideTag("RenderType", "Opaque");
material.renderQueue = (int)RenderQueue.Geometry;
material.SetFloat("_BUILTIN_SrcBlend", (float)UnityEngine.Rendering.BlendMode.One);
material.SetFloat("_BUILTIN_DstBlend", (float)UnityEngine.Rendering.BlendMode.Zero);
material.SetFloat("_BUILTIN_ZWrite", 1);
material.DisableKeyword("_ALPHABLEND_ON");
material.DisableKeyword("_ZWRITE_ON");
material.DisableKeyword("_BUILTIN_SURFACE_TYPE_TRANSPARENT");
}
// Render Face Type
int renderFace = (int)material.GetFloat("_BUILTIN_CullMode");
renderFace = EditorGUILayout.Popup("Render Face", renderFace, new string[] { "Both", "Back", "Front" });
material.SetFloat("_BUILTIN_CullMode", renderFace);
// Alpha Clipping
bool alphaClip = material.GetFloat("_BUILTIN_AlphaClip") == 1;
alphaClip = EditorGUILayout.Toggle("Alpha Clipping", alphaClip);
material.SetFloat("_BUILTIN_AlphaClip", alphaClip ? 1 : 0);
if (alphaClip)
{
material.EnableKeyword("_BUILTIN_ALPHATEST_ON");
material.EnableKeyword("_BUILTIN_AlphaClip");
}
else
{
material.DisableKeyword("_BUILTIN_ALPHATEST_ON");
material.DisableKeyword("_BUILTIN_AlphaClip");
}
EditorGUILayout.EndVertical();
EditorGUILayout.Separator();
material.shader = Shader.Find(material.shader.name);
}
}
//Build Surface Type options URP
public void SurfaceOptionsURP(MaterialEditor materialEditor)
{
GUIStyle backdropStyle = makeBackdrop();
Material material = materialEditor.target as Material;
if (material != null)
{
EditorGUILayout.LabelField("Surface Options", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
// Surface Type Dropdown
int surfaceType = (int)material.GetFloat("_Surface");
surfaceType = EditorGUILayout.Popup("Surface Type", surfaceType, new string[] { "Opaque", "Transparent" });
material.SetFloat("_Surface", surfaceType);
// Transparent
if (surfaceType == 1)
{
material.SetFloat("_SrcBlend", (float)UnityEngine.Rendering.BlendMode.SrcAlpha);
material.SetFloat("_DstBlend", (float)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
material.SetFloat("_ZWrite", 0);
material.EnableKeyword("_SURFACE_TYPE_TRANSPARENT");
material.EnableKeyword("_ZWRITE_ON");
}
else // Opaque
{
material.SetFloat("_SrcBlend", (float)UnityEngine.Rendering.BlendMode.One);
material.SetFloat("_DstBlend", (float)UnityEngine.Rendering.BlendMode.Zero);
material.SetFloat("_ZWrite", 1);
material.DisableKeyword("_SURFACE_TYPE_TRANSPARENT");
material.DisableKeyword("_ZWRITE_ON");
}
// Render Face Type
int renderFace = (int)material.GetFloat("_Cull");
renderFace = EditorGUILayout.Popup("Render Face", renderFace, new string[] { "Both", "Back", "Front" });
material.SetFloat("_Cull", renderFace);
// Alpha Clipping
bool alphaClip = material.GetFloat("_AlphaClip") == 1;
alphaClip = EditorGUILayout.Toggle("Alpha Clipping", alphaClip);
material.SetFloat("_AlphaClip", alphaClip ? 1 : 0);
material.SetFloat("_AlphaToMask", alphaClip ? 1 : 0);
if (alphaClip)
{
material.EnableKeyword("_ALPHATEST_ON");
material.EnableKeyword("_ALPHABLEND_ON");
}
else
{
material.DisableKeyword("_ALPHATEST_ON");
material.DisableKeyword("_ALPHABLEND_ON");
}
EditorGUILayout.EndVertical();
EditorGUILayout.Separator();
material.shader = Shader.Find(material.shader.name);
}
}
//used to setup the tabs and what settings to call
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
{
GUIStyle backdropStyle = makeBackdrop();
#region Create Warning button
foreach (var obj in Resources.FindObjectsOfTypeAll<WeatherControl>())
{
if (obj != null)
{
scriptExists = true;
break;
}
}
if (!scriptExists)
{
GUILayout.Label("WARNING", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
GUI.contentColor = Color.yellow;
GUILayout.Label("Global WeatherController missing in scene", EditorStyles.boldLabel);
GUI.contentColor = Color.white;
if (GUILayout.Button("Add WeatherController"))
{
GameObject weatherController = new GameObject("WeatherController");
weatherController.AddComponent<WeatherControl>();
}
EditorGUILayout.EndVertical();
}
#endregion
#region Surface Type Properties
//Set Default RenderType's
if (!checkedRenderPipe)
{
Material material = materialEditor.target as Material;
CheckRenderPipeline();
//Set BIRP
if (renderPipeType == 0)
{
//Make opaque
material.SetFloat("_BUILTIN_Surface", 0);
material.SetFloat("_BUILTIN_SrcBlend", (float)UnityEngine.Rendering.BlendMode.One);
material.SetFloat("_BUILTIN_DstBlend", (float)UnityEngine.Rendering.BlendMode.Zero);
material.SetFloat("_BUILTIN_ZWrite", 1);
material.DisableKeyword("_ZWRITE_ON");
material.DisableKeyword("_BUILTIN_SURFACE_TYPE_TRANSPARENT");
//alpha clip on
material.SetFloat("_BUILTIN_AlphaClip", 1);
material.EnableKeyword("_BUILTIN_ALPHATEST_ON");
material.EnableKeyword("_BUILTIN_AlphaClip");
//Render both faces
material.SetFloat("_BUILTIN_CullMode", 0);
}
//Set URP
else if (renderPipeType == 1)
{
//Make opaque
material.SetFloat("_Surface", 0);
material.SetFloat("_SrcBlend", (float)UnityEngine.Rendering.BlendMode.One);
material.SetFloat("_DstBlend", (float)UnityEngine.Rendering.BlendMode.Zero);
material.SetFloat("_ZWrite", 1);
material.DisableKeyword("_SURFACE_TYPE_TRANSPARENT");
material.DisableKeyword("_ZWRITE_ON");
//alpha clip on
material.SetFloat("_AlphaClip", 1);
material.SetFloat("_AlphaToMask", 1);
material.EnableKeyword("_ALPHATEST_ON");
//Render both faces
material.SetFloat("_Cull", 0);
}
}
//Manual Options
showSurfaceType = EditorGUILayout.Foldout(showSurfaceType, "Material Override properties");
if (showSurfaceType)
{
//Set BIRP
if (renderPipeType == 0)
{
SurfaceOptionsBIRP(materialEditor);
}
//Set URP
else if (renderPipeType == 1)
{
SurfaceOptionsURP(materialEditor);
}
}
#endregion
selectedTab = GUILayout.Toolbar(selectedTab, tabNames);
GUILayout.Space(10);
switch (selectedTab)
{
case 0:
DrawLeafSettings(materialEditor, properties);
break;
case 1:
DrawTrunkSettings(materialEditor, properties);
break;
case 2:
DrawFrostingSettings(materialEditor, properties);
break;
case 3:
DrawEmissionSettings(materialEditor, properties);
break;
case 4:
DrawWindSettings(materialEditor, properties);
break;
}
}
#endregion
#region Gui Backdrops
private static GUIStyle makeBackdrop()
{
GUIStyle backdropStyle = new GUIStyle(GUI.skin.box);
backdropStyle.padding = new RectOffset(10, 10, 10, 10);
backdropStyle.margin = new RectOffset(5, 5, 5, 5);
return backdropStyle;
}
#endregion
#region Vector Custom GUI Properties
//dictionary that contains the properties to override GUI for Vector2 + Vector3 elements
Dictionary<string, string> vecGuiProperties = new Dictionary<string, string>
{
{ "_Leaf_Tiling", "Vector2" },
{ "_Leaf_Offset", "Vector2" },
{ "_Leaf_Normal_Tiling", "Vector2" },
{ "_Leaf_Normal_Offset", "Vector2" },
{ "_Trunk_Tiling", "Vector2" },
{ "_Trunk_Offset", "Vector2" },
{ "_Trunk_Normal_Tiling", "Vector2" },
{ "_Trunk_Normal_Offset", "Vector2" },
{ "_Emissive_Mask_Tiling", "Vector2" },
{ "_Emissive_Mask_Offset", "Vector2" },
{ "_Emissive_Mask_2_Tiling", "Vector2" },
{ "_Emissive_Mask_2_Offset", "Vector2" }
};
#endregion
//Tab 1
#region Leaf Properties
private void DrawLeafSettings(MaterialEditor materialEditor, MaterialProperty[] properties)
{
GUIStyle backdropStyle = makeBackdrop();
#region Leaf & Trunk Color Noise
GUILayout.Label("Leaf & Trunk Color Noise", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
string[] generalProperties =
{
"_Alpha_Clip_Threshold",
"_Use_Color_Noise",
"_Color_Noise_Small_Freq",
"_Color_Noise_Large_Freq"
};
setProperties(materialEditor, properties, generalProperties, vecGuiProperties);
EditorGUILayout.EndVertical();
#endregion
EditorGUILayout.Separator();
#region Base Leaf
GUILayout.Label("Leaf Base", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
string[] leafProperties =
{
"_Leaf_Texture",
"_Leaf_Tiling",
"_Leaf_Offset",
"_Leaf_Metallic",
"_Leaf_Smoothness",
"_Leaf_Base_Color",
"_Leaf_Noise_Color",
"_Leaf_Noise_Large_Color",
"_Leaf_Flat_Color"
};
setProperties(materialEditor, properties, leafProperties, vecGuiProperties);
EditorGUILayout.EndVertical();
#endregion
EditorGUILayout.Separator();
#region Leaf Normals
GUILayout.Label("Leaf Normals", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableLeafNormals = FindProperty("_Enable_Leaf_Normal", properties);
materialEditor.ShaderProperty(enableLeafNormals, "Enable Leaf Normals");
if (enableLeafNormals.floatValue == 1)
{
string[] leafNormals =
{
"_Leaf_Normal",
"_Leaf_Normal_Tiling",
"_Leaf_Normal_Offset",
"_Leaf_Normal_Strength"
};
setProperties(materialEditor, properties, leafNormals, vecGuiProperties);
}
EditorGUILayout.EndVertical();
#endregion
EditorGUILayout.Separator();
#region Leaf AO
GUILayout.Label("Leaf AO", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
string[] leafAO =
{
"_Leaf_Ambient_Occlusion",
"_Leaf_Ambient_Occlusion_Intensity"
};
setProperties(materialEditor, properties, leafAO, vecGuiProperties);
EditorGUILayout.EndVertical();
#endregion
}
#endregion
//Tab 2
#region Trunk Properties
private void DrawTrunkSettings(MaterialEditor materialEditor, MaterialProperty[] properties)
{
GUIStyle backdropStyle = makeBackdrop();
#region Leaf & Trunk Color Noise
GUILayout.Label("Leaf & Trunk Color Noise", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
string[] generalProperties =
{
"_Use_Color_Noise",
"_Color_Noise_Small_Freq",
"_Color_Noise_Large_Freq"
};
setProperties(materialEditor, properties, generalProperties, vecGuiProperties);
EditorGUILayout.EndVertical();
EditorGUILayout.Separator();
#endregion
#region Trunk Base
GUILayout.Label("Trunk Base", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
string[] trunkBase =
{
"_Trunk_Texture",
"_Trunk_Tiling",
"_Trunk_Offset",
"_Trunk_Metallic",
"_Trunk_Smoothness",
"_Trunk_Base_Color",
"_Trunk_Noise_Color",
"_Trunk_Flat_Color_Switch"
};
setProperties(materialEditor, properties, trunkBase, vecGuiProperties);
EditorGUILayout.EndVertical();
#endregion
EditorGUILayout.Separator();
#region Trunk Normals
GUILayout.Label("Trunk Normals", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableTrunkNormals = FindProperty("_Enable_Trunk_Normal", properties);
materialEditor.ShaderProperty(enableTrunkNormals, "Enable Trunk Normals");
if (enableTrunkNormals.floatValue == 1)
{
string[] trunkNormals =
{
"_Trunk_Normal",
"_Trunk_Normal_Tiling",
"_Trunk_Normal_Offset",
"_Trunk_Normal_Strength"
};
setProperties(materialEditor, properties, trunkNormals, vecGuiProperties);
}
EditorGUILayout.EndVertical();
#endregion
EditorGUILayout.Separator();
#region Trunk Emission
GUILayout.Label("Trunk Emission", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
string[] trunkEmmisive =
{
"_Trunk_Emissive_Mask",
"_Trunk_Emissive_Color"
};
setProperties(materialEditor, properties, trunkEmmisive, vecGuiProperties);
EditorGUILayout.EndVertical();
#endregion
EditorGUILayout.Separator();
#region Trunk AO
GUILayout.Label("Trunk AO", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
string[] trunkAO =
{
"_Trunk_Ambient_Occlusion",
"_Trunk_Ambient_Occlusion_Intensity"
};
setProperties(materialEditor, properties, trunkAO, vecGuiProperties);
EditorGUILayout.EndVertical();
#endregion
}
#endregion
//Tab 3
#region Frosting
private void DrawFrostingSettings(MaterialEditor materialEditor, MaterialProperty[] properties)
{
GUIStyle backdropStyle = makeBackdrop();
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableFrosting = FindProperty("_Enable_Frosting", properties);
materialEditor.ShaderProperty(enableFrosting, "Enable Frosting");
if (enableFrosting.floatValue == 1)
{
string[] frosting =
{
"_Frosting_Color",
"_Frosting_Falloff",
"_Frosting_Height",
"_Frosting_Use_World_Normals"
};
setProperties(materialEditor, properties, frosting, vecGuiProperties);
}
EditorGUILayout.EndVertical();
}
#endregion
//Tab 4
#region Emission Properties
private void DrawEmissionSettings(MaterialEditor materialEditor, MaterialProperty[] properties)
{
GUIStyle backdropStyle = makeBackdrop();
#region Emission
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableEmission = FindProperty("_Enable_Emission", properties);
materialEditor.ShaderProperty(enableEmission, "Enable Emission");
if (enableEmission.floatValue == 1)
{
string[] emission =
{
"_Emissive_Color",
"_Emissive_2_Color",
"_Emissive_Mask",
"_Emissive_Mask_Tiling",
"_Emissive_Mask_Offset",
"_Emissive_2_Mask",
"_Emissive_Mask_2_Tiling",
"_Emissive_Mask_2_Offset",
"_Emissive_Amount"
};
setProperties(materialEditor, properties, emission, vecGuiProperties);
}
EditorGUILayout.EndVertical();
#endregion
EditorGUILayout.Separator();
#region Pulse
if (enableEmission.floatValue == 1)
{
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enablePulse = FindProperty("_Enable_Pulse", properties);
materialEditor.ShaderProperty(enablePulse, "Enable Pulse");
if (enablePulse.floatValue == 1)
{
string[] emissionPulse =
{
"_Emissive_Pulse_Map",
"_Pulse_Tiling",
"_Pulse_Speed"
};
setProperties(materialEditor, properties, emissionPulse, vecGuiProperties);
}
EditorGUILayout.EndVertical();
}
#endregion
}
#endregion
//Tab 5
#region Wind
private void DrawWindSettings(MaterialEditor materialEditor, MaterialProperty[] properties)
{
GUIStyle backdropStyle = makeBackdrop();
string[] enableVertexCol =
{
"_Use_Vertex_Color_Wind",
};
EditorGUILayout.BeginVertical(backdropStyle);
setProperties(materialEditor, properties, enableVertexCol, vecGuiProperties);
EditorGUILayout.EndVertical();
EditorGUILayout.Separator();
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty globalWeatherController = FindProperty("_Use_Global_Weather_Controller", properties);
materialEditor.ShaderProperty(globalWeatherController, "Use Global Weather Controller");
//Set if statement here
if (scriptExists)
{
GUILayout.Label("WeatherController found in scene", EditorStyles.boldLabel);
}
else
{
GUI.contentColor = Color.yellow;
GUILayout.Label("Cannot activate until WeatherController in scene", EditorStyles.boldLabel);
GUI.contentColor = Color.white;
globalWeatherController.floatValue = 0f;
}
EditorGUILayout.EndVertical();
EditorGUILayout.Separator();
#region Breeze
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableBreeze = FindProperty("_Enable_Breeze", properties);
materialEditor.ShaderProperty(enableBreeze, "Enable Breeze");
if (enableBreeze.floatValue == 1)
{
string[] enableBreezeProp =
{
"_Breeze_Strength",
};
setProperties(materialEditor, properties, enableBreezeProp, vecGuiProperties);
}
EditorGUILayout.EndVertical();
#endregion
EditorGUILayout.Separator();
#region Light Wind
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableLightWind = FindProperty("_Enable_Light_Wind", properties);
materialEditor.ShaderProperty(enableLightWind, "Enable Light Wind");
if (enableLightWind.floatValue == 1)
{
string[] enableLightWindProp =
{
"_Light_Wind_Strength",
"_Light_Wind_Y_Strength",
"_Light_Wind_Y_Offset",
"_Light_Wind_Use_Leaf_Fade"
};
setProperties(materialEditor, properties, enableLightWindProp, vecGuiProperties);
}
EditorGUILayout.EndVertical();
#endregion
EditorGUILayout.Separator();
#region Strong Wind
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableStrongWind = FindProperty("_Enable_Strong_Wind", properties);
materialEditor.ShaderProperty(enableStrongWind, "Enable Strong Wind");
if (enableStrongWind.floatValue == 1)
{
string[] enableStrongWindProp =
{
"_Strong_Wind_Strength",
"_Strong_Wind_Frequency"
};
setProperties(materialEditor, properties, enableStrongWindProp, vecGuiProperties);
}
EditorGUILayout.EndVertical();
#endregion
EditorGUILayout.Separator();
#region Wind Twist
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableWindTwist = FindProperty("_Enable_Wind_Twist", properties);
materialEditor.ShaderProperty(enableWindTwist, "Enable Wind Twist");
if (enableWindTwist.floatValue == 1)
{
string[] enableWindTwistProp =
{
"_Wind_Twist_Strength",
"_Gale_Bend"
};
setProperties(materialEditor, properties, enableWindTwistProp, vecGuiProperties);
}
EditorGUILayout.EndVertical();
#endregion
}
#endregion
// Build Properties
#region Build Properties
//Gathers list of properties to sort and display in inspector
private static void setProperties(MaterialEditor materialEditor, MaterialProperty[] properties, string[] shaderProperties, Dictionary<string, string> vecGuiProperties)
{
foreach (string property in shaderProperties)
{
MaterialProperty propertyReference = FindProperty(property, properties);
if (vecGuiProperties.ContainsKey(property))
{
string type = vecGuiProperties[property];
if (type == "Vector2")
{
Vector2 vec2Value = new Vector2(propertyReference.vectorValue.x, propertyReference.vectorValue.y);
vec2Value = EditorGUILayout.Vector2Field(propertyReference.displayName, vec2Value);
propertyReference.vectorValue = new Vector4(vec2Value.x, vec2Value.y, 0, 0);
}
else if (type == "Vector3")
{
Vector3 vec3Value = new Vector3(propertyReference.vectorValue.x, propertyReference.vectorValue.y, propertyReference.vectorValue.z);
vec3Value = EditorGUILayout.Vector3Field(propertyReference.displayName, vec3Value);
propertyReference.vectorValue = new Vector4(vec3Value.x, vec3Value.y, vec3Value.z, 0);
}
}
else
{
materialEditor.ShaderProperty(propertyReference, propertyReference.displayName);
}
}
}
#endregion
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d6622224d38129748bb16b565693f72d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,494 @@
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using UnityEngine.Rendering;
public class SyntyGlacier_customGUI : ShaderGUI
{
#region TabProperties
private int selectedTab = 0;
private string[] tabNames = { "Base", "Triplanar", "Refraction"};
/*
private bool showSurfaceType = false;
private bool checkedRenderPipe = false;
private int renderPipeType = 0;*/
/* void CheckRenderPipeline()
{
var pipelineAsset = GraphicsSettings.renderPipelineAsset;
if (pipelineAsset == null)
{
Debug.Log("Using Built-In Render Pipeline (BIRP)");
renderPipeType = 0;
}
else if (pipelineAsset.GetType().Name.Contains("UniversalRenderPipelineAsset"))
{
Debug.Log("Using Universal Render Pipeline (URP)");
renderPipeType = 1;
}
else if (pipelineAsset.GetType().Name.Contains("HDRenderPipelineAsset"))
{
Debug.Log("Using High Definition Render Pipeline (HDRP)");
renderPipeType = 1;
}
else
{
Debug.Log("Using custom render pipeline, falling back to BIRP settings");
renderPipeType = 0;
}
checkedRenderPipe = true;
}*/
//Build Surface Type options URP
/* public void SurfaceOptionsBIRP(MaterialEditor materialEditor)
{
GUIStyle backdropStyle = makeBackdrop();
Material material = materialEditor.target as Material;
if (material != null)
{
EditorGUILayout.LabelField("Surface Options", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
// Surface Type Dropdown
int surfaceType = (int)material.GetFloat("_BUILTIN_Surface");
surfaceType = EditorGUILayout.Popup("Surface Type", surfaceType, new string[] { "Opaque", "Transparent" });
material.SetFloat("_BUILTIN_Surface", surfaceType);
// Transparent
if (surfaceType == 1)
{
material.SetFloat("_BUILTIN_SrcBlend", (float)UnityEngine.Rendering.BlendMode.SrcAlpha);
material.SetFloat("_BUILTIN_DstBlend", (float)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
material.SetFloat("_BUILTIN_ZWrite", 0);
material.EnableKeyword("_ALPHABLEND_ON");
material.EnableKeyword("_ZWRITE_ON");
}
else // Opaque
{
material.SetFloat("_BUILTIN_SrcBlend", (float)UnityEngine.Rendering.BlendMode.One);
material.SetFloat("_BUILTIN_DstBlend", (float)UnityEngine.Rendering.BlendMode.Zero);
material.SetFloat("_BUILTIN_ZWrite", 1);
material.DisableKeyword("_ALPHABLEND_ON");
material.DisableKeyword("_ZWRITE_ON");
}
// Render Face Type
int renderFace = (int)material.GetFloat("_BUILTIN_Cull");
renderFace = EditorGUILayout.Popup("Render Face", renderFace, new string[] { "Both", "Back", "Front" });
material.SetFloat("_BUILTIN_Cull", renderFace);
// Alpha Clipping
bool alphaClip = material.GetFloat("_BUILTIN_AlphaClip") == 1;
alphaClip = EditorGUILayout.Toggle("Alpha Clipping", alphaClip);
material.SetFloat("_BUILTIN_AlphaClip", alphaClip ? 1 : 0);
if (alphaClip)
{
material.EnableKeyword("_ALPHATEST_ON");
}
else
{
material.DisableKeyword("_ALPHATEST_ON");
}
EditorGUILayout.EndVertical();
EditorGUILayout.Separator();
material.shader = Shader.Find(material.shader.name);
}
}
//Build Surface Type options URP
public void SurfaceOptionsURP(MaterialEditor materialEditor)
{
GUIStyle backdropStyle = makeBackdrop();
Material material = materialEditor.target as Material;
if (material != null)
{
EditorGUILayout.LabelField("Surface Options", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
// Surface Type Dropdown
int surfaceType = (int)material.GetFloat("_Surface");
surfaceType = EditorGUILayout.Popup("Surface Type", surfaceType, new string[] { "Opaque", "Transparent" });
material.SetFloat("_Surface", surfaceType);
// Transparent
if (surfaceType == 1)
{
material.SetFloat("_SrcBlend", (float)UnityEngine.Rendering.BlendMode.SrcAlpha);
material.SetFloat("_DstBlend", (float)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
material.SetFloat("_ZWrite", 0);
material.EnableKeyword("_SURFACE_TYPE_TRANSPARENT");
material.EnableKeyword("_ZWRITE_ON");
}
else // Opaque
{
material.SetFloat("_SrcBlend", (float)UnityEngine.Rendering.BlendMode.One);
material.SetFloat("_DstBlend", (float)UnityEngine.Rendering.BlendMode.Zero);
material.SetFloat("_ZWrite", 1);
material.DisableKeyword("_SURFACE_TYPE_TRANSPARENT");
material.DisableKeyword("_ZWRITE_ON");
}
// Render Face Type
int renderFace = (int)material.GetFloat("_Cull");
renderFace = EditorGUILayout.Popup("Render Face", renderFace, new string[] { "Both", "Back", "Front" });
material.SetFloat("_Cull", renderFace);
// Alpha Clipping
bool alphaClip = material.GetFloat("_AlphaClip") == 1;
alphaClip = EditorGUILayout.Toggle("Alpha Clipping", alphaClip);
material.SetFloat("_AlphaClip", alphaClip ? 1 : 0);
material.SetFloat("_AlphaToMask", alphaClip ? 1 : 0);
if (alphaClip)
{
material.EnableKeyword("_ALPHATEST_ON");
material.EnableKeyword("_ALPHABLEND_ON");
}
else
{
material.DisableKeyword("_ALPHATEST_ON");
material.DisableKeyword("_ALPHABLEND_ON");
}
EditorGUILayout.EndVertical();
EditorGUILayout.Separator();
material.shader = Shader.Find(material.shader.name);
}
}*/
//used to setup the tabs and what settings to call
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
{
/* #region Surface Type Properties
//Set Default RenderType's
if (!checkedRenderPipe)
{
Material material = materialEditor.target as Material;
CheckRenderPipeline();
//Set BIRP
if (renderPipeType == 0)
{
//Make transparent
material.SetFloat("_BUILTIN_Surface", 1);
material.SetFloat("_BUILTIN_SrcBlend", (float)UnityEngine.Rendering.BlendMode.SrcAlpha);
material.SetFloat("_BUILTIN_DstBlend", (float)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
material.SetFloat("_BUILTIN_ZWrite", 0);
material.EnableKeyword("_SURFACE_TYPE_TRANSPARENT");
material.EnableKeyword("_ZWRITE_ON");
material.EnableKeyword("_ALPHABLEND_ON");
//alpha clip off
material.SetFloat("_BUILTIN_AlphaClip", 0);
material.DisableKeyword("_ALPHATEST_ON");
//Render both faces
material.SetFloat("_BUILTIN_CullMode", 2);
}
//Set URP
else if (renderPipeType == 1)
{
//Make transparent
material.SetFloat("_Surface", 1);
material.SetFloat("_SrcBlend", (float)UnityEngine.Rendering.BlendMode.SrcAlpha);
material.SetFloat("_DstBlend", (float)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
material.SetFloat("_ZWrite", 0);
material.EnableKeyword("_SURFACE_TYPE_TRANSPARENT");
material.EnableKeyword("_ZWRITE_ON");
material.EnableKeyword("_ALPHABLEND_ON");
//alpha clip off
material.SetFloat("_AlphaClip", 0);
material.SetFloat("_AlphaToMask", 0);
material.DisableKeyword("_ALPHATEST_ON");
//Render both faces
material.SetFloat("_Cull", 2);
}
}
//Manual Options
showSurfaceType = EditorGUILayout.Foldout(showSurfaceType, "Material Override properties");
if (showSurfaceType)
{
//Set BIRP
if (renderPipeType == 0)
{
SurfaceOptionsBIRP(materialEditor);
}
//Set URP
else if (renderPipeType == 1)
{
SurfaceOptionsURP(materialEditor);
}
}
#endregion*/
selectedTab = GUILayout.Toolbar(selectedTab, tabNames);
GUILayout.Space(10);
switch (selectedTab)
{
case 0:
DrawBaseSettings(materialEditor, properties);
break;
case 1:
DrawTriplanarSettings(materialEditor, properties);
break;
case 2:
DrawRefractionSettings(materialEditor, properties);
break;
}
}
#endregion
#region Vector Custom GUI Properties
//dictionary that contains the properties to override GUI for Vector2 + Vector3 elements
Dictionary<string, string> vecGuiProperties = new Dictionary<string, string>
{
{ "_Normal_Offset", "Vector2" },
};
#endregion
#region Gui Backdrops
private static GUIStyle makeBackdrop()
{
GUIStyle backdropStyle = new GUIStyle(GUI.skin.box);
backdropStyle.padding = new RectOffset(10, 10, 10, 10);
backdropStyle.margin = new RectOffset(5, 5, 5, 5);
return backdropStyle;
}
#endregion
//Tab 1
#region Base Color
private void DrawBaseSettings(MaterialEditor materialEditor, MaterialProperty[] properties)
{
GUIStyle backdropStyle = makeBackdrop();
#region Base properties
EditorGUILayout.BeginVertical(backdropStyle);
GUILayout.Label("Base Properties", EditorStyles.boldLabel);
// Add properties here
string[] shaderProperties =
{
"_Base_Color",
"_Metallic",
"_Smoothness",
"_Opacity"
};
setProperties(materialEditor, properties, shaderProperties, vecGuiProperties);
EditorGUILayout.EndVertical();
#endregion
EditorGUILayout.Separator();
#region Fresnel
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableFresnel = FindProperty("_Enable_Side_Fresnel", properties);
materialEditor.ShaderProperty(enableFresnel, "Enable Fresnel");
if (enableFresnel.floatValue == 1)
{
string[] globalFresnelProperties =
{
"_Fresnel_Color",
"_Fresnel_Border",
"_Fresnel_Power"
};
setProperties(materialEditor, properties, globalFresnelProperties, vecGuiProperties);
}
EditorGUILayout.EndVertical();
#endregion
EditorGUILayout.Separator();
#region Depth
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableDepth = FindProperty("_Enable_Depth", properties);
materialEditor.ShaderProperty(enableDepth, "Enable Depth");
if (enableDepth.floatValue == 1)
{
string[] globalDepthProperties =
{
"_Depth_Power_Multiplier",
"_Deep_Color",
"_Deep_Power",
"_Shallow_Color",
"_Shallow_Power"
};
setProperties(materialEditor, properties, globalDepthProperties, vecGuiProperties);
}
EditorGUILayout.EndVertical();
#endregion
}
#endregion
//Tab 2
#region Triplanar Settings
private void DrawTriplanarSettings(MaterialEditor materialEditor, MaterialProperty[] properties)
{
GUIStyle backdropStyle = makeBackdrop();
#region Triplanar
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableTriplanar = FindProperty("_Enable_Triplanar", properties);
materialEditor.ShaderProperty(enableTriplanar, "Enable Triplanar");
if (enableTriplanar.floatValue == 1)
{
string[] globalTriplanarProperties =
{
"_Base_Tiling",
"_Base_Normal_Intensity",
"_Base_Albedo",
"_Base_Color_Multiplier",
"_Base_Normal",
"_Base_Specular_Power",
"_Base_Metallic"
};
setProperties(materialEditor, properties, globalTriplanarProperties, vecGuiProperties);
}
EditorGUILayout.EndVertical();
#endregion
EditorGUILayout.Separator();
#region Top triplanar
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableTopTriplanar = FindProperty("_Enable_Top_Projection", properties);
materialEditor.ShaderProperty(enableTopTriplanar, "Enable Top Triplanar");
if (enableTopTriplanar.floatValue == 1)
{
string[] globalTopTriplanarProperties =
{
"_Top_Tiling",
"_Top_Normal_Intensity",
"_Spread",
"_Fade_Amount",
"_Top_Albedo",
"_Top_Color_Multiplier",
"_Top_Normal",
"_Top_Opacity",
"_Top_Specular_Power",
"_Top_Metallic"
};
setProperties(materialEditor, properties, globalTopTriplanarProperties, vecGuiProperties);
}
EditorGUILayout.EndVertical();
#endregion
}
#endregion
//Tab 3
#region Advanced Settings
private void DrawRefractionSettings(MaterialEditor materialEditor, MaterialProperty[] properties)
{
GUIStyle backdropStyle = makeBackdrop();
#region Refraction
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableRefraction = FindProperty("_Enable_Refraction", properties);
materialEditor.ShaderProperty(enableRefraction, "Enable Refraction");
if (enableRefraction.floatValue == 1)
{
string[] globalRefractionProperties =
{
"_Refraction_Texture",
"_Refraction_Height",
"_Refraction_Color",
"_Refraction_Power",
"_Steps",
"_Amplitude",
"_Refraction_Tiling"
};
setProperties(materialEditor, properties, globalRefractionProperties, vecGuiProperties);
}
EditorGUILayout.EndVertical();
#endregion
EditorGUILayout.Separator();
#region Depth Distortion
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableDistortion = FindProperty("_Inner_Distortion", properties);
materialEditor.ShaderProperty(enableDistortion, "Enable Distortion");
if (enableDistortion.floatValue == 1)
{
string[] globalDistortionProperties =
{
"_Noise_Tiling",
"_Inner_Distortion_Power"
};
setProperties(materialEditor, properties, globalDistortionProperties, vecGuiProperties);
}
EditorGUILayout.EndVertical();
#endregion
}
#endregion
// Build Properties
#region Build Properties
//Gathers list of properties to sort and display in inspector
private static void setProperties(MaterialEditor materialEditor, MaterialProperty[] properties, string[] shaderProperties, Dictionary<string, string> vecGuiProperties)
{
foreach (string property in shaderProperties)
{
MaterialProperty propertyReference = FindProperty(property, properties);
if (vecGuiProperties.ContainsKey(property))
{
string type = vecGuiProperties[property];
if (type == "Vector2")
{
Vector2 vec2Value = new Vector2(propertyReference.vectorValue.x, propertyReference.vectorValue.y);
vec2Value = EditorGUILayout.Vector2Field(propertyReference.displayName, vec2Value);
propertyReference.vectorValue = new Vector4(vec2Value.x, vec2Value.y, 0, 0);
}
else if (type == "Vector3")
{
Vector3 vec3Value = new Vector3(propertyReference.vectorValue.x, propertyReference.vectorValue.y, propertyReference.vectorValue.z);
vec3Value = EditorGUILayout.Vector3Field(propertyReference.displayName, vec3Value);
propertyReference.vectorValue = new Vector4(vec3Value.x, vec3Value.y, vec3Value.z, 0);
}
}
else
{
materialEditor.ShaderProperty(propertyReference, propertyReference.displayName);
}
}
}
#endregion
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2f8a3e1b794877e48af79693f41b79d5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,368 @@
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using UnityEngine.Rendering;
public class SyntyPannerOpaque_customGUI : ShaderGUI
{
#region Vector Custom GUI Properties
//dictionary that contains the properties to override GUI for Vector2 + Vector3 elements
Dictionary<string, string> vecGuiProperties = new Dictionary<string, string>
{
{ "_Tiling", "Vector2" },
{ "_Offset", "Vector2" }
};
#endregion
#region Gui Backdrops
private static GUIStyle makeBackdrop()
{
GUIStyle backdropStyle = new GUIStyle(GUI.skin.box);
backdropStyle.padding = new RectOffset(10, 10, 10, 10);
backdropStyle.margin = new RectOffset(5, 5, 5, 5);
return backdropStyle;
}
#endregion
#region TabProperties
private int selectedTab = 0;
private string[] tabNames = { "Base", "Advanced" };
private bool showSurfaceType = false;
private bool checkedRenderPipe = false;
private int renderPipeType = 0;
void CheckRenderPipeline()
{
var pipelineAsset = GraphicsSettings.defaultRenderPipeline;
if (pipelineAsset == null)
{
Debug.Log("Using Built-In Render Pipeline (BIRP)");
renderPipeType = 0;
}
else if (pipelineAsset.GetType().Name.Contains("UniversalRenderPipelineAsset"))
{
Debug.Log("Using Universal Render Pipeline (URP)");
renderPipeType = 1;
}
else if (pipelineAsset.GetType().Name.Contains("HDRenderPipelineAsset"))
{
Debug.Log("Using High Definition Render Pipeline (HDRP)");
renderPipeType = 1;
}
else
{
Debug.Log("Using custom render pipeline, falling back to BIRP settings");
renderPipeType = 0;
}
checkedRenderPipe = true;
}
//Build Surface Type options URP
public void SurfaceOptionsBIRP(MaterialEditor materialEditor)
{
GUIStyle backdropStyle = makeBackdrop();
Material material = materialEditor.target as Material;
if (material != null)
{
EditorGUILayout.LabelField("Surface Options", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
// Surface Type Dropdown
int surfaceType = (int)material.GetFloat("_BUILTIN_Surface");
surfaceType = EditorGUILayout.Popup("Surface Type", surfaceType, new string[] { "Opaque", "Transparent" });
material.SetFloat("_BUILTIN_Surface", surfaceType);
// Transparent
if (surfaceType == 1)
{
material.SetFloat("_BUILTIN_SrcBlend", (float)UnityEngine.Rendering.BlendMode.SrcAlpha);
material.SetFloat("_BUILTIN_DstBlend", (float)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
material.SetFloat("_BUILTIN_ZWrite", 0);
material.EnableKeyword("_ALPHABLEND_ON");
material.EnableKeyword("_ZWRITE_ON");
}
else // Opaque
{
material.SetFloat("_BUILTIN_SrcBlend", (float)UnityEngine.Rendering.BlendMode.One);
material.SetFloat("_BUILTIN_DstBlend", (float)UnityEngine.Rendering.BlendMode.Zero);
material.SetFloat("_BUILTIN_ZWrite", 1);
material.DisableKeyword("_ALPHABLEND_ON");
material.DisableKeyword("_ZWRITE_ON");
}
// Render Face Type
int renderFace = (int)material.GetFloat("_BUILTIN_Cull");
renderFace = EditorGUILayout.Popup("Render Face", renderFace, new string[] { "Both", "Back", "Front" });
material.SetFloat("_BUILTIN_Cull", renderFace);
// Alpha Clipping
bool alphaClip = material.GetFloat("_BUILTIN_AlphaClip") == 1;
alphaClip = EditorGUILayout.Toggle("Alpha Clipping", alphaClip);
material.SetFloat("_BUILTIN_AlphaClip", alphaClip ? 1 : 0);
if (alphaClip)
{
material.EnableKeyword("_ALPHATEST_ON");
}
else
{
material.DisableKeyword("_ALPHATEST_ON");
}
EditorGUILayout.EndVertical();
EditorGUILayout.Separator();
material.shader = Shader.Find(material.shader.name);
}
}
//Build Surface Type options URP
public void SurfaceOptionsURP(MaterialEditor materialEditor)
{
GUIStyle backdropStyle = makeBackdrop();
Material material = materialEditor.target as Material;
if (material != null)
{
EditorGUILayout.LabelField("Surface Options", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
// Surface Type Dropdown
int surfaceType = (int)material.GetFloat("_Surface");
surfaceType = EditorGUILayout.Popup("Surface Type", surfaceType, new string[] { "Opaque", "Transparent" });
material.SetFloat("_Surface", surfaceType);
// Transparent
if (surfaceType == 1)
{
material.SetFloat("_SrcBlend", (float)UnityEngine.Rendering.BlendMode.SrcAlpha);
material.SetFloat("_DstBlend", (float)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
material.SetFloat("_ZWrite", 0);
material.EnableKeyword("_SURFACE_TYPE_TRANSPARENT");
material.EnableKeyword("_ZWRITE_ON");
}
else // Opaque
{
material.SetFloat("_SrcBlend", (float)UnityEngine.Rendering.BlendMode.One);
material.SetFloat("_DstBlend", (float)UnityEngine.Rendering.BlendMode.Zero);
material.SetFloat("_ZWrite", 1);
material.DisableKeyword("_SURFACE_TYPE_TRANSPARENT");
material.DisableKeyword("_ZWRITE_ON");
}
// Render Face Type
int renderFace = (int)material.GetFloat("_Cull");
renderFace = EditorGUILayout.Popup("Render Face", renderFace, new string[] { "Both", "Back", "Front" });
material.SetFloat("_Cull", renderFace);
// Alpha Clipping
bool alphaClip = material.GetFloat("_AlphaClip") == 1;
alphaClip = EditorGUILayout.Toggle("Alpha Clipping", alphaClip);
material.SetFloat("_AlphaClip", alphaClip ? 1 : 0);
material.SetFloat("_AlphaToMask", alphaClip ? 1 : 0);
if (alphaClip)
{
material.EnableKeyword("_ALPHATEST_ON");
material.EnableKeyword("_ALPHABLEND_ON");
}
else
{
material.DisableKeyword("_ALPHATEST_ON");
material.DisableKeyword("_ALPHABLEND_ON");
}
EditorGUILayout.EndVertical();
EditorGUILayout.Separator();
material.shader = Shader.Find(material.shader.name);
}
}
//used to setup the tabs and what settings to call
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
{
#region Surface Type Properties
//Set Default RenderType's
if (!checkedRenderPipe)
{
Material material = materialEditor.target as Material;
CheckRenderPipeline();
//Set BIRP
if (renderPipeType == 0)
{
//Make opaque
material.SetFloat("_BUILTIN_SrcBlend", (float)UnityEngine.Rendering.BlendMode.One);
material.SetFloat("_BUILTIN_DstBlend", (float)UnityEngine.Rendering.BlendMode.Zero);
material.SetFloat("_BUILTIN_ZWrite", 1);
material.DisableKeyword("_ZWRITE_ON");
//alpha clip on
material.SetFloat("_BUILTIN_AlphaClip", 1);
material.EnableKeyword("_ALPHATEST_ON");
//Render both faces
material.SetFloat("_BUILTIN_Cull", 0);
}
//Set URP
else if (renderPipeType == 1)
{
//Make opaque
material.SetFloat("_SrcBlend", (float)UnityEngine.Rendering.BlendMode.One);
material.SetFloat("_DstBlend", (float)UnityEngine.Rendering.BlendMode.Zero);
material.SetFloat("_ZWrite", 1);
material.DisableKeyword("_SURFACE_TYPE_TRANSPARENT");
material.DisableKeyword("_ZWRITE_ON");
//alpha clip on
material.SetFloat("_AlphaClip", 1);
material.SetFloat("_AlphaToMask", 1);
material.EnableKeyword("_ALPHATEST_ON");
//Render both faces
material.SetFloat("_Cull", 0);
}
}
//Manual Options
showSurfaceType = EditorGUILayout.Foldout(showSurfaceType, "Material Override properties");
if (showSurfaceType)
{
//Set BIRP
if (renderPipeType == 0)
{
SurfaceOptionsBIRP(materialEditor);
}
//Set URP
else if (renderPipeType == 1)
{
SurfaceOptionsURP(materialEditor);
}
}
#endregion
selectedTab = GUILayout.Toolbar(selectedTab, tabNames);
GUILayout.Space(10);
switch (selectedTab)
{
case 0:
DrawBaseSettings(materialEditor, properties);
break;
case 1:
DrawAdvancedSettings(materialEditor, properties);
break;
}
}
#endregion
#region Base Color
private void DrawBaseSettings(MaterialEditor materialEditor, MaterialProperty[] properties)
{
GUIStyle backdropStyle = makeBackdrop();
GUILayout.Label("Base Properties", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
string[] baseProperties =
{
"_Albedo_Map",
"_Albedo_Tint",
"_Normal_Map",
"_Normal_Intensity",
"_Emission_Map",
"_Emission_Tint",
"_Emission_Intensity",
"_Metallic",
"_Smoothness",
"_Tiling",
"_Offset"
};
setProperties(materialEditor, properties, baseProperties, vecGuiProperties);
EditorGUILayout.EndVertical();
EditorGUILayout.Separator();
GUILayout.Label("Scrolling", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
string[] scrollProperties =
{
"_Speed_X",
"_Speed_Y"
};
setProperties(materialEditor, properties, scrollProperties, vecGuiProperties);
EditorGUILayout.EndVertical();
}
#endregion
#region Advanced
private void DrawAdvancedSettings(MaterialEditor materialEditor, MaterialProperty[] properties)
{
GUIStyle backdropStyle = makeBackdrop();
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableUVDistortion = FindProperty("_Enable_UV_Distortion", properties);
materialEditor.ShaderProperty(enableUVDistortion, "Enable UV Noise");
if (enableUVDistortion.floatValue == 1)
{
string[] globalUVNoiseProperties =
{
"_Use_Texture",
"_Distortion_Map",
"_Distortion_Size",
"_Distortion_Speed",
"_Distortion_Strength"
};
setProperties(materialEditor, properties, globalUVNoiseProperties, vecGuiProperties);
}
EditorGUILayout.EndVertical();
}
#endregion
#region Build Properties
//Gathers list of properties to sort and display in inspector
private static void setProperties(MaterialEditor materialEditor, MaterialProperty[] properties, string[] shaderProperties, Dictionary<string, string> vecGuiProperties)
{
foreach (string property in shaderProperties)
{
MaterialProperty propertyReference = FindProperty(property, properties);
if (vecGuiProperties.ContainsKey(property))
{
string type = vecGuiProperties[property];
if (type == "Vector2")
{
Vector2 vec2Value = new Vector2(propertyReference.vectorValue.x, propertyReference.vectorValue.y);
vec2Value = EditorGUILayout.Vector2Field(propertyReference.displayName, vec2Value);
propertyReference.vectorValue = new Vector4(vec2Value.x, vec2Value.y, 0, 0);
}
else if (type == "Vector3")
{
Vector3 vec3Value = new Vector3(propertyReference.vectorValue.x, propertyReference.vectorValue.y, propertyReference.vectorValue.z);
vec3Value = EditorGUILayout.Vector3Field(propertyReference.displayName, vec3Value);
propertyReference.vectorValue = new Vector4(vec3Value.x, vec3Value.y, vec3Value.z, 0);
}
}
else
{
materialEditor.ShaderProperty(propertyReference, propertyReference.displayName);
}
}
}
#endregion
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: bb43379cac175074abf96ac2ba4fbba8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,396 @@
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using UnityEngine.Rendering;
public class SyntyPannerTransparent_customGUI : ShaderGUI
{
#region Vector Custom GUI Properties
//dictionary that contains the properties to override GUI for Vector2 + Vector3 elements
Dictionary<string, string> vecGuiProperties = new Dictionary<string, string>
{
{ "_Tiling", "Vector2" },
{ "_Offset", "Vector2" }
};
#endregion
#region Gui Backdrops
private static GUIStyle makeBackdrop()
{
GUIStyle backdropStyle = new GUIStyle(GUI.skin.box);
backdropStyle.padding = new RectOffset(10, 10, 10, 10);
backdropStyle.margin = new RectOffset(5, 5, 5, 5);
return backdropStyle;
}
#endregion
#region TabProperties
private int selectedTab = 0;
private string[] tabNames = { "Base", "Advanced" };
private bool showSurfaceType = false;
private bool checkedRenderPipe = false;
private int renderPipeType = 0;
void CheckRenderPipeline()
{
var pipelineAsset = GraphicsSettings.defaultRenderPipeline;
if (pipelineAsset == null)
{
Debug.Log("Using Built-In Render Pipeline (BIRP)");
renderPipeType = 0;
}
else if (pipelineAsset.GetType().Name.Contains("UniversalRenderPipelineAsset"))
{
Debug.Log("Using Universal Render Pipeline (URP)");
renderPipeType = 1;
}
else if (pipelineAsset.GetType().Name.Contains("HDRenderPipelineAsset"))
{
Debug.Log("Using High Definition Render Pipeline (HDRP)");
renderPipeType = 1;
}
else
{
Debug.Log("Using custom render pipeline, falling back to BIRP settings");
renderPipeType = 0;
}
checkedRenderPipe = true;
}
//Build Surface Type options URP
public void SurfaceOptionsBIRP(MaterialEditor materialEditor)
{
GUIStyle backdropStyle = makeBackdrop();
Material material = materialEditor.target as Material;
if (material != null)
{
EditorGUILayout.LabelField("Surface Options", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
// Surface Type Dropdown
int surfaceType = (int)material.GetFloat("_BUILTIN_Surface");
surfaceType = EditorGUILayout.Popup("Surface Type", surfaceType, new string[] { "Opaque", "Transparent" });
material.SetFloat("_BUILTIN_Surface", surfaceType);
// Transparent
if (surfaceType == 1)
{
material.SetFloat("_BUILTIN_SrcBlend", (float)UnityEngine.Rendering.BlendMode.SrcAlpha);
material.SetFloat("_BUILTIN_DstBlend", (float)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
material.SetFloat("_BUILTIN_ZWrite", 0);
material.EnableKeyword("_ALPHABLEND_ON");
material.EnableKeyword("_ZWRITE_ON");
}
else // Opaque
{
material.SetFloat("_BUILTIN_SrcBlend", (float)UnityEngine.Rendering.BlendMode.One);
material.SetFloat("_BUILTIN_DstBlend", (float)UnityEngine.Rendering.BlendMode.Zero);
material.SetFloat("_BUILTIN_ZWrite", 1);
material.DisableKeyword("_ALPHABLEND_ON");
material.DisableKeyword("_ZWRITE_ON");
}
// Render Face Type
int renderFace = (int)material.GetFloat("_BUILTIN_Cull");
renderFace = EditorGUILayout.Popup("Render Face", renderFace, new string[] { "Both", "Back", "Front" });
material.SetFloat("_BUILTIN_Cull", renderFace);
// Alpha Clipping
bool alphaClip = material.GetFloat("_BUILTIN_AlphaClip") == 1;
alphaClip = EditorGUILayout.Toggle("Alpha Clipping", alphaClip);
material.SetFloat("_BUILTIN_AlphaClip", alphaClip ? 1 : 0);
if (alphaClip)
{
material.EnableKeyword("_ALPHATEST_ON");
}
else
{
material.DisableKeyword("_ALPHATEST_ON");
}
EditorGUILayout.EndVertical();
EditorGUILayout.Separator();
material.shader = Shader.Find(material.shader.name);
}
}
//Build Surface Type options URP
public void SurfaceOptionsURP(MaterialEditor materialEditor)
{
GUIStyle backdropStyle = makeBackdrop();
Material material = materialEditor.target as Material;
if (material != null)
{
EditorGUILayout.LabelField("Surface Options", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
// Surface Type Dropdown
int surfaceType = (int)material.GetFloat("_Surface");
surfaceType = EditorGUILayout.Popup("Surface Type", surfaceType, new string[] { "Opaque", "Transparent" });
material.SetFloat("_Surface", surfaceType);
// Transparent
if (surfaceType == 1)
{
material.SetFloat("_SrcBlend", (float)UnityEngine.Rendering.BlendMode.SrcAlpha);
material.SetFloat("_DstBlend", (float)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
material.SetFloat("_ZWrite", 0);
material.EnableKeyword("_SURFACE_TYPE_TRANSPARENT");
material.EnableKeyword("_ZWRITE_ON");
}
else // Opaque
{
material.SetFloat("_SrcBlend", (float)UnityEngine.Rendering.BlendMode.One);
material.SetFloat("_DstBlend", (float)UnityEngine.Rendering.BlendMode.Zero);
material.SetFloat("_ZWrite", 1);
material.DisableKeyword("_SURFACE_TYPE_TRANSPARENT");
material.DisableKeyword("_ZWRITE_ON");
}
// Render Face Type
int renderFace = (int)material.GetFloat("_Cull");
renderFace = EditorGUILayout.Popup("Render Face", renderFace, new string[] { "Both", "Back", "Front" });
material.SetFloat("_Cull", renderFace);
// Alpha Clipping
bool alphaClip = material.GetFloat("_AlphaClip") == 1;
alphaClip = EditorGUILayout.Toggle("Alpha Clipping", alphaClip);
material.SetFloat("_AlphaClip", alphaClip ? 1 : 0);
material.SetFloat("_AlphaToMask", alphaClip ? 1 : 0);
if (alphaClip)
{
material.EnableKeyword("_ALPHATEST_ON");
material.EnableKeyword("_ALPHABLEND_ON");
}
else
{
material.DisableKeyword("_ALPHATEST_ON");
material.DisableKeyword("_ALPHABLEND_ON");
}
EditorGUILayout.EndVertical();
EditorGUILayout.Separator();
material.shader = Shader.Find(material.shader.name);
}
}
//used to setup the tabs and what settings to call
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
{
#region Surface Type Properties
//Set Default RenderType's
if (!checkedRenderPipe)
{
Material material = materialEditor.target as Material;
CheckRenderPipeline();
//Set BIRP
if (renderPipeType == 0)
{
//Make transparent
material.SetFloat("_BUILTIN_Surface", 1);
material.SetFloat("_BUILTIN_SrcBlend", (float)UnityEngine.Rendering.BlendMode.SrcAlpha);
material.SetFloat("_BUILTIN_DstBlend", (float)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
material.SetFloat("_BUILTIN_ZWrite", 0);
material.EnableKeyword("_SURFACE_TYPE_TRANSPARENT");
material.EnableKeyword("_ZWRITE_ON");
material.EnableKeyword("_ALPHABLEND_ON");
//alpha clip off
material.SetFloat("_BUILTIN_AlphaClip", 0);
material.DisableKeyword("_ALPHATEST_ON");
//Render both faces
material.SetFloat("_BUILTIN_CullMode", 2);
}
//Set URP
else if (renderPipeType == 1)
{
//Make transparent
material.SetFloat("_Surface", 1);
material.SetFloat("_SrcBlend", (float)UnityEngine.Rendering.BlendMode.SrcAlpha);
material.SetFloat("_DstBlend", (float)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
material.SetFloat("_ZWrite", 0);
material.EnableKeyword("_SURFACE_TYPE_TRANSPARENT");
material.EnableKeyword("_ZWRITE_ON");
material.EnableKeyword("_ALPHABLEND_ON");
//alpha clip off
material.SetFloat("_AlphaClip", 0);
material.SetFloat("_AlphaToMask", 0);
material.DisableKeyword("_ALPHATEST_ON");
//Render both faces
material.SetFloat("_Cull", 2);
}
}
//Manual Options
showSurfaceType = EditorGUILayout.Foldout(showSurfaceType, "Material Override properties");
if (showSurfaceType)
{
//Set BIRP
if (renderPipeType == 0)
{
SurfaceOptionsBIRP(materialEditor);
}
//Set URP
else if (renderPipeType == 1)
{
SurfaceOptionsURP(materialEditor);
}
}
#endregion
selectedTab = GUILayout.Toolbar(selectedTab, tabNames);
GUILayout.Space(10);
switch (selectedTab)
{
case 0:
DrawBaseSettings(materialEditor, properties);
break;
case 1:
DrawAdvancedSettings(materialEditor, properties);
break;
}
}
#endregion
#region Base Color
private void DrawBaseSettings(MaterialEditor materialEditor, MaterialProperty[] properties)
{
GUIStyle backdropStyle = makeBackdrop();
GUILayout.Label("Base Properties", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
string[] baseProperties =
{
"_Albedo_Map",
"_Albedo_Tint",
"_Normal_Map",
"_Normal_Intensity",
"_Emission_Map",
"_Emission_Tint",
"_Emission_Intensity",
"_Opacity_Map",
"_Opacity_Base",
"_Opacity_Map_Multiplier",
"_Metallic",
"_Smoothness",
"_Tiling",
"_Offset"
};
setProperties(materialEditor, properties, baseProperties, vecGuiProperties);
EditorGUILayout.EndVertical();
EditorGUILayout.Separator();
GUILayout.Label("Scrolling", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
string[] scrollProperties =
{
"_Speed_X",
"_Speed_Y"
};
setProperties(materialEditor, properties, scrollProperties, vecGuiProperties);
EditorGUILayout.EndVertical();
}
#endregion
#region Advanced
private void DrawAdvancedSettings(MaterialEditor materialEditor, MaterialProperty[] properties)
{
GUIStyle backdropStyle = makeBackdrop();
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableUVDistortion = FindProperty("_Enable_UV_Distortion", properties);
materialEditor.ShaderProperty(enableUVDistortion, "Enable UV Noise");
if (enableUVDistortion.floatValue == 1)
{
string[] globalUVNoiseProperties =
{
"_Use_Texture",
"_Distortion_Map",
"_Distortion_Size",
"_Distortion_Speed",
"_Distortion_Strength"
};
setProperties(materialEditor, properties, globalUVNoiseProperties, vecGuiProperties);
}
EditorGUILayout.EndVertical();
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableEdgeSpeed = FindProperty("_Enable_Edge_Speed", properties);
materialEditor.ShaderProperty(enableEdgeSpeed, "Enable Edge Distortion");
if (enableEdgeSpeed.floatValue == 1)
{
string[] globalEdgeProperties =
{
"_Edge_Depth",
"_Edge_Strength",
"_Edge_Distortion_Intensity"
};
setProperties(materialEditor, properties, globalEdgeProperties, vecGuiProperties);
}
EditorGUILayout.EndVertical();
}
#endregion
#region Build Properties
//Gathers list of properties to sort and display in inspector
private static void setProperties(MaterialEditor materialEditor, MaterialProperty[] properties, string[] shaderProperties, Dictionary<string, string> vecGuiProperties)
{
foreach (string property in shaderProperties)
{
MaterialProperty propertyReference = FindProperty(property, properties);
if (vecGuiProperties.ContainsKey(property))
{
string type = vecGuiProperties[property];
if (type == "Vector2")
{
Vector2 vec2Value = new Vector2(propertyReference.vectorValue.x, propertyReference.vectorValue.y);
vec2Value = EditorGUILayout.Vector2Field(propertyReference.displayName, vec2Value);
propertyReference.vectorValue = new Vector4(vec2Value.x, vec2Value.y, 0, 0);
}
else if (type == "Vector3")
{
Vector3 vec3Value = new Vector3(propertyReference.vectorValue.x, propertyReference.vectorValue.y, propertyReference.vectorValue.z);
vec3Value = EditorGUILayout.Vector3Field(propertyReference.displayName, vec3Value);
propertyReference.vectorValue = new Vector4(vec3Value.x, vec3Value.y, vec3Value.z, 0);
}
}
else
{
materialEditor.ShaderProperty(propertyReference, propertyReference.displayName);
}
}
}
#endregion
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 27d2f1849d7ae844e95bc1a13b32f6e6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,627 @@
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using UnityEngine.Rendering;
public class SyntyWater_customGUI : ShaderGUI
{
#region TabProperties
private int selectedTab = 0;
private string[] tabNames = { "Base", "Shore Foam", "Global Foam", "Waves", "Advanced" };
private bool showSurfaceType = false;
private bool checkedRenderPipe = false;
private int renderPipeType = 0;
void CheckRenderPipeline()
{
var pipelineAsset = GraphicsSettings.defaultRenderPipeline;
if (pipelineAsset == null)
{
Debug.Log("Using Built-In Render Pipeline (BIRP)");
renderPipeType = 0;
}
else if (pipelineAsset.GetType().Name.Contains("UniversalRenderPipelineAsset"))
{
Debug.Log("Using Universal Render Pipeline (URP)");
renderPipeType = 1;
}
else if (pipelineAsset.GetType().Name.Contains("HDRenderPipelineAsset"))
{
Debug.Log("Using High Definition Render Pipeline (HDRP)");
renderPipeType = 1;
}
else
{
Debug.Log("Using custom render pipeline, falling back to BIRP settings");
renderPipeType = 0;
}
checkedRenderPipe = true;
}
//Build Surface Type options URP
public void SurfaceOptionsBIRP(MaterialEditor materialEditor)
{
GUIStyle backdropStyle = makeBackdrop();
Material material = materialEditor.target as Material;
if (material != null)
{
EditorGUILayout.LabelField("Surface Options", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
// Surface Type Dropdown
int surfaceType = (int)material.GetFloat("_BUILTIN_Surface");
surfaceType = EditorGUILayout.Popup("Surface Type", surfaceType, new string[] { "Opaque", "Transparent" });
material.SetFloat("_BUILTIN_Surface", surfaceType);
// Transparent
if (surfaceType == 1)
{
material.SetFloat("_BUILTIN_SrcBlend", (float)UnityEngine.Rendering.BlendMode.SrcAlpha);
material.SetFloat("_BUILTIN_DstBlend", (float)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
material.SetFloat("_BUILTIN_ZWrite", 0);
material.EnableKeyword("_ALPHABLEND_ON");
material.EnableKeyword("_ZWRITE_ON");
material.EnableKeyword("_BUILTIN_SURFACE_TYPE_TRANSPARENT");
}
else // Opaque
{
material.SetFloat("_BUILTIN_SrcBlend", (float)UnityEngine.Rendering.BlendMode.One);
material.SetFloat("_BUILTIN_DstBlend", (float)UnityEngine.Rendering.BlendMode.Zero);
material.SetFloat("_BUILTIN_ZWrite", 1);
material.DisableKeyword("_ALPHABLEND_ON");
material.DisableKeyword("_ZWRITE_ON");
material.DisableKeyword("_BUILTIN_SURFACE_TYPE_TRANSPARENT");
}
// Render Face Type
int renderFace = (int)material.GetFloat("_BUILTIN_CullMode");
renderFace = EditorGUILayout.Popup("Render Face", renderFace, new string[] { "Both", "Back", "Front" });
material.SetFloat("_BUILTIN_CullMode", renderFace);
// Alpha Clipping
bool alphaClip = material.GetFloat("_BUILTIN_AlphaClip") == 1;
alphaClip = EditorGUILayout.Toggle("Alpha Clipping", alphaClip);
material.SetFloat("_BUILTIN_AlphaClip", alphaClip ? 1 : 0);
if (alphaClip)
{
material.EnableKeyword("_ALPHATEST_ON");
}
else
{
material.DisableKeyword("_ALPHATEST_ON");
}
EditorGUILayout.EndVertical();
EditorGUILayout.Separator();
}
}
//Build Surface Type options URP
public void SurfaceOptionsURP(MaterialEditor materialEditor)
{
GUIStyle backdropStyle = makeBackdrop();
Material material = materialEditor.target as Material;
if (material != null)
{
EditorGUILayout.LabelField("Surface Options", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
// Surface Type Dropdown
int surfaceType = (int)material.GetFloat("_Surface");
surfaceType = EditorGUILayout.Popup("Surface Type", surfaceType, new string[] { "Opaque", "Transparent" });
material.SetFloat("_Surface", surfaceType);
// Transparent
if (surfaceType == 1)
{
material.SetFloat("_SrcBlend", (float)UnityEngine.Rendering.BlendMode.SrcAlpha);
material.SetFloat("_DstBlend", (float)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
material.SetFloat("_ZWrite", 0);
material.EnableKeyword("_SURFACE_TYPE_TRANSPARENT");
material.EnableKeyword("_ZWRITE_ON");
}
else // Opaque
{
material.SetFloat("_SrcBlend", (float)UnityEngine.Rendering.BlendMode.One);
material.SetFloat("_DstBlend", (float)UnityEngine.Rendering.BlendMode.Zero);
material.SetFloat("_ZWrite", 1);
material.DisableKeyword("_SURFACE_TYPE_TRANSPARENT");
material.DisableKeyword("_ZWRITE_ON");
}
// Render Face Type
int renderFace = (int)material.GetFloat("_Cull");
renderFace = EditorGUILayout.Popup("Render Face", renderFace, new string[] { "Both", "Back", "Front" });
material.SetFloat("_Cull", renderFace);
// Alpha Clipping
bool alphaClip = material.GetFloat("_AlphaClip") == 1;
alphaClip = EditorGUILayout.Toggle("Alpha Clipping", alphaClip);
material.SetFloat("_AlphaClip", alphaClip ? 1 : 0);
material.SetFloat("_AlphaToMask", alphaClip ? 1 : 0);
if (alphaClip)
{
material.EnableKeyword("_ALPHATEST_ON");
material.EnableKeyword("_ALPHABLEND_ON");
}
else
{
material.DisableKeyword("_ALPHATEST_ON");
material.DisableKeyword("_ALPHABLEND_ON");
}
EditorGUILayout.EndVertical();
EditorGUILayout.Separator();
material.shader = Shader.Find(material.shader.name);
}
}
//used to setup the tabs and what settings to call
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
{
#region Surface Type Properties
//Set Default RenderType's
if (!checkedRenderPipe)
{
Material material = materialEditor.target as Material;
CheckRenderPipeline();
//Set BIRP
if (renderPipeType == 0)
{
//Make transparent
material.SetFloat("_BUILTIN_Surface", 1);
material.SetFloat("_BUILTIN_SrcBlend", (float)UnityEngine.Rendering.BlendMode.SrcAlpha);
material.SetFloat("_BUILTIN_DstBlend", (float)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
material.SetFloat("_BUILTIN_ZWrite", 0);
material.EnableKeyword("_BUILTIN_SURFACE_TYPE_TRANSPARENT");
material.EnableKeyword("_ZWRITE_ON");
material.EnableKeyword("_ALPHABLEND_ON");
//alpha clip off
material.SetFloat("_BUILTIN_AlphaClip", 0);
material.DisableKeyword("_ALPHATEST_ON");
//Render both faces
material.SetFloat("_BUILTIN_CullMode", 2);
}
//Set URP
else if (renderPipeType == 1)
{
//Make transparent
material.SetFloat("_Surface", 1);
material.SetFloat("_SrcBlend", (float)UnityEngine.Rendering.BlendMode.SrcAlpha);
material.SetFloat("_DstBlend", (float)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
material.SetFloat("_ZWrite", 0);
material.EnableKeyword("_SURFACE_TYPE_TRANSPARENT");
material.EnableKeyword("_ZWRITE_ON");
material.EnableKeyword("_ALPHABLEND_ON");
//alpha clip off
material.SetFloat("_AlphaClip", 0);
material.SetFloat("_AlphaToMask", 0);
material.DisableKeyword("_ALPHATEST_ON");
//Render both faces
material.SetFloat("_Cull", 2);
}
}
//Manual Options
showSurfaceType = EditorGUILayout.Foldout(showSurfaceType, "Material Override properties");
if (showSurfaceType)
{
//Set BIRP
if (renderPipeType == 0)
{
SurfaceOptionsBIRP(materialEditor);
}
//Set URP
else if (renderPipeType == 1)
{
SurfaceOptionsURP(materialEditor);
}
}
#endregion
selectedTab = GUILayout.Toolbar(selectedTab, tabNames);
GUILayout.Space(10);
switch (selectedTab)
{
case 0:
DrawBaseSettings(materialEditor, properties);
break;
case 1:
DrawShoreFoamSettings(materialEditor, properties);
break;
case 2:
DrawGlobalFoamSettings(materialEditor, properties);
break;
case 3:
DrawWaveSettings(materialEditor, properties);
break;
case 4:
DrawAdvancedSettings(materialEditor, properties);
break;
}
}
#endregion
#region Vector Custom GUI Properties
//dictionary that contains the properties to override GUI for Vector2 + Vector3 elements
Dictionary<string, string> vecGuiProperties = new Dictionary<string, string>
{
{ "_Normal_Offset", "Vector2" },
{ "_Scrolling_Texture_Direction", "Vector2" },
{ "_Scrolling_Texture_Tiling", "Vector2" },
{ "_Distortion_Direction", "Vector2" }
};
#endregion
#region Gui Backdrops
private static GUIStyle makeBackdrop()
{
GUIStyle backdropStyle = new GUIStyle(GUI.skin.box);
backdropStyle.padding = new RectOffset(10, 10, 10, 10);
backdropStyle.margin = new RectOffset(5, 5, 5, 5);
return backdropStyle;
}
#endregion
//Tab 1
#region Base Properties
bool showNormalSettings = true;
private void DrawBaseSettings(MaterialEditor materialEditor, MaterialProperty[] properties)
{
GUIStyle backdropStyle = makeBackdrop();
EditorGUILayout.BeginVertical(backdropStyle);
#region Base Properties
GUILayout.Label("Base Properties", EditorStyles.boldLabel);
// Add properties here
string[] shaderProperties =
{
"_Smoothness",
"_Metallic",
"_Base_Opacity",
"_Shallows_Opacity",
"_Shallow_Color",
"_Deep_Color",
"_Very_Deep_Color",
"_Deep_Height",
"_Very_Deep_Height"
};
setProperties(materialEditor, properties, shaderProperties, vecGuiProperties);
EditorGUILayout.EndVertical();
#endregion
EditorGUILayout.Separator();
#region Normals
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableNormals = FindProperty("_Enable_Normals", properties);
materialEditor.ShaderProperty(enableNormals, "Enable Normals");
if (enableNormals.floatValue == 1)
{
showNormalSettings = EditorGUILayout.Foldout(showNormalSettings, "Normal Settings");
if (showNormalSettings)
{
string[] normalProperties =
{
"_Normal_Texture",
"_Normal_Offset",
"_Normal_Tiling",
"_Normal_Intensity",
"_Normal_Pan_Speed",
"_Normal_Noise_Tiling",
"_Normal_Noise_Intensity"
};
setProperties(materialEditor, properties, normalProperties, vecGuiProperties);
EditorGUILayout.Separator();
GUILayout.Label("Fade Distant Normals", EditorStyles.boldLabel);
string[] fresnelMasking =
{
"_Enable_Fresnel_Fade",
"_Fade_Distance",
"_Fade_Power"
};
setProperties(materialEditor, properties, fresnelMasking, vecGuiProperties);
}
}
EditorGUILayout.EndVertical();
#endregion
}
#endregion
//Tab 2
#region Shore Foam
bool showShoreWaveFoamSettings = true;
bool showShoreFoamSettings = true;
private void DrawShoreFoamSettings(MaterialEditor materialEditor, MaterialProperty[] properties)
{
GUIStyle backdropStyle = makeBackdrop();
//GUILayout.Label("Shore Foam Properties", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableShoreWaveFoam = FindProperty("_Enable_Shore_Wave_Foam", properties);
materialEditor.ShaderProperty(enableShoreWaveFoam, "Enable Shore Wave Foam");
if (enableShoreWaveFoam.floatValue == 1)
{
showShoreWaveFoamSettings = EditorGUILayout.Foldout(showShoreWaveFoamSettings, "Shore Wave Foam Settings");
if (showShoreWaveFoamSettings)
{
string[] shoreAnimProperties =
{
"_Enable_Shore_Animation",
"_Animation_Offset"
};
setProperties(materialEditor, properties, shoreAnimProperties, vecGuiProperties);
EditorGUILayout.Separator();
string[] shoreWaveProperties =
{
"_Shore_Wave_Speed",
"_Shore_Wave_Return_Amount",
"_Shore_Wave_Thickness"
};
setProperties(materialEditor, properties, shoreWaveProperties, vecGuiProperties);
EditorGUILayout.Separator();
string[] shoreEdgeProperties =
{
"_Shore_Edge_Opacity",
"_Shore_Wave_Color_Tint",
"_Shore_Edge_Thickness",
"_Shore_Edge_Noise_Scale"
};
setProperties(materialEditor, properties, shoreEdgeProperties, vecGuiProperties);
EditorGUILayout.Separator();
string[] shoreFoamProperties =
{
"_Shore_Foam_Noise_Scale",
"_Shore_Foam_Noise_Texture"
};
setProperties(materialEditor, properties, shoreFoamProperties, vecGuiProperties);
EditorGUILayout.Separator();
}
}
EditorGUILayout.EndVertical();
EditorGUILayout.Separator();
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableShoreFoam = FindProperty("_Enable_Shore_Foam", properties);
materialEditor.ShaderProperty(enableShoreFoam, "Enable Shore Foam");
if (enableShoreFoam.floatValue == 1)
{
showShoreFoamSettings = EditorGUILayout.Foldout(showShoreFoamSettings, "Shore Foam Settings");
if (showShoreFoamSettings)
{
string[] shoreFoamProperties =
{
"_Shore_Small_Foam_Opacity",
"_Shore_Small_Foam_Tiling",
"_Shore_Foam_Color_Tint"
};
setProperties(materialEditor, properties, shoreFoamProperties, vecGuiProperties);
EditorGUILayout.Separator();
}
}
EditorGUILayout.EndVertical();
}
#endregion
//Tab 3
#region Global Foam
bool showGlobalFoamSettings = true;
bool showTopScrollingFoamSettings = true;
private void DrawGlobalFoamSettings(MaterialEditor materialEditor, MaterialProperty[] properties)
{
GUIStyle backdropStyle = makeBackdrop();
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableGlobalFoam = FindProperty("_Enable_Global_Foam", properties);
materialEditor.ShaderProperty(enableGlobalFoam, "Enable Global Foam");
if (enableGlobalFoam.floatValue == 1)
{
showGlobalFoamSettings = EditorGUILayout.Foldout(showGlobalFoamSettings, "Global Foam Settings");
if (showGlobalFoamSettings)
{
string[] globalFoamProperties =
{
"_Noise_Texture"
};
setProperties(materialEditor, properties, globalFoamProperties, vecGuiProperties);
}
}
EditorGUILayout.EndVertical();
EditorGUILayout.Separator();
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableTopScrollingFoam = FindProperty("_Enable_Top_Scrolling_Texture", properties);
materialEditor.ShaderProperty(enableTopScrollingFoam, "Enable Top Scrolling Texture");
if (enableTopScrollingFoam.floatValue == 1)
{
showTopScrollingFoamSettings = EditorGUILayout.Foldout(showTopScrollingFoamSettings, "Top Scrolling Foam Settings");
if (showTopScrollingFoamSettings)
{
string[] topScrollProperties =
{
"_Scrolling_Texture_Direction",
"_Scrolling_Texture",
"_Scrolling_Texture_Tiling",
"_Scrolling_Texture_Tint",
"_Scrolling_Texture_Opacity"
};
setProperties(materialEditor, properties, topScrollProperties, vecGuiProperties);
}
}
EditorGUILayout.EndVertical();
}
#endregion
//Tab 4
#region Wave Settings
private void DrawWaveSettings(MaterialEditor materialEditor, MaterialProperty[] properties)
{
GUIStyle backdropStyle = makeBackdrop();
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableOceanWaves = FindProperty("_Enable_Ocean_Wave", properties);
materialEditor.ShaderProperty(enableOceanWaves, "Enable Ocean Waves");
if (enableOceanWaves.floatValue == 1)
{
string[] globalFoamProperties =
{
"_Ocean_Wave_Height",
"_Ocean_Wave_Speed",
"_Ocean_Foam_Amount",
"_Ocean_Foam_Opacity",
"_Ocean_Foam_Breakup_Tiling"
};
setProperties(materialEditor, properties, globalFoamProperties, vecGuiProperties);
}
EditorGUILayout.EndVertical();
}
#endregion
//Tab 5
#region Advanced
private void DrawAdvancedSettings(MaterialEditor materialEditor, MaterialProperty[] properties)
{
GUIStyle backdropStyle = makeBackdrop();
EditorGUILayout.BeginVertical(backdropStyle);
MaterialProperty enableCaustics = FindProperty("_Enable_Caustics", properties);
materialEditor.ShaderProperty(enableCaustics, "Enable Caustics");
if (enableCaustics.floatValue == 1)
{
string[] globalCausticProperties =
{
"_Caustics_Scale",
"_Caustics_Use_Voronoi_Noise",
"_Caustics_Color",
"_Caustics_Intensity",
"_Caustics_Speed",
};
setProperties(materialEditor, properties, globalCausticProperties, vecGuiProperties);
}
EditorGUILayout.EndVertical();
EditorGUILayout.Separator();
EditorGUILayout.BeginVertical(backdropStyle);
GUILayout.Label("This feature is only supported in URP/HDRP", EditorStyles.boldLabel);
MaterialProperty enableDistortion = FindProperty("_Enable_Distortion", properties);
materialEditor.ShaderProperty(enableDistortion, "Enable Distortion");
if (enableDistortion.floatValue == 1)
{
string[] globalDistortionProperties =
{
"_Distortion_Direction",
"_Distortion_Speed",
"_Distortion_Strength",
"_Distortion_Size"
};
setProperties(materialEditor, properties, globalDistortionProperties, vecGuiProperties);
}
EditorGUILayout.EndVertical();
}
#endregion
// Build Properties
#region Build Properties
//Gathers list of properties to sort and display in inspector
private static void setProperties(MaterialEditor materialEditor, MaterialProperty[] properties, string[] shaderProperties, Dictionary<string, string> vecGuiProperties)
{
foreach (string property in shaderProperties)
{
MaterialProperty propertyReference = FindProperty(property, properties);
if (vecGuiProperties.ContainsKey(property))
{
string type = vecGuiProperties[property];
if (type == "Vector2")
{
Vector2 vec2Value = new Vector2(propertyReference.vectorValue.x, propertyReference.vectorValue.y);
vec2Value = EditorGUILayout.Vector2Field(propertyReference.displayName, vec2Value);
propertyReference.vectorValue = new Vector4(vec2Value.x, vec2Value.y, 0, 0);
}
else if (type == "Vector3")
{
Vector3 vec3Value = new Vector3(propertyReference.vectorValue.x, propertyReference.vectorValue.y, propertyReference.vectorValue.z);
vec3Value = EditorGUILayout.Vector3Field(propertyReference.displayName, vec3Value);
propertyReference.vectorValue = new Vector4(vec3Value.x, vec3Value.y, vec3Value.z, 0);
}
}
else
{
materialEditor.ShaderProperty(propertyReference, propertyReference.displayName);
}
}
}
#endregion
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0f82f46ab76c6904dbf8258cb4f716b7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 5808064c5204e554c89f589a7059c558
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
@@ -0,0 +1,61 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-6330148762399662452
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 10
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Shader Graphs_noiseTest
m_Shader: {fileID: -6465566751694194690, guid: 74fa94d128fe4f348889c6f5f182e0e1, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords:
- _EMISSION
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _Float: 36.63
- _Float_1: 0
- _QueueControl: 0
- _QueueOffset: 0
m_Colors: []
m_BuildTextureStacks: []
m_AllowLocking: 1
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: bf94e7549f8ed9247b189607ea728a68
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c10fa4b5cd9f7154e9b389c2481b4090
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 3e34830b699189944bbaf799961dea69
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 4609e0b95c671b44981067b57418cd22
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 716b4983807af024d8a826495d317506
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: f6e598038745efe499c44c4c30536944
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}
@@ -0,0 +1,164 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-6845971555519808091
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 639247ca83abc874e893eb93af2b5e44, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 0
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Synty_Refractive_Transparent
m_Shader: {fileID: -6465566751694194690, guid: 5808064c5204e554c89f589a7059c558, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _ALPHAPREMULTIPLY_ON
- _SURFACE_TYPE_TRANSPARENT
m_InvalidKeywords:
- _ALPHABLEND_ON
- _ZWRITE_ON
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
disabledShaderPasses:
- DepthOnly
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _Base_Albedo:
m_Texture: {fileID: 2800000, guid: d9ddea5ee082d6b45a4d67b4958ebcb3, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Base_Normal:
m_Texture: {fileID: 2800000, guid: 554447a73db1a0b4e833701b159dddf3, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Refraction_Height:
m_Texture: {fileID: 2800000, guid: 97b8ad3d215eba040ad6e10843d48c4a, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Refraction_Texture:
m_Texture: {fileID: 2800000, guid: 97b8ad3d215eba040ad6e10843d48c4a, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Top_Albedo:
m_Texture: {fileID: 2800000, guid: 1d0b4cd34f364f64db07922fd022cfc9, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Top_Normal:
m_Texture: {fileID: 2800000, guid: a4a2d65c83079fb40bb0568d96a4af64, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Amplitude: -50
- _BUILTIN_AlphaClip: 0
- _BUILTIN_Blend: 0
- _BUILTIN_CullMode: 2
- _BUILTIN_DstBlend: 0
- _BUILTIN_QueueControl: 0
- _BUILTIN_QueueOffset: 0
- _BUILTIN_SrcBlend: 1
- _BUILTIN_Surface: 0
- _BUILTIN_ZTest: 4
- _BUILTIN_ZWrite: 0
- _BUILTIN_ZWriteControl: 2
- _Base_Metallic: 0.084
- _Base_Normal_Intensity: -0.3
- _Base_Specular_Power: 0.85
- _Base_Tiling: 0.4
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _CastShadows: 1
- _Cull: 2
- _Deep_Power: 6.72
- _Depth_Power_Multiplier: 1.1
- _DstBlend: 10
- _Enable_Depth: 1
- _Enable_Refraction: 1
- _Enable_Side_Fresnel: 1
- _Enable_Top_Projection: 1
- _Enable_Triplanar: 1
- _Fade_Amount: 38.6
- _Fresnel_Border: 9.62
- _Fresnel_Power: 4.85
- _Inner_Distortion: 1
- _Inner_Distortion_Power: 0.0209
- _Metallic: 0.239
- _Noise_Tiling: 22.45
- _Opacity: 1
- _QueueControl: 0
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Refraction_Power: 2
- _Refraction_Tiling: 5
- _Shallow_Power: 3.51
- _Smoothness: 0.2
- _Spread: 0.215
- _SrcBlend: 1
- _Steps: 0
- _Surface: 1
- _Top_Metallic: 0
- _Top_Normal_Intensity: 1
- _Top_Opacity: 1
- _Top_Specular_Power: 0.2
- _Top_Tiling: 0.2
- _WorkflowMode: 1
- _ZTest: 4
- _ZWrite: 0
- _ZWriteControl: 2
m_Colors:
- _Base_Color: {r: 1, g: 1, b: 1, a: 0}
- _Base_Color_Multiplier: {r: 0.05700427, g: 0.1691054, b: 0.5754717, a: 0}
- _Deep_Color: {r: 0, g: 0.049652383, b: 0.2830189, a: 0}
- _Fresnel_Color: {r: 0.36037737, g: 1.0028218, b: 1.4980394, a: 0}
- _Refraction_Color: {r: 0.071956225, g: 0.09608789, b: 0.31132078, a: 0}
- _Shallow_Color: {r: 0.16019936, g: 0.27248794, b: 0.4528302, a: 0}
- _Top_Color_Multiplier: {r: 0.9622642, g: 0.9622642, b: 0.9622642, a: 0}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &8237638825396807318
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 10
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ad6491abbfcfac54187902c939cbaed1
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 56ef766d507df464fb2a1726a99c925f
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 2cdc5747df2558c44a81b4046687a83d
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: dcf4d834db1a0b046a044daab86f6519
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 436db39b4e2ae5e46a17e21865226b19
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 74fa94d128fe4f348889c6f5f182e0e1
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}