diff --git a/Shader Forge/Assets/ShaderForge/Editor.meta b/Editor.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor.meta rename to Editor.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code.meta b/Editor/Code.meta similarity index 58% rename from Shader Forge/Assets/ShaderForge/Editor/Code.meta rename to Editor/Code.meta index da46b9b3..0e4af6cb 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/Code.meta +++ b/Editor/Code.meta @@ -1,9 +1,8 @@ fileFormatVersion: 2 -guid: bda2643522b22874ea0704332ec6d288 +guid: fff0e576f4e9e2f4ea6dc2f383282b1b folderAsset: yes -timeCreated: 1443376891 -licenseType: Pro DefaultImporter: + externalObjects: {} userData: assetBundleName: assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Blending.cs b/Editor/Code/SFPSC_Blending.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Blending.cs rename to Editor/Code/SFPSC_Blending.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Blending.cs.meta b/Editor/Code/SFPSC_Blending.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Blending.cs.meta rename to Editor/Code/SFPSC_Blending.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Console.cs b/Editor/Code/SFPSC_Console.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Console.cs rename to Editor/Code/SFPSC_Console.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Console.cs.meta b/Editor/Code/SFPSC_Console.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Console.cs.meta rename to Editor/Code/SFPSC_Console.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Experimental.cs b/Editor/Code/SFPSC_Experimental.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Experimental.cs rename to Editor/Code/SFPSC_Experimental.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Experimental.cs.meta b/Editor/Code/SFPSC_Experimental.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Experimental.cs.meta rename to Editor/Code/SFPSC_Experimental.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Geometry.cs b/Editor/Code/SFPSC_Geometry.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Geometry.cs rename to Editor/Code/SFPSC_Geometry.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Geometry.cs.meta b/Editor/Code/SFPSC_Geometry.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Geometry.cs.meta rename to Editor/Code/SFPSC_Geometry.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Lighting.cs b/Editor/Code/SFPSC_Lighting.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Lighting.cs rename to Editor/Code/SFPSC_Lighting.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Lighting.cs.meta b/Editor/Code/SFPSC_Lighting.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Lighting.cs.meta rename to Editor/Code/SFPSC_Lighting.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Meta.cs b/Editor/Code/SFPSC_Meta.cs similarity index 90% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Meta.cs rename to Editor/Code/SFPSC_Meta.cs index 5a4fe813..3ca3d89f 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SFPSC_Meta.cs +++ b/Editor/Code/SFPSC_Meta.cs @@ -1,340 +1,344 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -using System.Collections.Generic; - -namespace ShaderForge { - - - [System.Serializable] - public class SFPSC_Meta : SFPS_Category { - - public enum Inspector3DPreviewType { Sphere, Plane, Skybox }; - public string[] strInspector3DPreviewType = new string[] { "3D object", "2D sprite", "Sky"}; - public enum BatchingMode { Enabled, Disabled, DisableDuringLODFade }; - public string[] strBatchingMode = new string[] { "Enabled", "Disabled", "Disabled during LOD fade" }; - public Inspector3DPreviewType previewType = Inspector3DPreviewType.Sphere; - - public BatchingMode batchingMode = BatchingMode.Enabled; - public bool canUseSpriteAtlas = false; - public bool[] usedRenderers; // TODO: Serialization? - public string fallback = ""; - public int LOD = 0; // TODO: Serialization? - - public List cgIncludes = new List(); - - /* - d3d9 = 0, // - Direct3D 9 - d3d11 = 1, // - Direct3D 11 - glcore = 2, // - OpenGL Core - gles = 3, // - OpenGL ES 2.0 - gles3 = 4, // - OpenGL ES 3.0 - metal = 5, // - iOS Metal - d3d11_9x = 6, // - Direct3D 11 windows RT - xboxone = 7, // - Xbox One - ps4 = 8, // - PlayStation 4 - psp2 = 10 // - PlayStation Vita - n3ds = 11 // - Nintendo 3DS - wiiu = 12, // - Nintendo Wii U - */ - - public override SFPS_Category PostInitialize (){ - usedRenderers = new bool[12]{ // TODO: Load from project settings - true, // - Direct3D 9 - true, // - Direct3D 11 - true, // - OpenGL Core - true, // - OpenGL ES 2.0 - false, // - OpenGL ES 3.0 - false, // - iOS Metal - false, // - Direct3D 11 windows RT - false, // - Xbox One - false, // - PlayStation 4 - false, // - PlayStation Vita - false, // - Nintendo 3DS - false // - Wii U - }; - return this; - } - - - char[] splitChars = new char[] { '|' }; - string SerializeCgIncludes() { - string serialized = ""; - for( int i = 0; i < cgIncludes.Count; i++ ) { - serialized += cgIncludes[i]; - if( i < cgIncludes.Count - 1 ) - serialized += splitChars[0]; - } - string encoded = SF_Tools.StringToBase64String( serialized ); - - return encoded; - } - - void DeserializeCgIncludes( string serialized ) { - string decoded = SF_Tools.Base64StringToString( serialized ); - cgIncludes = new List( decoded.Split( splitChars ) ); - - // Remove empty entries - for( int i = cgIncludes.Count - 1; i >= 0; i-- ) - if( cgIncludes[i] == string.Empty ) - cgIncludes.RemoveAt( i ); - } - - public override string Serialize(){ - string s = ""; - s += Serialize( "flbk", fallback ); - s += Serialize( "iptp", ((int)previewType).ToString() ); - s += Serialize( "cusa", canUseSpriteAtlas.ToString() ); - s += Serialize( "bamd", ( (int)batchingMode ).ToString() ); - s += Serialize( "cgin", SerializeCgIncludes() ); - return s; - } - - public override void Deserialize(string key, string value){ - - switch( key ) { - case "flbk": - fallback = value; - break; - case "iptp": - previewType = (Inspector3DPreviewType)int.Parse(value); - break; - case "cusa": - canUseSpriteAtlas = bool.Parse(value); - break; - case "bamd": - batchingMode = (BatchingMode)int.Parse( value ); - break; - case "cgin": - DeserializeCgIncludes( value ); - break; - } - - } - - - public override float DrawInner(ref Rect r){ - - float prevYpos = r.y; - r.y = 0; - - - r.xMin += 20; - r.y += 20; - - - EditorGUI.LabelField( r, "Path", EditorStyles.miniLabel ); - r.xMin += 30; - r.height = 17; - r.xMax -= 3; - ps.StartIgnoreChangeCheck(); - GUI.SetNextControlName( "shdrpath" ); - string prev = editor.currentShaderPath; - //editor.currentShaderPath = GUI.TextField( r, editor.currentShaderPath,EditorStyles.textField ); - editor.currentShaderPath = UndoableTextField( r, editor.currentShaderPath, "shader path", null, editor, showContent:false ); - if( editor.currentShaderPath != prev ) { - SF_Tools.FormatShaderPath( ref editor.currentShaderPath ); - } - if( Event.current.keyCode == KeyCode.Return && GUI.GetNameOfFocusedControl() == "shdrpath" ) { - editor.Defocus(); - editor.OnShaderModified( NodeUpdateType.Hard ); - } - ps.EndIgnoreChangeCheck(); - r.xMin -= 30; - r.height = 20; - r.xMax += 3; - r.y += 20; - - - - - EditorGUI.LabelField( r, "Fallback", EditorStyles.miniLabel ); - Rect rStart = new Rect( r ); - r.xMin += 50; - r.height = 17; - r.xMax -= 47; - ps.StartIgnoreChangeCheck(); - GUI.SetNextControlName( "shdrpath" ); - prev = fallback; - fallback = UndoableTextField( r, fallback, "shader fallback", null, null, showContent:false ); - r.x += r.width + 2; - r.width = 42; - ShaderPicker( r, "Pick"); - if( fallback != prev ) { - SF_Tools.FormatShaderPath( ref fallback ); - } - if( Event.current.keyCode == KeyCode.Return && GUI.GetNameOfFocusedControl() == "shdrpath" ) { - editor.Defocus(); - editor.OnShaderModified( NodeUpdateType.Hard ); - } - ps.EndIgnoreChangeCheck(); - r = rStart; - r.y += r.height; - - - EditorGUI.LabelField( r, "LOD", EditorStyles.miniLabel ); - r.xMin += 30; - r.height = 17; - r.xMax -= 3; - LOD = UndoableIntField( r, LOD, "LOD"); - r.xMin -= 30; - r.height = 20; - r.xMax += 3; - r.y += 20; - - - canUseSpriteAtlas = UndoableToggle( r, canUseSpriteAtlas, "Allow using atlased sprites", "allow using atlased sprites", null ); - r.y += 20; - - batchingMode = (BatchingMode)UndoableLabeledEnumPopupNamed( r, "Draw call batching", batchingMode, strBatchingMode, "draw call batching" ); - r.y += 20; - - previewType = (Inspector3DPreviewType)UndoableLabeledEnumPopupNamed( r, "Inspector preview mode", previewType, strInspector3DPreviewType, "inspector preview mode" ); - r.y += 20; - - r.y += 10; - - - if( cgIncludes.Count == 0 ) { - Rect rBtn = r; - rBtn.height -= 4; - rBtn.width = 100; - if( GUI.Button( rBtn, "Add CG Include", EditorStyles.miniButton ) ) { - Undo.RecordObject( this, "add CG include" ); - cgIncludes.Add( "" ); - } - //r.y += 20; - } else { - EditorGUI.LabelField( r, "CG Includes:" ); - r.y += 20; - - - int removeTarget = -1; - - for( int i = 0; i < cgIncludes.Count; i++ ) { - - Rect smallRect = r; - smallRect.width = 20; - smallRect.height -= 2; - - if( GUI.Button( smallRect, "-" ) ) { - removeTarget = i; - } - - r.xMin += 22; - - Rect textFieldRect = r; - textFieldRect.height -= 2; - textFieldRect.width -= 3; - cgIncludes[i] = UndoableTextField( textFieldRect, cgIncludes[i], "cg include", null ); - textFieldRect.x += 1; - GUI.color = new Color( 1f, 1f, 1f, 0.3f ); - GUI.Label( textFieldRect, "" + cgIncludes[i] + ".cginc", SF_Styles.RichLabel ); - GUI.color = Color.white; - r.y += 20; - - r.xMin -= 22; - } - - if( removeTarget != -1 ) { - Undo.RecordObject( this, "remove CG include" ); - cgIncludes.RemoveAt( removeTarget ); - } - - Rect buttonRect = r; - buttonRect.width = 20; - buttonRect.height -= 2; - if( GUI.Button( buttonRect, "+" ) ) { - Undo.RecordObject( this, "add CG include" ); - cgIncludes.Add( "" ); - } - } - - - - r.y += 40; - - - - EditorGUI.LabelField( r, "Target renderers:" ); - r.xMin += 20; - r.y += 20; - r.height = 17; - float pWidth = r.width; - - - bool onlyDX11GlCore = ps.mOut.tessellation.IsConnectedAndEnabled(); - - - for(int i=0;i cgIncludes = new List(); + + /* + d3d9 = 0, // - Direct3D 9 + d3d11 = 1, // - Direct3D 11 + glcore = 2, // - OpenGL Core + gles = 3, // - OpenGL ES 2.0 + gles3 = 4, // - OpenGL ES 3.0 + metal = 5, // - iOS Metal + d3d11_9x = 6, // - Direct3D 11 windows RT + xboxone = 7, // - Xbox One + ps4 = 8, // - PlayStation 4 + psp2 = 10 // - PlayStation Vita + n3ds = 11 // - Nintendo 3DS + wiiu = 12, // - Nintendo Wii U + switch = 13, // - Nintendo Switch + vulkan = 14, // - Vulkan + */ + + public override SFPS_Category PostInitialize (){ + usedRenderers = new bool[14]{ // TODO: Load from project settings + true, // - Direct3D 9 + true, // - Direct3D 11 + true, // - OpenGL Core + true, // - OpenGL ES 2.0 + false, // - OpenGL ES 3.0 + false, // - iOS Metal + false, // - Direct3D 11 windows RT + false, // - Xbox One + false, // - PlayStation 4 + false, // - PlayStation Vita + false, // - Nintendo 3DS + false, // - Wii U + false, // - Switch + true // - Vulkan + }; + return this; + } + + + char[] splitChars = new char[] { '|' }; + string SerializeCgIncludes() { + string serialized = ""; + for( int i = 0; i < cgIncludes.Count; i++ ) { + serialized += cgIncludes[i]; + if( i < cgIncludes.Count - 1 ) + serialized += splitChars[0]; + } + string encoded = SF_Tools.StringToBase64String( serialized ); + + return encoded; + } + + void DeserializeCgIncludes( string serialized ) { + string decoded = SF_Tools.Base64StringToString( serialized ); + cgIncludes = new List( decoded.Split( splitChars ) ); + + // Remove empty entries + for( int i = cgIncludes.Count - 1; i >= 0; i-- ) + if( cgIncludes[i] == string.Empty ) + cgIncludes.RemoveAt( i ); + } + + public override string Serialize(){ + string s = ""; + s += Serialize( "flbk", fallback ); + s += Serialize( "iptp", ((int)previewType).ToString() ); + s += Serialize( "cusa", canUseSpriteAtlas.ToString() ); + s += Serialize( "bamd", ( (int)batchingMode ).ToString() ); + s += Serialize( "cgin", SerializeCgIncludes() ); + return s; + } + + public override void Deserialize(string key, string value){ + + switch( key ) { + case "flbk": + fallback = value; + break; + case "iptp": + previewType = (Inspector3DPreviewType)int.Parse(value); + break; + case "cusa": + canUseSpriteAtlas = bool.Parse(value); + break; + case "bamd": + batchingMode = (BatchingMode)int.Parse( value ); + break; + case "cgin": + DeserializeCgIncludes( value ); + break; + } + + } + + + public override float DrawInner(ref Rect r){ + + float prevYpos = r.y; + r.y = 0; + + + r.xMin += 20; + r.y += 20; + + + EditorGUI.LabelField( r, "Path", EditorStyles.miniLabel ); + r.xMin += 30; + r.height = 17; + r.xMax -= 3; + ps.StartIgnoreChangeCheck(); + GUI.SetNextControlName( "shdrpath" ); + string prev = editor.currentShaderPath; + //editor.currentShaderPath = GUI.TextField( r, editor.currentShaderPath,EditorStyles.textField ); + editor.currentShaderPath = UndoableTextField( r, editor.currentShaderPath, "shader path", null, editor, showContent:false ); + if( editor.currentShaderPath != prev ) { + SF_Tools.FormatShaderPath( ref editor.currentShaderPath ); + } + if( Event.current.keyCode == KeyCode.Return && GUI.GetNameOfFocusedControl() == "shdrpath" ) { + editor.Defocus(); + editor.OnShaderModified( NodeUpdateType.Hard ); + } + ps.EndIgnoreChangeCheck(); + r.xMin -= 30; + r.height = 20; + r.xMax += 3; + r.y += 20; + + + + + EditorGUI.LabelField( r, "Fallback", EditorStyles.miniLabel ); + Rect rStart = new Rect( r ); + r.xMin += 50; + r.height = 17; + r.xMax -= 47; + ps.StartIgnoreChangeCheck(); + GUI.SetNextControlName( "shdrpath" ); + prev = fallback; + fallback = UndoableTextField( r, fallback, "shader fallback", null, null, showContent:false ); + r.x += r.width + 2; + r.width = 42; + ShaderPicker( r, "Pick"); + if( fallback != prev ) { + SF_Tools.FormatShaderPath( ref fallback ); + } + if( Event.current.keyCode == KeyCode.Return && GUI.GetNameOfFocusedControl() == "shdrpath" ) { + editor.Defocus(); + editor.OnShaderModified( NodeUpdateType.Hard ); + } + ps.EndIgnoreChangeCheck(); + r = rStart; + r.y += r.height; + + + EditorGUI.LabelField( r, "LOD", EditorStyles.miniLabel ); + r.xMin += 30; + r.height = 17; + r.xMax -= 3; + LOD = UndoableIntField( r, LOD, "LOD"); + r.xMin -= 30; + r.height = 20; + r.xMax += 3; + r.y += 20; + + + canUseSpriteAtlas = UndoableToggle( r, canUseSpriteAtlas, "Allow using atlased sprites", "allow using atlased sprites", null ); + r.y += 20; + + batchingMode = (BatchingMode)UndoableLabeledEnumPopupNamed( r, "Draw call batching", batchingMode, strBatchingMode, "draw call batching" ); + r.y += 20; + + previewType = (Inspector3DPreviewType)UndoableLabeledEnumPopupNamed( r, "Inspector preview mode", previewType, strInspector3DPreviewType, "inspector preview mode" ); + r.y += 20; + + r.y += 10; + + + if( cgIncludes.Count == 0 ) { + Rect rBtn = r; + rBtn.height -= 4; + rBtn.width = 100; + if( GUI.Button( rBtn, "Add CG Include", EditorStyles.miniButton ) ) { + Undo.RecordObject( this, "add CG include" ); + cgIncludes.Add( "" ); + } + //r.y += 20; + } else { + EditorGUI.LabelField( r, "CG Includes:" ); + r.y += 20; + + + int removeTarget = -1; + + for( int i = 0; i < cgIncludes.Count; i++ ) { + + Rect smallRect = r; + smallRect.width = 20; + smallRect.height -= 2; + + if( GUI.Button( smallRect, "-" ) ) { + removeTarget = i; + } + + r.xMin += 22; + + Rect textFieldRect = r; + textFieldRect.height -= 2; + textFieldRect.width -= 3; + cgIncludes[i] = UndoableTextField( textFieldRect, cgIncludes[i], "cg include", null ); + textFieldRect.x += 1; + GUI.color = new Color( 1f, 1f, 1f, 0.3f ); + GUI.Label( textFieldRect, "" + cgIncludes[i] + ".cginc", SF_Styles.RichLabel ); + GUI.color = Color.white; + r.y += 20; + + r.xMin -= 22; + } + + if( removeTarget != -1 ) { + Undo.RecordObject( this, "remove CG include" ); + cgIncludes.RemoveAt( removeTarget ); + } + + Rect buttonRect = r; + buttonRect.width = 20; + buttonRect.height -= 2; + if( GUI.Button( buttonRect, "+" ) ) { + Undo.RecordObject( this, "add CG include" ); + cgIncludes.Add( "" ); + } + } + + + + r.y += 40; + + + + EditorGUI.LabelField( r, "Target renderers:" ); + r.xMin += 20; + r.y += 20; + r.height = 17; + float pWidth = r.width; + + + bool onlyTessellationCore = ps.mOut.tessellation.IsConnectedAndEnabled(); + + + for(int i=0;i(); - - public enum UpToDateState{UpToDate, OutdatedSoft, OutdatedHard}; - - [Serializable] - public class SF_Editor : EditorWindow { - [SerializeField] - public SF_Evaluator shaderEvaluator; - [SerializeField] - public SF_PreviewWindow preview; - [SerializeField] - public SF_EditorNodeView nodeView; - [SerializeField] - public SF_EditorNodeBrowser nodeBrowser; - [SerializeField] - public SF_PassSettings ps; // TODO: Move - - [System.NonSerialized] - public static SF_Editor instance; - [SerializeField] - public SFN_Final mainNode; - [SerializeField] - public SF_StatusBox statusBox; - - [SerializeField] - public List nodes; - - [SerializeField] - DateTime startTime = DateTime.UtcNow; - - [SerializeField] - GUIStyle windowStyle; - [SerializeField] - GUIStyle titleStyle; - [SerializeField] - GUIStyle versionStyle; - [SerializeField] - GUIStyle nodeScrollbarStyle; - - [SerializeField] - public SF_DraggableSeparator separatorLeft; - - [SerializeField] - public SF_DraggableSeparator separatorRight; - - public Vector2 mousePosition = Vector2.zero; - - [SerializeField] - public Shader currentShaderAsset; - [SerializeField] - public string currentShaderPath; - - [SerializeField] - public List nodeTemplates; - - [SerializeField] - private UpToDateState shaderOutdated = UpToDateState.UpToDate; - public UpToDateState ShaderOutdated{ - get{ - return shaderOutdated; - } - set{ - if(shaderOutdated != value){ - //Debug.Log("Changed outdated state to " + value); - shaderOutdated = value; - } - } - } - - [NonSerialized] - public bool initialized = false; - - - - - public SF_Editor() { - if(SF_Debug.window) - Debug.Log( "[SF_LOG] - SF_Editor CONSTRUCTOR SF_Editor()" ); - SF_Editor.instance = this; - } - - [MenuItem( "Window/Shader Forge" )] - static void InitEmpty() { - if( SF_Editor.instance == null ) - Init( null ); - else { - EditorWindow.GetWindow( typeof( SF_Editor ) ); // Focus - } - } - - void OnEnable() { - SF_Settings.LoadAllFromDisk(); - titleContent = new GUIContent( "Shader Forge", (Texture)SF_GUI.Icon ); - if( this.preview != null ) - preview.OnEnable(); - } - - void OnDisable(){ - - if(shaderOutdated != UpToDateState.UpToDate){ - - fullscreenMessage = "Saving..."; - Repaint(); - shaderEvaluator.Evaluate(); - } - - if( this.preview != null ) - preview.OnDisable(); - - SF_Settings.SaveAllToDisk(); - - } - - - void OnDestroy(){ - DestroyImmediate( preview.internalMaterial ); - } - - public static bool Init( Shader initShader = null ) { - - // To make sure you get periods as decimal separators - System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US"); - - if(SF_Debug.evalFlow || SF_Debug.dynamicNodeLoad) - Debug.Log( "[SF_LOG] - SF_Editor Init(" + initShader + ")" ); - SF_Editor materialEditor = (SF_Editor)EditorWindow.GetWindow( typeof( SF_Editor ) ); - SF_Editor.instance = materialEditor; - updateCheck = ""; - bool loaded = materialEditor.InitializeInstance( initShader ); - if( !loaded ) - return false; - return true; - } - - public int GetUniqueNodeID() { - - int[] occupiedIDs = nodes.Select( x => x.id ).ToArray(); - int id = -1; - int limit = 1000000; - - do { - id = UnityEngine.Random.Range(1,9999); - limit--; - } while( occupiedIDs.Contains( id ) && limit > 0 ); - - if( limit <= 0 ) - Debug.LogError("Ran out of attempts to find a unique node ID"); - - return id; - } - - - - - - public void InitializeNodeTemplates() { - nodeTemplates = new List(); - - - // AddTemplate( typeof( SFN_CommentBox ), "Comment Box" ); - - string catArithmetic = "Arithmetic/"; - AddTemplate( typeof( SFN_Abs ), catArithmetic + "Abs" ); - AddTemplate( typeof( SFN_Add ), catArithmetic + "Add", KeyCode.A ); - AddTemplate( typeof( SFN_Blend ), catArithmetic + "Blend", KeyCode.B ); - AddTemplate( typeof( SFN_Ceil ), catArithmetic + "Ceil" ); - AddTemplate( typeof( SFN_Clamp ), catArithmetic + "Clamp" ); - AddTemplate( typeof( SFN_Clamp01 ), catArithmetic + "Clamp 0-1" ); - AddTemplate( typeof( SFN_ConstantClamp ), catArithmetic + "Clamp (Simple)",KeyCode.None, "Clamp Simple" ); - AddTemplate( typeof( SFN_Divide ), catArithmetic + "Divide", KeyCode.D ); - AddTemplate( typeof( SFN_Exp ), catArithmetic + "Exp" ); - AddTemplate( typeof( SFN_Floor ), catArithmetic + "Floor" ); - AddTemplate( typeof( SFN_Fmod ), catArithmetic + "Fmod" ); - AddTemplate( typeof( SFN_Frac ), catArithmetic + "Frac" ); - AddTemplate( typeof( SFN_HsvToRgb ), catArithmetic + "HSV to RGB" ); - AddTemplate( typeof( SFN_Hue ), catArithmetic + "Hue" ); - AddTemplate( typeof( SFN_If ), catArithmetic + "If", KeyCode.I ); - AddTemplate( typeof( SFN_InverseLerp ), catArithmetic + "Inverse Lerp" ); - AddTemplate( typeof( SFN_Lerp ), catArithmetic + "Lerp", KeyCode.L ); - AddTemplate( typeof( SFN_ConstantLerp ), catArithmetic + "Lerp (Simple)", KeyCode.None, "Lerp Simple" ); - AddTemplate( typeof( SFN_Log ), catArithmetic + "Log" ); - AddTemplate( typeof( SFN_Max ), catArithmetic + "Max" ); - AddTemplate( typeof( SFN_Min ), catArithmetic + "Min" ); - AddTemplate( typeof( SFN_Multiply ), catArithmetic + "Multiply", KeyCode.M ); - AddTemplate( typeof( SFN_MultiplyMatrix ), catArithmetic + "Multiply Matrix" ); - AddTemplate( typeof( SFN_Negate ), catArithmetic + "Negate" ); - AddTemplate( typeof( SFN_Noise ), catArithmetic + "Noise" ); - AddTemplate( typeof( SFN_OneMinus ), catArithmetic + "One Minus", KeyCode.O ); - AddTemplate( typeof( SFN_Posterize ), catArithmetic + "Posterize" ); - AddTemplate( typeof( SFN_Power ), catArithmetic + "Power", KeyCode.E ); - AddTemplate( typeof( SFN_Reciprocal ), catArithmetic + "Reciprocal" ); - AddTemplate( typeof( SFN_RemapRangeAdvanced),catArithmetic+ "Remap" ); - AddTemplate( typeof( SFN_RemapRange ), catArithmetic + "Remap (Simple)", KeyCode.R, "Remap Simple" ); - AddTemplate( typeof( SFN_RgbToHsv ), catArithmetic + "RGB to HSV" ); - AddTemplate( typeof( SFN_Round ), catArithmetic + "Round" ); - AddTemplate( typeof( SFN_Sign ), catArithmetic + "Sign" ); - AddTemplate( typeof( SFN_Smoothstep ), catArithmetic + "Smoothstep" ).MarkAsNewNode(); - AddTemplate( typeof( SFN_Sqrt ), catArithmetic + "Sqrt" ); - AddTemplate( typeof( SFN_Step ), catArithmetic + "Step (A <= B)", KeyCode.None, "Step" ); - AddTemplate( typeof( SFN_Subtract ), catArithmetic + "Subtract", KeyCode.S ); - AddTemplate( typeof( SFN_Trunc ), catArithmetic + "Trunc" ); - - string catConstVecs = "Constant Vectors/"; - AddTemplate( typeof( SFN_Vector1 ), catConstVecs + "Value", KeyCode.Alpha1 ); - AddTemplate( typeof( SFN_Vector2 ), catConstVecs + "Vector 2", KeyCode.Alpha2 ); - AddTemplate( typeof( SFN_Vector3 ), catConstVecs + "Vector 3", KeyCode.Alpha3 ); - AddTemplate( typeof( SFN_Vector4 ), catConstVecs + "Vector 4", KeyCode.Alpha4 ); - AddTemplate( typeof( SFN_Matrix4x4 ), catConstVecs + "Matrix 4x4" ); - - string catProps = "Properties/"; - AddTemplate( typeof( SFN_Color ), catProps + "Color" ); - AddTemplate( typeof( SFN_Cubemap ), catProps + "Cubemap" ); - AddTemplate( typeof( SFN_Matrix4x4Property ), catProps + "Matrix 4x4" ); - AddTemplate( typeof( SFN_Slider ), catProps + "Slider" ); - AddTemplate( typeof( SFN_SwitchProperty ), catProps + "Switch" ); - AddTemplate( typeof( SFN_Tex2d ), catProps + "Texture 2D", KeyCode.T ); - AddTemplate( typeof( SFN_Tex2dAsset ), catProps + "Texture Asset" ); - AddTemplate( typeof( SFN_ToggleProperty ), catProps + "Toggle" ); - AddTemplate( typeof( SFN_ValueProperty ), catProps + "Value" ); - AddTemplate( typeof( SFN_Vector4Property ), catProps + "Vector 4" ); - - //string catBranching = "Branching/"; - //AddTemplate( typeof( SFN_StaticBranch ), catBranching + "Static Branch" ); - - string catVecOps = "Vector Operations/"; - AddTemplate( typeof( SFN_Append ), catVecOps + "Append", KeyCode.Q ); - AddTemplate( typeof( SFN_ChannelBlend ), catVecOps + "Channel Blend"); - AddTemplate( typeof( SFN_ComponentMask ), catVecOps + "Component Mask", KeyCode.C ); - AddTemplate( typeof( SFN_Cross ), catVecOps + "Cross Product" ); - AddTemplate( typeof( SFN_Desaturate ), catVecOps + "Desaturate" ); - AddTemplate( typeof( SFN_DDX ), catVecOps + "DDX" ); - AddTemplate( typeof( SFN_DDXY ), catVecOps + "DDXY" ).MarkAsNewNode(); - AddTemplate( typeof( SFN_DDY ), catVecOps + "DDY" ); - AddTemplate( typeof( SFN_Distance ), catVecOps + "Distance" ); - AddTemplate( typeof( SFN_Dot ), catVecOps + "Dot Product" ); - AddTemplate( typeof( SFN_Length ), catVecOps + "Length" ); - AddTemplate( typeof( SFN_Normalize ), catVecOps + "Normalize", KeyCode.N ); - AddTemplate( typeof( SFN_NormalBlend ), catVecOps + "Normal Blend" ); - AddTemplate( typeof( SFN_Reflect ), catVecOps + "Reflect" ); - AddTemplate( typeof( SFN_Transform ), catVecOps + "Transform" ); - AddTemplate( typeof( SFN_Transpose ), catVecOps + "Transpose" ); - AddTemplate( typeof( SFN_VectorProjection ),catVecOps + "Vector Projection" ); - AddTemplate( typeof( SFN_VectorRejection ), catVecOps + "Vector Rejection" ); - - - string catUvOps = "UV Operations/"; - AddTemplate( typeof( SFN_Panner ), catUvOps + "Panner", KeyCode.P ); - AddTemplate( typeof( SFN_Parallax ), catUvOps + "Parallax" ); - AddTemplate( typeof( SFN_Rotator ), catUvOps + "Rotator" ); - AddTemplate( typeof( SFN_UVTile ), catUvOps + "UV Tile" ); - - string catGeoData = "Geometry Data/"; - AddTemplate( typeof( SFN_Bitangent ), catGeoData + "Bitangent Dir."); - AddTemplate( typeof( SFN_Depth ), catGeoData + "Depth"); - AddTemplate( typeof( SFN_FaceSign ), catGeoData + "Face Sign" ); - AddTemplate( typeof( SFN_Fresnel ), catGeoData + "Fresnel", KeyCode.F ); - AddTemplate( typeof( SFN_NormalVector ), catGeoData + "Normal Dir." ); - AddTemplate( typeof( SFN_ObjectPosition ), catGeoData + "Object Position"); - AddTemplate( typeof( SFN_ObjectScale ), catGeoData + "Object Scale" ); - AddTemplate( typeof( SFN_ScreenPos ), catGeoData + "Screen Position" ); - AddTemplate( typeof( SFN_Tangent ), catGeoData + "Tangent Dir." ); - AddTemplate( typeof( SFN_TexCoord ), catGeoData + "UV Coordinates", KeyCode.U ); - AddTemplate( typeof( SFN_VertexColor ), catGeoData + "Vertex Color", KeyCode.V ); - AddTemplate( typeof( SFN_ViewVector ), catGeoData + "View Dir." ); - AddTemplate( typeof( SFN_ViewReflectionVector ), catGeoData + "View Refl. Dir.", KeyCode.None, "View Reflection" ); - AddTemplate( typeof( SFN_FragmentPosition ), catGeoData + "World Position", KeyCode.W ); - - string catLighting = "Lighting/"; - AddTemplate( typeof( SFN_AmbientLight ), catLighting + "Ambient Light" ); - AddTemplate( typeof( SFN_HalfVector ), catLighting + "Half Direction", KeyCode.H ).UavailableInDeferredPrePass(); - AddTemplate( typeof( SFN_LightAttenuation ), catLighting + "Light Attenuation" ).UavailableInDeferredPrePass(); - AddTemplate( typeof( SFN_LightColor ), catLighting + "Light Color" ).UavailableInDeferredPrePass(); - AddTemplate( typeof( SFN_LightVector ), catLighting + "Light Direction" ).UavailableInDeferredPrePass(); - AddTemplate( typeof( SFN_LightPosition ), catLighting + "Light Position" ).UavailableInDeferredPrePass(); - - string catExtData = "External Data/"; - AddTemplate( typeof( SFN_PixelSize ), catExtData + "Pixel Size" ); - AddTemplate( typeof( SFN_ProjectionParameters ), catExtData + "Projection Parameters" ); - AddTemplate( typeof( SFN_ScreenParameters ), catExtData + "Screen Parameters" ); - AddTemplate( typeof( SFN_Time ), catExtData + "Time" ); - AddTemplate( typeof( SFN_ViewPosition ), catExtData + "View Position" ); - - string catSceneData = "Scene Data/"; - AddTemplate( typeof(SFN_DepthBlend), catSceneData + "Depth Blend" ); - AddTemplate( typeof( SFN_FogColor ), catSceneData + "Fog Color" ); - AddTemplate( typeof(SFN_SceneColor), catSceneData + "Scene Color" ); - AddTemplate( typeof(SFN_SceneDepth), catSceneData + "Scene Depth" ); - - string catMathConst = "Math Constants/"; - AddTemplate( typeof( SFN_E ), catMathConst + "e", KeyCode.None, "EulersConstant" ); - AddTemplate( typeof( SFN_Phi ), catMathConst + "Phi" ); - AddTemplate( typeof( SFN_Pi ), catMathConst + "Pi" ); - AddTemplate( typeof( SFN_Root2 ), catMathConst + "Root 2" ); - AddTemplate( typeof( SFN_Tau ), catMathConst + "Tau (2 Pi)", KeyCode.None, "Tau" ); - - string catTrig = "Trigonometry/"; - AddTemplate( typeof( SFN_ArcCos ), catTrig + "ArcCos" ); - AddTemplate( typeof( SFN_ArcSin ), catTrig + "ArcSin" ); - AddTemplate( typeof( SFN_ArcTan ), catTrig + "ArcTan" ); - AddTemplate( typeof( SFN_ArcTan2 ), catTrig + "ArcTan2" ); - AddTemplate( typeof( SFN_Cos ), catTrig + "Cos" ); - AddTemplate( typeof( SFN_Sin ), catTrig + "Sin" ); - AddTemplate( typeof( SFN_Tan ), catTrig + "Tan" ); - - string catCode = "Code/"; - AddTemplate( typeof( SFN_Code ), catCode + "Code" ); - - string catUtility = "Utility/"; - AddTemplate( typeof( SFN_Relay ), catUtility + "Relay" ); - AddTemplate( typeof( SFN_Get ), catUtility + "Get", KeyCode.G ).MarkAsNewNode(); - AddTemplate( typeof( SFN_Set ), catUtility + "Set" ).MarkAsNewNode(); - - - - SF_EditorNodeData ssDiff = TryAddTemplateDynamic( "SFN_SkyshopDiff", "Skyshop/" + "Skyshop Diffuse" ); - if(ssDiff != null) - ssDiff.MarkAsNewNode(); - - SF_EditorNodeData ssSpec = TryAddTemplateDynamic( "SFN_SkyshopSpec", "Skyshop/" + "Skyshop Specular" ); - if( ssSpec != null ) - ssSpec.MarkAsNewNode(); - - - - - } - - - public static bool NodeExistsAndIs(SF_Node node, string nodeName){ - if(NodeExists(nodeName)) - if(node.GetType() == GetNodeType(nodeName)) - return true; - return false; - } - - public static bool NodeExists(string nodeName){ - return GetNodeType(nodeName) != null; - } - - - static Assembly editorAssembly; - public static Assembly EditorAssembly { - get { - if( editorAssembly == null ) { - - Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); - - foreach( Assembly assembly in assemblies ) { - if( assembly.FullName.Split( ',' )[0].Trim() == "Assembly-CSharp-Editor" ) { - editorAssembly = assembly; - return editorAssembly; - } - } - //if( SF_Debug.dynamicNodeLoad ) - // Debug.LogError("Unable to find the editor assembly" ); - } - return editorAssembly; - } - } - - - public static Type GetNodeType(string nodeName){ - - Assembly asm = EditorAssembly; - if( asm == null ) - return null; - string fullNodeName = nodeName; - if(!nodeName.StartsWith("ShaderForge.")) - fullNodeName = "ShaderForge." + nodeName; - if( SF_Debug.dynamicNodeLoad ) - Debug.Log( "Trying to dynamically load [" + fullNodeName + "]" + " in assembly [" + asm.FullName + "]" ); - - return asm.GetType( fullNodeName ); - } - - public SF_EditorNodeData TryAddTemplateDynamic(string type, string label, KeyCode keyCode = KeyCode.None, string searchName = null ){ - - Type dynType = GetNodeType(type); - - if(dynType != null){ - if(SF_Debug.dynamicNodeLoad) - Debug.Log( "TryAddTemplateDynamic of " + type ); - return AddTemplate( dynType, label, keyCode, searchName ); - } - if( SF_Debug.dynamicNodeLoad ) - Debug.Log( "TryAddTemplateDynamic of " + type + " was null" ); - return null; - } - - public SF_EditorNodeData AddTemplate( Type type, string label, KeyCode keyCode = KeyCode.None, string searchName = null ) { - SF_EditorNodeData item = ScriptableObject.CreateInstance().Initialize( type.FullName, label, keyCode ); - - if(!string.IsNullOrEmpty(searchName)){ - item.SearchName = searchName; - } - - this.nodeTemplates.Add( item ); - return item; - } - - - - public SF_EditorNodeData GetTemplate() { - foreach( SF_EditorNodeData sft in nodeTemplates ) { - if( sft.type == typeof(T).FullName ) - return sft; - } - return null; - } - - public SF_EditorNodeData GetTemplate( string typeName ) { - foreach( SF_EditorNodeData sft in nodeTemplates ) { - if( sft.type == typeName ) - return sft; - } - return null; - } - - - public void OnShaderModified(NodeUpdateType updType) { - //Debug.Log("OnShaderModified: " + updType.ToString() ); - if( updType == NodeUpdateType.Hard && nodeView.treeStatus.CheckCanCompile() ){ - nodeView.lastChangeTime = (float)EditorApplication.timeSinceStartup; - ShaderOutdated = UpToDateState.OutdatedHard; - } - if(updType == NodeUpdateType.Soft && ShaderOutdated == UpToDateState.UpToDate) - ShaderOutdated = UpToDateState.OutdatedSoft; - - ps.fChecker.UpdateAvailability(); - ps.UpdateAutoSettings(); - } - - public void ResetRunningOutdatedTimer(){ - if(ShaderOutdated == UpToDateState.UpToDate) - return; - if(ShaderOutdated == UpToDateState.OutdatedSoft) // Might not want to have this later - return; - - nodeView.lastChangeTime = (float)EditorApplication.timeSinceStartup; - - } - - /* - public Vector3 GetMouseWorldPos( Vector3 playerPos ) { - - Vector3 camDir = Camera.main.transform.forward; - Ray r = Camera.main.ScreenPointToRay( Input.mousePosition ); - Plane p = new Plane( camDir * -1, playerPos ); - - float dist = 0f; - if( p.Raycast( r, out dist ) ) { - return r.GetPoint( dist ); - } - - Debug.LogError( "Mouse ray did not hit the plane" ); - return Vector3.zero; - }*/ - - public bool InitializeInstance( Shader initShader = null ) { - if(SF_Debug.evalFlow) - Debug.Log( "[SF_LOG] - SF_Editor InitializeInstance(" + initShader + ")" ); - //this.title = ; - - SF_Settings.InitializeSettings(); - this.initialized = true; - this.ps = ScriptableObject.CreateInstance().Initialize( this ); - this.shaderEvaluator = new SF_Evaluator( this ); - this.preview = new SF_PreviewWindow( this ); - this.statusBox = new SF_StatusBox( /*this*/ ); - statusBox.Initialize(this); - - InitializeNodeTemplates(); - - windowStyle = new GUIStyle( EditorStyles.textField ); - windowStyle.margin = new RectOffset( 0, 0, 0, 0 ); - windowStyle.padding = new RectOffset( 0, 0, 0, 0 ); - - titleStyle = new GUIStyle( EditorStyles.largeLabel ); - titleStyle.fontSize = 24; - - versionStyle = new GUIStyle( EditorStyles.miniBoldLabel ); - versionStyle.alignment = TextAnchor.MiddleLeft; - versionStyle.fontSize = 9; - versionStyle.normal.textColor = Color.gray; - versionStyle.padding.left = 1; - versionStyle.padding.top = 1; - versionStyle.padding.bottom = 1; - versionStyle.margin.left = 1; - versionStyle.margin.top = 3; - versionStyle.margin.bottom = 1; - - this.nodes = new List(); - - // Create main output node and add to list - this.nodeView = ScriptableObject.CreateInstance().Initialize( this ); - this.ps.catConsole.treeStatus = this.nodeView.treeStatus; - this.nodeBrowser = ScriptableObject.CreateInstance().Initialize( this ); - this.separatorLeft = ScriptableObject.CreateInstance(); - this.separatorRight = ScriptableObject.CreateInstance(); - - separatorLeft.rect = new Rect(340, 0, 0, 0); - separatorRight.rect = new Rect(Screen.width - 130f, 0, 0, 0); - - this.previousPosition = position; - - if( initShader == null ) { - // TODO: New menu etc - //CreateOutputNode(); - } else { - currentShaderAsset = initShader; - - bool loaded = SF_Parser.ParseNodeDataFromShader( this, initShader ); - if( !loaded ) { - initShader = null; - DestroyImmediate( this ); - return false; - } - - // Make preview material use this shader - //preview.material.shader = currentShaderAsset; - Material m = preview.InternalMaterial; - SF_Tools.AssignShaderToMaterialAsset( ref m, currentShaderAsset ); - } - - // Load data if it was set to initialize things - return true; // Successfully loaded - } - - - - - - public SF_Node CreateOutputNode() { - //Debug.Log ("Creating output node"); - this.mainNode = ScriptableObject.CreateInstance().Initialize( this );//new SFN_Final(); - this.nodes.Add( mainNode ); - return mainNode; - } - - public SF_Node GetNodeByID( int id ) { - for( int i = 0; i < nodes.Count; i++ ) { - if( nodes[i].id == id ) - return nodes[i]; - } - return null; - } - - - - - - public void UpdateKeyHoldEvents(bool mouseOverSomeNode) { - if( nodeTemplates == null || nodeTemplates.Count == 0 ) { - InitializeNodeTemplates(); - } - - //Debug.Log( "nodeTemplates.Count = " + nodeTemplates.Count ); - - foreach( SF_EditorNodeData nData in nodeTemplates ) { - - if( nData == null ) { - InitializeNodeTemplates(); - return; - } - SF_EditorNodeData requestedNode = nData.CheckHotkeyInput(mouseOverSomeNode); - if( requestedNode != null ) { - AddNode( requestedNode, true ); - return; - } - } - /*foreach(KeyValuePair> entry in inputInstancers){ - if(entry.Key.CheckHotkeyInput()){ - AddNode( entry.Key ); - } - }*/ - } - - public T AddNode() where T:SF_Node { - return AddNode(GetTemplate()) as T; - } - - public SF_Node AddNode(string typeName) { - //Debug.Log( "Searching for " + typeName ); - return AddNode( GetTemplate( typeName ) ); - } - - public SF_Node AddNode( SF_EditorNodeData nodeData, bool registerUndo = false ) { - - if( nodeData == null ){ - Debug.Log("Null node data passed into AddNode"); - } - - SF_Node node = nodeData.CreateInstance(); - - if( SF_Debug.dynamicNodeLoad ) { - if( node == null ) - Debug.Log( "nodeData failed to create a node of full path: " + nodeData.fullPath ); - else - Debug.Log( "Created a node of full path: " + nodeData.fullPath ); - } - - if(registerUndo){ - Undo.RecordObject(this, "add node " + node.nodeName); - } - - - nodes.Add( node ); - if(Event.current != null) - Event.current.Use(); - //Repaint(); - return node; - } - - - bool Clicked() { - return Event.current.type == EventType.mouseDown; - } - - float fps = 0; - double prevFrameTime = 1; - public double deltaTime = 0.02; - - - - - - - List coroutines = new List(); - - //double corLastTime; - // double corDeltaTime; - void UpdateCoroutines(){ - //corDeltaTime = EditorApplication.timeSinceStartup - corLastTime; - //corLastTime = EditorApplication.timeSinceStartup; - for(int i = 0; i < coroutines.Count; i++){ - IEnumerator routine = coroutines[i]; - if(!routine.MoveNext()){ - coroutines.RemoveAt(i--); - } - } - } - void StartCoroutine (IEnumerator routine){ - coroutines.Add(routine); - } - - - - - void Update() { - - - - if( closeMe ) { - base.Close(); - return; - } - - - double now = Now(); - double deltaTime = now-prevFrameTime; - fps = 1f/(float)deltaTime; - - - - if(fps > 60) - return; // Wait for target FPS - - - prevFrameTime = now; - - preview.UpdateRot(); - - - - for (int i = nodes.Count - 1; i >= 0; i--) { - if(nodes[i] == null) - nodes.Remove(nodes[i]); - else - nodes[i].Update(); - } - - - // Refresh node previews - int maxUpdatesPerFrame = 80; - int updatedNodes = 0; - - while( updatedNodes < maxUpdatesPerFrame ) { - bool anyUpdated = false; - for( int i = 0; i < nodes.Count; i++ ) { - if( nodes[i].CheckIfDirty() ) { - anyUpdated = true; - updatedNodes++; - } - } - if( !anyUpdated ) { - break; - } - } - - - - - - - if( ShaderOutdated == UpToDateState.OutdatedHard && SF_Settings.autoCompile && nodeView.GetTimeSinceChanged() >= 1f) { - shaderEvaluator.Evaluate(); - } - - - //UpdateCameraZoomValue(); - if(focusedWindow == this) - Repaint(); // Update GUI every frame if focused - - } - - - - MethodInfo isDockedMethod; - const float dockedCheckInterval = 1f; - public float dockedLastUpdate = -100f; - public bool _docked = false; - public bool Docked{ - get{ - if( EditorApplication.timeSinceStartup - dockedLastUpdate > dockedCheckInterval ) { - dockedLastUpdate = (float)EditorApplication.timeSinceStartup; - if( isDockedMethod == null ) { - BindingFlags fullBinding = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static; - isDockedMethod = typeof( EditorWindow ).GetProperty( "docked", fullBinding ).GetGetMethod( true ); - } - _docked = ( bool ) isDockedMethod.Invoke(this, null); - } - return _docked; - } - } - - public int TabOffset{ - get{ - return Docked ? 19 : 22; - } - } - - - - public double Now(){ - TimeSpan t = ( DateTime.UtcNow - startTime ); - return t.TotalSeconds; - } - - - - - void OnWindowResized( int deltaXsize, int deltaYsize ) { - if(separatorRight == null) - ForceClose(); - separatorRight.rect.x += deltaXsize; - } - - void ForceClose() { - //Debug.Log("Force close"); - closeMe = true; - GUIUtility.ExitGUI(); - } - - void AddDependenciesHierarchally(SF_Node node, DependencyTree tree){ - node.ReadDependencies(); - tree.Add(node); - foreach(SF_Node n in ((IDependable)node).Dependencies){ - AddDependenciesHierarchally(n, tree); - } - } - - public List GetDepthSortedDependencyTreeForConnectedNodes(bool reverse = false){ - DependencyTree tree = new DependencyTree(); - - AddDependenciesHierarchally(mainNode, tree); - //Debug.Log(tree.tree.Count); - tree.Sort(); - - List list = tree.tree.Select(x=>(SF_Node)x).ToList(); - if(reverse) - list.Reverse(); - return list; - } - - string fullscreenMessage = ""; - public Rect previousPosition; - public bool closeMe = false; - void OnGUI() { - - //Debug.Log("SF_Editor OnGUI()"); - - //SF_AllDependencies.DrawDependencyTree(new Rect(0, 0, Screen.width, Screen.height)); - //return; - -// if(Event.current.keyCode == KeyCode.Space && Event.current.type == EventType.keyDown){ -// Debug.Log("Beep"); -// Event.current.Use(); -// -// -// -// } - - if(SF_Parser.quickLoad) // Don't draw while loading - return; - - if(SF_Debug.performance) - GUI.Label(new Rect(500,64,128,64),"fps: "+fps.ToString()); - - if( position != previousPosition ) { - OnWindowResized( (int)(position.width - previousPosition.width), (int)(position.height - previousPosition.height) ); - previousPosition = position; - } - - Rect fullRect = new Rect( 0, 0, Screen.width, Screen.height); - //Debug.Log( fullRect ); - - if( currentShaderAsset == null ) { - DrawMainMenu(); - return; - } - - if(!string.IsNullOrEmpty(fullscreenMessage)){ - GUI.Box(fullRect,fullscreenMessage); - return; - } - - - - //UpdateCameraZoomInput(); - - - if(Event.current.rawType == EventType.ValidateCommand && Event.current.commandName == "UndoRedoPerformed"){ - Defocus(deselectNodes:false); - CheckForDirtyNodes(); // When undoing, some nodes will come back as dirty, which means they need to update their values - shaderEvaluator.ps.fChecker.UpdateAvailability(); - ResetRunningOutdatedTimer(); - } - - - if( nodes != null ) { - - //foreach( SF_Node n in nodes ) { - for( int i = 0; i < nodes.Count;i++ ) { - SF_Node n = nodes[i]; - - if( n == null ) { - // THIS MEANS YOU STARTED UNITY WITH SF OPEN - ForceClose(); - return; - } else{ - n.DrawConnections(); - } - } - - } - - if(separatorLeft == null){ - // THIS MEANS YOU STARTED UNITY WITH SF OPEN - ForceClose(); - return; - } - - - - - //EditorGUILayout.BeginHorizontal(); - //{ - //float wPreview = leftSeparator; - //float wNodeBrowser = 130; - - Rect pRect = new Rect( fullRect ); - pRect.height /= EditorGUIUtility.pixelsPerPoint; - pRect.width /= EditorGUIUtility.pixelsPerPoint; - pRect.width = separatorLeft.rect.x; - SF_GUI.FillBackground( pRect ); - DrawPreviewPanel( pRect ); - Rect previewPanelRect = pRect; - - //pRect.x += leftWidth; - //pRect.width = wSeparator; - //VerticalSeparatorDraggable(ref leftWidth, pRect ); - separatorLeft.MinX = 320; - separatorLeft.MaxX = (int)( fullRect.width / 2f - separatorLeft.rect.width ); - separatorLeft.Draw( (int)pRect.y, (int)pRect.height ); - pRect.x = separatorLeft.rect.x + separatorLeft.rect.width; - - - if(SF_Settings.showNodeSidebar) - pRect.width = separatorRight.rect.x - separatorLeft.rect.x - separatorLeft.rect.width; - else - pRect.width = Screen.width - separatorLeft.rect.x - separatorLeft.rect.width; - //GUI.Box( new Rect( 300, 0, 512, 32 ), pRect.ToString() ); - - if( SF_Debug.nodes ) { - Rect r = pRect; r.width = 256; r.height = 16; - for( int i = 0; i < nodes.Count; i++ ) { - GUI.Label( r, "Node[" + i + "] at {" + nodes[i].rect.x + ", " + nodes[i].rect.y + "}", EditorStyles.label ); // nodes[i] - r = r.MovedDown(); - } - } - - if( Event.current.rawType == EventType.keyUp ){ - foreach(SF_EditorNodeData nd in nodeTemplates){ - nd.holding = false; - } - } - - - nodeView.OnLocalGUI( pRect.PadTop(TabOffset) ); // 22 when not docked, 19 if docked - //GUI.EndGroup(); - - //pRect.yMin -= 3; // if docked - - - - - - //pRect.x += pRect.width; - //pRect.width = wSeparator; - //VerticalSeparatorDraggable(ref rightWidth, pRect ); - if(SF_Settings.showNodeSidebar){ - separatorRight.MinX = (int)(fullRect.width / EditorGUIUtility.pixelsPerPoint) - 150; - separatorRight.MaxX = (int)(fullRect.width / EditorGUIUtility.pixelsPerPoint) - 32; - separatorRight.Draw( (int)pRect.y, (int)pRect.height ); - - pRect.x += pRect.width + separatorRight.rect.width; - pRect.width = (fullRect.width / EditorGUIUtility.pixelsPerPoint) - separatorRight.rect.x - separatorRight.rect.width; - - SF_GUI.FillBackground( pRect ); - nodeBrowser.OnLocalGUI( pRect ); - } - - - - - // Last thing, right? - - ssButtonColor = Color.Lerp(ssButtonColor,ssButtonColorTarget, (float)deltaTime*ssButtonFadeSpeed); - - if(previewPanelRect.Contains(Event.current.mousePosition)){ - - ssButtonColorTarget = Color.white; - ssButtonFadeSpeed = 0.4f; - - - } else { - ssButtonColorTarget = new Color(1f,1f,1f,0f); // TODO LERP - ssButtonFadeSpeed = 1.5f; - } - Rect ssRect = new Rect(8,previewButtonHeightOffset,32,19); - GUI.color = ssButtonColor; - if(GUI.Button(ssRect, SF_GUI.Screenshot_icon)){ - GenericMenu menu = new GenericMenu(); - menu.AddItem( new GUIContent("Take screenshot of node tree"), false, ContextClickScreenshot, "ss_standard" ); - menu.AddItem( new GUIContent("Take screenshot of node tree without 3D preview"), false, ContextClickScreenshot, "ss_nopreview" ); - menu.ShowAsContext(); - - } - GUI.color = Color.white; - - //Rect ssRectIcon = new Rect(0f, 0f, SF_GUI.Screenshot_icon.width, SF_GUI.Screenshot_icon.height); - ////ssRectIcon.center = ssRect.center; - //GUI.DrawTexture(ssRectIcon, SF_GUI.Screenshot_icon); - - - if(Event.current.type == EventType.repaint) - UpdateCoroutines(); - - - DrawTooltip(); - - } - - - public void CheckForDirtyNodes(){ - - for(int i=0;i 0){ - shaderTitle = split[split.Length-1]; - } - } - } - - - - - - for(int ix=0;ix nodeRects = new List(); - List lines = new List(); - for(int i=0;i longestDist){ - longestDist = shortest; - longestDistPt = testPt; - //pixel = Color.red; - }// else { - //pixel = Color.white * Mathf.Clamp01(shortest/(Mathf.Max(nodeWrap.width,nodeWrap.height)*0.2f)); - //} - - - - //pixel.a = 1f; - //newMaskPixels[i] = pixel; - } - //mask.SetPixels(newMaskPixels); - //mask.Apply(); - radius = longestDist; - return longestDistPt; - } - - - - - // TOOLTIP, Draw this last - public void DrawTooltip() { - /* - if( !string.IsNullOrEmpty( GUI.tooltip ) ) { - //Debug.Log( "TOOLTIP" ); - GUIStyle tooltipStyle = EditorStyles.miniButton; - GUI.Box( - new Rect( - Event.current.mousePosition.x + 32, - Event.current.mousePosition.y, - tooltipStyle.CalcSize( new GUIContent( GUI.tooltip ) ).x * 1.1f, - tooltipStyle.CalcSize( new GUIContent( GUI.tooltip ) ).y * 1.2f - ), - GUI.tooltip, tooltipStyle - ); - } - GUI.tooltip = null;*/ - } - - public void Defocus(bool deselectNodes = false) { - //Debug.Log("DEFOCUS"); -// string currentFocus = GUI.GetNameOfFocusedControl(); -// if( currentFocus != "defocus"){ - GUI.FocusControl("null"); -// } - - if( deselectNodes ) - nodeView.selection.DeselectAll(registerUndo:true); - } - - - public bool DraggingAnySeparator() { - return separatorLeft.dragging || separatorRight.dragging; - } - - - - public void FlexHorizontal(Action func){ - GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); - func(); - GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); - } - - public void FlexHorizontal(Action func, float width){ - GUILayout.BeginHorizontal(GUILayout.Width(width)); GUILayout.Space(Screen.width/2f - 335); - func(); - GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); - } - - - public static string updateCheck = ""; - public static bool outOfDate = false; - - public static void CheckForUpdates(){ - updateCheck = "Checking for updates..."; - //Debug.Log(updateCheck); - - WebClient wc = new WebClient(); - - string latestVersion; - - try{ - latestVersion = wc.DownloadString("http://www.acegikmo.com/shaderforge/latestversion.php"); - string[] split = latestVersion.Split('.'); - int latestMajor = int.Parse(split[0]); - int latestMinor = int.Parse(split[1]); - - if(latestMajor > SF_Tools.versionNumPrimary){ - outOfDate = true; - } else if(latestMajor == SF_Tools.versionNumPrimary && latestMinor > SF_Tools.versionNumSecondary){ - outOfDate = true; - } else { - outOfDate = false; - } - - if(outOfDate){ - updateCheck = "Shader Forge is out of date!\nYou are running " + SF_Tools.version + ", the latest version is " + latestVersion; - } else { - updateCheck = "Shader Forge is up to date!"; - } - - - - - } catch ( WebException e){ - updateCheck = "Couldn't check for updates: " + e.Status; - } - - - } - - - private enum MainMenuState{Main, Credits, PresetPick} - - private MainMenuState menuState = MainMenuState.Main; - - - public void DrawMainMenu() { - - - //SF_AllDependencies.DrawDependencyTree(new Rect(0f,0f,Screen.width,Screen.height)); - //return; - - if(string.IsNullOrEmpty(updateCheck)){ - CheckForUpdates(); - } - - GUILayout.BeginVertical(); - { - GUILayout.FlexibleSpace(); - - - FlexHorizontal(()=>{ - GUILayout.Label( SF_GUI.Logo ); - if(outOfDate) - GUI.color = Color.red; - GUILayout.Label( SF_Tools.versionStage + " v" + SF_Tools.version, EditorStyles.boldLabel ); - if(outOfDate) - GUI.color = Color.white; - }); - - - if(menuState == MainMenuState.Main){ - minSize = new Vector2(500,400); - DrawPrimaryMainMenuGUI(); - } else if( menuState == MainMenuState.PresetPick ) { - minSize = new Vector2( 128*(shaderPresetNames.Length + 1), 560 ); - DrawPresetPickGUI(); - } else if(menuState == MainMenuState.Credits){ - - //Vector2 centerPrev = position.center; - - minSize = new Vector2(740,560); - - //Rect rWnd = position; - //rWnd.center = new Vector2( 800,800); - //position = rWnd; - - - DrawCreditsGUI(); - } - - - - - GUILayout.FlexibleSpace(); - } - GUILayout.EndVertical(); - - - } - - public void DrawCreditsGUI(){ - EditorGUILayout.Separator(); - FlexHorizontal(()=>{ - GUILayout.Label( "Thanks for purchasing Shader Forge <3" ); - }); - EditorGUILayout.Separator(); - EditorGUILayout.Separator(); - FlexHorizontal(()=>{ - GUILayout.Label( "Created by ", SF_Styles.CreditsLabelText); - GUILayout.Label( "Freya 'Acegikmo' Holm" + '\u00e9' + "r", EditorStyles.boldLabel); - }); - EditorGUILayout.Separator(); - EditorGUILayout.Separator(); - FlexHorizontal(()=>{ - GUILayout.Label( "Special thanks:", EditorStyles.boldLabel ); - }); - CreditsLine("All of the alpha & beta testers","For their amazing feedback during the early days!" ); - CreditsLine( "Jenny 'sranine' Nordenborg", "For creating the Shader Forge logo and for supporting me throughout the development time!" ); - CreditsLine( "Peter Cornelius", "For convincing me that I should have started creating SF in the first place" ); - CreditsLine( "Robert Briscoe", "For actively testing SF and providing excellent feedback" ); - CreditsLine( "Thomas Pasieka", "For helping out immensely in getting the word out, as well as motivating me to continue" ); - CreditsLine( "Aras Pranckevi" +'\u010D'+ "ius", "For helping out with various shader code issues"); - CreditsLine( "Renaldas 'ReJ' Zioma", "For assisting in the Unity 5 transition" ); - CreditsLine( "Tim 'Stramit' Cooper & David 'Texel' Jones", "For giving helpful tips"); - CreditsLine( "Sander 'Zerot' Homan", "For helping out stealing Unity's internal RT code"); - CreditsLine( "Carlos 'Darkcoder' Wilkes", "For helping out with various serialization issues"); - CreditsLine( "Ville 'wiliz' Mäkynen", "For helping out with the undo system"); - CreditsLine( "Daniele Giardini", "For his editor window icon script (also, check out his plugin DOTween!)"); - CreditsLine( "Beck Sebenius", "For helping out getting coroutines to run in the Editor"); - CreditsLine( "James 'Farfarer' O'Hare", "For asking all the advanced shader questions on the forums so I didn't have to"); - CreditsLine( "Tenebrous", "For helping with... Something... (I can't remember)"); - CreditsLine( "Alex Telford", "For his fragment shader tutorials"); - CreditsLine( "Shawn White", "For helping out finding how to access compiled shaders from code"); - CreditsLine( "Colin Barr"+ '\u00e9' +"-Brisebois & Stephen Hill", "For their research on normal map blending"); - CreditsLine( "Andrew Baldwin", "For his articles on pseudorandom numbers" ); - - - EditorGUILayout.Separator(); - FlexHorizontal(()=>{ - if( GUILayout.Button( "Return to menu", GUILayout.Height( 30f ), GUILayout.Width( 190f ) ) ) { - menuState = MainMenuState.Main; - } - }); - } - - public void CreditsLine(string author, string reason){ - FlexHorizontal(()=>{ - GUILayout.Label( author, EditorStyles.boldLabel ); - GUILayout.Label(" - ", SF_Styles.CreditsLabelText ); - GUILayout.Label( reason, SF_Styles.CreditsLabelText ); - },400f); - } - - public enum ShaderPresets { Unlit, LitPBR, LitBasic, Custom, Sprite, ParticleAdditive, ParticleAlphaBlended, ParticleMultiplicative, Sky, PostEffect } - public string[] shaderPresetNames = new string[] { - "Unlit", - "Lit\n(PBR)", - "Lit\n(Basic)", - "Custom Lighting", - "Sprite", - "Particle\n(Additive)", - "Particle\n(Alpha-Blended)", - "Particle\n(Multiplicative)", - "Sky", - "Post-Effect" - }; - - public string[] shaderPresetShaders = new string[] { - "Unlit", - "PBR", - "Basic", - "CustomLighting", - "Sprite", - "ParticleAdditive", - "ParticleAlphaBlended", - "ParticleMultiplicative", - "Sky", - "PostEffect" - }; - - public string GetShaderPresetPath(ShaderPresets preset) { - int i = (int)preset; - string file = "preset" + shaderPresetShaders[i] + ".shader"; - return SF_Resources.InternalResourcesPath + "Shader Presets/" + file; - } - - - public string[] shaderPresetDescriptions = new string[] { - "Unlit means that light sources will not affect this shader, it will simply have the color you give it, regardless of the scene setup.", - "Lit (PBR) is set up to match Unity's Physically Based shader, affected by lightmaps, light probes, reflection probes etc.", - "Lit (Basic) is the old-school Blinn-Phong lighting model. Direct lighting only, no lightmap or probe data.", - "Custom Lighting is set up with a simple example of how you can create your own lighting models. The initial setup is a Blinn-Phong shader.", - "Sprite is for creating 2D shaders to be used on sprites. These will have the pixel-perfect option and sort properly with other 2D sprites.", - "Particle (Additive) is generally for glow effects, lightshafts, sparks etc. Primarily used in particle systems.", - "Particle (Alpha-Blended) is generally for debris effects, dusty smoke etc. Primarily used in particle systems.", - "Particle (Multiplicative) is generally for darkening effects, black smoke, evil-looking anti-glow etc. Primarily used in particle systems.", - "Sky is for creating shaders to be used with a sky material in your scene. It will render behind everything else.", - "Post-Effect is for creating shaders meant to render full-screen rather than at a position in the world, commonly used for post-process effects" - }; - - string desc = ""; - - public void DrawPresetPickGUI() { - - GUIStyle centerLabel = new GUIStyle( EditorStyles.boldLabel ); - GUIStyle centerLabelSmall = new GUIStyle( EditorStyles.miniLabel ); - centerLabel.alignment = centerLabelSmall.alignment = TextAnchor.MiddleCenter; - - - EditorGUILayout.Separator(); - FlexHorizontal( () => { - GUILayout.BeginVertical(); - GUILayout.Label( "What kind of shader do you want to forge?", centerLabel ); - GUI.color = new Color(1f,1f,1f,0.4f); - GUILayout.Label( "This will simply affect the initial configuration of the shader. It will not \"lock-in\" any features", centerLabelSmall ); - GUI.color = Color.white; - GUILayout.EndVertical(); - } ); - EditorGUILayout.Separator(); - - - - FlexHorizontal( () => { - - GUILayoutOption[] btnLayout = new GUILayoutOption[2] { GUILayout.Width( 128 ), GUILayout.Height( 128 ) }; - - GUIStyle style = new GUIStyle( EditorStyles.boldLabel ); - style.alignment = TextAnchor.UpperCenter; - - //if( Event.current.type == EventType.mouseMove) - //desc = ""; - - //GUILayout.BeginVertical(); - for(int i=0;i { - GUILayout.Label( desc, centerLabelSmall ); - }); - - EditorGUILayout.Separator(); - EditorGUILayout.Separator(); - - FlexHorizontal( () => { - if( GUILayout.Button( "Back" ) ) { - menuState = MainMenuState.Main; - } - } ); - - - - - } - - - public Texture2D GetShaderPresetIcon(ShaderPresets preset) { - - switch( preset ) { - - case ShaderPresets.Custom: - return SF_GUI.Shader_preset_icon_custom; - case ShaderPresets.LitBasic: - return SF_GUI.Shader_preset_icon_litbasic; - case ShaderPresets.LitPBR: - return SF_GUI.Shader_preset_icon_litpbr; - case ShaderPresets.ParticleAdditive: - return SF_GUI.Shader_preset_icon_particleadditive; - case ShaderPresets.ParticleAlphaBlended: - return SF_GUI.Shader_preset_icon_particlealphablended; - case ShaderPresets.ParticleMultiplicative: - return SF_GUI.Shader_preset_icon_particlemultiplicative; - case ShaderPresets.Sky: - return SF_GUI.Shader_preset_icon_sky; - case ShaderPresets.Sprite: - return SF_GUI.Shader_preset_icon_sprite; - case ShaderPresets.Unlit: - return SF_GUI.Shader_preset_icon_unlit; - case ShaderPresets.PostEffect: - return SF_GUI.Shader_preset_icon_posteffect; - - } - - Debug.LogError("No preset icon found"); - - return null; - - - } - - - public void DrawPrimaryMainMenuGUI(){ - - - - FlexHorizontal(()=>{ - GUI.color = new Color( 0.7f, 0.7f, 0.7f ); - if( GUILayout.Button( '\u00a9' + " Freya 'Acegikmo' Holm" + '\u00e9' + "r", EditorStyles.miniLabel ) ) { - Application.OpenURL("https://twitter.com/FreyaHolmer"); - } - - SF_GUI.AssignCursorForPreviousRect( MouseCursor.Link ); - GUI.color = Color.white; - }); - - EditorGUILayout.Separator(); - - /* - FlexHorizontal(()=>{ - if( GUILayout.Button(SF_Tools.manualLabel , GUILayout.Height( 32f ), GUILayout.Width( 190f ) ) ) { - Application.OpenURL( SF_Tools.manualURL ); - } - }); - */ - - FlexHorizontal(()=>{ - - if(SF_Tools.CanRunShaderForge()){ - if( GUILayout.Button( "New Shader", GUILayout.Width( 128 ), GUILayout.Height( 64 ) ) ) { - menuState = MainMenuState.PresetPick; - } - if( GUILayout.Button( "Load Shader", GUILayout.Width( 128 ), GUILayout.Height( 64 ) ) ) { - OpenLoadDialog(); - } - } else { - GUILayout.BeginVertical(); - SF_Tools.UnityOutOfDateGUI(); - GUILayout.EndVertical(); - } - }); - - - - FlexHorizontal(()=>{ - if( GUILayout.Button( "Polycount thread" ) ) { - Application.OpenURL( "http://www.polycount.com/forum/showthread.php?t=123439" ); - } - if( GUILayout.Button( "Unity thread" ) ) { - Application.OpenURL( "http://forum.unity3d.com/threads/222049-Shader-Forge-A-visual-node-based-shader-editor" ); - } - if( GUILayout.Button( SF_Tools.documentationLabel ) ) { - Application.OpenURL( SF_Tools.documentationURL ); - } - if( GUILayout.Button( "Wiki" ) ) { - Application.OpenURL( "http://acegikmo.com/shaderforge/wiki" ); - } - if( GUILayout.Button("Credits") ){ - menuState = MainMenuState.Credits; - } - }); - - - FlexHorizontal( () => { - if( GUILayout.Button( SF_Tools.bugReportLabel, GUILayout.Height( 32f ), GUILayout.Width( 180f ) ) ) { - Application.OpenURL( SF_Tools.bugReportURL ); - } - } ); - - FlexHorizontal( () => { - if( GUILayout.Button( "Forums", GUILayout.Height( 32f ), GUILayout.Width( 120f ) ) ) { - Application.OpenURL( "http://neatcorporation.com/forums/viewforum.php?f=1" ); - } - } ); - - EditorGUILayout.Separator(); - FlexHorizontal(()=>{ - GUILayout.Label(updateCheck); - }); - if(outOfDate){ - float t = (Mathf.Sin((float)EditorApplication.timeSinceStartup*Mathf.PI*2f)*0.5f)+0.5f; - GUI.color = Color.Lerp(Color.white, new Color(0.4f,0.7f,1f),t); - FlexHorizontal(()=>{ - if(GUILayout.Button("Download latest version")){ - Application.OpenURL( "https://www.assetstore.unity3d.com/#/content/14147" ); - } - }); - t = (Mathf.Sin((float)EditorApplication.timeSinceStartup*Mathf.PI*2f-1)*0.5f)+0.5f; - GUI.color = Color.Lerp(Color.white, new Color(0.4f,0.7f,1f),t); - FlexHorizontal(()=>{ - if(GUILayout.Button("What's new?")){ - Application.OpenURL( "http://acegikmo.com/shaderforge/changelog/" ); - } - }); - GUI.color = Color.green; - } - } - - - - public bool PropertyNameTaken(SF_ShaderProperty sProp){ - foreach(SF_Node n in nodes){ - if(n == sProp.node) - continue; - if(n.IsProperty()) - if(n.property.nameDisplay == sProp.nameDisplay || n.property.nameInternal == sProp.nameInternal) - return true; - } - return false; - } - - - public void OpenLoadDialog(){ - string path = EditorUtility.OpenFilePanel( - "Load Shader", - "Assets", - "shader" - ); - - if( string.IsNullOrEmpty( path ) ) { - //Debug.LogError("No path selected"); - return; - } else { - - // Found file! Make sure it's a shader - - path = SF_Tools.PathFromAbsoluteToProject( path ); - Shader loadedShader = (Shader)AssetDatabase.LoadAssetAtPath(path, typeof(Shader)); - if( loadedShader == null ) { - Debug.LogError( "Selected shader not found" ); - return; - } - - - - bool isSFshader = SF_Parser.ContainsShaderForgeData(loadedShader); - - bool allowEdit = isSFshader; - if(!allowEdit) - allowEdit = SF_GUI.AcceptedNewShaderReplaceDialog(); - - - if( allowEdit ) { - SF_Editor.Init( loadedShader ); - } else { - //Debug.LogError( "User cancelled loading operation" ); - } - - } - - } - - - - public bool TryCreateNewShader(SF_Editor.ShaderPresets preset) { - - - - - - //Shader s = (Shader)AssetDatabase.LoadAssetAtPath( presetPath, typeof(Shader) ); - //Debug.Log( s); - - - - string savePath = EditorUtility.SaveFilePanel( - "Save new shader", - "Assets", - "NewShader", - "shader" - ); - - if( string.IsNullOrEmpty( savePath ) ) { - return false; - } - - string presetPath = GetShaderPresetPath( preset ); - StreamReader presetReader = new StreamReader( Application.dataPath + presetPath.Substring( 6 ) ); - - // So we now have the path to save it, let's save - StreamWriter sw; - if( !File.Exists( savePath ) ) { - sw = File.CreateText( savePath ); - } else { - sw = new StreamWriter(savePath); - } - - // Read from preset - string[] presetLines = presetReader.ReadToEnd().Split( '\n' ); - for( int i=0; i < presetLines.Length; i++ ) { - if( presetLines[i].StartsWith( "Shader \"Hidden/" ) ) { - - // Extract name of the file to put in the shader path - string[] split = savePath.Split( '/' ); - currentShaderPath = split[split.Length - 1].Split( '.' )[0]; - currentShaderPath = "Shader Forge/" + currentShaderPath; - - // Write to the line - presetLines[i] = "Shader \"" + currentShaderPath + "\" {"; - - break; - } - } - - // Read from the preset - for( int i=0; i < presetLines.Length; i++ ) { - sw.WriteLine( presetLines[i] ); - } - - sw.Flush(); - sw.Close(); - presetReader.Close(); - AssetDatabase.Refresh(); - - // Shorten it to a relative path - string dataPath = Application.dataPath; - string assetPath = "Assets/" + savePath.Substring( dataPath.Length + 1 ); - - // Assign a reference to the file - currentShaderAsset = (Shader)AssetDatabase.LoadAssetAtPath( assetPath, typeof( Shader ) ); - - if( currentShaderAsset == null ) { - Debug.LogError( "Couldn't load shader asset" ); - Debug.Break(); - return false; - } - - - - // Make sure the preview material is using the shader - preview.InternalMaterial.shader = currentShaderAsset; - - // That's about it for the file/asset management. - //CreateOutputNode(); - SF_Editor.Init( currentShaderAsset ); - //shaderEvaluator.Evaluate(); // And we're off! - - //nodeView.CenterCamera(); - - return true; - } - - public string GetShaderFilePath() { - - if( currentShaderAsset == null ) { - Debug.LogError( "Tried to find path of null shader asset!" ); - Debug.Break(); - return null; - } - return AssetDatabase.GetAssetPath( currentShaderAsset ); - } - - public bool displaySettings = false; - - public void DrawPreviewPanel( Rect r ) { - // Left side shader preview - - //Rect logoRect = new Rect( 1, 0, SF_GUI.Logo.width, SF_GUI.Logo.height ); - - //GUI.DrawTexture( logoRect, SF_GUI.Logo ); - - Rect btnRect = new Rect(r); - btnRect.y += 4; - btnRect.x += 2; - //btnRect.xMin += logoRect.width; - - int wDiff = 8; - - btnRect.height = 17; - btnRect.width /= 4; - btnRect.width += wDiff; - - GUIStyle btnStyle = EditorStyles.miniButton; - - if(GUI.Button(btnRect,"Return to menu",btnStyle)){ - OnPressBackToMenuButton(); - } - btnRect.x += btnRect.width; - btnRect.xMax -= wDiff*2; - btnRect.width *= 0.75f; - displaySettings = GUI.Toggle(btnRect, displaySettings, "Settings",btnStyle); - - btnRect.x += btnRect.width; - btnRect.width *= 2f; - - GUI.color = SF_GUI.outdatedStateColors[(int)ShaderOutdated]; - if( GUI.Button( btnRect, "Compile shader", btnStyle ) ) { - if(nodeView.treeStatus.CheckCanCompile()) - shaderEvaluator.Evaluate(); - } - GUI.color = Color.white; - - nodeView.DrawRecompileTimer(btnRect); - btnRect.x += btnRect.width; - btnRect.width *= 0.5f; - - SF_Settings.autoCompile = GUI.Toggle( btnRect, SF_Settings.autoCompile, "Auto" ); - - btnRect.y += 4; - - - - // SETTINGS EXPANSION - if(displaySettings){ - btnRect.y += btnRect.height; - btnRect.x = r.x - 4; - btnRect.width = r.width / 4f; - btnRect.x += btnRect.width; - btnRect.width *= 2.55f; - - /*Rect[] splitRects = btnRect.SplitHorizontal( 0.5f, 1 ); // Node render mode control - GUI.Label( splitRects[1], "Node rendering" ); - EditorGUI.BeginChangeCheck(); - SF_Settings.nodeRenderMode = (NodeRenderMode)EditorGUI.EnumPopup( splitRects[0], SF_Settings.nodeRenderMode ); - if( EditorGUI.EndChangeCheck() ) { - RegenerateNodeBaseData(); - } - btnRect = btnRect.MovedDown();*/ - if( SF_Settings.nodeRenderMode == NodeRenderMode.Viewport ) { - EditorGUI.BeginDisabledGroup( true ); - GUI.Toggle( btnRect, true, "Real-time node rendering" ); - EditorGUI.EndDisabledGroup(); - } else { - EditorGUI.BeginChangeCheck(); - SF_Settings.realtimeNodePreviews = GUI.Toggle( btnRect, SF_Settings.realtimeNodePreviews, "Real-time node rendering" ); - if( EditorGUI.EndChangeCheck() ) { - RegenerateNodeBaseData(); - } - } - - btnRect = btnRect.MovedDown(); - SF_Settings.quickPickScrollWheel = GUI.Toggle( btnRect, SF_Settings.quickPickScrollWheel, "Use scroll in the quickpicker" ); - btnRect = btnRect.MovedDown(); - SF_Settings.showVariableSettings = GUI.Toggle( btnRect, SF_Settings.showVariableSettings, "Show variable name & precision" ); - btnRect = btnRect.MovedDown(); - SF_Settings.showNodeSidebar = GUI.Toggle( btnRect, SF_Settings.showNodeSidebar, "Show node browser panel" ); - btnRect = btnRect.MovedDown(); - if( SF_GUI.HoldingControl() ) { - EditorGUI.BeginDisabledGroup( true ); - GUI.Toggle( btnRect, !SF_Settings.hierarchalNodeMove, "Hierarchal Node Move" ); - EditorGUI.EndDisabledGroup(); - } else { - SF_Settings.hierarchalNodeMove = GUI.Toggle( btnRect, SF_Settings.hierarchalNodeMove, "Hierarchal Node Move" ); - } - - btnRect.y += 4; - } - - - - - //GUI.Box( new Rect(203,10,128,19), SF_Tools.versionStage+" "+SF_Tools.version, versionStyle ); - previewButtonHeightOffset = (int)btnRect.yMax + 24; - int previewOffset = preview.OnGUI( (int)btnRect.yMax, (int)r.width ); - int statusBoxOffset = statusBox.OnGUI( previewOffset, (int)r.width ); - - - ps.OnLocalGUI(statusBoxOffset, (int)r.width ); - if( SF_Debug.nodes ) { - GUILayout.Label( "Node count: " + nodes.Count ); - } - - } - - void RegenerateNodeBaseData() { - for( int i = 0; i < nodes.Count; i++ ) { - nodes[i].GenerateBaseData(); - } - } - - int previewButtonHeightOffset; - - public void OnPressBackToMenuButton(){ - shaderEvaluator.SaveShaderAsset(); - Close(); - Init(); - } - - - public void OnPressSettingsButton(){ - - } - - - - - - - - public void OnShaderEvaluated() { - // statusBox.UpdateInstructionCount( preview.InternalMaterial.shader ); - } - - - - public void CheckForBrokenConnections() { - foreach( SF_Node node in nodes ) - node.CheckForBrokenConnections(); - } - - } +using UnityEngine; +using UnityEditor; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Xml; +using System.Reflection; +using System.Net; +using System.Collections; + + + + +namespace ShaderForge { + + + public delegate T Func(); + + public enum UpToDateState{UpToDate, OutdatedSoft, OutdatedHard}; + + [Serializable] + public class SF_Editor : EditorWindow { + [SerializeField] + public SF_Evaluator shaderEvaluator; + [SerializeField] + public SF_PreviewWindow preview; + [SerializeField] + public SF_EditorNodeView nodeView; + [SerializeField] + public SF_EditorNodeBrowser nodeBrowser; + [SerializeField] + public SF_PassSettings ps; // TODO: Move + + [System.NonSerialized] + public static SF_Editor instance; + [SerializeField] + public SFN_Final mainNode; + [SerializeField] + public SF_StatusBox statusBox; + + [SerializeField] + public List nodes; + + [SerializeField] + DateTime startTime = DateTime.UtcNow; + + [SerializeField] + GUIStyle windowStyle; + [SerializeField] + GUIStyle titleStyle; + [SerializeField] + GUIStyle versionStyle; + [SerializeField] + GUIStyle nodeScrollbarStyle; + + [SerializeField] + public SF_DraggableSeparator separatorLeft; + + [SerializeField] + public SF_DraggableSeparator separatorRight; + + public Vector2 mousePosition = Vector2.zero; + + [SerializeField] + public Shader currentShaderAsset; + [SerializeField] + public string currentShaderPath; + + [SerializeField] + public List nodeTemplates; + + [SerializeField] + private UpToDateState shaderOutdated = UpToDateState.UpToDate; + public UpToDateState ShaderOutdated{ + get{ + return shaderOutdated; + } + set{ + if(shaderOutdated != value){ + //Debug.Log("Changed outdated state to " + value); + shaderOutdated = value; + } + } + } + + [NonSerialized] + public bool initialized = false; + + + + + public SF_Editor() { + if(SF_Debug.window) + Debug.Log( "[SF_LOG] - SF_Editor CONSTRUCTOR SF_Editor()" ); + SF_Editor.instance = this; + } + + [MenuItem( "Window/Shader Forge" )] + static void InitEmpty() { + if( SF_Editor.instance == null ) + Init( null ); + else { + EditorWindow.GetWindow( typeof( SF_Editor ) ); // Focus + } + } + + void OnEnable() { + SF_Settings.LoadAllFromDisk(); + titleContent = new GUIContent( "Shader Forge", (Texture)SF_GUI.Icon ); + if( this.preview != null ) + preview.OnEnable(); + } + + void OnDisable(){ + + if(shaderOutdated != UpToDateState.UpToDate){ + + fullscreenMessage = "Saving..."; + Repaint(); + shaderEvaluator.Evaluate(); + } + + if( this.preview != null ) + preview.OnDisable(); + + SF_Settings.SaveAllToDisk(); + + } + + + void OnDestroy(){ + DestroyImmediate( preview.internalMaterial ); + } + + public static bool Init( Shader initShader = null ) { + + // To make sure you get periods as decimal separators + System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US"); + + if(SF_Debug.evalFlow || SF_Debug.dynamicNodeLoad) + Debug.Log( "[SF_LOG] - SF_Editor Init(" + initShader + ")" ); + SF_Editor materialEditor = (SF_Editor)EditorWindow.GetWindow( typeof( SF_Editor ) ); + SF_Editor.instance = materialEditor; + updateCheck = ""; + bool loaded = materialEditor.InitializeInstance( initShader ); + if( !loaded ) + return false; + return true; + } + + public int GetUniqueNodeID() { + + int[] occupiedIDs = nodes.Select( x => x.id ).ToArray(); + int id = -1; + int limit = 1000000; + + do { + id = UnityEngine.Random.Range(1,9999); + limit--; + } while( occupiedIDs.Contains( id ) && limit > 0 ); + + if( limit <= 0 ) + Debug.LogError("Ran out of attempts to find a unique node ID"); + + return id; + } + + + + + + public void InitializeNodeTemplates() { + nodeTemplates = new List(); + + + // AddTemplate( typeof( SFN_CommentBox ), "Comment Box" ); + + string catArithmetic = "Arithmetic/"; + AddTemplate( typeof( SFN_Abs ), catArithmetic + "Abs" ); + AddTemplate( typeof( SFN_Add ), catArithmetic + "Add", KeyCode.A ); + AddTemplate( typeof( SFN_Blend ), catArithmetic + "Blend", KeyCode.B ); + AddTemplate( typeof( SFN_Ceil ), catArithmetic + "Ceil" ); + AddTemplate( typeof( SFN_Clamp ), catArithmetic + "Clamp" ); + AddTemplate( typeof( SFN_Clamp01 ), catArithmetic + "Clamp 0-1" ); + AddTemplate( typeof( SFN_ConstantClamp ), catArithmetic + "Clamp (Simple)",KeyCode.None, "Clamp Simple" ); + AddTemplate( typeof( SFN_Divide ), catArithmetic + "Divide", KeyCode.D ); + AddTemplate( typeof( SFN_Exp ), catArithmetic + "Exp" ); + AddTemplate( typeof( SFN_Floor ), catArithmetic + "Floor" ); + AddTemplate( typeof( SFN_Fmod ), catArithmetic + "Fmod" ); + AddTemplate( typeof( SFN_Frac ), catArithmetic + "Frac" ); + AddTemplate( typeof( SFN_HsvToRgb ), catArithmetic + "HSV to RGB" ); + AddTemplate( typeof( SFN_Hue ), catArithmetic + "Hue" ); + AddTemplate( typeof( SFN_If ), catArithmetic + "If", KeyCode.I ); + AddTemplate( typeof( SFN_InverseLerp ), catArithmetic + "Inverse Lerp" ); + AddTemplate( typeof( SFN_Lerp ), catArithmetic + "Lerp", KeyCode.L ); + AddTemplate( typeof( SFN_ConstantLerp ), catArithmetic + "Lerp (Simple)", KeyCode.None, "Lerp Simple" ); + AddTemplate( typeof( SFN_Log ), catArithmetic + "Log" ); + AddTemplate( typeof( SFN_Max ), catArithmetic + "Max" ); + AddTemplate( typeof( SFN_Min ), catArithmetic + "Min" ); + AddTemplate( typeof( SFN_Multiply ), catArithmetic + "Multiply", KeyCode.M ); + AddTemplate( typeof( SFN_MultiplyMatrix ), catArithmetic + "Multiply Matrix" ); + AddTemplate( typeof( SFN_Negate ), catArithmetic + "Negate" ); + AddTemplate( typeof( SFN_Noise ), catArithmetic + "Noise" ); + AddTemplate( typeof( SFN_OneMinus ), catArithmetic + "One Minus", KeyCode.O ); + AddTemplate( typeof( SFN_Posterize ), catArithmetic + "Posterize" ); + AddTemplate( typeof( SFN_Power ), catArithmetic + "Power", KeyCode.E ); + AddTemplate( typeof( SFN_Reciprocal ), catArithmetic + "Reciprocal" ); + AddTemplate( typeof( SFN_RemapRangeAdvanced),catArithmetic+ "Remap" ); + AddTemplate( typeof( SFN_RemapRange ), catArithmetic + "Remap (Simple)", KeyCode.R, "Remap Simple" ); + AddTemplate( typeof( SFN_RgbToHsv ), catArithmetic + "RGB to HSV" ); + AddTemplate( typeof( SFN_Round ), catArithmetic + "Round" ); + AddTemplate( typeof( SFN_Sign ), catArithmetic + "Sign" ); + AddTemplate( typeof( SFN_Smoothstep ), catArithmetic + "Smoothstep" ).MarkAsNewNode(); + AddTemplate( typeof( SFN_Sqrt ), catArithmetic + "Sqrt" ); + AddTemplate( typeof( SFN_Step ), catArithmetic + "Step (A <= B)", KeyCode.None, "Step" ); + AddTemplate( typeof( SFN_Subtract ), catArithmetic + "Subtract", KeyCode.S ); + AddTemplate( typeof( SFN_Trunc ), catArithmetic + "Trunc" ); + + string catConstVecs = "Constant Vectors/"; + AddTemplate( typeof( SFN_Vector1 ), catConstVecs + "Value", KeyCode.Alpha1 ); + AddTemplate( typeof( SFN_Vector2 ), catConstVecs + "Vector 2", KeyCode.Alpha2 ); + AddTemplate( typeof( SFN_Vector3 ), catConstVecs + "Vector 3", KeyCode.Alpha3 ); + AddTemplate( typeof( SFN_Vector4 ), catConstVecs + "Vector 4", KeyCode.Alpha4 ); + AddTemplate( typeof( SFN_Matrix4x4 ), catConstVecs + "Matrix 4x4" ); + + string catProps = "Properties/"; + AddTemplate( typeof( SFN_Color ), catProps + "Color" ); + AddTemplate( typeof( SFN_Cubemap ), catProps + "Cubemap" ); + AddTemplate( typeof( SFN_Matrix4x4Property ), catProps + "Matrix 4x4" ); + AddTemplate( typeof( SFN_Slider ), catProps + "Slider" ); + AddTemplate( typeof( SFN_SwitchProperty ), catProps + "Switch" ); + AddTemplate( typeof( SFN_Tex2d ), catProps + "Texture 2D", KeyCode.T ); + AddTemplate( typeof( SFN_Tex2dAsset ), catProps + "Texture Asset" ); + AddTemplate( typeof( SFN_ToggleProperty ), catProps + "Toggle" ); + AddTemplate( typeof( SFN_ValueProperty ), catProps + "Value" ); + AddTemplate( typeof( SFN_Vector4Property ), catProps + "Vector 4" ); + + //string catBranching = "Branching/"; + //AddTemplate( typeof( SFN_StaticBranch ), catBranching + "Static Branch" ); + + string catVecOps = "Vector Operations/"; + AddTemplate( typeof( SFN_Append ), catVecOps + "Append", KeyCode.Q ); + AddTemplate( typeof( SFN_ChannelBlend ), catVecOps + "Channel Blend"); + AddTemplate( typeof( SFN_ComponentMask ), catVecOps + "Component Mask", KeyCode.C ); + AddTemplate( typeof( SFN_Cross ), catVecOps + "Cross Product" ); + AddTemplate( typeof( SFN_Desaturate ), catVecOps + "Desaturate" ); + AddTemplate( typeof( SFN_DDX ), catVecOps + "DDX" ); + AddTemplate( typeof( SFN_DDXY ), catVecOps + "DDXY" ).MarkAsNewNode(); + AddTemplate( typeof( SFN_DDY ), catVecOps + "DDY" ); + AddTemplate( typeof( SFN_Distance ), catVecOps + "Distance" ); + AddTemplate( typeof( SFN_Dot ), catVecOps + "Dot Product" ); + AddTemplate( typeof( SFN_Length ), catVecOps + "Length" ); + AddTemplate( typeof( SFN_Normalize ), catVecOps + "Normalize", KeyCode.N ); + AddTemplate( typeof( SFN_NormalBlend ), catVecOps + "Normal Blend" ); + AddTemplate( typeof( SFN_Reflect ), catVecOps + "Reflect" ); + AddTemplate( typeof( SFN_Transform ), catVecOps + "Transform" ); + AddTemplate( typeof( SFN_Transpose ), catVecOps + "Transpose" ); + AddTemplate( typeof( SFN_VectorProjection ),catVecOps + "Vector Projection" ); + AddTemplate( typeof( SFN_VectorRejection ), catVecOps + "Vector Rejection" ); + + + string catUvOps = "UV Operations/"; + AddTemplate( typeof( SFN_Panner ), catUvOps + "Panner", KeyCode.P ); + AddTemplate( typeof( SFN_Parallax ), catUvOps + "Parallax" ); + AddTemplate( typeof( SFN_Rotator ), catUvOps + "Rotator" ); + AddTemplate( typeof( SFN_UVTile ), catUvOps + "UV Tile" ); + + string catGeoData = "Geometry Data/"; + AddTemplate( typeof( SFN_Bitangent ), catGeoData + "Bitangent Dir."); + AddTemplate( typeof( SFN_Depth ), catGeoData + "Depth"); + AddTemplate( typeof( SFN_FaceSign ), catGeoData + "Face Sign" ); + AddTemplate( typeof( SFN_Fresnel ), catGeoData + "Fresnel", KeyCode.F ); + AddTemplate( typeof( SFN_NormalVector ), catGeoData + "Normal Dir." ); + AddTemplate( typeof( SFN_ObjectPosition ), catGeoData + "Object Position"); + AddTemplate( typeof( SFN_ObjectScale ), catGeoData + "Object Scale" ); + AddTemplate( typeof( SFN_ScreenPos ), catGeoData + "Screen Position" ); + AddTemplate( typeof( SFN_Tangent ), catGeoData + "Tangent Dir." ); + AddTemplate( typeof( SFN_TexCoord ), catGeoData + "UV Coordinates", KeyCode.U ); + AddTemplate( typeof( SFN_VertexColor ), catGeoData + "Vertex Color", KeyCode.V ); + AddTemplate( typeof( SFN_ViewVector ), catGeoData + "View Dir." ); + AddTemplate( typeof( SFN_ViewReflectionVector ), catGeoData + "View Refl. Dir.", KeyCode.None, "View Reflection" ); + AddTemplate( typeof( SFN_FragmentPosition ), catGeoData + "World Position", KeyCode.W ); + + string catLighting = "Lighting/"; + AddTemplate( typeof( SFN_AmbientLight ), catLighting + "Ambient Light" ); + AddTemplate( typeof( SFN_HalfVector ), catLighting + "Half Direction", KeyCode.H ).UavailableInDeferredPrePass(); + AddTemplate( typeof( SFN_LightAttenuation ), catLighting + "Light Attenuation" ).UavailableInDeferredPrePass(); + AddTemplate( typeof( SFN_LightColor ), catLighting + "Light Color" ).UavailableInDeferredPrePass(); + AddTemplate( typeof( SFN_LightVector ), catLighting + "Light Direction" ).UavailableInDeferredPrePass(); + AddTemplate( typeof( SFN_LightPosition ), catLighting + "Light Position" ).UavailableInDeferredPrePass(); + + string catExtData = "External Data/"; + AddTemplate( typeof( SFN_PixelSize ), catExtData + "Pixel Size" ); + AddTemplate( typeof( SFN_ProjectionParameters ), catExtData + "Projection Parameters" ); + AddTemplate( typeof( SFN_ScreenParameters ), catExtData + "Screen Parameters" ); + AddTemplate( typeof( SFN_Time ), catExtData + "Time" ); + AddTemplate( typeof( SFN_ViewPosition ), catExtData + "View Position" ); + + string catSceneData = "Scene Data/"; + AddTemplate( typeof(SFN_DepthBlend), catSceneData + "Depth Blend" ); + AddTemplate( typeof( SFN_FogColor ), catSceneData + "Fog Color" ); + AddTemplate( typeof(SFN_SceneColor), catSceneData + "Scene Color" ); + AddTemplate( typeof(SFN_SceneDepth), catSceneData + "Scene Depth" ); + + string catMathConst = "Math Constants/"; + AddTemplate( typeof( SFN_E ), catMathConst + "e", KeyCode.None, "EulersConstant" ); + AddTemplate( typeof( SFN_Phi ), catMathConst + "Phi" ); + AddTemplate( typeof( SFN_Pi ), catMathConst + "Pi" ); + AddTemplate( typeof( SFN_Root2 ), catMathConst + "Root 2" ); + AddTemplate( typeof( SFN_Tau ), catMathConst + "Tau (2 Pi)", KeyCode.None, "Tau" ); + + string catTrig = "Trigonometry/"; + AddTemplate( typeof( SFN_ArcCos ), catTrig + "ArcCos" ); + AddTemplate( typeof( SFN_ArcSin ), catTrig + "ArcSin" ); + AddTemplate( typeof( SFN_ArcTan ), catTrig + "ArcTan" ); + AddTemplate( typeof( SFN_ArcTan2 ), catTrig + "ArcTan2" ); + AddTemplate( typeof( SFN_Cos ), catTrig + "Cos" ); + AddTemplate( typeof( SFN_Sin ), catTrig + "Sin" ); + AddTemplate( typeof( SFN_Tan ), catTrig + "Tan" ); + + string catCode = "Code/"; + AddTemplate( typeof( SFN_Code ), catCode + "Code" ); + + string catUtility = "Utility/"; + AddTemplate( typeof( SFN_Relay ), catUtility + "Relay" ); + AddTemplate( typeof( SFN_Get ), catUtility + "Get", KeyCode.G ).MarkAsNewNode(); + AddTemplate( typeof( SFN_Set ), catUtility + "Set" ).MarkAsNewNode(); + + + + SF_EditorNodeData ssDiff = TryAddTemplateDynamic( "SFN_SkyshopDiff", "Skyshop/" + "Skyshop Diffuse" ); + if(ssDiff != null) + ssDiff.MarkAsNewNode(); + + SF_EditorNodeData ssSpec = TryAddTemplateDynamic( "SFN_SkyshopSpec", "Skyshop/" + "Skyshop Specular" ); + if( ssSpec != null ) + ssSpec.MarkAsNewNode(); + + + + + } + + + public static bool NodeExistsAndIs(SF_Node node, string nodeName){ + if(NodeExists(nodeName)) + if(node.GetType() == GetNodeType(nodeName)) + return true; + return false; + } + + public static bool NodeExists(string nodeName){ + return GetNodeType(nodeName) != null; + } + + + static Assembly editorAssembly; + public static Assembly EditorAssembly { + get { + if( editorAssembly == null ) { + + Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); + + foreach( Assembly assembly in assemblies ) { + if( assembly.FullName.Split( ',' )[0].Trim() == "Assembly-CSharp-Editor" ) { + editorAssembly = assembly; + return editorAssembly; + } + } + //if( SF_Debug.dynamicNodeLoad ) + // Debug.LogError("Unable to find the editor assembly" ); + } + return editorAssembly; + } + } + + + public static Type GetNodeType(string nodeName){ + + Assembly asm = EditorAssembly; + if( asm == null ) + return null; + string fullNodeName = nodeName; + if(!nodeName.StartsWith("ShaderForge.")) + fullNodeName = "ShaderForge." + nodeName; + if( SF_Debug.dynamicNodeLoad ) + Debug.Log( "Trying to dynamically load [" + fullNodeName + "]" + " in assembly [" + asm.FullName + "]" ); + + return asm.GetType( fullNodeName ); + } + + public SF_EditorNodeData TryAddTemplateDynamic(string type, string label, KeyCode keyCode = KeyCode.None, string searchName = null ){ + + Type dynType = GetNodeType(type); + + if(dynType != null){ + if(SF_Debug.dynamicNodeLoad) + Debug.Log( "TryAddTemplateDynamic of " + type ); + return AddTemplate( dynType, label, keyCode, searchName ); + } + if( SF_Debug.dynamicNodeLoad ) + Debug.Log( "TryAddTemplateDynamic of " + type + " was null" ); + return null; + } + + public SF_EditorNodeData AddTemplate( Type type, string label, KeyCode keyCode = KeyCode.None, string searchName = null ) { + SF_EditorNodeData item = ScriptableObject.CreateInstance().Initialize( type.FullName, label, keyCode ); + + if(!string.IsNullOrEmpty(searchName)){ + item.SearchName = searchName; + } + + this.nodeTemplates.Add( item ); + return item; + } + + + + public SF_EditorNodeData GetTemplate() { + foreach( SF_EditorNodeData sft in nodeTemplates ) { + if( sft.type == typeof(T).FullName ) + return sft; + } + return null; + } + + public SF_EditorNodeData GetTemplate( string typeName ) { + foreach( SF_EditorNodeData sft in nodeTemplates ) { + if( sft.type == typeName ) + return sft; + } + return null; + } + + + public void OnShaderModified(NodeUpdateType updType) { + //Debug.Log("OnShaderModified: " + updType.ToString() ); + if( updType == NodeUpdateType.Hard && nodeView.treeStatus.CheckCanCompile() ){ + nodeView.lastChangeTime = (float)EditorApplication.timeSinceStartup; + ShaderOutdated = UpToDateState.OutdatedHard; + } + if(updType == NodeUpdateType.Soft && ShaderOutdated == UpToDateState.UpToDate) + ShaderOutdated = UpToDateState.OutdatedSoft; + + ps.fChecker.UpdateAvailability(); + ps.UpdateAutoSettings(); + } + + public void ResetRunningOutdatedTimer(){ + if(ShaderOutdated == UpToDateState.UpToDate) + return; + if(ShaderOutdated == UpToDateState.OutdatedSoft) // Might not want to have this later + return; + + nodeView.lastChangeTime = (float)EditorApplication.timeSinceStartup; + + } + + /* + public Vector3 GetMouseWorldPos( Vector3 playerPos ) { + + Vector3 camDir = Camera.main.transform.forward; + Ray r = Camera.main.ScreenPointToRay( Input.mousePosition ); + Plane p = new Plane( camDir * -1, playerPos ); + + float dist = 0f; + if( p.Raycast( r, out dist ) ) { + return r.GetPoint( dist ); + } + + Debug.LogError( "Mouse ray did not hit the plane" ); + return Vector3.zero; + }*/ + + public bool InitializeInstance( Shader initShader = null ) { + if(SF_Debug.evalFlow) + Debug.Log( "[SF_LOG] - SF_Editor InitializeInstance(" + initShader + ")" ); + //this.title = ; + + SF_Settings.InitializeSettings(); + this.initialized = true; + this.ps = ScriptableObject.CreateInstance().Initialize( this ); + this.shaderEvaluator = new SF_Evaluator( this ); + this.preview = new SF_PreviewWindow( this ); + this.statusBox = new SF_StatusBox( /*this*/ ); + statusBox.Initialize(this); + + InitializeNodeTemplates(); + + windowStyle = new GUIStyle( EditorStyles.textField ); + windowStyle.margin = new RectOffset( 0, 0, 0, 0 ); + windowStyle.padding = new RectOffset( 0, 0, 0, 0 ); + + titleStyle = new GUIStyle( EditorStyles.largeLabel ); + titleStyle.fontSize = 24; + + versionStyle = new GUIStyle( EditorStyles.miniBoldLabel ); + versionStyle.alignment = TextAnchor.MiddleLeft; + versionStyle.fontSize = 9; + versionStyle.normal.textColor = Color.gray; + versionStyle.padding.left = 1; + versionStyle.padding.top = 1; + versionStyle.padding.bottom = 1; + versionStyle.margin.left = 1; + versionStyle.margin.top = 3; + versionStyle.margin.bottom = 1; + + this.nodes = new List(); + + // Create main output node and add to list + this.nodeView = ScriptableObject.CreateInstance().Initialize( this ); + this.ps.catConsole.treeStatus = this.nodeView.treeStatus; + this.nodeBrowser = ScriptableObject.CreateInstance().Initialize( this ); + this.separatorLeft = ScriptableObject.CreateInstance(); + this.separatorRight = ScriptableObject.CreateInstance(); + + separatorLeft.rect = new Rect(340, 0, 0, 0); + separatorRight.rect = new Rect(Screen.width - 130f, 0, 0, 0); + + this.previousPosition = position; + + if( initShader == null ) { + // TODO: New menu etc + //CreateOutputNode(); + } else { + currentShaderAsset = initShader; + + bool loaded = SF_Parser.ParseNodeDataFromShader( this, initShader ); + if( !loaded ) { + initShader = null; + DestroyImmediate( this ); + return false; + } + + // Make preview material use this shader + //preview.material.shader = currentShaderAsset; + Material m = preview.InternalMaterial; + SF_Tools.AssignShaderToMaterialAsset( ref m, currentShaderAsset ); + } + + // Load data if it was set to initialize things + return true; // Successfully loaded + } + + + + + + public SF_Node CreateOutputNode() { + //Debug.Log ("Creating output node"); + this.mainNode = ScriptableObject.CreateInstance().Initialize( this );//new SFN_Final(); + this.nodes.Add( mainNode ); + return mainNode; + } + + public SF_Node GetNodeByID( int id ) { + for( int i = 0; i < nodes.Count; i++ ) { + if( nodes[i].id == id ) + return nodes[i]; + } + return null; + } + + + + + + public void UpdateKeyHoldEvents(bool mouseOverSomeNode) { + if( nodeTemplates == null || nodeTemplates.Count == 0 ) { + InitializeNodeTemplates(); + } + + //Debug.Log( "nodeTemplates.Count = " + nodeTemplates.Count ); + + foreach( SF_EditorNodeData nData in nodeTemplates ) { + + if( nData == null ) { + InitializeNodeTemplates(); + return; + } + SF_EditorNodeData requestedNode = nData.CheckHotkeyInput(mouseOverSomeNode); + if( requestedNode != null ) { + AddNode( requestedNode, true ); + return; + } + } + /*foreach(KeyValuePair> entry in inputInstancers){ + if(entry.Key.CheckHotkeyInput()){ + AddNode( entry.Key ); + } + }*/ + } + + public T AddNode() where T:SF_Node { + return AddNode(GetTemplate()) as T; + } + + public SF_Node AddNode(string typeName) { + //Debug.Log( "Searching for " + typeName ); + return AddNode( GetTemplate( typeName ) ); + } + + public SF_Node AddNode( SF_EditorNodeData nodeData, bool registerUndo = false ) { + + if( nodeData == null ){ + Debug.Log("Null node data passed into AddNode"); + } + + SF_Node node = nodeData.CreateInstance(); + + if( SF_Debug.dynamicNodeLoad ) { + if( node == null ) + Debug.Log( "nodeData failed to create a node of full path: " + nodeData.fullPath ); + else + Debug.Log( "Created a node of full path: " + nodeData.fullPath ); + } + + if(registerUndo){ + Undo.RecordObject(this, "add node " + node.nodeName); + } + + + nodes.Add( node ); + if(Event.current != null) + Event.current.Use(); + //Repaint(); + return node; + } + + + bool Clicked() { + return Event.current.type == EventType.MouseDown; + } + + float fps = 0; + double prevFrameTime = 1; + public double deltaTime = 0.02; + + + + + + + List coroutines = new List(); + + //double corLastTime; + // double corDeltaTime; + void UpdateCoroutines(){ + //corDeltaTime = EditorApplication.timeSinceStartup - corLastTime; + //corLastTime = EditorApplication.timeSinceStartup; + for(int i = 0; i < coroutines.Count; i++){ + IEnumerator routine = coroutines[i]; + if(!routine.MoveNext()){ + coroutines.RemoveAt(i--); + } + } + } + void StartCoroutine (IEnumerator routine){ + coroutines.Add(routine); + } + + + + + void Update() { + + + + if( closeMe ) { + base.Close(); + return; + } + + + double now = Now(); + double deltaTime = now-prevFrameTime; + fps = 1f/(float)deltaTime; + + + + if(fps > 60) + return; // Wait for target FPS + + + prevFrameTime = now; + + preview.UpdateRot(); + + + + for (int i = nodes.Count - 1; i >= 0; i--) { + if(nodes[i] == null) + nodes.Remove(nodes[i]); + else + nodes[i].Update(); + } + + + // Refresh node previews + int maxUpdatesPerFrame = 80; + int updatedNodes = 0; + + while( updatedNodes < maxUpdatesPerFrame ) { + bool anyUpdated = false; + for( int i = 0; i < nodes.Count; i++ ) { + if( nodes[i].CheckIfDirty() ) { + anyUpdated = true; + updatedNodes++; + } + } + if( !anyUpdated ) { + break; + } + } + + + + + + + if( ShaderOutdated == UpToDateState.OutdatedHard && SF_Settings.autoCompile && nodeView.GetTimeSinceChanged() >= 1f) { + shaderEvaluator.Evaluate(); + } + + + //UpdateCameraZoomValue(); + if(focusedWindow == this) + Repaint(); // Update GUI every frame if focused + + } + + + + MethodInfo isDockedMethod; + const float dockedCheckInterval = 1f; + public float dockedLastUpdate = -100f; + public bool _docked = false; + public bool Docked{ + get{ + if( EditorApplication.timeSinceStartup - dockedLastUpdate > dockedCheckInterval ) { + dockedLastUpdate = (float)EditorApplication.timeSinceStartup; + if( isDockedMethod == null ) { + BindingFlags fullBinding = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static; + isDockedMethod = typeof( EditorWindow ).GetProperty( "docked", fullBinding ).GetGetMethod( true ); + } + _docked = ( bool ) isDockedMethod.Invoke(this, null); + } + return _docked; + } + } + + public int TabOffset{ + get{ + return Docked ? 19 : 22; + } + } + + + + public double Now(){ + TimeSpan t = ( DateTime.UtcNow - startTime ); + return t.TotalSeconds; + } + + + + + void OnWindowResized( int deltaXsize, int deltaYsize ) { + if(separatorRight == null) + ForceClose(); + separatorRight.rect.x += deltaXsize; + } + + void ForceClose() { + //Debug.Log("Force close"); + closeMe = true; + GUIUtility.ExitGUI(); + } + + void AddDependenciesHierarchally(SF_Node node, DependencyTree tree){ + node.ReadDependencies(); + tree.Add(node); + foreach(SF_Node n in ((IDependable)node).Dependencies){ + AddDependenciesHierarchally(n, tree); + } + } + + public List GetDepthSortedDependencyTreeForConnectedNodes(bool reverse = false){ + DependencyTree tree = new DependencyTree(); + + AddDependenciesHierarchally(mainNode, tree); + //Debug.Log(tree.tree.Count); + tree.Sort(); + + List list = tree.tree.Select(x=>(SF_Node)x).ToList(); + if(reverse) + list.Reverse(); + return list; + } + + string fullscreenMessage = ""; + public Rect previousPosition; + public bool closeMe = false; + void OnGUI() { + + //Debug.Log("SF_Editor OnGUI()"); + + //SF_AllDependencies.DrawDependencyTree(new Rect(0, 0, Screen.width, Screen.height)); + //return; + +// if(Event.current.keyCode == KeyCode.Space && Event.current.type == EventType.keyDown){ +// Debug.Log("Beep"); +// Event.current.Use(); +// +// +// +// } + + if(SF_Parser.quickLoad) // Don't draw while loading + return; + + if(SF_Debug.performance) + GUI.Label(new Rect(500,64,128,64),"fps: "+fps.ToString()); + + if( position != previousPosition ) { + OnWindowResized( (int)(position.width - previousPosition.width), (int)(position.height - previousPosition.height) ); + previousPosition = position; + } + + Rect fullRect = new Rect( 0, 0, Screen.width, Screen.height); + //Debug.Log( fullRect ); + + if( currentShaderAsset == null ) { + DrawMainMenu(); + return; + } + + if(!string.IsNullOrEmpty(fullscreenMessage)){ + GUI.Box(fullRect,fullscreenMessage); + return; + } + + + + //UpdateCameraZoomInput(); + + + if(Event.current.rawType == EventType.ValidateCommand && Event.current.commandName == "UndoRedoPerformed"){ + Defocus(deselectNodes:false); + CheckForDirtyNodes(); // When undoing, some nodes will come back as dirty, which means they need to update their values + shaderEvaluator.ps.fChecker.UpdateAvailability(); + ResetRunningOutdatedTimer(); + } + + + if( nodes != null ) { + + //foreach( SF_Node n in nodes ) { + for( int i = 0; i < nodes.Count;i++ ) { + SF_Node n = nodes[i]; + + if( n == null ) { + // THIS MEANS YOU STARTED UNITY WITH SF OPEN + ForceClose(); + return; + } else{ + n.DrawConnections(); + } + } + + } + + if(separatorLeft == null){ + // THIS MEANS YOU STARTED UNITY WITH SF OPEN + ForceClose(); + return; + } + + + + + //EditorGUILayout.BeginHorizontal(); + //{ + //float wPreview = leftSeparator; + //float wNodeBrowser = 130; + + Rect pRect = new Rect( fullRect ); + pRect.height /= EditorGUIUtility.pixelsPerPoint; + pRect.width /= EditorGUIUtility.pixelsPerPoint; + pRect.width = separatorLeft.rect.x; + SF_GUI.FillBackground( pRect ); + DrawPreviewPanel( pRect ); + Rect previewPanelRect = pRect; + + //pRect.x += leftWidth; + //pRect.width = wSeparator; + //VerticalSeparatorDraggable(ref leftWidth, pRect ); + separatorLeft.MinX = 320; + separatorLeft.MaxX = (int)( fullRect.width / 2f - separatorLeft.rect.width ); + separatorLeft.Draw( (int)pRect.y, (int)pRect.height ); + pRect.x = separatorLeft.rect.x + separatorLeft.rect.width; + + + if(SF_Settings.showNodeSidebar) + pRect.width = separatorRight.rect.x - separatorLeft.rect.x - separatorLeft.rect.width; + else + pRect.width = Screen.width - separatorLeft.rect.x - separatorLeft.rect.width; + //GUI.Box( new Rect( 300, 0, 512, 32 ), pRect.ToString() ); + + if( SF_Debug.nodes ) { + Rect r = pRect; r.width = 256; r.height = 16; + for( int i = 0; i < nodes.Count; i++ ) { + GUI.Label( r, "Node[" + i + "] at {" + nodes[i].rect.x + ", " + nodes[i].rect.y + "}", EditorStyles.label ); // nodes[i] + r = r.MovedDown(); + } + } + + if( Event.current.rawType == EventType.KeyUp ){ + foreach(SF_EditorNodeData nd in nodeTemplates){ + nd.holding = false; + } + } + + + nodeView.OnLocalGUI( pRect.PadTop(TabOffset) ); // 22 when not docked, 19 if docked + //GUI.EndGroup(); + + //pRect.yMin -= 3; // if docked + + + + + + //pRect.x += pRect.width; + //pRect.width = wSeparator; + //VerticalSeparatorDraggable(ref rightWidth, pRect ); + if(SF_Settings.showNodeSidebar){ + separatorRight.MinX = (int)(fullRect.width / EditorGUIUtility.pixelsPerPoint) - 150; + separatorRight.MaxX = (int)(fullRect.width / EditorGUIUtility.pixelsPerPoint) - 32; + separatorRight.Draw( (int)pRect.y, (int)pRect.height ); + + pRect.x += pRect.width + separatorRight.rect.width; + pRect.width = (fullRect.width / EditorGUIUtility.pixelsPerPoint) - separatorRight.rect.x - separatorRight.rect.width; + + SF_GUI.FillBackground( pRect ); + nodeBrowser.OnLocalGUI( pRect ); + } + + + + + // Last thing, right? + + ssButtonColor = Color.Lerp(ssButtonColor,ssButtonColorTarget, (float)deltaTime*ssButtonFadeSpeed); + + if(previewPanelRect.Contains(Event.current.mousePosition)){ + + ssButtonColorTarget = Color.white; + ssButtonFadeSpeed = 0.4f; + + + } else { + ssButtonColorTarget = new Color(1f,1f,1f,0f); // TODO LERP + ssButtonFadeSpeed = 1.5f; + } + Rect ssRect = new Rect(8,previewButtonHeightOffset,32,19); + GUI.color = ssButtonColor; + if(GUI.Button(ssRect, SF_GUI.Screenshot_icon)){ + GenericMenu menu = new GenericMenu(); + menu.AddItem( new GUIContent("Take screenshot of node tree"), false, ContextClickScreenshot, "ss_standard" ); + menu.AddItem( new GUIContent("Take screenshot of node tree without 3D preview"), false, ContextClickScreenshot, "ss_nopreview" ); + menu.ShowAsContext(); + + } + GUI.color = Color.white; + + //Rect ssRectIcon = new Rect(0f, 0f, SF_GUI.Screenshot_icon.width, SF_GUI.Screenshot_icon.height); + ////ssRectIcon.center = ssRect.center; + //GUI.DrawTexture(ssRectIcon, SF_GUI.Screenshot_icon); + + + if(Event.current.type == EventType.Repaint) + UpdateCoroutines(); + + + DrawTooltip(); + + } + + + public void CheckForDirtyNodes(){ + + for(int i=0;i 0){ + shaderTitle = split[split.Length-1]; + } + } + } + + + + + + for(int ix=0;ix nodeRects = new List(); + List lines = new List(); + for(int i=0;i longestDist){ + longestDist = shortest; + longestDistPt = testPt; + //pixel = Color.red; + }// else { + //pixel = Color.white * Mathf.Clamp01(shortest/(Mathf.Max(nodeWrap.width,nodeWrap.height)*0.2f)); + //} + + + + //pixel.a = 1f; + //newMaskPixels[i] = pixel; + } + //mask.SetPixels(newMaskPixels); + //mask.Apply(); + radius = longestDist; + return longestDistPt; + } + + + + + // TOOLTIP, Draw this last + public void DrawTooltip() { + /* + if( !string.IsNullOrEmpty( GUI.tooltip ) ) { + //Debug.Log( "TOOLTIP" ); + GUIStyle tooltipStyle = EditorStyles.miniButton; + GUI.Box( + new Rect( + Event.current.mousePosition.x + 32, + Event.current.mousePosition.y, + tooltipStyle.CalcSize( new GUIContent( GUI.tooltip ) ).x * 1.1f, + tooltipStyle.CalcSize( new GUIContent( GUI.tooltip ) ).y * 1.2f + ), + GUI.tooltip, tooltipStyle + ); + } + GUI.tooltip = null;*/ + } + + public void Defocus(bool deselectNodes = false) { + //Debug.Log("DEFOCUS"); +// string currentFocus = GUI.GetNameOfFocusedControl(); +// if( currentFocus != "defocus"){ + GUI.FocusControl("null"); +// } + + if( deselectNodes ) + nodeView.selection.DeselectAll(registerUndo:true); + } + + + public bool DraggingAnySeparator() { + return separatorLeft.dragging || separatorRight.dragging; + } + + + + public void FlexHorizontal(Action func){ + GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); + func(); + GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); + } + + public void FlexHorizontal(Action func, float width){ + GUILayout.BeginHorizontal(GUILayout.Width(width)); GUILayout.Space(Screen.width/2f - 335); + func(); + GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); + } + + + public static string updateCheck = ""; + public static bool outOfDate = false; + + public static void CheckForUpdates(){ + updateCheck = "Checking for updates..."; + //Debug.Log(updateCheck); + + WebClient wc = new WebClient(); + + string latestVersion; + + try{ + latestVersion = wc.DownloadString("http://www.acegikmo.com/shaderforge/latestversion.php"); + string[] split = latestVersion.Split('.'); + int latestMajor = int.Parse(split[0]); + int latestMinor = int.Parse(split[1]); + + if(latestMajor > SF_Tools.versionNumPrimary){ + outOfDate = true; + } else if(latestMajor == SF_Tools.versionNumPrimary && latestMinor > SF_Tools.versionNumSecondary){ + outOfDate = true; + } else { + outOfDate = false; + } + + if(outOfDate){ + updateCheck = "Shader Forge is out of date!\nYou are running " + SF_Tools.version + ", the latest version is " + latestVersion; + } else { + updateCheck = "Shader Forge is up to date!"; + } + + + + + } catch ( WebException e){ + updateCheck = "Couldn't check for updates: " + e.Status; + } + + + } + + + private enum MainMenuState{Main, Credits, PresetPick, UpgradeDialog} + + private MainMenuState menuState = MainMenuState.Main; + + + public void DrawMainMenu() { + + + //SF_AllDependencies.DrawDependencyTree(new Rect(0f,0f,Screen.width,Screen.height)); + //return; + + if(string.IsNullOrEmpty(updateCheck)){ + CheckForUpdates(); + } + + GUILayout.BeginVertical(); + { + GUILayout.FlexibleSpace(); + + + FlexHorizontal(()=>{ + GUILayout.Label( SF_GUI.Logo ); + if(outOfDate) + GUI.color = Color.red; + GUILayout.Label( SF_Tools.versionStage + " v" + SF_Tools.version, EditorStyles.boldLabel ); + if(outOfDate) + GUI.color = Color.white; + }); + + + if(menuState == MainMenuState.Main){ + minSize = new Vector2(500,400); + DrawPrimaryMainMenuGUI(); + } else if( menuState == MainMenuState.PresetPick ) { + minSize = new Vector2( 128*(shaderPresetNames.Length + 1), 560 ); + DrawPresetPickGUI(); + } else if (menuState == MainMenuState.UpgradeDialog) { + minSize = new Vector2(400, 400); + DrawUpgradeDialogGUI(); + } + else if(menuState == MainMenuState.Credits) { + + //Vector2 centerPrev = position.center; + + minSize = new Vector2(740,560); + + //Rect rWnd = position; + //rWnd.center = new Vector2( 800,800); + //position = rWnd; + + + DrawCreditsGUI(); + } + + + + + GUILayout.FlexibleSpace(); + } + GUILayout.EndVertical(); + + + } + + public void DrawCreditsGUI(){ + EditorGUILayout.Separator(); + FlexHorizontal(()=>{ + GUILayout.Label( "Thanks for purchasing Shader Forge <3" ); + }); + EditorGUILayout.Separator(); + EditorGUILayout.Separator(); + FlexHorizontal(()=>{ + GUILayout.Label( "Created by ", SF_Styles.CreditsLabelText); + GUILayout.Label( "Freya 'Acegikmo' Holm" + '\u00e9' + "r", EditorStyles.boldLabel); + }); + EditorGUILayout.Separator(); + EditorGUILayout.Separator(); + FlexHorizontal(()=>{ + GUILayout.Label( "Special thanks:", EditorStyles.boldLabel ); + }); + CreditsLine("All of the alpha & beta testers","For their amazing feedback during the early days!" ); + CreditsLine( "Jenny 'sranine' Nordenborg", "For creating the Shader Forge logo and for supporting me throughout the development time!" ); + CreditsLine( "Peter Cornelius", "For convincing me that I should have started creating SF in the first place" ); + CreditsLine( "Robert Briscoe", "For actively testing SF and providing excellent feedback" ); + CreditsLine( "Thomas Pasieka", "For helping out immensely in getting the word out, as well as motivating me to continue" ); + CreditsLine( "Aras Pranckevi" +'\u010D'+ "ius", "For helping out with various shader code issues"); + CreditsLine( "Renaldas 'ReJ' Zioma", "For assisting in the Unity 5 transition" ); + CreditsLine( "Tim 'Stramit' Cooper & David 'Texel' Jones", "For giving helpful tips"); + CreditsLine( "Sander 'Zerot' Homan", "For helping out stealing Unity's internal RT code"); + CreditsLine( "Carlos 'Darkcoder' Wilkes", "For helping out with various serialization issues"); + CreditsLine( "Ville 'wiliz' Mäkynen", "For helping out with the undo system"); + CreditsLine( "Daniele Giardini", "For his editor window icon script (also, check out his plugin DOTween!)"); + CreditsLine( "Beck Sebenius", "For helping out getting coroutines to run in the Editor"); + CreditsLine( "James 'Farfarer' O'Hare", "For asking all the advanced shader questions on the forums so I didn't have to"); + CreditsLine( "Tenebrous", "For helping with... Something... (I can't remember)"); + CreditsLine( "Alex Telford", "For his fragment shader tutorials"); + CreditsLine( "Shawn White", "For helping out finding how to access compiled shaders from code"); + CreditsLine( "Colin Barr"+ '\u00e9' +"-Brisebois & Stephen Hill", "For their research on normal map blending"); + CreditsLine( "Andrew Baldwin", "For his articles on pseudorandom numbers" ); + + + EditorGUILayout.Separator(); + FlexHorizontal(()=>{ + if( GUILayout.Button( "Return to menu", GUILayout.Height( 30f ), GUILayout.Width( 190f ) ) ) { + menuState = MainMenuState.Main; + } + }); + } + + public void CreditsLine(string author, string reason){ + FlexHorizontal(()=>{ + GUILayout.Label( author, EditorStyles.boldLabel ); + GUILayout.Label(" - ", SF_Styles.CreditsLabelText ); + GUILayout.Label( reason, SF_Styles.CreditsLabelText ); + },400f); + } + + public enum ShaderPresets { Unlit, LitPBR, LitBasic, Custom, Sprite, ParticleAdditive, ParticleAlphaBlended, ParticleMultiplicative, Sky, PostEffect } + public string[] shaderPresetNames = new string[] { + "Unlit", + "Lit\n(PBR)", + "Lit\n(Basic)", + "Custom Lighting", + "Sprite", + "Particle\n(Additive)", + "Particle\n(Alpha-Blended)", + "Particle\n(Multiplicative)", + "Sky", + "Post-Effect" + }; + + public string[] shaderPresetShaders = new string[] { + "Unlit", + "PBR", + "Basic", + "CustomLighting", + "Sprite", + "ParticleAdditive", + "ParticleAlphaBlended", + "ParticleMultiplicative", + "Sky", + "PostEffect" + }; + + public string GetShaderPresetPath(ShaderPresets preset) { + int i = (int)preset; + string file = "preset" + shaderPresetShaders[i] + ".shader"; + return SF_Resources.InternalResourcesPath + "ShaderPresets/" + file; + } + + + public string[] shaderPresetDescriptions = new string[] { + "Unlit means that light sources will not affect this shader, it will simply have the color you give it, regardless of the scene setup.", + "Lit (PBR) is set up to match Unity's Physically Based shader, affected by lightmaps, light probes, reflection probes etc.", + "Lit (Basic) is the old-school Blinn-Phong lighting model. Direct lighting only, no lightmap or probe data.", + "Custom Lighting is set up with a simple example of how you can create your own lighting models. The initial setup is a Blinn-Phong shader.", + "Sprite is for creating 2D shaders to be used on sprites. These will have the pixel-perfect option and sort properly with other 2D sprites.", + "Particle (Additive) is generally for glow effects, lightshafts, sparks etc. Primarily used in particle systems.", + "Particle (Alpha-Blended) is generally for debris effects, dusty smoke etc. Primarily used in particle systems.", + "Particle (Multiplicative) is generally for darkening effects, black smoke, evil-looking anti-glow etc. Primarily used in particle systems.", + "Sky is for creating shaders to be used with a sky material in your scene. It will render behind everything else.", + "Post-Effect is for creating shaders meant to render full-screen rather than at a position in the world, commonly used for post-process effects" + }; + + string desc = ""; + + public void DrawPresetPickGUI() { + + GUIStyle centerLabel = new GUIStyle( EditorStyles.boldLabel ); + GUIStyle centerLabelSmall = new GUIStyle( EditorStyles.miniLabel ); + centerLabel.alignment = centerLabelSmall.alignment = TextAnchor.MiddleCenter; + + + EditorGUILayout.Separator(); + FlexHorizontal( () => { + GUILayout.BeginVertical(); + GUILayout.Label( "What kind of shader do you want to forge?", centerLabel ); + GUI.color = new Color(1f,1f,1f,0.4f); + GUILayout.Label( "This will simply affect the initial configuration of the shader. It will not \"lock-in\" any features", centerLabelSmall ); + GUI.color = Color.white; + GUILayout.EndVertical(); + } ); + EditorGUILayout.Separator(); + + + + FlexHorizontal( () => { + + GUILayoutOption[] btnLayout = new GUILayoutOption[2] { GUILayout.Width( 128 ), GUILayout.Height( 128 ) }; + + GUIStyle style = new GUIStyle( EditorStyles.boldLabel ); + style.alignment = TextAnchor.UpperCenter; + + //if( Event.current.type == EventType.mouseMove) + //desc = ""; + + //GUILayout.BeginVertical(); + for(int i=0;i { + GUILayout.Label( desc, centerLabelSmall ); + }); + + EditorGUILayout.Separator(); + EditorGUILayout.Separator(); + + FlexHorizontal( () => { + if( GUILayout.Button( "Back" ) ) { + menuState = MainMenuState.Main; + } + } ); + + + + + } + + private struct ShaderInfo + { + public Shader shader; + public string assetPath; + public float version; + public bool selected; + + public ShaderInfo(Shader shader, string assetPath, float version) + { + this.shader = shader; + this.assetPath = assetPath; + this.version = version; + this.selected = false; + } + } + + [NonSerialized] + private ShaderInfo[] allUpgradableShaders; + [NonSerialized] + private List pendingUpgradableShaders; + [NonSerialized] + private string[] pendingShaderGuids; + [NonSerialized] + private int pendingShaderIndex; + [NonSerialized] + private Vector2 upgradeDialogScrollPos; + [NonSerialized] + private int upgradeDialogLastSelected; + [NonSerialized] + private int[] upgradingShaders; + [NonSerialized] + private int upgradingShaderIndex; + [NonSerialized] + private bool upgradingShaderThisFrame; + + [SerializeField] + public bool upgradingDisplayAssetPath; + [SerializeField] + public bool upgradingHideIfUpToDate; + + public void DrawUpgradeDialogGUI() { + + GUIStyle centerLabel = new GUIStyle( EditorStyles.boldLabel ); + GUIStyle centerLabelSmall = new GUIStyle( EditorStyles.miniLabel ); + centerLabel.alignment = centerLabelSmall.alignment = TextAnchor.MiddleCenter; + + float currentVersion = float.Parse(SF_Tools.version); + + bool needRepaint = false; + + if (allUpgradableShaders == null) + { + if (pendingUpgradableShaders == null) + pendingUpgradableShaders = new List(); + + if (pendingShaderGuids == null) + { + pendingShaderGuids = AssetDatabase.FindAssets("t:Shader"); + pendingShaderIndex = 0; + } + + int processedCount = 0; + while (pendingShaderIndex < pendingShaderGuids.Length) + { + string path = AssetDatabase.GUIDToAssetPath(pendingShaderGuids[pendingShaderIndex++]); + Shader shader = AssetDatabase.LoadAssetAtPath(path); + try + { + if (shader != null) + { + float version; + string sfData = SF_Parser.ExtractShaderForgeData(shader, out version, false, false, false); + if (!string.IsNullOrEmpty(sfData)) + { + pendingUpgradableShaders.Add(new ShaderInfo(shader, path, version)); + } + } + } + catch (Exception) + { + } + + if (++processedCount >= 10) + break; + } + + if (pendingShaderIndex >= pendingShaderGuids.Length) + { + pendingUpgradableShaders.Sort((a, b) => String.Compare(a.shader.name, b.shader.name, true)); + allUpgradableShaders = pendingUpgradableShaders.ToArray(); + pendingUpgradableShaders = null; + pendingShaderGuids = null; + upgradingShaders = null; + upgradeDialogLastSelected = -1; + } + } + + if (allUpgradableShaders == null) + { + EditorGUILayout.Separator(); + FlexHorizontal(() => { + GUILayout.Label(string.Format("Looking for ShaderForge shaders in your assets ({0}/{1}).", pendingShaderIndex, pendingShaderGuids.Length), centerLabel); + }); + EditorGUILayout.Separator(); + needRepaint = true; + } + else if(upgradingShaders != null) + { + int shaderIndex = (upgradingShaderIndex < upgradingShaders.Length) ? upgradingShaders[upgradingShaderIndex] : -1; + Shader shader = (shaderIndex >= 0 && shaderIndex < allUpgradableShaders.Length) ? allUpgradableShaders[shaderIndex].shader : null; + + EditorGUILayout.Separator(); + FlexHorizontal(() => { + GUILayout.Label(string.Format("Upgrading shader ({0}/{1}) : {2}.", upgradingShaderIndex, upgradingShaders.Length, shader != null ? shader.name : "none"), centerLabel); + }); + EditorGUILayout.Separator(); + + if (shader != null && upgradingShaderThisFrame) + { + try + { + if (InitializeInstance(shader) && nodeView.treeStatus.CheckCanCompile()) + { + shaderEvaluator.Evaluate(); + allUpgradableShaders[shaderIndex].version = currentVersion; + } + else + { + Debug.LogErrorFormat("Failed to upgrade shader {0} ({1}) : the shader doesn't compile.", shader.name, allUpgradableShaders[shaderIndex].assetPath); + } + } + catch(Exception e) + { + Debug.LogErrorFormat("Failed to upgrade shader {0} ({1}) : {2}", shader.name, allUpgradableShaders[shaderIndex].assetPath, e.Message); + } + currentShaderAsset = null; // stay in the current view. + shaderOutdated = UpToDateState.UpToDate; + } + + if (upgradingShaderThisFrame) + { + upgradingShaderIndex++; + upgradingShaderThisFrame = false; + } + else + upgradingShaderThisFrame = true; + + if (upgradingShaderIndex >= upgradingShaders.Length) + { + upgradingShaders = null; + } + + needRepaint = true; + } + else + { + EditorGUILayout.Separator(); + FlexHorizontal( () => { + GUILayout.Label( "ShaderForge shaders list.", centerLabel ); + } ); + EditorGUILayout.Separator(); + FlexHorizontal(() => { + upgradingDisplayAssetPath = GUILayout.Toggle(upgradingDisplayAssetPath, "Display Asset Path"); + upgradingHideIfUpToDate = GUILayout.Toggle(upgradingHideIfUpToDate, "Hide If Up To Date"); + }); + EditorGUILayout.Separator(); + + { + GUIStyle normalStyle = new GUIStyle(EditorStyles.boldLabel); + normalStyle.alignment = TextAnchor.UpperCenter; + GUIStyle selectedStyle = new GUIStyle(normalStyle); + selectedStyle.normal.background = Texture2D.whiteTexture; + selectedStyle.normal.textColor = new Color32(50, 50, 50, 255); + Color selectedBGColor = new Color32(199, 210, 249, 255); + Color baseBGColor = GUI.backgroundColor; + + Event e = Event.current; + + upgradeDialogScrollPos = GUILayout.BeginScrollView(upgradeDialogScrollPos); + for (int i = 0; i < allUpgradableShaders.Length; i++) + { + ShaderInfo current = allUpgradableShaders[i]; + + if (upgradingHideIfUpToDate && current.version >= currentVersion) + continue; + + GUILayout.BeginHorizontal(); + GUIStyle style = current.selected ? selectedStyle : normalStyle; + GUI.backgroundColor = current.selected ? selectedBGColor : baseBGColor; + GUILayout.Label(upgradingDisplayAssetPath ? current.assetPath : current.shader.name, style, GUILayout.ExpandWidth(true)); + Rect nameRect = GUILayoutUtility.GetLastRect(); + GUILayout.Label(current.version.ToString("N2"), style, GUILayout.Width(60)); + Rect versionRect = GUILayoutUtility.GetLastRect(); + GUILayout.EndHorizontal(); + + if (e.type == EventType.MouseUp && e.button == 0 && (nameRect.Contains(e.mousePosition) || versionRect.Contains(e.mousePosition))) + { + bool wantSelected = !allUpgradableShaders[i].selected; + if (!e.control) + { + for (int j = 0; j < allUpgradableShaders.Length; j++) + allUpgradableShaders[j].selected = false; + } + if (e.shift && upgradeDialogLastSelected != -1) + { + upgradeDialogLastSelected = Math.Max(0, Math.Min(upgradeDialogLastSelected, allUpgradableShaders.Length - 1)); + int start = Math.Min(upgradeDialogLastSelected, i); + int end = Math.Max(upgradeDialogLastSelected, i); + for (int j = start; j <= end; j++) + allUpgradableShaders[j].selected = wantSelected; + } + else + { + allUpgradableShaders[i].selected = wantSelected; + } + needRepaint = true; + upgradeDialogLastSelected = i; + } + } + GUI.backgroundColor = baseBGColor; + GUILayout.EndScrollView(); + } + } + + EditorGUILayout.Separator(); + EditorGUILayout.Separator(); + EditorGUILayout.Separator(); + EditorGUILayout.Separator(); + EditorGUILayout.Separator(); + + if (allUpgradableShaders != null && upgradingShaders == null) + { + FlexHorizontal(() => { + GUI.enabled = allUpgradableShaders.Count(info => info.selected) == 1; + if (GUILayout.Button("Open Selected")) + { + Shader shader = allUpgradableShaders.First(info => info.selected).shader; + SF_Editor.Init(shader); + } + + GUI.enabled = allUpgradableShaders.Any(info => info.selected); + if (GUILayout.Button("Resave Selected")) + { + List tmpShaderIndexes = new List(); + for (int i = 0; i < allUpgradableShaders.Length; ++i) + { + if (allUpgradableShaders[i].selected) + tmpShaderIndexes.Add(i); + } + if (tmpShaderIndexes.Count > 0) + { + upgradingShaders = tmpShaderIndexes.ToArray(); + upgradingShaderIndex = 0; + upgradingShaderThisFrame = false; + needRepaint = true; + } + } + GUI.enabled = allUpgradableShaders.Any(info => info.version < currentVersion); + if (GUILayout.Button("Upgrade As Needed")) + { + List tmpShaderIndexes = new List(); + for (int i = 0; i < allUpgradableShaders.Length; ++i) + { + if (allUpgradableShaders[i].version < currentVersion) + tmpShaderIndexes.Add(i); + } + if (tmpShaderIndexes.Count > 0) + { + upgradingShaders = tmpShaderIndexes.ToArray(); + upgradingShaderIndex = 0; + upgradingShaderThisFrame = false; + needRepaint = true; + } + } + GUI.enabled = allUpgradableShaders.Length > 0; + if (GUILayout.Button("Resave All")) + { + upgradingShaders = new int[allUpgradableShaders.Length]; + for (int i = 0; i < upgradingShaders.Length; ++i) + upgradingShaders[i] = i; + upgradingShaderIndex = 0; + upgradingShaderThisFrame = false; + needRepaint = true; + } + GUI.enabled = true; + }); + } + + EditorGUILayout.Separator(); + EditorGUILayout.Separator(); + EditorGUILayout.Separator(); + + FlexHorizontal( () => { + if( GUILayout.Button( "Back" ) ) { + allUpgradableShaders = null; + pendingUpgradableShaders = null; + pendingShaderGuids = null; + upgradingShaders = null; + menuState = MainMenuState.Main; + } + } ); + + if (needRepaint) + { + Repaint(); + } + } + + public Texture2D GetShaderPresetIcon(ShaderPresets preset) { + + switch( preset ) { + + case ShaderPresets.Custom: + return SF_GUI.Shader_preset_icon_custom; + case ShaderPresets.LitBasic: + return SF_GUI.Shader_preset_icon_litbasic; + case ShaderPresets.LitPBR: + return SF_GUI.Shader_preset_icon_litpbr; + case ShaderPresets.ParticleAdditive: + return SF_GUI.Shader_preset_icon_particleadditive; + case ShaderPresets.ParticleAlphaBlended: + return SF_GUI.Shader_preset_icon_particlealphablended; + case ShaderPresets.ParticleMultiplicative: + return SF_GUI.Shader_preset_icon_particlemultiplicative; + case ShaderPresets.Sky: + return SF_GUI.Shader_preset_icon_sky; + case ShaderPresets.Sprite: + return SF_GUI.Shader_preset_icon_sprite; + case ShaderPresets.Unlit: + return SF_GUI.Shader_preset_icon_unlit; + case ShaderPresets.PostEffect: + return SF_GUI.Shader_preset_icon_posteffect; + + } + + Debug.LogError("No preset icon found"); + + return null; + + + } + + + public void DrawPrimaryMainMenuGUI(){ + + + + FlexHorizontal(()=>{ + GUI.color = new Color( 0.7f, 0.7f, 0.7f ); + if( GUILayout.Button( '\u00a9' + " Freya 'Acegikmo' Holm" + '\u00e9' + "r", EditorStyles.miniLabel ) ) { + Application.OpenURL("https://twitter.com/FreyaHolmer"); + } + + SF_GUI.AssignCursorForPreviousRect( MouseCursor.Link ); + GUI.color = Color.white; + }); + + EditorGUILayout.Separator(); + + /* + FlexHorizontal(()=>{ + if( GUILayout.Button(SF_Tools.manualLabel , GUILayout.Height( 32f ), GUILayout.Width( 190f ) ) ) { + Application.OpenURL( SF_Tools.manualURL ); + } + }); + */ + + FlexHorizontal(()=>{ + + if(SF_Tools.CanRunShaderForge()){ + if( GUILayout.Button( "New Shader", GUILayout.Width( 128 ), GUILayout.Height( 64 ) ) ) { + menuState = MainMenuState.PresetPick; + } + if( GUILayout.Button( "Load Shader", GUILayout.Width( 128 ), GUILayout.Height( 64 ) ) ) { + OpenLoadDialog(); + } + if( GUILayout.Button( "Upgrade Shaders", GUILayout.Width( 128 ), GUILayout.Height( 64 ) ) ) { + menuState = MainMenuState.UpgradeDialog; + } + } else { + GUILayout.BeginVertical(); + SF_Tools.UnityOutOfDateGUI(); + GUILayout.EndVertical(); + } + }); + + + + FlexHorizontal(()=>{ + if( GUILayout.Button( "Polycount thread" ) ) { + Application.OpenURL( "http://www.polycount.com/forum/showthread.php?t=123439" ); + } + if( GUILayout.Button( "Unity thread" ) ) { + Application.OpenURL( "http://forum.unity3d.com/threads/222049-Shader-Forge-A-visual-node-based-shader-editor" ); + } + if( GUILayout.Button( SF_Tools.documentationLabel ) ) { + Application.OpenURL( SF_Tools.documentationURL ); + } + if( GUILayout.Button( "Wiki" ) ) { + Application.OpenURL( "http://acegikmo.com/shaderforge/wiki" ); + } + if( GUILayout.Button("Credits") ){ + menuState = MainMenuState.Credits; + } + }); + + + FlexHorizontal( () => { + if( GUILayout.Button( SF_Tools.bugReportLabel, GUILayout.Height( 32f ), GUILayout.Width( 180f ) ) ) { + Application.OpenURL( SF_Tools.bugReportURL ); + } + } ); + + FlexHorizontal( () => { + if( GUILayout.Button( "Forums", GUILayout.Height( 32f ), GUILayout.Width( 120f ) ) ) { + Application.OpenURL( "http://neatcorporation.com/forums/viewforum.php?f=1" ); + } + } ); + + EditorGUILayout.Separator(); + FlexHorizontal(()=>{ + GUILayout.Label(updateCheck); + }); + if(outOfDate){ + float t = (Mathf.Sin((float)EditorApplication.timeSinceStartup*Mathf.PI*2f)*0.5f)+0.5f; + GUI.color = Color.Lerp(Color.white, new Color(0.4f,0.7f,1f),t); + FlexHorizontal(()=>{ + if(GUILayout.Button("Download latest version")){ + Application.OpenURL( "https://www.assetstore.unity3d.com/#/content/14147" ); + } + }); + t = (Mathf.Sin((float)EditorApplication.timeSinceStartup*Mathf.PI*2f-1)*0.5f)+0.5f; + GUI.color = Color.Lerp(Color.white, new Color(0.4f,0.7f,1f),t); + FlexHorizontal(()=>{ + if(GUILayout.Button("What's new?")){ + Application.OpenURL( "http://acegikmo.com/shaderforge/changelog/" ); + } + }); + GUI.color = Color.green; + } + } + + + + public bool PropertyNameTaken(SF_ShaderProperty sProp){ + foreach(SF_Node n in nodes){ + if(n == sProp.node) + continue; + if(n.IsProperty()) + if(n.property.nameDisplay == sProp.nameDisplay || n.property.nameInternal == sProp.nameInternal) + return true; + } + return false; + } + + + public void OpenLoadDialog(){ + string path = EditorUtility.OpenFilePanel( + "Load Shader", + "Assets", + "shader" + ); + + if( string.IsNullOrEmpty( path ) ) { + //Debug.LogError("No path selected"); + return; + } else { + + // Found file! Make sure it's a shader + + path = SF_Tools.PathFromAbsoluteToProject( path ); + Shader loadedShader = (Shader)AssetDatabase.LoadAssetAtPath(path, typeof(Shader)); + if( loadedShader == null ) { + Debug.LogError( "Selected shader not found" ); + return; + } + + + + bool isSFshader = SF_Parser.ContainsShaderForgeData(loadedShader); + + bool allowEdit = isSFshader; + if(!allowEdit) + allowEdit = SF_GUI.AcceptedNewShaderReplaceDialog(); + + + if( allowEdit ) { + SF_Editor.Init( loadedShader ); + } else { + //Debug.LogError( "User cancelled loading operation" ); + } + + } + + } + + + + public bool TryCreateNewShader(SF_Editor.ShaderPresets preset) { + + + + + + //Shader s = (Shader)AssetDatabase.LoadAssetAtPath( presetPath, typeof(Shader) ); + //Debug.Log( s); + + + + string savePath = EditorUtility.SaveFilePanel( + "Save new shader", + "Assets", + "NewShader", + "shader" + ); + + if( string.IsNullOrEmpty( savePath ) ) { + return false; + } + + string presetPath = GetShaderPresetPath( preset ); + StreamReader presetReader = new StreamReader( Application.dataPath + presetPath.Substring( 6 ) ); + + // So we now have the path to save it, let's save + StreamWriter sw; + if( !File.Exists( savePath ) ) { + sw = File.CreateText( savePath ); + } else { + sw = new StreamWriter(savePath); + } + + // Read from preset + string[] presetLines = presetReader.ReadToEnd().Split( '\n' ); + for( int i=0; i < presetLines.Length; i++ ) { + if( presetLines[i].StartsWith( "Shader \"Hidden/" ) ) { + + // Extract name of the file to put in the shader path + string[] split = savePath.Split( '/' ); + currentShaderPath = split[split.Length - 1].Split( '.' )[0]; + currentShaderPath = "Shader Forge/" + currentShaderPath; + + // Write to the line + presetLines[i] = "Shader \"" + currentShaderPath + "\" {"; + + break; + } + } + + // Read from the preset + for( int i=0; i < presetLines.Length; i++ ) { + sw.WriteLine( presetLines[i] ); + } + + sw.Flush(); + sw.Close(); + presetReader.Close(); + AssetDatabase.Refresh(); + + // Shorten it to a relative path + string dataPath = Application.dataPath; + string assetPath = "Assets/" + savePath.Substring( dataPath.Length + 1 ); + + // Assign a reference to the file + currentShaderAsset = (Shader)AssetDatabase.LoadAssetAtPath( assetPath, typeof( Shader ) ); + + if( currentShaderAsset == null ) { + Debug.LogError( "Couldn't load shader asset" ); + Debug.Break(); + return false; + } + + + + // Make sure the preview material is using the shader + preview.InternalMaterial.shader = currentShaderAsset; + + // That's about it for the file/asset management. + //CreateOutputNode(); + SF_Editor.Init( currentShaderAsset ); + //shaderEvaluator.Evaluate(); // And we're off! + + //nodeView.CenterCamera(); + + return true; + } + + public string GetShaderFilePath() { + + if( currentShaderAsset == null ) { + Debug.LogError( "Tried to find path of null shader asset!" ); + Debug.Break(); + return null; + } + return AssetDatabase.GetAssetPath( currentShaderAsset ); + } + + public bool displaySettings = false; + + public void DrawPreviewPanel( Rect r ) { + // Left side shader preview + + //Rect logoRect = new Rect( 1, 0, SF_GUI.Logo.width, SF_GUI.Logo.height ); + + //GUI.DrawTexture( logoRect, SF_GUI.Logo ); + + Rect btnRect = new Rect(r); + btnRect.y += 4; + btnRect.x += 2; + //btnRect.xMin += logoRect.width; + + int wDiff = 8; + + btnRect.height = 17; + btnRect.width /= 4; + btnRect.width += wDiff; + + GUIStyle btnStyle = EditorStyles.miniButton; + + if(GUI.Button(btnRect,"Return to menu",btnStyle)){ + OnPressBackToMenuButton(); + } + btnRect.x += btnRect.width; + btnRect.xMax -= wDiff*2; + btnRect.width *= 0.75f; + displaySettings = GUI.Toggle(btnRect, displaySettings, "Settings",btnStyle); + + btnRect.x += btnRect.width; + btnRect.width *= 2f; + + GUI.color = SF_GUI.outdatedStateColors[(int)ShaderOutdated]; + if( GUI.Button( btnRect, "Compile shader", btnStyle ) ) { + if(nodeView.treeStatus.CheckCanCompile()) + shaderEvaluator.Evaluate(); + } + GUI.color = Color.white; + + nodeView.DrawRecompileTimer(btnRect); + btnRect.x += btnRect.width; + btnRect.width *= 0.5f; + + SF_Settings.autoCompile = GUI.Toggle( btnRect, SF_Settings.autoCompile, "Auto" ); + + btnRect.y += 4; + + + + // SETTINGS EXPANSION + if(displaySettings){ + btnRect.y += btnRect.height; + btnRect.x = r.x - 4; + btnRect.width = r.width / 4f; + btnRect.x += btnRect.width; + btnRect.width *= 2.55f; + + /*Rect[] splitRects = btnRect.SplitHorizontal( 0.5f, 1 ); // Node render mode control + GUI.Label( splitRects[1], "Node rendering" ); + EditorGUI.BeginChangeCheck(); + SF_Settings.nodeRenderMode = (NodeRenderMode)EditorGUI.EnumPopup( splitRects[0], SF_Settings.nodeRenderMode ); + if( EditorGUI.EndChangeCheck() ) { + RegenerateNodeBaseData(); + } + btnRect = btnRect.MovedDown();*/ + if( SF_Settings.nodeRenderMode == NodeRenderMode.Viewport ) { + EditorGUI.BeginDisabledGroup( true ); + GUI.Toggle( btnRect, true, "Real-time node rendering" ); + EditorGUI.EndDisabledGroup(); + } else { + EditorGUI.BeginChangeCheck(); + SF_Settings.realtimeNodePreviews = GUI.Toggle( btnRect, SF_Settings.realtimeNodePreviews, "Real-time node rendering" ); + if( EditorGUI.EndChangeCheck() ) { + RegenerateNodeBaseData(); + } + } + + btnRect = btnRect.MovedDown(); + SF_Settings.quickPickScrollWheel = GUI.Toggle( btnRect, SF_Settings.quickPickScrollWheel, "Use scroll in the quickpicker" ); + btnRect = btnRect.MovedDown(); + SF_Settings.showVariableSettings = GUI.Toggle( btnRect, SF_Settings.showVariableSettings, "Show variable name & precision" ); + btnRect = btnRect.MovedDown(); + SF_Settings.showNodeSidebar = GUI.Toggle( btnRect, SF_Settings.showNodeSidebar, "Show node browser panel" ); + btnRect = btnRect.MovedDown(); + if( SF_GUI.HoldingControl() ) { + EditorGUI.BeginDisabledGroup( true ); + GUI.Toggle( btnRect, !SF_Settings.hierarchalNodeMove, "Hierarchal Node Move" ); + EditorGUI.EndDisabledGroup(); + } else { + SF_Settings.hierarchalNodeMove = GUI.Toggle( btnRect, SF_Settings.hierarchalNodeMove, "Hierarchal Node Move" ); + } + + btnRect.y += 4; + } + + + + + //GUI.Box( new Rect(203,10,128,19), SF_Tools.versionStage+" "+SF_Tools.version, versionStyle ); + previewButtonHeightOffset = (int)btnRect.yMax + 24; + int previewOffset = preview.OnGUI( (int)btnRect.yMax, (int)r.width ); + int statusBoxOffset = statusBox.OnGUI( previewOffset, (int)r.width ); + + + ps.OnLocalGUI(statusBoxOffset, (int)r.width ); + if( SF_Debug.nodes ) { + GUILayout.Label( "Node count: " + nodes.Count ); + } + + } + + void RegenerateNodeBaseData() { + for( int i = 0; i < nodes.Count; i++ ) { + nodes[i].GenerateBaseData(); + } + } + + int previewButtonHeightOffset; + + public void OnPressBackToMenuButton(){ + shaderEvaluator.SaveShaderAsset(); + Close(); + Init(); + } + + + public void OnPressSettingsButton(){ + + } + + + + + + + + public void OnShaderEvaluated() { + // statusBox.UpdateInstructionCount( preview.InternalMaterial.shader ); + } + + + + public void CheckForBrokenConnections() { + foreach( SF_Node node in nodes ) + node.CheckForBrokenConnections(); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_Editor.cs.meta b/Editor/Code/SF_Editor.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_Editor.cs.meta rename to Editor/Code/SF_Editor.cs.meta index 16805ea1..f821e58c --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_Editor.cs.meta +++ b/Editor/Code/SF_Editor.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 74496bb1dec304ba59a268d77032e300 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 74496bb1dec304ba59a268d77032e300 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_EditorNodeBrowser.cs b/Editor/Code/SF_EditorNodeBrowser.cs old mode 100755 new mode 100644 similarity index 92% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_EditorNodeBrowser.cs rename to Editor/Code/SF_EditorNodeBrowser.cs index 7e263f83..f1ecce0c --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_EditorNodeBrowser.cs +++ b/Editor/Code/SF_EditorNodeBrowser.cs @@ -1,411 +1,411 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -using System.Collections.Generic; - -namespace ShaderForge { - - [System.Serializable] - public class SF_EditorNodeBrowser : ScriptableObject { - - - [SerializeField] - public SF_Editor editor; - [SerializeField] - public Vector2 scrollPos; - - [SerializeField] - GUIStyle styleToolbar; - [SerializeField] - GUIStyle styleSearchField; - [SerializeField] - GUIStyle styleSearchCancel; - [SerializeField] - GUIStyle styleCategory; - [SerializeField] - GUIStyle styleButton; - - [SerializeField] - bool showFiltered = false; - //[SerializeField] SerializableDictionary> unfiltered; - //[SerializeField] SerializableDictionary> filtered; - [SerializeField] - List unfiltered; - [SerializeField] - List filtered; - - bool initializedStyles = false; - - [SerializeField] - SF_EditorNodeData dragNode = null; - - [SerializeField] - public string searchString = ""; - - - public SF_EditorNodeBrowser() { - initializedStyles = false; - } - - public void OnEnable() { - base.hideFlags = HideFlags.HideAndDontSave; - } - - - - - public SF_EditorNodeBrowser Initialize( SF_Editor editor ) { - this.editor = editor; - unfiltered = editor.nodeTemplates; - filtered = new List(); - dragNode = null; - return this; - } - - - public void CheckInitializeStyles() { - if( initializedStyles && styleCategory.fixedHeight == 24 && styleButton.fixedHeight == 24 ) - return; - InitializeStyles(); - } - - private void InitializeStyles() { - styleToolbar = new GUIStyle( GUI.skin.FindStyle( "Toolbar" ) ); - styleSearchField = new GUIStyle( GUI.skin.FindStyle( "ToolbarSeachTextField" ) ); - styleSearchCancel = new GUIStyle( GUI.skin.FindStyle( "ToolbarSeachCancelButton" ) ); - styleCategory = new GUIStyle( EditorStyles.toolbarButton ); - styleCategory.alignment = TextAnchor.MiddleLeft; - styleCategory.fixedHeight = 24; - styleCategory.fontStyle = FontStyle.Bold; - styleCategory.fontSize = 9; - styleCategory.margin.top = 0; - styleCategory.margin.bottom = 0; - - styleButton = new GUIStyle( GUI.skin.textField ); - styleButton.alignment = TextAnchor.MiddleLeft; - styleButton.normal.textColor = SF_GUI.ProSkin ? new Color( 0.8f, 0.8f, 0.8f ) : new Color( 0.2f, 0.2f, 0.2f ); - styleButton.fontSize = 10; - styleButton.fixedHeight = 24; - styleButton.fontSize = 10; - styleButton.margin.top = 0; - styleButton.margin.bottom = 0; - - initializedStyles = true; - } - - - - [SerializeField] - string prevString; - - [SerializeField] - string prevCategory; - - [SerializeField] - float innerHeight = 256; - - const string searchBoxName = "sf_search_box"; - - public void OnLocalGUI( Rect rect ) { - - if( IsPlacing() && Event.current.type == EventType.mouseUp && Event.current.button == 1 ) { - CancelDrag(); - Event.current.Use(); - } - - CheckInitializeStyles(); - //EditorGUIUtility.LookLikeInspector(); - - if( styleCategory.alignment != TextAnchor.MiddleLeft ) - InitializeStyles(); - - - Rect toolbarRect = new Rect( rect ); - toolbarRect.height = 19; - - - Rect searchRect = new Rect( toolbarRect ); - searchRect.width -= 19; - searchRect.y += 1; - - Rect searchCancelRect = new Rect( searchRect ); - searchCancelRect.x += searchCancelRect.width; - searchCancelRect.width = 19; - - // Command/ctrl + F // TODO - /* - if( SF_GUI.HoldingControl() && - Event.current.keyCode == KeyCode.F && - Event.current.type == EventType.keyDown && - GUI.GetNameOfFocusedControl() != searchBoxName){ - - Event.current.character = (char)0; // We're done using F now - Event.current.Use(); - GUI.FocusControl(searchBoxName); // Focus search field - Event.current.character = (char)0; // Stop! No more characters! Please! - } - */ - - - // Draw Toolbar - GUI.Box( toolbarRect, "", styleToolbar ); - - prevString = searchString.Trim(); - GUI.SetNextControlName( searchBoxName ); - searchString = EditorGUI.TextField( searchRect, searchString, styleSearchField ); - if( GUI.Button(searchCancelRect, "", styleSearchCancel ) ) { - searchString = ""; - GUI.FocusControl( null ); - } - if( searchString.Trim() != prevString ) - OnSearchStringChanged(); - - - - - - // Scroll view stuff - Rect panelRect = new Rect( rect ); - panelRect.yMin += toolbarRect.height - 1; - panelRect.height -= toolbarRect.height; - - Rect scrollRect = new Rect( panelRect ); - scrollRect.y = scrollPos.y; - - - - // Calc insides height - //Debug.Log(panelRect.height); - scrollRect.height = Mathf.Max( panelRect.height, innerHeight ); - scrollRect.width -= 15; - - Rect btnRect = new Rect( panelRect.x, panelRect.y - toolbarRect.height, rect.width - 16, styleCategory.fixedHeight ); - innerHeight = 0; - float innerStartY = 0f; - - scrollPos = GUI.BeginScrollView( panelRect, scrollPos, scrollRect, false, true /*GUILayout.Width( rect.wi )*/ ); - { - if(Event.current.type == EventType.layout) - innerStartY = btnRect.y; - if( GetNodeList().Count > 0 ) { - foreach( SF_EditorNodeData entry in GetNodeList() ) { - - if( entry.category != prevCategory ) { - DrawCategory(entry.category, ref btnRect ); - prevCategory = entry.category; - } - - DrawButton( entry, ref btnRect ); - } - } else { - GUI.color = Color.gray; - GUI.Label(btnRect, "No nodes matched" ); - GUI.color = Color.white; - } - - if(Event.current.type == EventType.layout){ - innerHeight = btnRect.yMax - innerStartY; - //Debug.Log ("Inner: " + innerHeight + ", Panel: " + panelRect.height); - } - - } - GUI.EndScrollView(); - - - - - UpdateDrag(); - - } - - public void DrawCategory( string label, ref Rect btnRect ) { - GUI.Label( btnRect, label + ":", styleCategory ); - btnRect.y += btnRect.height; - } - - public void DrawButton( SF_EditorNodeData entry, ref Rect btnRect ) { - GUI.color = entry.isProperty ? SF_Node.colorExposed : Color.white; - - bool usable = !(!entry.availableInDeferredPrePass && editor.ps.catLighting.renderPath == SFPSC_Lighting.RenderPath.Deferred); - - if(!usable){ - //GUI.color = Color.red; - GUI.enabled = false; - } - - bool mouseOver = btnRect.Contains(Event.current.mousePosition); - - - if(usable){ - if( dragNode == entry ) - GUI.color = SF_GUI.selectionColorBright; - else if( mouseOver && dragNode == null ) - GUI.color = SF_GUI.selectionColorBrighter; - } - - - GUI.Label( btnRect, (usable ? string.Empty : " ") + entry.nodeName, styleButton ); - - - if( mouseOver && Event.current.type == EventType.mouseDown && Event.current.button == 0 && usable) { - OnStartDrag( entry ); - } else if( Event.current.type == EventType.ContextClick ) { - Vector2 mousePos = Event.current.mousePosition; - if( btnRect.Contains( mousePos ) ) { - // Now create the menu, add items and show it - GenericMenu menu = new GenericMenu(); - editor.ResetRunningOutdatedTimer(); - //menu.AddItem( new GUIContent("Edit Comment"), false, ContextClick, "cmt_edit" ); - menu.AddItem( new GUIContent("What does " + entry.nodeName + " do?"), false, ContextClick, entry ); - menu.ShowAsContext(); - Event.current.Use(); - } - } - - - - GUI.color = Color.white; - if( entry.isNew || entry.isUnstable) { - GUIStyle miniStyle = new GUIStyle( EditorStyles.miniBoldLabel ); - miniStyle.alignment = TextAnchor.UpperRight; - miniStyle.normal.textColor = Color.red; - GUI.Label( btnRect, entry.isNew ? "New" : "Unstable", miniStyle ); - } - - if(usable){ - SF_GUI.AssignCursor( btnRect, MouseCursor.Pan ); - } else { - if(Event.current.type == EventType.repaint){ - GUI.enabled = true; - SF_GUI.DrawLock(btnRect.PadTop(4),"Forward rendering only", TextAlignment.Right); - //Draw(btnRect.PadTop(4), false, true, true, false); // Draw lock - GUI.enabled = false; - } - } - GUI.enabled = true; - btnRect.y += btnRect.height; - } - - public void ContextClick( object o ) { - SF_EditorNodeData entry = o as SF_EditorNodeData; - SF_Web.OpenDocumentationForNode(entry); - } - - - - public void OnStartDrag( SF_EditorNodeData nodeData ) { - //if( IsPlacing() ) - // return; - //Debug.Log( "DRAG BUTTON: " + nodeData.name ); - dragNode = nodeData; - } - - public SF_Node OnStopDrag() { - if( !IsPlacing() ) - return null; - SF_Node newNode = null; - if(editor.nodeView.rect.Contains(Event.current.mousePosition)) - newNode = editor.AddNode( dragNode, registerUndo:true ); - dragNode = null; - return newNode; - } - - public void UpdateDrag() { - if( !IsPlacing() ) - return; - - editor.Repaint(); - - //Debug.Log( "Drag exists: " + ( dragNode != null ) + "\nDrag name: " + dragNode.name + "\nDrag type: " + dragNode.type.ToString() ); - - //float preScale = (float)(editor.separatorRight.rect.x - Event.current.mousePosition.x); - //preScale /= 48f; // Distance to animate in - //preScale = Mathf.Clamp01(preScale); - - //Rect boxRect = new Rect( 0, 0, SF_Node.NODE_SIZE, SF_Node.NODE_SIZE ).ScaleSizeBy(preScale).ClampSize((int)styleCategory.fixedHeight,SF_Node.NODE_SIZE); - Rect boxRect = new Rect( 0, 0, SF_Node.NODE_SIZE, SF_Node.NODE_SIZE ); - boxRect.center = Event.current.mousePosition; - - GUI.Box( boxRect, dragNode.nodeName ); - // Debug.Log( Event.current.type.ToString()); - if( Event.current.rawType == EventType.mouseUp ) - OnStopDrag(); - - - } - - public void CancelDrag() { - dragNode = null; - } - - public bool IsPlacing() { - if( dragNode == null ) - return false; - if( string.IsNullOrEmpty( dragNode.nodeName ) ) { - dragNode = null; - return false; - } - return true; - } - - - public bool DragButton( Rect r, string label, GUIStyle style ) { - bool clicked = ( Event.current.type == EventType.mouseDown && Event.current.button == 0 ); - GUI.Button( r, label, style ); - bool hover = r.Contains( Event.current.mousePosition ); - return ( hover && clicked ); - } - - - - public List GetNodeList() { - return showFiltered ? filtered : unfiltered; - } - - - public void OnSearchStringChanged() { - if( string.IsNullOrEmpty( searchString ) ) { - OnSearchStringCleared(); - return; - } - showFiltered = true; - - RefreshFilter(); - - } - - public void OnSearchStringCleared() { - showFiltered = false; - } - - - - public void RefreshFilter() { - filtered.Clear(); - - /*foreach( KeyValuePair> entry in unfiltered ) { - if( Match(entry.Key.name, searchString) ) { - filtered.Add(entry.Key,entry.Value); - } - }*/ - - foreach( SF_EditorNodeData entry in unfiltered ) { - if( Match( entry.nodeName, searchString ) ) { - filtered.Add( entry ); - } - } - - } - - private bool Match( string a, string b ) { - return Clean( a ).Contains( Clean( b ) ); - } - - private string Clean( string s ) { - return s.Trim().Replace( " ", string.Empty ).ToLower(); - } - - - - } +using UnityEngine; +using UnityEditor; +using System.Collections; +using System.Collections.Generic; + +namespace ShaderForge { + + [System.Serializable] + public class SF_EditorNodeBrowser : ScriptableObject { + + + [SerializeField] + public SF_Editor editor; + [SerializeField] + public Vector2 scrollPos; + + [SerializeField] + GUIStyle styleToolbar; + [SerializeField] + GUIStyle styleSearchField; + [SerializeField] + GUIStyle styleSearchCancel; + [SerializeField] + GUIStyle styleCategory; + [SerializeField] + GUIStyle styleButton; + + [SerializeField] + bool showFiltered = false; + //[SerializeField] SerializableDictionary> unfiltered; + //[SerializeField] SerializableDictionary> filtered; + [SerializeField] + List unfiltered; + [SerializeField] + List filtered; + + bool initializedStyles = false; + + [SerializeField] + SF_EditorNodeData dragNode = null; + + [SerializeField] + public string searchString = ""; + + + public SF_EditorNodeBrowser() { + initializedStyles = false; + } + + public void OnEnable() { + base.hideFlags = HideFlags.HideAndDontSave; + } + + + + + public SF_EditorNodeBrowser Initialize( SF_Editor editor ) { + this.editor = editor; + unfiltered = editor.nodeTemplates; + filtered = new List(); + dragNode = null; + return this; + } + + + public void CheckInitializeStyles() { + if( initializedStyles && styleCategory.fixedHeight == 24 && styleButton.fixedHeight == 24 ) + return; + InitializeStyles(); + } + + private void InitializeStyles() { + styleToolbar = new GUIStyle( GUI.skin.FindStyle( "Toolbar" ) ); + styleSearchField = new GUIStyle( GUI.skin.FindStyle( "ToolbarSeachTextField" ) ); + styleSearchCancel = new GUIStyle( GUI.skin.FindStyle( "ToolbarSeachCancelButton" ) ); + styleCategory = new GUIStyle( EditorStyles.toolbarButton ); + styleCategory.alignment = TextAnchor.MiddleLeft; + styleCategory.fixedHeight = 24; + styleCategory.fontStyle = FontStyle.Bold; + styleCategory.fontSize = 9; + styleCategory.margin.top = 0; + styleCategory.margin.bottom = 0; + + styleButton = new GUIStyle( GUI.skin.textField ); + styleButton.alignment = TextAnchor.MiddleLeft; + styleButton.normal.textColor = SF_GUI.ProSkin ? new Color( 0.8f, 0.8f, 0.8f ) : new Color( 0.2f, 0.2f, 0.2f ); + styleButton.fontSize = 10; + styleButton.fixedHeight = 24; + styleButton.fontSize = 10; + styleButton.margin.top = 0; + styleButton.margin.bottom = 0; + + initializedStyles = true; + } + + + + [SerializeField] + string prevString; + + [SerializeField] + string prevCategory; + + [SerializeField] + float innerHeight = 256; + + const string searchBoxName = "sf_search_box"; + + public void OnLocalGUI( Rect rect ) { + + if( IsPlacing() && Event.current.type == EventType.MouseUp && Event.current.button == 1 ) { + CancelDrag(); + Event.current.Use(); + } + + CheckInitializeStyles(); + //EditorGUIUtility.LookLikeInspector(); + + if( styleCategory.alignment != TextAnchor.MiddleLeft ) + InitializeStyles(); + + + Rect toolbarRect = new Rect( rect ); + toolbarRect.height = 19; + + + Rect searchRect = new Rect( toolbarRect ); + searchRect.width -= 19; + searchRect.y += 1; + + Rect searchCancelRect = new Rect( searchRect ); + searchCancelRect.x += searchCancelRect.width; + searchCancelRect.width = 19; + + // Command/ctrl + F // TODO + /* + if( SF_GUI.HoldingControl() && + Event.current.keyCode == KeyCode.F && + Event.current.type == EventType.keyDown && + GUI.GetNameOfFocusedControl() != searchBoxName){ + + Event.current.character = (char)0; // We're done using F now + Event.current.Use(); + GUI.FocusControl(searchBoxName); // Focus search field + Event.current.character = (char)0; // Stop! No more characters! Please! + } + */ + + + // Draw Toolbar + GUI.Box( toolbarRect, "", styleToolbar ); + + prevString = searchString.Trim(); + GUI.SetNextControlName( searchBoxName ); + searchString = EditorGUI.TextField( searchRect, searchString, styleSearchField ); + if( GUI.Button(searchCancelRect, "", styleSearchCancel ) ) { + searchString = ""; + GUI.FocusControl( null ); + } + if( searchString.Trim() != prevString ) + OnSearchStringChanged(); + + + + + + // Scroll view stuff + Rect panelRect = new Rect( rect ); + panelRect.yMin += toolbarRect.height - 1; + panelRect.height -= toolbarRect.height; + + Rect scrollRect = new Rect( panelRect ); + scrollRect.y = scrollPos.y; + + + + // Calc insides height + //Debug.Log(panelRect.height); + scrollRect.height = Mathf.Max( panelRect.height, innerHeight ); + scrollRect.width -= 15; + + Rect btnRect = new Rect( panelRect.x, panelRect.y - toolbarRect.height, rect.width - 16, styleCategory.fixedHeight ); + innerHeight = 0; + float innerStartY = 0f; + + scrollPos = GUI.BeginScrollView( panelRect, scrollPos, scrollRect, false, true /*GUILayout.Width( rect.wi )*/ ); + { + if(Event.current.type == EventType.Layout) + innerStartY = btnRect.y; + if( GetNodeList().Count > 0 ) { + foreach( SF_EditorNodeData entry in GetNodeList() ) { + + if( entry.category != prevCategory ) { + DrawCategory(entry.category, ref btnRect ); + prevCategory = entry.category; + } + + DrawButton( entry, ref btnRect ); + } + } else { + GUI.color = Color.gray; + GUI.Label(btnRect, "No nodes matched" ); + GUI.color = Color.white; + } + + if(Event.current.type == EventType.Layout){ + innerHeight = btnRect.yMax - innerStartY; + //Debug.Log ("Inner: " + innerHeight + ", Panel: " + panelRect.height); + } + + } + GUI.EndScrollView(); + + + + + UpdateDrag(); + + } + + public void DrawCategory( string label, ref Rect btnRect ) { + GUI.Label( btnRect, label + ":", styleCategory ); + btnRect.y += btnRect.height; + } + + public void DrawButton( SF_EditorNodeData entry, ref Rect btnRect ) { + GUI.color = entry.isProperty ? SF_Node.colorExposed : Color.white; + + bool usable = !(!entry.availableInDeferredPrePass && editor.ps.catLighting.renderPath == SFPSC_Lighting.RenderPath.Deferred); + + if(!usable){ + //GUI.color = Color.red; + GUI.enabled = false; + } + + bool mouseOver = btnRect.Contains(Event.current.mousePosition); + + + if(usable){ + if( dragNode == entry ) + GUI.color = SF_GUI.selectionColorBright; + else if( mouseOver && dragNode == null ) + GUI.color = SF_GUI.selectionColorBrighter; + } + + + GUI.Label( btnRect, (usable ? string.Empty : " ") + entry.nodeName, styleButton ); + + + if( mouseOver && Event.current.type == EventType.MouseDown && Event.current.button == 0 && usable) { + OnStartDrag( entry ); + } else if( Event.current.type == EventType.ContextClick ) { + Vector2 mousePos = Event.current.mousePosition; + if( btnRect.Contains( mousePos ) ) { + // Now create the menu, add items and show it + GenericMenu menu = new GenericMenu(); + editor.ResetRunningOutdatedTimer(); + //menu.AddItem( new GUIContent("Edit Comment"), false, ContextClick, "cmt_edit" ); + menu.AddItem( new GUIContent("What does " + entry.nodeName + " do?"), false, ContextClick, entry ); + menu.ShowAsContext(); + Event.current.Use(); + } + } + + + + GUI.color = Color.white; + if( entry.isNew || entry.isUnstable) { + GUIStyle miniStyle = new GUIStyle( EditorStyles.miniBoldLabel ); + miniStyle.alignment = TextAnchor.UpperRight; + miniStyle.normal.textColor = Color.red; + GUI.Label( btnRect, entry.isNew ? "New" : "Unstable", miniStyle ); + } + + if(usable){ + SF_GUI.AssignCursor( btnRect, MouseCursor.Pan ); + } else { + if(Event.current.type == EventType.Repaint){ + GUI.enabled = true; + SF_GUI.DrawLock(btnRect.PadTop(4),"Forward rendering only", TextAlignment.Right); + //Draw(btnRect.PadTop(4), false, true, true, false); // Draw lock + GUI.enabled = false; + } + } + GUI.enabled = true; + btnRect.y += btnRect.height; + } + + public void ContextClick( object o ) { + SF_EditorNodeData entry = o as SF_EditorNodeData; + SF_Web.OpenDocumentationForNode(entry); + } + + + + public void OnStartDrag( SF_EditorNodeData nodeData ) { + //if( IsPlacing() ) + // return; + //Debug.Log( "DRAG BUTTON: " + nodeData.name ); + dragNode = nodeData; + } + + public SF_Node OnStopDrag() { + if( !IsPlacing() ) + return null; + SF_Node newNode = null; + if(editor.nodeView.rect.Contains(Event.current.mousePosition)) + newNode = editor.AddNode( dragNode, registerUndo:true ); + dragNode = null; + return newNode; + } + + public void UpdateDrag() { + if( !IsPlacing() ) + return; + + editor.Repaint(); + + //Debug.Log( "Drag exists: " + ( dragNode != null ) + "\nDrag name: " + dragNode.name + "\nDrag type: " + dragNode.type.ToString() ); + + //float preScale = (float)(editor.separatorRight.rect.x - Event.current.mousePosition.x); + //preScale /= 48f; // Distance to animate in + //preScale = Mathf.Clamp01(preScale); + + //Rect boxRect = new Rect( 0, 0, SF_Node.NODE_SIZE, SF_Node.NODE_SIZE ).ScaleSizeBy(preScale).ClampSize((int)styleCategory.fixedHeight,SF_Node.NODE_SIZE); + Rect boxRect = new Rect( 0, 0, SF_Node.NODE_SIZE, SF_Node.NODE_SIZE ); + boxRect.center = Event.current.mousePosition; + + GUI.Box( boxRect, dragNode.nodeName ); + // Debug.Log( Event.current.type.ToString()); + if( Event.current.rawType == EventType.MouseUp ) + OnStopDrag(); + + + } + + public void CancelDrag() { + dragNode = null; + } + + public bool IsPlacing() { + if( dragNode == null ) + return false; + if( string.IsNullOrEmpty( dragNode.nodeName ) ) { + dragNode = null; + return false; + } + return true; + } + + + public bool DragButton( Rect r, string label, GUIStyle style ) { + bool clicked = ( Event.current.type == EventType.MouseDown && Event.current.button == 0 ); + GUI.Button( r, label, style ); + bool hover = r.Contains( Event.current.mousePosition ); + return ( hover && clicked ); + } + + + + public List GetNodeList() { + return showFiltered ? filtered : unfiltered; + } + + + public void OnSearchStringChanged() { + if( string.IsNullOrEmpty( searchString ) ) { + OnSearchStringCleared(); + return; + } + showFiltered = true; + + RefreshFilter(); + + } + + public void OnSearchStringCleared() { + showFiltered = false; + } + + + + public void RefreshFilter() { + filtered.Clear(); + + /*foreach( KeyValuePair> entry in unfiltered ) { + if( Match(entry.Key.name, searchString) ) { + filtered.Add(entry.Key,entry.Value); + } + }*/ + + foreach( SF_EditorNodeData entry in unfiltered ) { + if( Match( entry.nodeName, searchString ) ) { + filtered.Add( entry ); + } + } + + } + + private bool Match( string a, string b ) { + return Clean( a ).Contains( Clean( b ) ); + } + + private string Clean( string s ) { + return s.Trim().Replace( " ", string.Empty ).ToLower(); + } + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_EditorNodeBrowser.cs.meta b/Editor/Code/SF_EditorNodeBrowser.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_EditorNodeBrowser.cs.meta rename to Editor/Code/SF_EditorNodeBrowser.cs.meta index a8dd3895..c5e497b0 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_EditorNodeBrowser.cs.meta +++ b/Editor/Code/SF_EditorNodeBrowser.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 8317eafd51c2b41ee9f29c20218164f3 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 8317eafd51c2b41ee9f29c20218164f3 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_EditorNodeData.cs b/Editor/Code/SF_EditorNodeData.cs old mode 100755 new mode 100644 similarity index 92% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_EditorNodeData.cs rename to Editor/Code/SF_EditorNodeData.cs index 852eb163..3fa7bb92 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_EditorNodeData.cs +++ b/Editor/Code/SF_EditorNodeData.cs @@ -1,354 +1,354 @@ -using UnityEngine; -using System.Collections; -using System.Collections.Generic; -using System; - -namespace ShaderForge { - - [System.Serializable] - public class SF_EditorNodeData : ScriptableObject { - - [SerializeField] - KeyCode key; - [SerializeField] - public bool holding = false; - [SerializeField] - public string nodeName; - [SerializeField] - private string nodeNameSearch; - - public string SearchName{ - get{ - if(string.IsNullOrEmpty(nodeNameSearch)){ - return nodeName; - } else { - return nodeNameSearch; - } - } - set{ - nodeNameSearch = value; - } - } - - [SerializeField] - public string type; - [SerializeField] - public bool isNew = false; - [SerializeField] - public bool isUnstable = false; - [SerializeField] - public string fullPath; - [SerializeField] - public string category; - [SerializeField] - public bool isProperty = false; - [SerializeField] - public bool availableInDeferredPrePass = true; - - - - public SF_EditorNodeData() { - - } - - public void OnEnable() { - base.hideFlags = HideFlags.HideAndDontSave; - } - - public SF_EditorNodeData Initialize( string type, string fullPath, KeyCode key = KeyCode.None ) { - holding = false; - this.type = type; - ParseCategoryAndName( fullPath ); - this.key = key; - - if( type.Contains( "SFN_Color" ) || - type.Contains( "SFN_Cubemap" ) || - type.Contains( "SFN_Slider" ) || - type.Contains( "SFN_Tex2d" ) || - type.Contains( "SFN_Tex2dAsset" ) || - type.Contains( "SFN_Vector4Property" ) || - type.Contains( "SFN_ValueProperty" ) || - type.Contains( "SFN_ToggleProperty" ) || - type.Contains( "SFN_SwitchProperty" ) || - type.Contains( "SFN_Matrix4x4Property" ) - ) - isProperty = true; - - return this; - } - - public void ParseCategoryAndName(string fullPath) { - - this.fullPath = fullPath; - - string[] split = fullPath.Split( '/' ); - if( split.Length > 1 ) { - this.category = split[0]; - this.nodeName = split[1]; - } else { - this.nodeName = fullPath; - } - - } - - - public SF_Node CreateInstance() { - - Type fType = Type.GetType( type ); - - // Might be dynamic... - if( fType == null ) { - if(SF_Debug.dynamicNodeLoad) - Debug.Log( "CreateInstance couldn't use GetType, attempting dynamic load..." ); - fType = SF_Editor.GetNodeType( type ); - if( SF_Debug.dynamicNodeLoad && fType == null ) - Debug.Log( "Failed to load dynamic load fType is null" ); - } - - - SF_Node node = (SF_Node)ScriptableObject.CreateInstance( fType ); - node.Initialize(); - return node; - } - - public SF_EditorNodeData MarkAsNewNode() { - isNew = true; - return this; - } - - public SF_EditorNodeData MarkAsUnstableNode() { - isUnstable = true; - return this; - } - - public SF_EditorNodeData UavailableInDeferredPrePass(){ - availableInDeferredPrePass = false; - return this; - } - - public float smoothHotkeySelectorIndex = 0f; - public int defaultHotkeySelectorIndex = 0; - public int hotkeySelectorIndex = 0; - [SerializeField] - private List hotkeyFriends; - public List HotkeyFriends{ - get{ - if(hotkeyFriends == null){ - hotkeyFriends = new List(); - } - - if(hotkeyFriends.Count == 0){ - int i=0; - foreach( SF_EditorNodeData node in SF_Editor.instance.nodeTemplates){ - if(node == this) - smoothHotkeySelectorIndex = hotkeySelectorIndex = defaultHotkeySelectorIndex = i; - if(node.key == key || KeyCodeToChar(key) == char.ToUpper(node.nodeName[0])){ - hotkeyFriends.Add(node); - i++; - } - - } - } - return hotkeyFriends; - } - } - - - public char KeyCodeToChar(KeyCode kc){ - string s = kc.ToString(); - if(s.StartsWith("Alpha")) // Numbers 0 to 9 are called "Alpha5" etc. Extract just the numeral as the returned character - return s[5]; - return s[0]; - } - - [SerializeField] - private static GUIStyle popupButtonStyle; - public static GUIStyle PopupButtonStyle{ - get{ - if(popupButtonStyle == null){ - popupButtonStyle = new GUIStyle(SF_Styles.NodeStyle); - popupButtonStyle.alignment = TextAnchor.UpperLeft; - RectOffset ro = popupButtonStyle.padding; - ro.left = 4; - popupButtonStyle.padding = ro; - } - return popupButtonStyle; - } - } - - public Vector2 quickpickerStartPosition = Vector2.zero; - - public SF_EditorNodeData CheckHotkeyInput(bool mouseOverSomeNode) { - - bool mouseInNodeView = SF_Editor.instance.nodeView.MouseInsideNodeView(false); - - - if(Event.current.type == EventType.repaint){ - smoothHotkeySelectorIndex = Mathf.Lerp(smoothHotkeySelectorIndex, hotkeySelectorIndex, 0.5f); - } - - bool useScroll = SF_Settings.quickPickScrollWheel; - - if(holding && Event.current.type == EventType.scrollWheel && HotkeyFriends.Count > 0 && mouseInNodeView){ - - if(useScroll){ - hotkeySelectorIndex += (int)Mathf.Sign(Event.current.delta.y); - hotkeySelectorIndex = Mathf.Clamp(hotkeySelectorIndex, 0, HotkeyFriends.Count-1); - } - - - // hotkeySelectorIndex = ( hotkeySelectorIndex + HotkeyFriends.Count ) % HotkeyFriends.Count; // Wrap - Event.current.Use(); - } - - if( key == KeyCode.None ) - return null; - - if( Event.current.keyCode == key ) { - if( Event.current.type == EventType.keyDown && !SF_GUI.HoldingControl() && holding == false && mouseInNodeView ){ - - hotkeySelectorIndex = defaultHotkeySelectorIndex; - smoothHotkeySelectorIndex = defaultHotkeySelectorIndex; - - quickpickerStartPosition = Event.current.mousePosition; - - holding = true; - } - if( Event.current.rawType == EventType.keyUp ){ - holding = false; - } - } - - - - if(holding && !mouseOverSomeNode){ - - - - - float width = 166f; // nodeName.Length*8 + 10; - Rect dispPos = new Rect(0, 0, width, 36); - - Vector2 centerPos = useScroll ? Event.current.mousePosition : quickpickerStartPosition; - - dispPos.center = centerPos; - dispPos.y -= dispPos.height*0.3333f; - - // - //GUI.Box(dispPos, nodeName, GUI.skin.button); - // - - - - // Draw hotkey node picker - //if(Event.current.type == EventType.keyDown){ - //Debug.Log(Event.current.keyCode); - Rect nRect = dispPos; //new Rect(0,0,128,32); - nRect.center = centerPos - Vector2.up*nRect.height*0.3333f; - //nRect = nRect.MovedRight(); - if(useScroll) - nRect.y -= nRect.height * smoothHotkeySelectorIndex; - else - nRect.y -= nRect.height * defaultHotkeySelectorIndex; - //if(Event.current.keyCode != KeyCode.None){ - - Color prevCol = GUI.color; - - - - int i = 0; - foreach( SF_EditorNodeData node in HotkeyFriends){ - //float dist = Mathf.Abs(smoothHotkeySelectorIndex - i); - //float alpha = Mathf.Clamp(1f-Mathf.Clamp01(dist*0.25f), 0.2f, 0.8f); - - - float offset = 0f;//(dist*dist)/3f; - - - - - //if(i == hotkeySelectorIndex){ - //alpha = 1; - //offset -= 8f; - //GUI.Box(nRect, node.nodeName, PopupButtonStyle); - //} - Rect newNRect = nRect; - newNRect.x += offset; - - - if(!useScroll && newNRect.Contains(Event.current.mousePosition)){ - hotkeySelectorIndex = i; - } - - bool selected = (i == hotkeySelectorIndex); - - if( selected ) - GUI.color = new Color(1f,1f,1f,1f); - else - GUI.color = new Color(0.6f,0.6f,0.6f,0.5f); - - if(node.isProperty){ - GUI.color *= SF_Node.colorExposed; - } - - - Texture2D icon = SF_Resources.LoadNodeIcon( node.type.Split('.')[1].ToLower() ); - - if(icon != null){ - newNRect.width -= newNRect.height; - } - - //if(useScroll){ - GUI.Box(newNRect, node.nodeName, PopupButtonStyle); - //} else { - //if(GUI.Button(newNRect, node.nodeName, PopupButtonStyle)){ - //hotkeySelectorIndex = i; - //} - //} - - - - - if(icon != null){ - Rect iconRect = newNRect; - iconRect = iconRect.MovedRight(); - iconRect.width = iconRect.height; - GUI.color = selected ? Color.white : new Color(1f,1f,1f,0.4f); - GUI.DrawTexture(iconRect, icon); - - } - - - - - nRect = nRect.MovedDown(); - - i++; - } - GUI.color = prevCol; - - - - //} - if(Event.current.type == EventType.keyDown/* && Event.current.type == EventType.layout*/ /*&& GUI.GetNameOfFocusedControl() == "defocus"*/){ - Event.current.Use(); - } - //} - - //} - - //GUI.Label(new Rect(Event.current.mousePosition.x, Event.current.mousePosition.y, 256,32),"currentindex = " + hotkeySelectorIndex); - } - - - - - bool clicked = Event.current.type == EventType.mouseDown; - if(holding && clicked){ - return HotkeyFriends[hotkeySelectorIndex]; - } else { - return null; - } - } - } +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using System; + +namespace ShaderForge { + + [System.Serializable] + public class SF_EditorNodeData : ScriptableObject { + + [SerializeField] + KeyCode key; + [SerializeField] + public bool holding = false; + [SerializeField] + public string nodeName; + [SerializeField] + private string nodeNameSearch; + + public string SearchName{ + get{ + if(string.IsNullOrEmpty(nodeNameSearch)){ + return nodeName; + } else { + return nodeNameSearch; + } + } + set{ + nodeNameSearch = value; + } + } + + [SerializeField] + public string type; + [SerializeField] + public bool isNew = false; + [SerializeField] + public bool isUnstable = false; + [SerializeField] + public string fullPath; + [SerializeField] + public string category; + [SerializeField] + public bool isProperty = false; + [SerializeField] + public bool availableInDeferredPrePass = true; + + + + public SF_EditorNodeData() { + + } + + public void OnEnable() { + base.hideFlags = HideFlags.HideAndDontSave; + } + + public SF_EditorNodeData Initialize( string type, string fullPath, KeyCode key = KeyCode.None ) { + holding = false; + this.type = type; + ParseCategoryAndName( fullPath ); + this.key = key; + + if( type.Contains( "SFN_Color" ) || + type.Contains( "SFN_Cubemap" ) || + type.Contains( "SFN_Slider" ) || + type.Contains( "SFN_Tex2d" ) || + type.Contains( "SFN_Tex2dAsset" ) || + type.Contains( "SFN_Vector4Property" ) || + type.Contains( "SFN_ValueProperty" ) || + type.Contains( "SFN_ToggleProperty" ) || + type.Contains( "SFN_SwitchProperty" ) || + type.Contains( "SFN_Matrix4x4Property" ) + ) + isProperty = true; + + return this; + } + + public void ParseCategoryAndName(string fullPath) { + + this.fullPath = fullPath; + + string[] split = fullPath.Split( '/' ); + if( split.Length > 1 ) { + this.category = split[0]; + this.nodeName = split[1]; + } else { + this.nodeName = fullPath; + } + + } + + + public SF_Node CreateInstance() { + + Type fType = Type.GetType( type ); + + // Might be dynamic... + if( fType == null ) { + if(SF_Debug.dynamicNodeLoad) + Debug.Log( "CreateInstance couldn't use GetType, attempting dynamic load..." ); + fType = SF_Editor.GetNodeType( type ); + if( SF_Debug.dynamicNodeLoad && fType == null ) + Debug.Log( "Failed to load dynamic load fType is null" ); + } + + + SF_Node node = (SF_Node)ScriptableObject.CreateInstance( fType ); + node.Initialize(); + return node; + } + + public SF_EditorNodeData MarkAsNewNode() { + isNew = true; + return this; + } + + public SF_EditorNodeData MarkAsUnstableNode() { + isUnstable = true; + return this; + } + + public SF_EditorNodeData UavailableInDeferredPrePass(){ + availableInDeferredPrePass = false; + return this; + } + + public float smoothHotkeySelectorIndex = 0f; + public int defaultHotkeySelectorIndex = 0; + public int hotkeySelectorIndex = 0; + [SerializeField] + private List hotkeyFriends; + public List HotkeyFriends{ + get{ + if(hotkeyFriends == null){ + hotkeyFriends = new List(); + } + + if(hotkeyFriends.Count == 0){ + int i=0; + foreach( SF_EditorNodeData node in SF_Editor.instance.nodeTemplates){ + if(node == this) + smoothHotkeySelectorIndex = hotkeySelectorIndex = defaultHotkeySelectorIndex = i; + if(node.key == key || KeyCodeToChar(key) == char.ToUpper(node.nodeName[0])){ + hotkeyFriends.Add(node); + i++; + } + + } + } + return hotkeyFriends; + } + } + + + public char KeyCodeToChar(KeyCode kc){ + string s = kc.ToString(); + if(s.StartsWith("Alpha")) // Numbers 0 to 9 are called "Alpha5" etc. Extract just the numeral as the returned character + return s[5]; + return s[0]; + } + + [SerializeField] + private static GUIStyle popupButtonStyle; + public static GUIStyle PopupButtonStyle{ + get{ + if(popupButtonStyle == null){ + popupButtonStyle = new GUIStyle(SF_Styles.NodeStyle); + popupButtonStyle.alignment = TextAnchor.UpperLeft; + RectOffset ro = popupButtonStyle.padding; + ro.left = 4; + popupButtonStyle.padding = ro; + } + return popupButtonStyle; + } + } + + public Vector2 quickpickerStartPosition = Vector2.zero; + + public SF_EditorNodeData CheckHotkeyInput(bool mouseOverSomeNode) { + + bool mouseInNodeView = SF_Editor.instance.nodeView.MouseInsideNodeView(false); + + + if(Event.current.type == EventType.Repaint){ + smoothHotkeySelectorIndex = Mathf.Lerp(smoothHotkeySelectorIndex, hotkeySelectorIndex, 0.5f); + } + + bool useScroll = SF_Settings.quickPickScrollWheel; + + if(holding && Event.current.type == EventType.ScrollWheel && HotkeyFriends.Count > 0 && mouseInNodeView){ + + if(useScroll){ + hotkeySelectorIndex += (int)Mathf.Sign(Event.current.delta.y); + hotkeySelectorIndex = Mathf.Clamp(hotkeySelectorIndex, 0, HotkeyFriends.Count-1); + } + + + // hotkeySelectorIndex = ( hotkeySelectorIndex + HotkeyFriends.Count ) % HotkeyFriends.Count; // Wrap + Event.current.Use(); + } + + if( key == KeyCode.None ) + return null; + + if( Event.current.keyCode == key ) { + if( Event.current.type == EventType.KeyDown && !SF_GUI.HoldingControl() && holding == false && mouseInNodeView ){ + + hotkeySelectorIndex = defaultHotkeySelectorIndex; + smoothHotkeySelectorIndex = defaultHotkeySelectorIndex; + + quickpickerStartPosition = Event.current.mousePosition; + + holding = true; + } + if( Event.current.rawType == EventType.KeyUp ){ + holding = false; + } + } + + + + if(holding && !mouseOverSomeNode){ + + + + + float width = 166f; // nodeName.Length*8 + 10; + Rect dispPos = new Rect(0, 0, width, 36); + + Vector2 centerPos = useScroll ? Event.current.mousePosition : quickpickerStartPosition; + + dispPos.center = centerPos; + dispPos.y -= dispPos.height*0.3333f; + + // + //GUI.Box(dispPos, nodeName, GUI.skin.button); + // + + + + // Draw hotkey node picker + //if(Event.current.type == EventType.keyDown){ + //Debug.Log(Event.current.keyCode); + Rect nRect = dispPos; //new Rect(0,0,128,32); + nRect.center = centerPos - Vector2.up*nRect.height*0.3333f; + //nRect = nRect.MovedRight(); + if(useScroll) + nRect.y -= nRect.height * smoothHotkeySelectorIndex; + else + nRect.y -= nRect.height * defaultHotkeySelectorIndex; + //if(Event.current.keyCode != KeyCode.None){ + + Color prevCol = GUI.color; + + + + int i = 0; + foreach( SF_EditorNodeData node in HotkeyFriends){ + //float dist = Mathf.Abs(smoothHotkeySelectorIndex - i); + //float alpha = Mathf.Clamp(1f-Mathf.Clamp01(dist*0.25f), 0.2f, 0.8f); + + + float offset = 0f;//(dist*dist)/3f; + + + + + //if(i == hotkeySelectorIndex){ + //alpha = 1; + //offset -= 8f; + //GUI.Box(nRect, node.nodeName, PopupButtonStyle); + //} + Rect newNRect = nRect; + newNRect.x += offset; + + + if(!useScroll && newNRect.Contains(Event.current.mousePosition)){ + hotkeySelectorIndex = i; + } + + bool selected = (i == hotkeySelectorIndex); + + if( selected ) + GUI.color = new Color(1f,1f,1f,1f); + else + GUI.color = new Color(0.6f,0.6f,0.6f,0.5f); + + if(node.isProperty){ + GUI.color *= SF_Node.colorExposed; + } + + + Texture2D icon = SF_Resources.LoadNodeIcon( node.type.Split('.')[1].ToLower() ); + + if(icon != null){ + newNRect.width -= newNRect.height; + } + + //if(useScroll){ + GUI.Box(newNRect, node.nodeName, PopupButtonStyle); + //} else { + //if(GUI.Button(newNRect, node.nodeName, PopupButtonStyle)){ + //hotkeySelectorIndex = i; + //} + //} + + + + + if(icon != null){ + Rect iconRect = newNRect; + iconRect = iconRect.MovedRight(); + iconRect.width = iconRect.height; + GUI.color = selected ? Color.white : new Color(1f,1f,1f,0.4f); + GUI.DrawTexture(iconRect, icon); + + } + + + + + nRect = nRect.MovedDown(); + + i++; + } + GUI.color = prevCol; + + + + //} + if(Event.current.type == EventType.KeyDown/* && Event.current.type == EventType.layout*/ /*&& GUI.GetNameOfFocusedControl() == "defocus"*/){ + Event.current.Use(); + } + //} + + //} + + //GUI.Label(new Rect(Event.current.mousePosition.x, Event.current.mousePosition.y, 256,32),"currentindex = " + hotkeySelectorIndex); + } + + + + + bool clicked = Event.current.type == EventType.MouseDown; + if(holding && clicked){ + return HotkeyFriends[hotkeySelectorIndex]; + } else { + return null; + } + } + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_EditorNodeData.cs.meta b/Editor/Code/SF_EditorNodeData.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_EditorNodeData.cs.meta rename to Editor/Code/SF_EditorNodeData.cs.meta index 31f08f62..e60c3a1f --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_EditorNodeData.cs.meta +++ b/Editor/Code/SF_EditorNodeData.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 89068dde132014929a5aa4e450ff685b -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 89068dde132014929a5aa4e450ff685b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_EditorNodeView.cs b/Editor/Code/SF_EditorNodeView.cs old mode 100755 new mode 100644 similarity index 89% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_EditorNodeView.cs rename to Editor/Code/SF_EditorNodeView.cs index e744c5de..85ab75a4 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_EditorNodeView.cs +++ b/Editor/Code/SF_EditorNodeView.cs @@ -1,953 +1,915 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -using System.Collections.Generic; -using System.Xml; -using System.IO; -using System.Linq; - -namespace ShaderForge { - - public enum ConnectionLineStyle { Bezier, Linear, Rectilinear }; - - [System.Serializable] - public class SF_SetNodeSource { - - public SF_NodeConnector con; - - public SF_SetNodeSource( SF_Node node ) { - con = node.connectors[0]; - } - - public int NodeID { - get { return con.node.id; } - } - - public string Name { - get { return con.node.variableName; } - } - - } - - [System.Serializable] - public class SF_EditorNodeView : ScriptableObject { - - SF_Editor editor; - - const int TOOLBAR_HEIGHT = 18; - [SerializeField] - public Vector2 cameraPos = Vector3.zero; - - [SerializeField] - bool panCamera = false; - - [SerializeField] - Vector2 mousePosStart; - public Rect rect; - public GUIStyle toolbarStyle; - - public List relayInSources; - public string[] relayInNames; - - public SF_SelectionManager selection; - - public SF_NodeTreeStatus treeStatus; - - - - - - public SF_EditorNodeView() { - - } - - public void OnEnable() { - base.hideFlags = HideFlags.HideAndDontSave; - } - - - public void RefreshRelaySources() { - relayInSources = new List(); - for( int i = 0; i < editor.nodes.Count; i++ ) { - if( editor.nodes[i] is SFN_Set ) { - relayInSources.Add( new SF_SetNodeSource(editor.nodes[i]) ); - } - } - relayInSources.Sort( ( a, b ) => a.Name.CompareTo( b.Name ) ); - relayInNames = relayInSources.Select( x => x.Name ).ToArray(); - } - - // Only the node ID is serialized - this is used to ensure proper display in the GUI - // Returns -1 if the relay ID is missing - public int NodeIdToRelayId(int nodeId) { - if( relayInSources != null ) { - for( int i = 0; i < relayInSources.Count; i++ ) { - if( relayInSources[i].NodeID == nodeId ) { - return i; - } - } - } - return -1; - } - - public SF_EditorNodeView Initialize( SF_Editor editor ) { - this.editor = editor; - selection = ScriptableObject.CreateInstance().Initialize( editor ); - treeStatus = ScriptableObject.CreateInstance().Initialize(editor); - rect = new Rect(); - cameraPos = new Vector2( 32768 - 400, 32768 - 300 ); - toolbarStyle = new GUIStyle( EditorStyles.toolbar ); - toolbarStyle.fixedHeight = TOOLBAR_HEIGHT; - return this; - } - - - // Erasing nodes with cut line: (alt+RMB) - - public Vector2 cutStart = Vector3.zero; - public bool isCutting = false; - - public void StartCutting(){ - isCutting = true; - cutStart = editor.nodeView.GetNodeSpaceMousePos(); - } - - public void StopCutting(){ - List disconnectors = new List(); - for (int i = 0; i < editor.nodes.Count; i++) { - SF_Node n = editor.nodes [i]; - for (int j = 0; j < n.connectors.Length; j++) { - SF_NodeConnector con = n.connectors [j]; - if (con.IsConnected () && con.conType == ConType.cInput) { - if (con.conLine.aboutToBeDeleted) { - disconnectors.Add(con); - } - } - } - } - - if(disconnectors.Count == 0){ - isCutting = false; - return; - } - - UnmarkDeleteHighlights(); - - //Undo.RecordObject((Object)con, "cut" - string undoMsg = "cut "; - if(disconnectors.Count > 1){ - undoMsg += disconnectors.Count + " "; - undoMsg += "connections"; - } else { - undoMsg += "connection: "; - undoMsg += disconnectors[0].node.nodeName; - undoMsg += "[" + disconnectors[0].label + "]"; - undoMsg += " <--- "; - undoMsg += "[" + disconnectors[0].inputCon.label + "]"; - undoMsg += disconnectors[0].inputCon.node.nodeName; - } // = disconnectors.Count > 1 ? "cut "+disconnectors.Count+" connections" : "cut connection " + disconnectors[i].node.name + "[" + - - foreach(SF_NodeConnector con in disconnectors){ - Undo.RecordObject(con, undoMsg); - } - - foreach(SF_NodeConnector con in disconnectors){ - con.Disconnect(); - } - - isCutting = false; - - } - - public void UnmarkDeleteHighlights(){ - foreach(SF_Node n in editor.nodes){ - foreach(SF_NodeConnector con in n.connectors){ - if(con.IsConnected() && con.conType == ConType.cInput){ - con.conLine.aboutToBeDeleted = false; - } - } - } - } - - - public float zoom = 1f; - public float zoomTarget = 1f; - - public void SetZoom(float setZoom){ - Vector2 oldWidth = new Vector2(rect.width,rect.height)/zoom; - zoom = ClampZoom(setZoom); - Vector2 newWidth = new Vector2(rect.width,rect.height)/zoom; - Vector2 delta = newWidth - oldWidth; - - Vector2 normalizedMouseCoords = (Event.current.mousePosition - new Vector2(editor.separatorLeft.rect.xMax,editor.TabOffset)); - - normalizedMouseCoords.x /= rect.width; - normalizedMouseCoords.y /= rect.height; - - - - cameraPos -= Vector2.Scale(delta, normalizedMouseCoords); - - if(delta.sqrMagnitude != 0f){ - - - // Correct in here to prevent going outside the bounds - BoundsAdjustCamera(); - } - - - if(zoom == 1f) - SnapCamera(); - - } - - - - public void BoundsAdjustCamera(){ - /* - Rect wrapped = GetNodeEncapsulationRect().Margin(256); - Rect view = ScreenSpaceToZoomSpace(rect); - - Vector2 toCenter = (view.center - wrapped.center)*0.5f; - - float camBottom = cameraPos.y + rect.height/zoom - 22; - float camTop = cameraPos.y; - float camRight = cameraPos.x + rect.width/zoom - editor.separatorLeft.rect.xMax; - float camLeft = cameraPos.x - editor.separatorLeft.rect.xMax; - - Vector2 deltaTotal = Vector2.zero; - - if( camBottom > wrapped.yMax) - deltaTotal -= new Vector2(0f,camBottom-wrapped.yMax); - if(camTop < wrapped.yMin){ - deltaTotal -= new Vector2(0f,camTop-wrapped.yMin); - } - if(camRight > wrapped.xMax) - deltaTotal -= new Vector2(camRight-wrapped.xMax,0f); - if(camLeft < wrapped.xMin) - deltaTotal -= new Vector2(camLeft-wrapped.xMin,0f); - - cameraPos += deltaTotal; - -*/ - - } - - - public float ClampZoom(float in_zoom){ - return Mathf.Clamp(in_zoom,0.125f,1f); - } - - - public void OnLocalGUI( Rect r ) { - - - //r = r.PadTop(Mathf.CeilToInt(22*zoom)); - - - - - - editor.mousePosition = Event.current.mousePosition; - rect = r; - - - - // TOOLBAR - //DrawToolbar( new Rect( rect.x, rect.y, rect.width, TOOLBAR_HEIGHT ) ); - - - - Rect localRect = new Rect( r ); - localRect.x = 0; - localRect.y = 0; - - //rect.y += TOOLBAR_HEIGHT; - //rect.height -= TOOLBAR_HEIGHT; - - - - - // VIEW - Rect rectInner = new Rect( rect ); - rectInner.width = float.MaxValue / 2f; - rectInner.height = float.MaxValue / 2f; - - - // TEMP: -// Rect btn = rectInner; -// btn.width = 64; -// btn.height = 24; -// if(SF_Debug.renderDataNodes){ -// if(selection.Selection.Count > 0){ -// if(GUI.Button(btn,"NSS")){ -// editor.TakeNodePreviewScreenshot(); -// } -// } -// } - - - - if(Event.current.type == EventType.repaint){ - nodeSpaceMousePos = ScreenSpaceToZoomSpace( Event.current.mousePosition ); - - } - - - - - - bool mouseOverNode = false; - - - - - SF_ZoomArea.Begin(zoom,rect,cameraPos); - { - selection.OnGUI(); // To detect if you press things - if(editor.nodeView != null) - editor.nodeView.selection.DrawBoxSelection(); - - if(Event.current.type == EventType.repaint){ - viewSpaceMousePos = ZoomSpaceToScreenSpace( Event.current.mousePosition ); - } - // NODES - if( editor.nodes != null ) { - - // If we're repainting, draw in reverse to sort properly - //if(Event.current.rawType == EventType.repaint){ - for (int i = editor.nodes.Count - 1; i >= 0; i--) { - if( !editor.nodes[i].Draw() ) - break; - } - /*} else { - for(int i=0;i 0 ) { - Object dragObj = DragAndDrop.objectReferences[0]; - if( dragObj is Texture2D || dragObj is ProceduralTexture || dragObj is RenderTexture ) { - DragAndDrop.visualMode = DragAndDropVisualMode.Link; - if( !editor.nodeBrowser.IsPlacing() ) - editor.nodeBrowser.OnStartDrag( editor.GetTemplate() ); - else - editor.nodeBrowser.UpdateDrag(); - } else if(dragObj is ProceduralMaterial){ - DragAndDrop.visualMode = DragAndDropVisualMode.Link; - } else { - DragAndDrop.visualMode = DragAndDropVisualMode.Rejected; - } - } else { - DragAndDrop.visualMode = DragAndDropVisualMode.Rejected; - } - } - - - - - - - // If release - if( MouseInsideNodeView( false ) && Event.current.type == EventType.mouseUp) { - bool ifCursorStayed = Vector2.SqrMagnitude( mousePosStart - Event.current.mousePosition ) < SF_Tools.stationaryCursorRadius; - - if( ifCursorStayed && !SF_GUI.MultiSelectModifierHeld() ) - selection.DeselectAll(registerUndo:true); - - - //editor.Defocus( deselectNodes: ifCursorStayed ); - } - - if( SF_GUI.ReleasedRawLMB() ) { - SF_NodeConnector.pendingConnectionSource = null; - } - - // If press - if( Event.current.type == EventType.mouseDown && MouseInsideNodeView( false ) ) { - //bool ifNotHoldingModifier = !SF_GUI.MultiSelectModifierHeld(); - mousePosStart = Event.current.mousePosition; - editor.Defocus(); - } - - - if(!editor.screenshotInProgress){ - - Rect logoRect = rect; - logoRect.y -= 14; - logoRect.x += 1; - logoRect.width = SF_GUI.Logo.width; - logoRect.height = SF_GUI.Logo.height; - GUI.color = new Color(1f,1f,1f,0.5f); - GUI.DrawTexture( logoRect, SF_GUI.Logo ); - - logoRect.y += logoRect.height; - logoRect.height = 16; - - GUI.Label(logoRect, "v"+SF_Tools.version, EditorStyles.boldLabel); - GUI.color = Color.white; - - - } - - - } - - - public void OnDroppedSubstance(ProceduralMaterial procMat){ - - Texture diffuse = TryGetProceduralTexture(procMat, "_MainTex"); - Texture normal = TryGetProceduralTexture(procMat, "_BumpMap"); - //Texture parallax = TryGetProceduralTexture(procMat, "_ParallaxMap"); - //Texture emission = TryGetProceduralTexture(procMat, "_Illum"); - //TryGetProceduralTexture("_MainTex"); - - SF_Node prevNode = TryLinkIfExistsAndOpenSlotAvailable(diffuse, "MainTex", editor.mainNode.diffuse, "RGB"); - TryLinkIfExistsAndOpenSlotAvailable(normal, "BumpMap", editor.mainNode.normal, "RGB", prevNode); - - - } - - // For connecting procedural materials to the main node - public SF_Node TryLinkIfExistsAndOpenSlotAvailable(Texture tex, string propertyName, SF_NodeConnector connector, string outChannel, SF_Node prevNode = null){ - - if(tex){ - SFN_Tex2d tNode = editor.AddNode(); - if(prevNode != null){ - Rect r = tNode.rect; - r = r.MovedDown(1); - r.y += 64; - tNode.rect = r; - } - tNode.TextureAsset = tex; - tNode.property.SetName(propertyName); - tNode.OnAssignedTexture(); - if(connector.enableState == EnableState.Enabled && connector.availableState == AvailableState.Available && !connector.IsConnected()){ - connector.LinkTo(tNode[outChannel]); - } - return tNode; - } - return null; - } - - public Texture TryGetProceduralTexture(ProceduralMaterial procMat, string propName){ - Texture returnTex = null; - try{ - if(procMat.HasProperty(propName)) - returnTex = procMat.GetTexture(propName); - } catch (UnityException e){ - e.Equals(e); - } - return returnTex; - } - - - - - public void UpdateCutLine(){ - - if(SF_GUI.HoldingAlt() && Event.current.type == EventType.mouseDown && Event.current.button == 1){ // Alt + RMB drag - StartCutting(); - } else if(SF_GUI.ReleasedRawRMB()){ - StopCutting(); - } - - if(isCutting){ - Vector2 cutEnd = GetNodeSpaceMousePos(); - - GUILines.DrawDashedLine(editor, cutStart, cutEnd, Color.white, 5f); - - - foreach(SF_Node n in editor.nodes){ - foreach(SF_NodeConnector con in n.connectors){ - if(con.IsConnected() && con.conType == ConType.cInput && con.enableState != EnableState.Hidden){ - Vector2 intersection = Vector2.zero; - if(con.conLine.Intersects(cutStart, cutEnd, out intersection)){ - - con.conLine.aboutToBeDeleted = true; - - Vector2 hit = editor.nodeView.ScreenSpaceToZoomSpace(intersection); - - float scale = 5f; - float scaleDiff = 0.95f; - //Vector2 rg, up, lf, dn; - - - //Vector2 localRight = (cutStart-cutEnd).normalized; - //Vector2 localUp = new Vector2(localRight.y,-localRight.x); - - //rg = hit + localRight * scale; - //up = hit + localUp * scale; - //lf = hit - localRight * scale; - //dn = hit - localUp * scale; - Color c0 = new Color(1f,0.1f,0.1f,0.9f); - Color c1 = new Color(1f,0.1f,0.1f,0.7f); - Color c2 = new Color(1f,0.1f,0.1f,0.5f); - Color c3 = new Color(1f,0.1f,0.1f,0.3f); - - GUILines.DrawDisc(hit,scale,c0); - GUILines.DrawDisc(hit,scale-scaleDiff,c1); - GUILines.DrawDisc(hit,scale-scaleDiff*2,c2); - GUILines.DrawDisc(hit,scale-scaleDiff*3,c3); - - //GUILines.DrawLine(rg,up,Color.red,2f,true); - //GUILines.DrawLine(up,lf,Color.red,2f,true); - //GUILines.DrawLine(lf,dn,Color.red,2f,true); - //GUILines.DrawLine(dn,rg,Color.red,2f,true); - - - - - - continue; - } else { - con.conLine.aboutToBeDeleted = false; - } - } - } - } - - - } - - } - - - - public Rect GetNodeEncapsulationRect(){ - - Rect r = editor.nodes[0].rect; // No need for null check, there should always be a main node - foreach( SF_Node n in editor.nodes ) { - r = SF_Tools.Encapsulate( r, n.rect ); - } - return r; - - } - - public void CenterCamera() { - - // Find midpoint of all nodes - Rect r = GetNodeEncapsulationRect(); - - // Move Camera - cameraPos = r.center - new Vector2( 0f, Screen.height * 0.5f ); - SnapCamera(); - } - - - - - public void ContextClick( object o ) { - // Add node - SF_EditorNodeData nodeData = o as SF_EditorNodeData; - editor.AddNode( nodeData, true ); - } - - - - public void UpdateDebugInput() { - - if( Event.current.type != EventType.keyDown ) - return; - - if( Event.current.keyCode == KeyCode.UpArrow ) { - HierarchalRefresh(); - } - - - if( Event.current.keyCode == KeyCode.DownArrow ) { - Debug.Log( GetNodeDataSerialized() ); - } - - - } - - - public void AssignDepthValuesToNodes() { - foreach( SF_Node n in editor.nodes ) { - n.depth = 0; - } - // Recurse some depth! - // TODO: Run this for disconnected islands of nodes too - //Debug.Log("SFN_FINAL exists = " + (editor.materialOutput != null)); - AddDepthToChildrenOf( editor.mainNode, 0 ); - } - - void AddDepthToChildrenOf( SF_Node n, int carry ) { - carry++; - n.depth = Mathf.Max( carry, n.depth ); ; - for( int i = 0; i < n.connectors.Length; i++ ) { - if( n.connectors[i].conType == ConType.cOutput ) // Ignore outputs, we came from here! - continue; - if( !n.connectors[i].IsConnected() ) // Ignore unconnected inputs - continue; - AddDepthToChildrenOf( n.connectors[i].inputCon.node, carry ); - } - } - - public void HierarchalRefresh() { - -// AssignDepthValuesToNodes(); -// -// int maxDepth = 0; // Deepest level -// foreach( SF_Node n in editor.nodes ) { -// if( maxDepth < n.depth ) -// maxDepth = n.depth; -// } -// -// -// // Relink everything -// int depth = maxDepth; -// while( depth > 0 ) { -// for(int i=0; i 0 ) { - foreach( SF_Node n in editor.nodes ) { - if( n.depth == depth ) { - //n.RefreshValue(); - //n.OnUpdateNode( NodeUpdateType.Soft ); - } - - } - depth--; - } - * */ - - } - - - public void ReconnectConnectedPending() { - AssignDepthValuesToNodes(); - - int maxDepth = 0; // Deepest level - foreach( SF_Node n in editor.nodes ) { - if( maxDepth < n.depth ) - maxDepth = n.depth; - } - - - int depth = maxDepth; - while( depth > 0 ) { - //foreach( SF_Node n in editor.nodes ) { - for( int i = 0; i < editor.nodes.Count; i++ ) { - SF_Node n = editor.nodes[i]; - if( n.depth == depth ) { - foreach( SF_NodeConnector con in n.connectors ) { - if( con.conType == ConType.cOutput ) - continue; - if( !con.IsConnectedAndEnabled() ) - continue; - if( con.valueType != ValueType.VTvPending ) - continue; - con.inputCon.LinkTo( con, LinkingMethod.Default ); - } - } - } - depth--; - } - } - - - - - public string GetNodeDataSerialized() { - - // TODO; move parts of this to their respective places - - string header = ""; - header += "// Shader created with " + SF_Tools.versionString + " \n"; - header += "// Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/\n"; - header += "// Note: Manually altering this data may prevent you from opening it in Shader Forge\n"; - header += "/" + "*"; // Hurgh! - - string sData = ""; - sData += "SF_DATA;"; // TODO: Multi-pass, shader settings etc - sData += "ver:" + SF_Tools.version + ";"; - sData += "sub:START;"; - sData += "pass:START;"; - sData += editor.ps.Serialize() + ";"; - - foreach( SF_Node node in editor.nodes ) - sData += node.Serialize(false,useSuffixPrefix:true); - - if(editor.nodeView.treeStatus.propertyList.Count > 0) - sData += editor.nodeView.treeStatus.SerializeProps() + ";"; - - string footer = "pass:END;sub:END;"; - footer += "*" + "/"; - return ( header + sData + footer ); - } - - public float lastChangeTime; - - float GetTime(){ - return (float)EditorApplication.timeSinceStartup; - } - - public float GetTimeSinceChanged(){ - return GetTime() - lastChangeTime; - } - - public void DrawRecompileTimer(Rect r){ - - if(!SF_Settings.autoCompile) - return; // Don't draw recompile timer when autoRecompile is unchecked - - float delta = GetTimeSinceChanged(); - - if(delta > 1.12f) - return; - - r.width *= Mathf.Clamp01(delta); - if(SF_GUI.ProSkin){ - GUI.Box(r,string.Empty); - GUI.Box(r,string.Empty); - GUI.Box(r,string.Empty); - } else { - GUI.color = new Color(1f,1f,1f,0.4f); - GUI.Box(r,string.Empty); - GUI.color = Color.white; - } - } - - void DrawToolbar( Rect r ) { - - } - - void UpdateCameraPanning() { - - - if( SF_GUI.ReleasedCameraMove() ) { - panCamera = false; - } - - bool insideNodeView = MouseInsideNodeView( true ); - bool dragging = ( Event.current.type == EventType.MouseDrag && panCamera ); - bool connecting = SF_NodeConnector.IsConnecting(); - bool rotatingPreview = editor.preview.isDraggingLMB; - bool placingNode = editor.nodeBrowser.IsPlacing(); - bool draggingSeparators = editor.DraggingAnySeparator(); - - - if(connecting){ - // Pan camera when cursor nears edges while making a connection - Vector2 mousePosInNodeViewScreenSpace = ZoomSpaceToScreenSpace(Event.current.mousePosition) - Vector2.right*editor.separatorLeft.rect.xMax; - - float areaWidth; - if(SF_Settings.showNodeSidebar) - areaWidth = editor.separatorRight.rect.xMin - editor.separatorLeft.rect.xMax; - else - areaWidth = Screen.width - editor.separatorLeft.rect.xMax; - float areaHeight = editor.nodeView.rect.height; - float dragPanMargin = 32f; - float panSpeed = 0.2f; - float leftMag = Mathf.Clamp(-mousePosInNodeViewScreenSpace.x + dragPanMargin, 0f, dragPanMargin); - float rightMag = Mathf.Clamp( mousePosInNodeViewScreenSpace.x - areaWidth + dragPanMargin, 0f, dragPanMargin); - float topMag = Mathf.Clamp( -mousePosInNodeViewScreenSpace.y + dragPanMargin , 0f, dragPanMargin); - float bottomMag = Mathf.Clamp( mousePosInNodeViewScreenSpace.y - areaHeight + dragPanMargin , 0f, dragPanMargin); - cameraPos += new Vector2(rightMag-leftMag, bottomMag-topMag)*panSpeed; - } - - - bool doingSomethingElse = connecting || rotatingPreview || placingNode || draggingSeparators; - bool dragInside = dragging && insideNodeView; - - if( dragInside && !doingSomethingElse ) { - - //if( !SF_GUI.MultiSelectModifierHeld() ) - // selection.DeselectAll(); - //Debug.Log("Delta: " + Event.current.delta); - cameraPos -= Event.current.delta; - SnapCamera(); - - BoundsAdjustCamera(); - editor.Defocus(); - //Debug.Log( "USING" ); - Event.current.Use(); - } - - - if( SF_GUI.PressedCameraMove() ) { - panCamera = true; - } - - - - } - - public Vector2 nodeSpaceMousePos; - public Vector2 viewSpaceMousePos; - - public Vector2 GetNodeSpaceMousePos() { - return nodeSpaceMousePos; - } - - - public bool MouseInsideNodeView( bool offset = false ) { - - if( offset ) { - return rect.Contains( viewSpaceMousePos/*ZoomSpaceToScreenSpace( Event.current.mousePosition )*/ ); - } else { - return rect.Contains( Event.current.mousePosition ); - } - - } - - void SnapCamera(){ - cameraPos.x = Mathf.Round(cameraPos.x); - cameraPos.y = Mathf.Round(cameraPos.y); - } - - - public Vector2 ZoomSpaceToScreenSpace( Vector2 in_vec ) { - return (in_vec - cameraPos + editor.separatorLeft.rect.TopRight() )*zoom + rect.TopLeft() + (Vector2.up * (editor.TabOffset))*(zoom-1); - } - public Rect ZoomSpaceToScreenSpace( Rect in_rect ) { - Vector2 offset = ZoomSpaceToScreenSpace(in_rect.TopLeft()); - in_rect.x = offset.x; - in_rect.y = offset.y; - in_rect.width /= zoom; - in_rect.height /= zoom; - //in_rect.x += -cameraPos.x; - //in_rect.y += -cameraPos.y; - return in_rect; - } - public Vector2 ScreenSpaceToZoomSpace( Vector2 in_vec ) { - return ( in_vec - (Vector2.up * (editor.TabOffset))*(zoom-1) - rect.TopLeft() ) / zoom - editor.separatorLeft.rect.TopRight() + cameraPos; - //return in_vec + cameraPos; - } - - // az + b + x(z-1) - - - public Rect ScreenSpaceToZoomSpace( Rect in_rect ) { - //in_rect.x -= -cameraPos.x; - //in_rect.y -= -cameraPos.y; - Vector2 offset = ScreenSpaceToZoomSpace(in_rect.TopLeft()); - in_rect.x = offset.x; - in_rect.y = offset.y; - in_rect.width *= zoom; - in_rect.height *= zoom; - - return in_rect; - } - - - } - -} - +using UnityEngine; +using UnityEditor; +using System.Collections; +using System.Collections.Generic; +using System.Xml; +using System.IO; +using System.Linq; + +namespace ShaderForge { + + public enum ConnectionLineStyle { Bezier, Linear, Rectilinear }; + + [System.Serializable] + public class SF_SetNodeSource { + + public SF_NodeConnector con; + + public SF_SetNodeSource( SF_Node node ) { + con = node.connectors[0]; + } + + public int NodeID { + get { return con.node.id; } + } + + public string Name { + get { return con.node.variableName; } + } + + } + + [System.Serializable] + public class SF_EditorNodeView : ScriptableObject { + + SF_Editor editor; + + const int TOOLBAR_HEIGHT = 18; + [SerializeField] + public Vector2 cameraPos = Vector3.zero; + + [SerializeField] + bool panCamera = false; + + [SerializeField] + Vector2 mousePosStart; + public Rect rect; + public GUIStyle toolbarStyle; + + public List relayInSources; + public string[] relayInNames; + + public SF_SelectionManager selection; + + public SF_NodeTreeStatus treeStatus; + + + + + + public SF_EditorNodeView() { + + } + + public void OnEnable() { + base.hideFlags = HideFlags.HideAndDontSave; + } + + + public void RefreshRelaySources() { + relayInSources = new List(); + for( int i = 0; i < editor.nodes.Count; i++ ) { + if( editor.nodes[i] is SFN_Set ) { + relayInSources.Add( new SF_SetNodeSource(editor.nodes[i]) ); + } + } + relayInSources.Sort( ( a, b ) => a.Name.CompareTo( b.Name ) ); + relayInNames = relayInSources.Select( x => x.Name ).ToArray(); + } + + // Only the node ID is serialized - this is used to ensure proper display in the GUI + // Returns -1 if the relay ID is missing + public int NodeIdToRelayId(int nodeId) { + if( relayInSources != null ) { + for( int i = 0; i < relayInSources.Count; i++ ) { + if( relayInSources[i].NodeID == nodeId ) { + return i; + } + } + } + return -1; + } + + public SF_EditorNodeView Initialize( SF_Editor editor ) { + this.editor = editor; + selection = ScriptableObject.CreateInstance().Initialize( editor ); + treeStatus = ScriptableObject.CreateInstance().Initialize(editor); + rect = new Rect(); + cameraPos = new Vector2( 32768 - 400, 32768 - 300 ); + toolbarStyle = new GUIStyle( EditorStyles.toolbar ); + toolbarStyle.fixedHeight = TOOLBAR_HEIGHT; + return this; + } + + + // Erasing nodes with cut line: (alt+RMB) + + public Vector2 cutStart = Vector3.zero; + public bool isCutting = false; + + public void StartCutting(){ + isCutting = true; + cutStart = editor.nodeView.GetNodeSpaceMousePos(); + } + + public void StopCutting(){ + List disconnectors = new List(); + for (int i = 0; i < editor.nodes.Count; i++) { + SF_Node n = editor.nodes [i]; + for (int j = 0; j < n.connectors.Length; j++) { + SF_NodeConnector con = n.connectors [j]; + if (con.IsConnected () && con.conType == ConType.cInput) { + if (con.conLine.aboutToBeDeleted) { + disconnectors.Add(con); + } + } + } + } + + if(disconnectors.Count == 0){ + isCutting = false; + return; + } + + UnmarkDeleteHighlights(); + + //Undo.RecordObject((Object)con, "cut" + string undoMsg = "cut "; + if(disconnectors.Count > 1){ + undoMsg += disconnectors.Count + " "; + undoMsg += "connections"; + } else { + undoMsg += "connection: "; + undoMsg += disconnectors[0].node.nodeName; + undoMsg += "[" + disconnectors[0].label + "]"; + undoMsg += " <--- "; + undoMsg += "[" + disconnectors[0].inputCon.label + "]"; + undoMsg += disconnectors[0].inputCon.node.nodeName; + } // = disconnectors.Count > 1 ? "cut "+disconnectors.Count+" connections" : "cut connection " + disconnectors[i].node.name + "[" + + + foreach(SF_NodeConnector con in disconnectors){ + Undo.RecordObject(con, undoMsg); + } + + foreach(SF_NodeConnector con in disconnectors){ + con.Disconnect(); + } + + isCutting = false; + + } + + public void UnmarkDeleteHighlights(){ + foreach(SF_Node n in editor.nodes){ + foreach(SF_NodeConnector con in n.connectors){ + if(con.IsConnected() && con.conType == ConType.cInput){ + con.conLine.aboutToBeDeleted = false; + } + } + } + } + + + public float zoom = 1f; + public float zoomTarget = 1f; + + public void SetZoom(float setZoom){ + Vector2 oldWidth = new Vector2(rect.width,rect.height)/zoom; + zoom = ClampZoom(setZoom); + Vector2 newWidth = new Vector2(rect.width,rect.height)/zoom; + Vector2 delta = newWidth - oldWidth; + + Vector2 normalizedMouseCoords = (Event.current.mousePosition - new Vector2(editor.separatorLeft.rect.xMax,editor.TabOffset)); + + normalizedMouseCoords.x /= rect.width; + normalizedMouseCoords.y /= rect.height; + + + + cameraPos -= Vector2.Scale(delta, normalizedMouseCoords); + + if(delta.sqrMagnitude != 0f){ + + + // Correct in here to prevent going outside the bounds + BoundsAdjustCamera(); + } + + + if(zoom == 1f) + SnapCamera(); + + } + + + + public void BoundsAdjustCamera(){ + /* + Rect wrapped = GetNodeEncapsulationRect().Margin(256); + Rect view = ScreenSpaceToZoomSpace(rect); + + Vector2 toCenter = (view.center - wrapped.center)*0.5f; + + float camBottom = cameraPos.y + rect.height/zoom - 22; + float camTop = cameraPos.y; + float camRight = cameraPos.x + rect.width/zoom - editor.separatorLeft.rect.xMax; + float camLeft = cameraPos.x - editor.separatorLeft.rect.xMax; + + Vector2 deltaTotal = Vector2.zero; + + if( camBottom > wrapped.yMax) + deltaTotal -= new Vector2(0f,camBottom-wrapped.yMax); + if(camTop < wrapped.yMin){ + deltaTotal -= new Vector2(0f,camTop-wrapped.yMin); + } + if(camRight > wrapped.xMax) + deltaTotal -= new Vector2(camRight-wrapped.xMax,0f); + if(camLeft < wrapped.xMin) + deltaTotal -= new Vector2(camLeft-wrapped.xMin,0f); + + cameraPos += deltaTotal; + +*/ + + } + + + public float ClampZoom(float in_zoom){ + return Mathf.Clamp(in_zoom,0.125f,1f); + } + + + public void OnLocalGUI( Rect r ) { + + + //r = r.PadTop(Mathf.CeilToInt(22*zoom)); + + + + + + editor.mousePosition = Event.current.mousePosition; + rect = r; + + + + // TOOLBAR + //DrawToolbar( new Rect( rect.x, rect.y, rect.width, TOOLBAR_HEIGHT ) ); + + + + Rect localRect = new Rect( r ); + localRect.x = 0; + localRect.y = 0; + + //rect.y += TOOLBAR_HEIGHT; + //rect.height -= TOOLBAR_HEIGHT; + + + + + // VIEW + Rect rectInner = new Rect( rect ); + rectInner.width = float.MaxValue / 2f; + rectInner.height = float.MaxValue / 2f; + + + // TEMP: +// Rect btn = rectInner; +// btn.width = 64; +// btn.height = 24; +// if(SF_Debug.renderDataNodes){ +// if(selection.Selection.Count > 0){ +// if(GUI.Button(btn,"NSS")){ +// editor.TakeNodePreviewScreenshot(); +// } +// } +// } + + + + if(Event.current.type == EventType.Repaint){ + nodeSpaceMousePos = ScreenSpaceToZoomSpace( Event.current.mousePosition ); + + } + + + + + + bool mouseOverNode = false; + + + + + SF_ZoomArea.Begin(zoom,rect,cameraPos); + { + selection.OnGUI(); // To detect if you press things + if(editor.nodeView != null) + editor.nodeView.selection.DrawBoxSelection(); + + if(Event.current.type == EventType.Repaint){ + viewSpaceMousePos = ZoomSpaceToScreenSpace( Event.current.mousePosition ); + } + // NODES + if( editor.nodes != null ) { + + // If we're repainting, draw in reverse to sort properly + //if(Event.current.rawType == EventType.repaint){ + for (int i = editor.nodes.Count - 1; i >= 0; i--) { + if( !editor.nodes[i].Draw() ) + break; + } + /*} else { + for(int i=0;i 0 ) { + Object dragObj = DragAndDrop.objectReferences[0]; + if( dragObj is Texture2D || dragObj is RenderTexture ) { + DragAndDrop.visualMode = DragAndDropVisualMode.Link; + if( !editor.nodeBrowser.IsPlacing() ) + editor.nodeBrowser.OnStartDrag( editor.GetTemplate() ); + else + editor.nodeBrowser.UpdateDrag(); + } else { + DragAndDrop.visualMode = DragAndDropVisualMode.Rejected; + } + } else { + DragAndDrop.visualMode = DragAndDropVisualMode.Rejected; + } + } + + + + + + + // If release + if( MouseInsideNodeView( false ) && Event.current.type == EventType.MouseUp) { + bool ifCursorStayed = Vector2.SqrMagnitude( mousePosStart - Event.current.mousePosition ) < SF_Tools.stationaryCursorRadius; + + if( ifCursorStayed && !SF_GUI.MultiSelectModifierHeld() ) + selection.DeselectAll(registerUndo:true); + + + //editor.Defocus( deselectNodes: ifCursorStayed ); + } + + if( SF_GUI.ReleasedRawLMB() ) { + SF_NodeConnector.pendingConnectionSource = null; + } + + // If press + if( Event.current.type == EventType.MouseDown && MouseInsideNodeView( false ) ) { + //bool ifNotHoldingModifier = !SF_GUI.MultiSelectModifierHeld(); + mousePosStart = Event.current.mousePosition; + editor.Defocus(); + } + + + if(!editor.screenshotInProgress){ + + Rect logoRect = rect; + logoRect.y -= 14; + logoRect.x += 1; + logoRect.width = SF_GUI.Logo.width; + logoRect.height = SF_GUI.Logo.height; + GUI.color = new Color(1f,1f,1f,0.5f); + GUI.DrawTexture( logoRect, SF_GUI.Logo ); + + logoRect.y += logoRect.height; + logoRect.height = 16; + + GUI.Label(logoRect, "v"+SF_Tools.version, EditorStyles.boldLabel); + GUI.color = Color.white; + + + } + + + } + + // For connecting procedural materials to the main node + public SF_Node TryLinkIfExistsAndOpenSlotAvailable(Texture tex, string propertyName, SF_NodeConnector connector, string outChannel, SF_Node prevNode = null){ + + if(tex){ + SFN_Tex2d tNode = editor.AddNode(); + if(prevNode != null){ + Rect r = tNode.rect; + r = r.MovedDown(1); + r.y += 64; + tNode.rect = r; + } + tNode.TextureAsset = tex; + tNode.property.SetName(propertyName); + tNode.OnAssignedTexture(); + if(connector.enableState == EnableState.Enabled && connector.availableState == AvailableState.Available && !connector.IsConnected()){ + connector.LinkTo(tNode[outChannel]); + } + return tNode; + } + return null; + } + + public void UpdateCutLine(){ + + if(SF_GUI.HoldingAlt() && Event.current.type == EventType.MouseDown && Event.current.button == 1){ // Alt + RMB drag + StartCutting(); + } else if(SF_GUI.ReleasedRawRMB()){ + StopCutting(); + } + + if(isCutting){ + Vector2 cutEnd = GetNodeSpaceMousePos(); + + GUILines.DrawDashedLine(editor, cutStart, cutEnd, Color.white, 5f); + + + foreach(SF_Node n in editor.nodes){ + foreach(SF_NodeConnector con in n.connectors){ + if(con.IsConnected() && con.conType == ConType.cInput && con.enableState != EnableState.Hidden){ + Vector2 intersection = Vector2.zero; + if(con.conLine.Intersects(cutStart, cutEnd, out intersection)){ + + con.conLine.aboutToBeDeleted = true; + + Vector2 hit = editor.nodeView.ScreenSpaceToZoomSpace(intersection); + + float scale = 5f; + float scaleDiff = 0.95f; + //Vector2 rg, up, lf, dn; + + + //Vector2 localRight = (cutStart-cutEnd).normalized; + //Vector2 localUp = new Vector2(localRight.y,-localRight.x); + + //rg = hit + localRight * scale; + //up = hit + localUp * scale; + //lf = hit - localRight * scale; + //dn = hit - localUp * scale; + Color c0 = new Color(1f,0.1f,0.1f,0.9f); + Color c1 = new Color(1f,0.1f,0.1f,0.7f); + Color c2 = new Color(1f,0.1f,0.1f,0.5f); + Color c3 = new Color(1f,0.1f,0.1f,0.3f); + + GUILines.DrawDisc(hit,scale,c0); + GUILines.DrawDisc(hit,scale-scaleDiff,c1); + GUILines.DrawDisc(hit,scale-scaleDiff*2,c2); + GUILines.DrawDisc(hit,scale-scaleDiff*3,c3); + + //GUILines.DrawLine(rg,up,Color.red,2f,true); + //GUILines.DrawLine(up,lf,Color.red,2f,true); + //GUILines.DrawLine(lf,dn,Color.red,2f,true); + //GUILines.DrawLine(dn,rg,Color.red,2f,true); + + + + + + continue; + } else { + con.conLine.aboutToBeDeleted = false; + } + } + } + } + + + } + + } + + + + public Rect GetNodeEncapsulationRect(){ + + Rect r = editor.nodes[0].rect; // No need for null check, there should always be a main node + foreach( SF_Node n in editor.nodes ) { + r = SF_Tools.Encapsulate( r, n.rect ); + } + return r; + + } + + public void CenterCamera() { + + // Find midpoint of all nodes + Rect r = GetNodeEncapsulationRect(); + + // Move Camera + cameraPos = r.center - new Vector2( 0f, Screen.height * 0.5f ); + SnapCamera(); + } + + + + + public void ContextClick( object o ) { + // Add node + SF_EditorNodeData nodeData = o as SF_EditorNodeData; + editor.AddNode( nodeData, true ); + } + + + + public void UpdateDebugInput() { + + if( Event.current.type != EventType.KeyDown ) + return; + + if( Event.current.keyCode == KeyCode.UpArrow ) { + HierarchalRefresh(); + } + + + if( Event.current.keyCode == KeyCode.DownArrow ) { + Debug.Log( GetNodeDataSerialized() ); + } + + + } + + + public void AssignDepthValuesToNodes() { + foreach( SF_Node n in editor.nodes ) { + n.depth = 0; + } + // Recurse some depth! + // TODO: Run this for disconnected islands of nodes too + //Debug.Log("SFN_FINAL exists = " + (editor.materialOutput != null)); + AddDepthToChildrenOf( editor.mainNode, 0 ); + } + + void AddDepthToChildrenOf( SF_Node n, int carry ) { + carry++; + n.depth = Mathf.Max( carry, n.depth ); ; + for( int i = 0; i < n.connectors.Length; i++ ) { + if( n.connectors[i].conType == ConType.cOutput ) // Ignore outputs, we came from here! + continue; + if( !n.connectors[i].IsConnected() ) // Ignore unconnected inputs + continue; + AddDepthToChildrenOf( n.connectors[i].inputCon.node, carry ); + } + } + + public void HierarchalRefresh() { + +// AssignDepthValuesToNodes(); +// +// int maxDepth = 0; // Deepest level +// foreach( SF_Node n in editor.nodes ) { +// if( maxDepth < n.depth ) +// maxDepth = n.depth; +// } +// +// +// // Relink everything +// int depth = maxDepth; +// while( depth > 0 ) { +// for(int i=0; i 0 ) { + foreach( SF_Node n in editor.nodes ) { + if( n.depth == depth ) { + //n.RefreshValue(); + //n.OnUpdateNode( NodeUpdateType.Soft ); + } + + } + depth--; + } + * */ + + } + + + public void ReconnectConnectedPending() { + AssignDepthValuesToNodes(); + + int maxDepth = 0; // Deepest level + foreach( SF_Node n in editor.nodes ) { + if( maxDepth < n.depth ) + maxDepth = n.depth; + } + + + int depth = maxDepth; + while( depth > 0 ) { + //foreach( SF_Node n in editor.nodes ) { + for( int i = 0; i < editor.nodes.Count; i++ ) { + SF_Node n = editor.nodes[i]; + if( n.depth == depth ) { + foreach( SF_NodeConnector con in n.connectors ) { + if( con.conType == ConType.cOutput ) + continue; + if( !con.IsConnectedAndEnabled() ) + continue; + if( con.valueType != ValueType.VTvPending ) + continue; + con.inputCon.LinkTo( con, LinkingMethod.Default ); + } + } + } + depth--; + } + } + + + + + public string GetNodeDataSerialized() { + + // TODO; move parts of this to their respective places + + string header = ""; + header += "// Shader created with " + SF_Tools.versionString + " \n"; + header += "// Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/\n"; + header += "// Enhanced by Antoine Guillon / Arkham Development - http://www.arkham-development.com/\n"; + header += "// Note: Manually altering this data may prevent you from opening it in Shader Forge\n"; + header += "/" + "*"; // Hurgh! + + string sData = ""; + sData += "SF_DATA;"; // TODO: Multi-pass, shader settings etc + sData += "ver:" + SF_Tools.version + ";"; + sData += "sub:START;"; + sData += "pass:START;"; + sData += editor.ps.Serialize() + ";"; + + foreach( SF_Node node in editor.nodes ) + sData += node.Serialize(false,useSuffixPrefix:true); + + if(editor.nodeView.treeStatus.propertyList.Count > 0) + sData += editor.nodeView.treeStatus.SerializeProps() + ";"; + + string footer = "pass:END;sub:END;"; + footer += "*" + "/"; + return ( header + sData + footer ); + } + + public float lastChangeTime; + + float GetTime(){ + return (float)EditorApplication.timeSinceStartup; + } + + public float GetTimeSinceChanged(){ + return GetTime() - lastChangeTime; + } + + public void DrawRecompileTimer(Rect r){ + + if(!SF_Settings.autoCompile) + return; // Don't draw recompile timer when autoRecompile is unchecked + + float delta = GetTimeSinceChanged(); + + if(delta > 1.12f) + return; + + r.width *= Mathf.Clamp01(delta); + if(SF_GUI.ProSkin){ + GUI.Box(r,string.Empty); + GUI.Box(r,string.Empty); + GUI.Box(r,string.Empty); + } else { + GUI.color = new Color(1f,1f,1f,0.4f); + GUI.Box(r,string.Empty); + GUI.color = Color.white; + } + } + + void DrawToolbar( Rect r ) { + + } + + void UpdateCameraPanning() { + + + if( SF_GUI.ReleasedCameraMove() ) { + panCamera = false; + } + + bool insideNodeView = MouseInsideNodeView( true ); + bool dragging = ( Event.current.type == EventType.MouseDrag && panCamera ); + bool connecting = SF_NodeConnector.IsConnecting(); + bool rotatingPreview = editor.preview.isDraggingLMB; + bool placingNode = editor.nodeBrowser.IsPlacing(); + bool draggingSeparators = editor.DraggingAnySeparator(); + + + if(connecting){ + // Pan camera when cursor nears edges while making a connection + Vector2 mousePosInNodeViewScreenSpace = ZoomSpaceToScreenSpace(Event.current.mousePosition) - Vector2.right*editor.separatorLeft.rect.xMax; + + float areaWidth; + if(SF_Settings.showNodeSidebar) + areaWidth = editor.separatorRight.rect.xMin - editor.separatorLeft.rect.xMax; + else + areaWidth = Screen.width - editor.separatorLeft.rect.xMax; + float areaHeight = editor.nodeView.rect.height; + float dragPanMargin = 32f; + float panSpeed = 0.2f; + float leftMag = Mathf.Clamp(-mousePosInNodeViewScreenSpace.x + dragPanMargin, 0f, dragPanMargin); + float rightMag = Mathf.Clamp( mousePosInNodeViewScreenSpace.x - areaWidth + dragPanMargin, 0f, dragPanMargin); + float topMag = Mathf.Clamp( -mousePosInNodeViewScreenSpace.y + dragPanMargin , 0f, dragPanMargin); + float bottomMag = Mathf.Clamp( mousePosInNodeViewScreenSpace.y - areaHeight + dragPanMargin , 0f, dragPanMargin); + cameraPos += new Vector2(rightMag-leftMag, bottomMag-topMag)*panSpeed; + } + + + bool doingSomethingElse = connecting || rotatingPreview || placingNode || draggingSeparators; + bool dragInside = dragging && insideNodeView; + + if( dragInside && !doingSomethingElse ) { + + //if( !SF_GUI.MultiSelectModifierHeld() ) + // selection.DeselectAll(); + //Debug.Log("Delta: " + Event.current.delta); + cameraPos -= Event.current.delta; + SnapCamera(); + + BoundsAdjustCamera(); + editor.Defocus(); + //Debug.Log( "USING" ); + Event.current.Use(); + } + + + if( SF_GUI.PressedCameraMove() ) { + panCamera = true; + } + + + + } + + public Vector2 nodeSpaceMousePos; + public Vector2 viewSpaceMousePos; + + public Vector2 GetNodeSpaceMousePos() { + return nodeSpaceMousePos; + } + + + public bool MouseInsideNodeView( bool offset = false ) { + + if( offset ) { + return rect.Contains( viewSpaceMousePos/*ZoomSpaceToScreenSpace( Event.current.mousePosition )*/ ); + } else { + return rect.Contains( Event.current.mousePosition ); + } + + } + + void SnapCamera(){ + cameraPos.x = Mathf.Round(cameraPos.x); + cameraPos.y = Mathf.Round(cameraPos.y); + } + + + public Vector2 ZoomSpaceToScreenSpace( Vector2 in_vec ) { + return (in_vec - cameraPos + editor.separatorLeft.rect.TopRight() )*zoom + rect.TopLeft() + (Vector2.up * (editor.TabOffset))*(zoom-1); + } + public Rect ZoomSpaceToScreenSpace( Rect in_rect ) { + Vector2 offset = ZoomSpaceToScreenSpace(in_rect.TopLeft()); + in_rect.x = offset.x; + in_rect.y = offset.y; + in_rect.width /= zoom; + in_rect.height /= zoom; + //in_rect.x += -cameraPos.x; + //in_rect.y += -cameraPos.y; + return in_rect; + } + public Vector2 ScreenSpaceToZoomSpace( Vector2 in_vec ) { + return ( in_vec - (Vector2.up * (editor.TabOffset))*(zoom-1) - rect.TopLeft() ) / zoom - editor.separatorLeft.rect.TopRight() + cameraPos; + //return in_vec + cameraPos; + } + + // az + b + x(z-1) + + + public Rect ScreenSpaceToZoomSpace( Rect in_rect ) { + //in_rect.x -= -cameraPos.x; + //in_rect.y -= -cameraPos.y; + Vector2 offset = ScreenSpaceToZoomSpace(in_rect.TopLeft()); + in_rect.x = offset.x; + in_rect.y = offset.y; + in_rect.width *= zoom; + in_rect.height *= zoom; + + return in_rect; + } + + + } + +} + diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_EditorNodeView.cs.meta b/Editor/Code/SF_EditorNodeView.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_EditorNodeView.cs.meta rename to Editor/Code/SF_EditorNodeView.cs.meta index 9de7ca8f..15f64940 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_EditorNodeView.cs.meta +++ b/Editor/Code/SF_EditorNodeView.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: b1e7c52e807954f07b3d3f54461b3cc2 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: b1e7c52e807954f07b3d3f54461b3cc2 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_ErrorEntry.cs b/Editor/Code/SF_ErrorEntry.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_ErrorEntry.cs rename to Editor/Code/SF_ErrorEntry.cs index 55372afb..1316d243 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_ErrorEntry.cs +++ b/Editor/Code/SF_ErrorEntry.cs @@ -1,66 +1,66 @@ -using UnityEngine; -using System.Collections; - - -namespace ShaderForge { - [System.Serializable] - public class SF_ErrorEntry : ScriptableObject { - - public SF_Node node; - public SF_NodeConnector con; - public string error; - public bool isWarning; - public int rows = 1; - public System.Action action; - - void OnEnable() { - hideFlags = HideFlags.HideAndDontSave; - } - - - public static SF_ErrorEntry Create( string error, bool isWarning ) { - SF_ErrorEntry entry = ScriptableObject.CreateInstance(); - entry.isWarning = isWarning; - entry.error = error; - entry.InitializeRows(); - return entry; - } - - public static SF_ErrorEntry Create( string error, SF_Node target, bool isWarning ) { - SF_ErrorEntry entry = ScriptableObject.CreateInstance(); - entry.isWarning = isWarning; - entry.node = target; - entry.error = error; - entry.InitializeRows(); - return entry; - } - - public static SF_ErrorEntry Create( string error, SF_NodeConnector target, bool isWarning ) { - SF_ErrorEntry entry = ScriptableObject.CreateInstance(); - entry.isWarning = isWarning; - entry.con = target; - entry.node = target.node; - entry.error = error; - entry.InitializeRows(); - return entry; - } - - void InitializeRows() { - rows = Mathf.CeilToInt( error.Length / 50f ); - } - - public void OnPress() { - if( action != null ) { - action.Invoke(); - } - } - - public Texture2D icon { - get { - return isWarning ? SF_Styles.IconWarningSmall : SF_Styles.IconErrorSmall; - } - } - - } - -} +using UnityEngine; +using System.Collections; + + +namespace ShaderForge { + [System.Serializable] + public class SF_ErrorEntry : ScriptableObject { + + public SF_Node node; + public SF_NodeConnector con; + public string error; + public bool isWarning; + public int rows = 1; + public System.Action action; + + void OnEnable() { + hideFlags = HideFlags.HideAndDontSave; + } + + + public static SF_ErrorEntry Create( string error, bool isWarning ) { + SF_ErrorEntry entry = ScriptableObject.CreateInstance(); + entry.isWarning = isWarning; + entry.error = error; + entry.InitializeRows(); + return entry; + } + + public static SF_ErrorEntry Create( string error, SF_Node target, bool isWarning ) { + SF_ErrorEntry entry = ScriptableObject.CreateInstance(); + entry.isWarning = isWarning; + entry.node = target; + entry.error = error; + entry.InitializeRows(); + return entry; + } + + public static SF_ErrorEntry Create( string error, SF_NodeConnector target, bool isWarning ) { + SF_ErrorEntry entry = ScriptableObject.CreateInstance(); + entry.isWarning = isWarning; + entry.con = target; + entry.node = target.node; + entry.error = error; + entry.InitializeRows(); + return entry; + } + + void InitializeRows() { + rows = Mathf.CeilToInt( error.Length / 50f ); + } + + public void OnPress() { + if( action != null ) { + action.Invoke(); + } + } + + public Texture2D icon { + get { + return isWarning ? SF_Styles.IconWarningSmall : SF_Styles.IconErrorSmall; + } + } + + } + +} diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_ErrorEntry.cs.meta b/Editor/Code/SF_ErrorEntry.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_ErrorEntry.cs.meta rename to Editor/Code/SF_ErrorEntry.cs.meta index 600d17b3..07436f6f --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_ErrorEntry.cs.meta +++ b/Editor/Code/SF_ErrorEntry.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 14c91959058f04c62a8e3075652c4638 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 14c91959058f04c62a8e3075652c4638 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_FeatureChecker.cs b/Editor/Code/SF_FeatureChecker.cs old mode 100755 new mode 100644 similarity index 97% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_FeatureChecker.cs rename to Editor/Code/SF_FeatureChecker.cs index c4acdfa0..25f42952 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_FeatureChecker.cs +++ b/Editor/Code/SF_FeatureChecker.cs @@ -1,141 +1,141 @@ using UnityEngine; -using System.Collections; - -namespace ShaderForge { - [System.Serializable] - public class SF_FeatureChecker : ScriptableObject { - - [SerializeField] - SF_PassSettings ps; - - [SerializeField] - public SF_Editor editor; - - public SF_FeatureChecker Initialize( SF_PassSettings ps, SF_Editor editor ) { - this.ps = ps; - this.editor = editor; - return this; - } - - public void OnEnable() { - base.hideFlags = HideFlags.HideAndDontSave; - } - - - - // Diffuse & Diffuse Power - // if light mode is not unlit - - // Specular & Gloss - // if light mode is !(Unlit || Lambert) - - // Transmission - // if light mode is not Unlit - - // Light Wrapping - // if light mode is not Unlit - +using System.Collections; + +namespace ShaderForge { + [System.Serializable] + public class SF_FeatureChecker : ScriptableObject { + + [SerializeField] + SF_PassSettings ps; + + [SerializeField] + public SF_Editor editor; + + public SF_FeatureChecker Initialize( SF_PassSettings ps, SF_Editor editor ) { + this.ps = ps; + this.editor = editor; + return this; + } + + public void OnEnable() { + base.hideFlags = HideFlags.HideAndDontSave; + } + + + + // Diffuse & Diffuse Power + // if light mode is not unlit + + // Specular & Gloss + // if light mode is !(Unlit || Lambert) + + // Transmission + // if light mode is not Unlit + + // Light Wrapping + // if light mode is not Unlit + public void UpdateAvailability() { - bool deferredPp = ps.catLighting.renderPath == SFPSC_Lighting.RenderPath.Deferred; + bool deferredPp = ps.catLighting.renderPath == SFPSC_Lighting.RenderPath.Deferred; bool unlit = (ps.catLighting.lightMode == SFPSC_Lighting.LightMode.Unlit); bool pbr = (ps.catLighting.lightMode == SFPSC_Lighting.LightMode.PBL); bool lit = !unlit; // Diffuse makes these available: Transmission, Light Wrapping, Ambient lighting, Diffuse Power bool diffConnected = editor.mainNode.diffuse.IsConnectedAndEnabled(); - bool specConnected = editor.mainNode.specular.IsConnectedAndEnabled(); - + bool specConnected = editor.mainNode.specular.IsConnectedAndEnabled(); + bool bakedData = ps.catLighting.bakedLight; bool usesAmbient = ps.catLighting.useAmbient; bool ambDiffConnected = ps.HasAmbientDiffuse(); bool ambSpecConnected = ps.HasAmbientSpecular(); - - - editor.mainNode.diffuse.SetAvailable( lit ); - editor.mainNode.diffusePower.SetAvailable( lit && diffConnected && !deferredPp ); + + + editor.mainNode.diffuse.SetAvailable( lit ); + editor.mainNode.diffusePower.SetAvailable( lit && diffConnected && !deferredPp ); editor.mainNode.specular.SetAvailable( lit ); - editor.mainNode.gloss.SetAvailable( lit && ( specConnected || ( diffConnected && pbr ) )); - editor.mainNode.normal.SetAvailable( true ); - editor.mainNode.alpha.SetAvailable( !deferredPp ); - editor.mainNode.alphaClip.SetAvailable( true ); - editor.mainNode.refraction.SetAvailable( !deferredPp ); - editor.mainNode.emissive.SetAvailable( true ); - editor.mainNode.transmission.SetAvailable( lit && diffConnected && !deferredPp ); - - - - - - editor.mainNode.diffuseOcclusion.SetAvailable( lit && diffConnected && ( bakedData || usesAmbient || ambDiffConnected ) ); + editor.mainNode.gloss.SetAvailable( lit && ( specConnected || ( diffConnected && pbr ) )); + editor.mainNode.normal.SetAvailable( true ); + editor.mainNode.alpha.SetAvailable( !deferredPp ); + editor.mainNode.alphaClip.SetAvailable( true ); + editor.mainNode.refraction.SetAvailable( !deferredPp ); + editor.mainNode.emissive.SetAvailable( true ); + editor.mainNode.transmission.SetAvailable( lit && diffConnected && !deferredPp ); + + + + + + editor.mainNode.diffuseOcclusion.SetAvailable( lit && diffConnected && ( bakedData || usesAmbient || ambDiffConnected ) ); editor.mainNode.specularOcclusion.SetAvailable( lit && specConnected && ( bakedData || ambSpecConnected ) ); // Masks ambient spec & directional lightmaps editor.mainNode.ambientDiffuse.SetAvailable( lit && diffConnected); editor.mainNode.ambientSpecular.SetAvailable( lit && specConnected ); editor.mainNode.customLighting.SetAvailable( !lit && !deferredPp ); - - editor.mainNode.lightWrap.SetAvailable( lit && diffConnected && !deferredPp ); - editor.mainNode.displacement.SetAvailable( editor.mainNode.tessellation.IsConnectedAndEnabled() ); + + editor.mainNode.lightWrap.SetAvailable( lit && diffConnected && !deferredPp ); + editor.mainNode.displacement.SetAvailable( editor.mainNode.tessellation.IsConnectedAndEnabled() ); editor.mainNode.outlineColor.SetAvailable( editor.mainNode.outlineWidth.IsConnectedAndEnabled() && !deferredPp ); editor.mainNode.outlineWidth.SetAvailable( !deferredPp ); // Rename labels based on which lighting mode you're using - if(ps.catLighting.lightMode == SFPSC_Lighting.LightMode.PBL){ - if( ps.catLighting.specularMode == SFPSC_Lighting.SpecularMode.Metallic ){ - editor.mainNode.diffuse.label = "Base Color"; - editor.mainNode.specular.label = "Metallic"; - } else { - editor.mainNode.diffuse.label = "Albedo"; - editor.mainNode.specular.label = "Specular"; - } - } else { - editor.mainNode.diffuse.label = "Diffuse"; - editor.mainNode.specular.label = "Specular"; - } - - // Metallic is 1 component, specular has 3 components - if(ps.catLighting.lightMode == SFPSC_Lighting.LightMode.PBL && ps.catLighting.specularMode == SFPSC_Lighting.SpecularMode.Metallic ){ - editor.mainNode.specular.valueTypeDefault = ValueType.VTv1; - editor.mainNode.specular.SetValueType( ValueType.VTv1 ); - editor.mainNode.specular.TypecastTo( 1 ); - } else { - editor.mainNode.specular.valueTypeDefault = ValueType.VTvPending; - editor.mainNode.specular.SetValueType( ValueType.VTvPending ); - editor.mainNode.specular.TypecastTo( 3 ); - } - - - if( ps.catLighting.glossRoughMode == SFPSC_Lighting.GlossRoughMode.Roughness ) { - editor.mainNode.gloss.label = "Roughness"; - } else { - editor.mainNode.gloss.label = "Gloss"; - } - - if( ps.catGeometry.vertexOffsetMode == SFPSC_Geometry.VertexOffsetMode.Relative ) { - editor.mainNode.vertexOffset.label = "Vertex Offset"; - } else if( ps.catGeometry.vertexOffsetMode == SFPSC_Geometry.VertexOffsetMode.Absolute ) { - editor.mainNode.vertexOffset.label = "Vertex Position"; + if(ps.catLighting.lightMode == SFPSC_Lighting.LightMode.PBL){ + if( ps.catLighting.specularMode == SFPSC_Lighting.SpecularMode.Metallic ){ + editor.mainNode.diffuse.label = "Base Color"; + editor.mainNode.specular.label = "Metallic"; + } else { + editor.mainNode.diffuse.label = "Albedo"; + editor.mainNode.specular.label = "Specular"; + } + } else { + editor.mainNode.diffuse.label = "Diffuse"; + editor.mainNode.specular.label = "Specular"; + } + + // Metallic is 1 component, specular has 3 components + if(ps.catLighting.lightMode == SFPSC_Lighting.LightMode.PBL && ps.catLighting.specularMode == SFPSC_Lighting.SpecularMode.Metallic ){ + editor.mainNode.specular.valueTypeDefault = ValueType.VTv1; + editor.mainNode.specular.SetValueType( ValueType.VTv1 ); + editor.mainNode.specular.TypecastTo( 1 ); + } else { + editor.mainNode.specular.valueTypeDefault = ValueType.VTvPending; + editor.mainNode.specular.SetValueType( ValueType.VTvPending ); + editor.mainNode.specular.TypecastTo( 3 ); + } + + + if( ps.catLighting.glossRoughMode == SFPSC_Lighting.GlossRoughMode.Roughness ) { + editor.mainNode.gloss.label = "Roughness"; + } else { + editor.mainNode.gloss.label = "Gloss"; + } + + if( ps.catGeometry.vertexOffsetMode == SFPSC_Geometry.VertexOffsetMode.Relative ) { + editor.mainNode.vertexOffset.label = "Vertex Offset"; + } else if( ps.catGeometry.vertexOffsetMode == SFPSC_Geometry.VertexOffsetMode.Absolute ) { + editor.mainNode.vertexOffset.label = "Vertex Position"; } - - - - //editor.materialOutput.anisotropicDirection.SetAvailable( false ); - //editor.materialOutput.worldPositionOffset.SetAvailable( false ); - - - } - - - - - - - - - - } + + + + //editor.materialOutput.anisotropicDirection.SetAvailable( false ); + //editor.materialOutput.worldPositionOffset.SetAvailable( false ); + + + } + + + + + + + + + + } } diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_FeatureChecker.cs.meta b/Editor/Code/SF_FeatureChecker.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_FeatureChecker.cs.meta rename to Editor/Code/SF_FeatureChecker.cs.meta index 3006abc8..6a77efe5 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_FeatureChecker.cs.meta +++ b/Editor/Code/SF_FeatureChecker.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: e295e3262ddd14ff299ea932442b948f -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: e295e3262ddd14ff299ea932442b948f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_InstructionPass.cs b/Editor/Code/SF_InstructionPass.cs old mode 100755 new mode 100644 similarity index 92% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_InstructionPass.cs rename to Editor/Code/SF_InstructionPass.cs index 0ca7bb41..3ee978da --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_InstructionPass.cs +++ b/Editor/Code/SF_InstructionPass.cs @@ -35,7 +35,9 @@ public class SFIns_Pass { new SFIns_PassPlat(RenderPlatform.ps4), new SFIns_PassPlat(RenderPlatform.psp2), new SFIns_PassPlat(RenderPlatform.n3ds), - new SFIns_PassPlat(RenderPlatform.wiiu) + new SFIns_PassPlat(RenderPlatform.wiiu), + new SFIns_PassPlat(RenderPlatform.nswitch), + new SFIns_PassPlat(RenderPlatform.vulkan) }; public void Parse(ShaderProgram prog, string line, bool ignoreMin ) { diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_InstructionPass.cs.meta b/Editor/Code/SF_InstructionPass.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_InstructionPass.cs.meta rename to Editor/Code/SF_InstructionPass.cs.meta index c4a94174..a5a0b16c --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_InstructionPass.cs.meta +++ b/Editor/Code/SF_InstructionPass.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 31b9629aa3f2942e796d40d1277bab28 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 31b9629aa3f2942e796d40d1277bab28 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeConnectionLine.cs b/Editor/Code/SF_NodeConnectionLine.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeConnectionLine.cs rename to Editor/Code/SF_NodeConnectionLine.cs index f6a68b8f..1c3c6b49 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeConnectionLine.cs +++ b/Editor/Code/SF_NodeConnectionLine.cs @@ -1,345 +1,345 @@ -using UnityEngine; -using System.Collections; - - -namespace ShaderForge{ - - - [System.Serializable] - public class SF_NodeConnectionLine : ScriptableObject { - - - public SF_NodeConnector connector; - public SF_Editor editor; - - public bool aboutToBeDeleted = false; - - public Vector2[] pointsBezier0; - public Vector2[] pointsBezier1; - public Vector2[] pointsBezier2; - public Vector2[] pointsBezier3; - - public Vector2[] pointsLinear0; - public Vector2[] pointsLinear1; - public Vector2[] pointsLinear2; - public Vector2[] pointsLinear3; - - public Vector2[] pointsRectilinear0; - public Vector2[] pointsRectilinear1; - public Vector2[] pointsRectilinear2; - public Vector2[] pointsRectilinear3; - - public Vector2[] this[ConnectionLineStyle style, int id]{ - get{ - switch(style){ - case ConnectionLineStyle.Bezier: - switch(id){ - case 0: - return pointsBezier0; - case 1: - return pointsBezier1; - case 2: - return pointsBezier2; - case 3: - return pointsBezier3; - } - break; - case ConnectionLineStyle.Linear: - switch(id){ - case 0: - return pointsLinear0; - case 1: - return pointsLinear1; - case 2: - return pointsLinear2; - case 3: - return pointsLinear3; - } - break; - case ConnectionLineStyle.Rectilinear: - switch(id){ - case 0: - return pointsRectilinear0; - case 1: - return pointsRectilinear1; - case 2: - return pointsRectilinear2; - case 3: - return pointsRectilinear3; - } - break; - } - Debug.LogError("Invalid this[style,id] attempt on NodeConnectionLink = " + style + " and " + id); - return null; - } - set{ - switch(style){ - case ConnectionLineStyle.Bezier: - switch(id){ - case 0: - pointsBezier0 = value; - return; - case 1: - pointsBezier1 = value; - return; - case 2: - pointsBezier2 = value; - return; - case 3: - pointsBezier3 = value; - return; - } - return; - case ConnectionLineStyle.Linear: - switch(id){ - case 0: - pointsLinear0 = value; - return; - case 1: - pointsLinear1 = value; - return; - case 2: - pointsLinear2 = value; - return; - case 3: - pointsLinear3 = value; - return; - } - return; - case ConnectionLineStyle.Rectilinear: - switch(id){ - case 0: - pointsRectilinear0 = value; - return; - case 1: - pointsRectilinear1 = value; - return; - case 2: - pointsRectilinear2 = value; - return; - case 3: - pointsRectilinear3 = value; - return; - } - return; - } - Debug.LogError("Invalid this[style,id] set attempt on NodeConnectionLink = " + style + " and " + id); - //return null; - } - } - - - - public void OnEnable() { - base.hideFlags = HideFlags.HideAndDontSave; - } - - - public SF_NodeConnectionLine Initialize(SF_Editor editor, SF_NodeConnector connector){ - this.connector = connector; - this.editor = editor; - return this; - } - - public bool DeleteImminent(){ - - bool thisIsPendingInput = (connector.conType == ConType.cInput) && (SF_NodeConnector.pendingConnectionSource == connector); - - return aboutToBeDeleted || connector.IsDeleteHovering(false) || connector.inputCon.IsDeleteHovering(false) || thisIsPendingInput; - } - - - public void Draw(){ - - if(aboutToBeDeleted && !connector.IsConnected()){ // It's disconnected, don't mark it anymore - aboutToBeDeleted = false; - } - - if(!connector.IsConnected()) - return; - - if(Event.current.rawType != EventType.repaint) - return; - - //Vector2 a = connector.GetConnectionPoint(); - //Vector2 b = connector.inputCon.GetConnectionPoint(); - int cc = connector.GetCompCount(); - bool isMatrix4x4 = ( cc == 16 ); - if( isMatrix4x4 ) { - cc = 1; - } - - Color color = DeleteImminent() ? new Color(1f,0f,0f,0.7f) : connector.GetConnectionLineColor(); - - // TEMP: - ReconstructShapes(); - - //GUILines.DrawStyledConnection( editor, a, b, cc, color); - - - //switch(SF_Settings.ConnectionLineStyle){ - //case ConnectionLineStyle.Bezier: - if( isMatrix4x4 ) { - //GUILines.DrawMatrixConnection( editor, connector.GetConnectionPoint(), connector.inputCon.GetConnectionPoint(), color ); - GUILines.DrawLines( editor, this[ConnectionLineStyle.Bezier, 0], color, GetConnectionWidth(), true ); - GUILines.DrawLines( editor, this[ConnectionLineStyle.Bezier, 1], color, GetConnectionWidth(), true, true ); - GUILines.DrawLines( editor, this[ConnectionLineStyle.Bezier, 2], color, GetConnectionWidth(), true ); - } else { - for( int i=0; i < cc; i++ ) { - GUILines.DrawLines( editor, this[ConnectionLineStyle.Bezier, i], color, GetConnectionWidth(), true ); - } - } - - //break; - //} - - - - } - - const float partOffsetFactor = 10f; - const float connectionWidth = 2f; - const int bezierSegments = 25; - - - private float GetConnectionWidth(){ - return DeleteImminent() ? 4f : connectionWidth; - } - - - - //Vector2 lastUpdatePosStart = Vector2.zero; - //Vector2 lastUpdatePosEnd = Vector2.zero; - //float lastUpdateCC = 0; - - - public void ReconstructShapes(){ - - - - //if( Event.current.type != EventType.repaint ) // To trigger it before painting! - // return; - - - float cc = connector.GetCompCount(); - if( cc == 16 ) - cc = 3; - - - - - //if( cc != lastUpdateCC ) { - // lastUpdateCC = cc; - // needsUpdate = true; - //} - - //Vector2 curPosStart = connector.inputCon.node.rect.position; - //Vector2 curPosEnd = connector.node.rect.position; - - //if( lastUpdatePosStart != curPosStart ) { - // lastUpdatePosStart = curPosStart; - // needsUpdate = true; - //} - - //if( lastUpdatePosEnd != curPosEnd ) { - // lastUpdatePosEnd = curPosEnd; - // needsUpdate = true; - //} - - - //if( needsUpdate ) { - //Debug.Log("Updating"); - float partOffset = partOffsetFactor / cc; - float mainOffset = -( cc - 1 ) * 0.5f * partOffset; - - float offset = 0; - - for( int i=0; i < cc; i++ ) { - offset = mainOffset + partOffset * i; - - - // TODO: Style branching - ReconstructBezier( offset, i ); - - - } - //} - - - //Debug.Log(this[ConnectionLineStyle.Bezier,0][0].ToString()); - - - - - } - - - - private void ReconstructBezier(float offset, int id){ - this[ConnectionLineStyle.Bezier,id] = GUILines.ConnectionBezierOffsetArray( - offset, - connector, - connector.inputCon, - bezierSegments - ); - } - - public bool Intersects(Vector2 p0, Vector2 p1, out Vector2 intersection){ - intersection = Vector2.zero; - -// p0 = editor.nodeView.ZoomSpaceToScreenSpace(p0); -// p1 = editor.nodeView.ZoomSpaceToScreenSpace(p1); - p0 = editor.nodeView.ZoomSpaceToScreenSpace(p0); - p1 = editor.nodeView.ZoomSpaceToScreenSpace(p1); // Double, for whatever reason - - float cc = connector.GetCompCount(); - if( cc == 16 || cc == 0 ) // Matrices - cc = 1; - - if(cc == 1){ - if(SF_Tools.LineIntersection(p0, p1, this[0, 0], out intersection)){ - return true; - } - } else if( cc == 2){ - - Vector2 intA = Vector2.zero; - Vector2 intB = Vector2.zero; - - bool hitA = SF_Tools.LineIntersection(p0, p1, this[0, 0], out intA); - bool hitB = SF_Tools.LineIntersection(p0, p1, this[0, 1], out intB); - - if(hitA && hitB){ - intersection = (intA + intB)/2; - return true; - } - - } else if(cc == 3){ - if(SF_Tools.LineIntersection(p0, p1, this[0, 1], out intersection)){ - return true; - } - }else if( cc == 4){ - - Vector2 intA = Vector2.zero; - Vector2 intB = Vector2.zero; - - bool hitA = SF_Tools.LineIntersection(p0, p1, this[0, 1], out intA); - bool hitB = SF_Tools.LineIntersection(p0, p1, this[0, 2], out intB); - - if(hitA && hitB){ - intersection = (intA + intB)/2; - return true; - } - } - - return false; - - - } - - - - - - } - -} +using UnityEngine; +using System.Collections; + + +namespace ShaderForge{ + + + [System.Serializable] + public class SF_NodeConnectionLine : ScriptableObject { + + + public SF_NodeConnector connector; + public SF_Editor editor; + + public bool aboutToBeDeleted = false; + + public Vector2[] pointsBezier0; + public Vector2[] pointsBezier1; + public Vector2[] pointsBezier2; + public Vector2[] pointsBezier3; + + public Vector2[] pointsLinear0; + public Vector2[] pointsLinear1; + public Vector2[] pointsLinear2; + public Vector2[] pointsLinear3; + + public Vector2[] pointsRectilinear0; + public Vector2[] pointsRectilinear1; + public Vector2[] pointsRectilinear2; + public Vector2[] pointsRectilinear3; + + public Vector2[] this[ConnectionLineStyle style, int id]{ + get{ + switch(style){ + case ConnectionLineStyle.Bezier: + switch(id){ + case 0: + return pointsBezier0; + case 1: + return pointsBezier1; + case 2: + return pointsBezier2; + case 3: + return pointsBezier3; + } + break; + case ConnectionLineStyle.Linear: + switch(id){ + case 0: + return pointsLinear0; + case 1: + return pointsLinear1; + case 2: + return pointsLinear2; + case 3: + return pointsLinear3; + } + break; + case ConnectionLineStyle.Rectilinear: + switch(id){ + case 0: + return pointsRectilinear0; + case 1: + return pointsRectilinear1; + case 2: + return pointsRectilinear2; + case 3: + return pointsRectilinear3; + } + break; + } + Debug.LogError("Invalid this[style,id] attempt on NodeConnectionLink = " + style + " and " + id); + return null; + } + set{ + switch(style){ + case ConnectionLineStyle.Bezier: + switch(id){ + case 0: + pointsBezier0 = value; + return; + case 1: + pointsBezier1 = value; + return; + case 2: + pointsBezier2 = value; + return; + case 3: + pointsBezier3 = value; + return; + } + return; + case ConnectionLineStyle.Linear: + switch(id){ + case 0: + pointsLinear0 = value; + return; + case 1: + pointsLinear1 = value; + return; + case 2: + pointsLinear2 = value; + return; + case 3: + pointsLinear3 = value; + return; + } + return; + case ConnectionLineStyle.Rectilinear: + switch(id){ + case 0: + pointsRectilinear0 = value; + return; + case 1: + pointsRectilinear1 = value; + return; + case 2: + pointsRectilinear2 = value; + return; + case 3: + pointsRectilinear3 = value; + return; + } + return; + } + Debug.LogError("Invalid this[style,id] set attempt on NodeConnectionLink = " + style + " and " + id); + //return null; + } + } + + + + public void OnEnable() { + base.hideFlags = HideFlags.HideAndDontSave; + } + + + public SF_NodeConnectionLine Initialize(SF_Editor editor, SF_NodeConnector connector){ + this.connector = connector; + this.editor = editor; + return this; + } + + public bool DeleteImminent(){ + + bool thisIsPendingInput = (connector.conType == ConType.cInput) && (SF_NodeConnector.pendingConnectionSource == connector); + + return aboutToBeDeleted || connector.IsDeleteHovering(false) || connector.inputCon.IsDeleteHovering(false) || thisIsPendingInput; + } + + + public void Draw(){ + + if(aboutToBeDeleted && !connector.IsConnected()){ // It's disconnected, don't mark it anymore + aboutToBeDeleted = false; + } + + if(!connector.IsConnected()) + return; + + if(Event.current.rawType != EventType.Repaint) + return; + + //Vector2 a = connector.GetConnectionPoint(); + //Vector2 b = connector.inputCon.GetConnectionPoint(); + int cc = connector.GetCompCount(); + bool isMatrix4x4 = ( cc == 16 ); + if( isMatrix4x4 ) { + cc = 1; + } + + Color color = DeleteImminent() ? new Color(1f,0f,0f,0.7f) : connector.GetConnectionLineColor(); + + // TEMP: + ReconstructShapes(); + + //GUILines.DrawStyledConnection( editor, a, b, cc, color); + + + //switch(SF_Settings.ConnectionLineStyle){ + //case ConnectionLineStyle.Bezier: + if( isMatrix4x4 ) { + //GUILines.DrawMatrixConnection( editor, connector.GetConnectionPoint(), connector.inputCon.GetConnectionPoint(), color ); + GUILines.DrawLines( editor, this[ConnectionLineStyle.Bezier, 0], color, GetConnectionWidth(), true ); + GUILines.DrawLines( editor, this[ConnectionLineStyle.Bezier, 1], color, GetConnectionWidth(), true, true ); + GUILines.DrawLines( editor, this[ConnectionLineStyle.Bezier, 2], color, GetConnectionWidth(), true ); + } else { + for( int i=0; i < cc; i++ ) { + GUILines.DrawLines( editor, this[ConnectionLineStyle.Bezier, i], color, GetConnectionWidth(), true ); + } + } + + //break; + //} + + + + } + + const float partOffsetFactor = 10f; + const float connectionWidth = 2f; + const int bezierSegments = 25; + + + private float GetConnectionWidth(){ + return DeleteImminent() ? 4f : connectionWidth; + } + + + + //Vector2 lastUpdatePosStart = Vector2.zero; + //Vector2 lastUpdatePosEnd = Vector2.zero; + //float lastUpdateCC = 0; + + + public void ReconstructShapes(){ + + + + //if( Event.current.type != EventType.repaint ) // To trigger it before painting! + // return; + + + float cc = connector.GetCompCount(); + if( cc == 16 ) + cc = 3; + + + + + //if( cc != lastUpdateCC ) { + // lastUpdateCC = cc; + // needsUpdate = true; + //} + + //Vector2 curPosStart = connector.inputCon.node.rect.position; + //Vector2 curPosEnd = connector.node.rect.position; + + //if( lastUpdatePosStart != curPosStart ) { + // lastUpdatePosStart = curPosStart; + // needsUpdate = true; + //} + + //if( lastUpdatePosEnd != curPosEnd ) { + // lastUpdatePosEnd = curPosEnd; + // needsUpdate = true; + //} + + + //if( needsUpdate ) { + //Debug.Log("Updating"); + float partOffset = partOffsetFactor / cc; + float mainOffset = -( cc - 1 ) * 0.5f * partOffset; + + float offset = 0; + + for( int i=0; i < cc; i++ ) { + offset = mainOffset + partOffset * i; + + + // TODO: Style branching + ReconstructBezier( offset, i ); + + + } + //} + + + //Debug.Log(this[ConnectionLineStyle.Bezier,0][0].ToString()); + + + + + } + + + + private void ReconstructBezier(float offset, int id){ + this[ConnectionLineStyle.Bezier,id] = GUILines.ConnectionBezierOffsetArray( + offset, + connector, + connector.inputCon, + bezierSegments + ); + } + + public bool Intersects(Vector2 p0, Vector2 p1, out Vector2 intersection){ + intersection = Vector2.zero; + +// p0 = editor.nodeView.ZoomSpaceToScreenSpace(p0); +// p1 = editor.nodeView.ZoomSpaceToScreenSpace(p1); + p0 = editor.nodeView.ZoomSpaceToScreenSpace(p0); + p1 = editor.nodeView.ZoomSpaceToScreenSpace(p1); // Double, for whatever reason + + float cc = connector.GetCompCount(); + if( cc == 16 || cc == 0 ) // Matrices + cc = 1; + + if(cc == 1){ + if(SF_Tools.LineIntersection(p0, p1, this[0, 0], out intersection)){ + return true; + } + } else if( cc == 2){ + + Vector2 intA = Vector2.zero; + Vector2 intB = Vector2.zero; + + bool hitA = SF_Tools.LineIntersection(p0, p1, this[0, 0], out intA); + bool hitB = SF_Tools.LineIntersection(p0, p1, this[0, 1], out intB); + + if(hitA && hitB){ + intersection = (intA + intB)/2; + return true; + } + + } else if(cc == 3){ + if(SF_Tools.LineIntersection(p0, p1, this[0, 1], out intersection)){ + return true; + } + }else if( cc == 4){ + + Vector2 intA = Vector2.zero; + Vector2 intB = Vector2.zero; + + bool hitA = SF_Tools.LineIntersection(p0, p1, this[0, 1], out intA); + bool hitB = SF_Tools.LineIntersection(p0, p1, this[0, 2], out intB); + + if(hitA && hitB){ + intersection = (intA + intB)/2; + return true; + } + } + + return false; + + + } + + + + + + } + +} diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeConnectionLine.cs.meta b/Editor/Code/SF_NodeConnectionLine.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeConnectionLine.cs.meta rename to Editor/Code/SF_NodeConnectionLine.cs.meta index 9a8b744b..4ca83b88 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeConnectionLine.cs.meta +++ b/Editor/Code/SF_NodeConnectionLine.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 584792dc3e3b749a5adc8f6fa95aad34 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 584792dc3e3b749a5adc8f6fa95aad34 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeConnector.cs b/Editor/Code/SF_NodeConnector.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeConnector.cs rename to Editor/Code/SF_NodeConnector.cs index 3c79480c..3438816e --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeConnector.cs +++ b/Editor/Code/SF_NodeConnector.cs @@ -1,1217 +1,1217 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using System; - - -namespace ShaderForge { - - public enum ConType { cInput, cOutput }; - public enum OutChannel { RGB, R, G, B, A, All, RG }; - - public enum EnableState { Enabled, Disabled, Hidden }; - public enum AvailableState { Available, Unavailable }; - - public enum LinkingMethod { Default, NoUpdate }; - - public enum ValueType { VTvPending, VTv1, VTv2, VTv3, VTv4, VTv1v2, VTv1v3, VTv1v4, TexAsset, VTm4x4, VTv4m4x4 }; - - [System.Serializable] - public class SF_NodeConnector : ScriptableObject { - - - public static SF_NodeConnector pendingConnectionSource = null; - public AvailableState availableState = AvailableState.Available; - public EnableState enableState = EnableState.Enabled; - public bool required = false; - - public ConType conType; - public OutChannel outputChannel = OutChannel.All; - public ValueType valueType; - public ValueType valueTypeDefault; - [SerializeField] - private CustomValueType customValueType; - public CustomValueType CustomValueType{ // This is used when dealing with custom nodes - get{ - return customValueType; - } - set{ - CustomValueType cvtBef = customValueType; - customValueType = value; - bool changed = (customValueType != cvtBef); - if(changed){ - switch(customValueType){ - case CustomValueType.Float: - this.TypecastTo(1).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv1); - break; - case CustomValueType.Float2: - this.TypecastTo(2).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv2); - break; - case CustomValueType.Float3: - this.TypecastTo(3).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv3); - break; - case CustomValueType.Float4: - this.TypecastTo(4).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv4); - break; - case CustomValueType.Half: - this.TypecastTo(1).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv1); - break; - case CustomValueType.Half2: - this.TypecastTo(2).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv2); - break; - case CustomValueType.Half3: - this.TypecastTo(3).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv3); - break; - case CustomValueType.Half4: - this.TypecastTo(4).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv4); - break; - case CustomValueType.Fixed: - this.TypecastTo(1).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv1); - break; - case CustomValueType.Fixed2: - this.TypecastTo(2).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv2); - break; - case CustomValueType.Fixed3: - this.TypecastTo(3).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv3); - break; - case CustomValueType.Fixed4: - this.TypecastTo(4).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv4); - break; - case CustomValueType.Sampler2D: - this.TypecastTo(0).WithColor(SF_Node.colorExposed).SetValueType(this.valueTypeDefault = ValueType.TexAsset); - break; - case CustomValueType.Matrix4x4: - this.TypecastTo(0).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTm4x4); - break; - } - - } - - - } - - } - public string label; - public SF_NodeConnector inputCon; - public SF_NodeConnectionLine conLine; - public List outputCons; - public SF_Node node; - public bool outerLabel = false; - public bool displayLockIfDeferredPrePassIsOn = false; - public Rect rect; - public int typecastTarget = 0; // 0 = No typecasting - - public int usageCount = 1; - - public string strID = null; - - [SerializeField] - private ShaderProgram forcedProgram = ShaderProgram.Any; - - [SerializeField] - private List skipPasses; - public List SkipPasses{ - get{ - if(skipPasses == null) - skipPasses = new List(); - return skipPasses; - } - } - - public static Color colorEnabledDefault{ - get{ - if(SF_GUI.ProSkin) - return new Color( 0.6f, 0.6f, 0.6f ); - else - return new Color( 1f, 1f, 1f ); - } - } - public Color color; - public string unconnectedEvaluationValue = null; - - public void OnEnable() { - base.hideFlags = HideFlags.HideAndDontSave; - if(color == default(Color)) - color = colorEnabledDefault; - } - - public SF_NodeConnector() { - //Debug.Log("NODE CONNECTION "); - } - - - public static SF_NodeConnector Create( SF_Node node, string strID, string label, ConType conType, ValueType valueType, bool outerLabel = false, string unconnectedEvaluationValue = null ) { - return ScriptableObject.CreateInstance< SF_NodeConnector>().Initialize(node, strID, label, conType,valueType, outerLabel, unconnectedEvaluationValue); - } - - public SF_NodeConnector Initialize( SF_Node node, string strID, string label, ConType conType, ValueType valueType, bool outerLabel = false, string unconnectedEvaluationValue = null ) { - this.node = node; - this.strID = strID; - this.label = label; - this.conType = conType; - - if(conType == ConType.cInput){ - conLine = ScriptableObject.CreateInstance().Initialize(node.editor, this); - } - - this.valueType = this.valueTypeDefault = valueType; - this.outerLabel = outerLabel; - this.unconnectedEvaluationValue = unconnectedEvaluationValue; - outputCons = new List(); - return this; - } - - // Chaining - public SF_NodeConnector SetRequired( bool b ) { - required = b; - return this; - } - public SF_NodeConnector WithColor( Color c ) { - color = c; - return this; - } - public SF_NodeConnector Outputting( OutChannel channel ) { - outputChannel = channel; - return this; - } - public SF_NodeConnector TypecastTo(int target) { - typecastTarget = target; - //Debug.Log("Typecasting " + label + " to " + target); - return this; - } - public SF_NodeConnector WithUseCount(int count){ - usageCount = count; - return this; - } - public SF_NodeConnector Skip( params PassType[] passes ) { - SkipPasses.AddRange( passes ); - return this; - } - public SF_NodeConnector ForceBlock(ShaderProgram block) { - forcedProgram = block; - return this; - } - public SF_NodeConnector DisplayLockIfDeferredPrePassIsOn(){ - displayLockIfDeferredPrePassIsOn = true; - return this; - } - - public SF_NodeConnector visControlChild; - public SF_NodeConnector visControlParent; - public SF_NodeConnector SetVisChild(SF_NodeConnector child){ // Used to make enable-chains (Connecting B enables the C connector etc) - visControlChild = child; - child.visControlParent = this; - child.enableState = EnableState.Hidden; - return this; - } - - public void SetVisChildVisible(bool visible){ - - if(visControlChild == null){ - return; - } - - EnableState targetState = visible ? EnableState.Enabled : EnableState.Hidden; - - if(visControlChild.enableState == targetState) - return; // Don't do anything if unchanged - - - if(!visible){ - visControlChild.Disconnect(true,false); // Disconnect if it goes invisible when linked - } - - visControlChild.enableState = targetState; - - } - - - - - public string ghostType = null; - public string ghostLinkStrId = null; - public SF_NodeConnector SetGhostNodeLink( Type ghostType, string ghostLinkStrId ) { - this.ghostType = ghostType.FullName; - this.ghostLinkStrId = ghostLinkStrId; - return this; - } - - - // Ghost nodes are default values assigned to unconnected node connectors - // They are instantiated when the shader is being evaluated, and then removed again - public void DefineGhostIfNeeded(ref List ghosts) { - - - // Skip nodes without ghosts - if( string.IsNullOrEmpty(ghostType) ) { - return; - } - - - if( IsConnected() ) // Skip already connected ones - return; - - - SF_Node ghost = null; - - // Search for existing ghost node - foreach( SF_Node exisGhost in ghosts ) { - if( exisGhost.GetType().FullName == ghostType ) { // TODO: Make sure serialized data matches too! - // Found! - ghost = exisGhost; - - if(SF_Debug.ghostNodes) - Debug.Log("Found matching existing ghost"); - break; - } - } - - // If no ghost was found, create one - if( ghost == null ) { - ghost = node.editor.AddNode( ghostType ); - ghost.isGhost = true; - ghosts.Add( ghost ); - if(SF_Debug.ghostNodes){ - Debug.Log("Adding ghost " + ghostType + " with connection count " + ghost.connectors.Length); - Debug.Log("Linked to " + node.nodeName + "["+this.label+"]" ); - Debug.Log("Ghost Count = " + node.editor.shaderEvaluator.ghostNodes.Count); - } - //Debug.Log( "Adding ghost of type " + ghostType ); - //Debug.Log( "Ghost in main node list = " + node.editor.nodes.Contains( ghost ) ); - } - - // Just to make sure... - if( ghost == null ) { - Debug.LogError( "Ghost is null, this should really not happen. Tried to find type " + ghostType ); - } - - // By this point, ghost is surely an existing node! - // Link it: - - //Debug.Log( "Linking ghost of type " + ghostType + " on " + this.node.nodeName + " Is COnnected = " + IsConnected()); - ghost.status.leadsToFinal = true; - ghost[ghostLinkStrId].LinkTo(this,LinkingMethod.NoUpdate); - - } - - // Get the index of this connector in the node array - public string GetIndex() { - if( this.HasID() ) - return strID; - for( int i = 0; i < node.connectors.Length; i++ ) - if( node.connectors[i] == this ) - return i.ToString(); - Debug.LogError( "Couldn't find index of a connector in " + node.nodeName ); - return "0"; - } - - public bool DisplayLock(){ - return displayLockIfDeferredPrePassIsOn && node.editor.ps.catLighting.renderPath == SFPSC_Lighting.RenderPath.Deferred; - } - - public bool HasID() { - return !string.IsNullOrEmpty( strID ); - } - - - public ShaderProgram GetProgram() { - if( forcedProgram == ShaderProgram.Any ) - return node.program; - return forcedProgram; - } - - - public int GetCompCount() { - - - if( conType == ConType.cInput){ - if( IsConnected() ) { - return inputCon.GetCompCount(); - } else { - int cc = 0; - if(SF_Tools.CompCountOf(valueType, out cc)){ - return cc; - } else { - Debug.LogWarning("[Shader Forge] - invalid component count in ["+label+"] of " + node.name + ""); - return node.texture.CompCount; // This is super weird, shouldn't read from the max comp count, read from the connection type instead - } - } - - } - - - - OutChannel oc = outputChannel; - if( oc == OutChannel.All ){ - - int cc = 0; - if(SF_Tools.CompCountOf(valueType, out cc)){ - return cc; - } else { - Debug.LogWarning("[Shader Forge] - invalid component count in ["+label+"] of " + node.name + ""); - return node.texture.CompCount; // This is super weird, shouldn't read from the max comp count, read from the connection type instead - } - - } else if( oc == OutChannel.RGB ) - return 3; - if( oc == OutChannel.RG ) - return 2; - - int custCount = SF_Tools.ComponentCountOf(customValueType); - if(custCount != 0){ - return custCount; - } - - return 1; - } - - - - - public string Evaluate() { - - string s = node.PreEvaluate(); - - switch( outputChannel ) { - case OutChannel.RGB: - return s + ".rgb"; - case OutChannel.RG: - return s + ".rg"; - case OutChannel.R: - return s + ".r"; - case OutChannel.G: - return s + ".g"; - case OutChannel.B: - return s + ".b"; - case OutChannel.A: - return s + ".a"; - } - - return s; - - } - - - public bool IsConnected() { - if( conType == ConType.cInput ) { - return inputCon != null; - } else { - if( outputCons == null ) - return false; - return ( outputCons.Count != 0 ); - } - - } - - public bool IsConnectedAndEnabled() { - return IsConnected() && (enableState == EnableState.Enabled || enableState == EnableState.Hidden); - } - - public bool IsConnectedEnabledAndAvailable(){ - return IsConnected() && ( enableState == EnableState.Enabled || enableState == EnableState.Hidden ) && availableState == AvailableState.Available; - } - - public bool IsConnectedEnabledAndAvailableInThisPass(PassType pass){ - if(SkipPasses.Contains(pass)){ - return false; - } - return IsConnectedEnabledAndAvailable(); - } - - - - public bool ConnectionInProgress() { - return ( SF_NodeConnector.pendingConnectionSource == this && IsConnecting() ); - } - - public static bool IsConnecting() { - if( SF_NodeConnector.pendingConnectionSource == null ) - return false; - /*else if( string.IsNullOrEmpty( SF_NodeConnection.pendingConnectionSource.node.name ) ) { - SF_NodeConnection.pendingConnectionSource=null; - return false; - }*/ - - return true; - } - - public bool Hovering(bool world) { - if( !node.editor.nodeView.MouseInsideNodeView(offset:world) ) - return false; - Rect r = SF_Tools.GetExpanded( rect, SF_Tools.connectorMargin ); - return r.Contains( world ? Event.current.mousePosition : MousePos() ); - } - - - - public bool Clicked(int button = 0) { - - - bool hovering = Hovering(world:false); - bool click = ( Event.current.type == EventType.mouseDown && Event.current.button == button ); - bool clickedCont = hovering && click; - //bool clickedCont=cont&&click; - //Debug.Log(); - return clickedCont; - } - - public bool Released() { - bool cont = Hovering(world:false); - bool release = ( Event.current.type == EventType.mouseUp ); - return cont && release; - } - - - public void OnClick() { - Debug.Log( "Clicked Button" ); - } - - public Vector2 MousePos() { - if( node.editor == null ) - return Vector2.zero; - return node.editor.nodeView.GetNodeSpaceMousePos(); - } - - // TODO: Pass nodes into actual line draw thingy - public float GetConnectionCenterY( SF_NodeConnector cA, SF_NodeConnector cB ) { - Rect a = cA.node.rect; - Rect b = cB.node.rect; - if( cA.GetConnectionPoint().y > cB.GetConnectionPoint().y ) - return 0.5f * ( a.yMax + b.yMin ); - else - return 0.5f * ( b.yMax + a.yMin ); - } - - public void CheckConnection( SF_Editor editor ) { - - - - if(ShouldBeInvisible()) - return; - - - - - if( conType == ConType.cInput && Event.current.type == EventType.repaint ) { - DrawConnection( editor ); - } - - if( enableState == EnableState.Disabled || availableState == AvailableState.Unavailable ) - return; - - if( Clicked() ) { - SF_NodeConnector.pendingConnectionSource = this; - editor.nodeView.selection.DeselectAll(registerUndo:false); - foreach( SF_Node iNode in editor.nodes ) { - foreach( SF_NodeConnector con in iNode.connectors ) { - con.UpdateCanValidlyConnectToPending(); - } - } - Event.current.Use(); - } - - if( Clicked(1) && SF_GUI.HoldingAlt()){ - Disconnect(); - } - - if( !ConnectionInProgress() ) { - if( Released() ) - TryMakeConnection(); - return; - } - - - // Active connection: - - editor.ResetRunningOutdatedTimer(); - - //if(Event.current.type == EventType.repaint) - //node.Repaint(); - - - bool hovering = false; - foreach(SF_Node n in editor.nodes){ - foreach(SF_NodeConnector con in n.connectors){ - if(con.CanConnectToPending() && con.Hovering(false)){ - hovering = true; - break; - } - } - if(hovering) - break; - } - - if( Event.current.type == EventType.repaint ) { - Color c = hovering ? Color.green : GetConnectionLineColor(); - - bool input = ( conType == ConType.cInput ); - Vector2 start = input ? GetConnectionPoint() : MousePos(); - Vector2 end = input ? MousePos() : GetConnectionPoint(); ; - - if( valueType == ValueType.VTm4x4 || valueType == ValueType.VTv4m4x4 ) { - GUILines.DrawMatrixConnection( editor, start, end, c ); - } else { - GUILines.DrawStyledConnection( editor, start, end, GetCompCount(), c ); - } - } - - - - - //Drawing.DrawLine(rect.center,MousePos(),Color.white,2,true); - - - } - - public Color GetConnectionLineColor() { - - Color def = EditorGUIUtility.isProSkin ? new Color( 1f, 1f, 1f, 0.3f ) : new Color( 0f, 0f, 0f, 0.4f ); - - - - - Color sel = SF_GUI.selectionColor; - - if( inputCon == null ) - return def; - else if( inputCon.color == SF_Node.colorExposed ) - def = SF_Node.colorExposedDark; - - if( node.selected || inputCon.node.selected ) - return sel; - - - if( !DisplayAsValid() ) - def.a = 0.1f; - - return def; - } - - void DrawConnection( SF_Editor editor ) { - - conLine.Draw(); - - /* - Vector2 a = GetConnectionPoint(); - Vector2 b = inputCon.GetConnectionPoint(); - int cc = GetCompCount(); - - - - GUILines.DrawStyledConnection( editor, a, b, cc, GetConnectionLineColor() ); - */ - - } - - public bool CanEvaluate() { - if( !IsConnectedAndEnabled() ) - if( !string.IsNullOrEmpty( unconnectedEvaluationValue ) ) - return true; - else - return false; // TODO: Something - if(conType == ConType.cInput) - if( !inputCon.node.CanEvaluate() ) - return false; - return true; - } - - public bool CanEvaluateAs( int target ) { - if( !CanEvaluate() ) - return false; - //int source = inputCon.GetCompCount(); - //if( target < source ) // TODO: Allow this? - // return false; - return true; - } - - - public string TryEvaluate() { - - //Debug.Log("TryEvaluate " + label + " typecast = " + typecastTarget); - - if( !IsConnectedAndEnabled() ) - if( !string.IsNullOrEmpty( unconnectedEvaluationValue ) ) - return unconnectedEvaluationValue; - if( !CanEvaluate() ) - return null; - - if( typecastTarget == 0 ){ - if(conType == ConType.cInput) - return inputCon.Evaluate(); - else - return Evaluate(); - } else { - //Debug.Log("Trying to evaluate node " + this.label + " on node " + this.node.nodeName); - return TryEvaluateAs( typecastTarget ); - } - - } - - public string TryEvaluateAs(int target) { - if( !CanEvaluateAs(target) ) - return null; // TODO: Throw errors etc - - int source = inputCon.GetCompCount(); - - int diff = target - source; - - - - if(diff == 0) // Same value type - return inputCon.Evaluate(); - if( diff < 0 ) { // Lowering component count, mask components - switch( target ) { - case 1: - return inputCon.Evaluate() + ".r"; - case 2: - return inputCon.Evaluate() + ".rg"; - case 3: - return inputCon.Evaluate() + ".rgb"; - } - } - - // Increasing component count: - - string cast; - - - if( source != 1 ) { // Evaluate + append zeroes - cast = "float" + target + "(" + inputCon.Evaluate(); - for( int i = 0; i < diff; i++ ) - cast += ",0.0"; - } else { - inputCon.node.DefineVariable(); - cast = "float" + target + "(" + inputCon.Evaluate(); - for( int i = 0; i < diff; i++ ) - cast += "," + inputCon.Evaluate(); - } - - - - cast += ")"; - return cast; - } - - - /* - public bool IsFocused() { - return rect.Contains( Event.current.mousePosition ); - }*/ - - public bool CheckIfDeleted() { - if( (Event.current.keyCode == KeyCode.Delete || Event.current.keyCode == KeyCode.Backspace) && Event.current.type == EventType.keyDown && Hovering( world: true ) ) { - Disconnect(); - return true; - } - return false; - } - - - - - public bool IsDeleted() { - return ( node == null ); - } - - public void Disconnect( bool force = false, bool callback = true, bool reconnection = false ) { - - //Debug.Log( "Attempt to disconnect: " + node.name + "[" + label + "]" ); - - if( !IsConnected() ) { - //Debug.Log( "Aborted " + node.name + "[" + label + "]" ); - return; - } - - - if( conType == ConType.cInput ) { - //Debug.Log( "Input disconnecting " + node.name + "[" + label + "]" ); - ResetValueType(); - if( inputCon != null ) { - inputCon.outputCons.Remove( this ); - if(!reconnection) - SetVisChildVisible(false); // Don't hide the child if this was disconnected by reconnection - //Debug.Log( "Disconnecting " + label + "<--" + inputCon.label ); - } - inputCon = null; - if( callback && !SF_Parser.quickLoad ) - node.OnUpdateNode(); - } else { - //Debug.Log( "Output disconnecting " + node.name + "[" + label + "]" ); - SF_NodeConnector[] outputsArr = outputCons.ToArray(); - for( int i = 0; i < outputsArr.Length; i++ ) { - //Debug.Log( "Disconnecting " + outputsArr[i].label + "<--" + label ); - outputsArr[i].Disconnect( true, callback ); - } - outputCons.Clear(); - } - - // AceMatEditor.instance.CheckForBrokenConnections(); - - // node = null; // What? - } - - public Vector2 GetConnectionPoint() { - if( conType == ConType.cOutput ) - return new Vector2( rect.xMax, rect.center.y ); - else - return new Vector2( rect.xMin+1, rect.center.y ); - } - - - public bool CanConnectTo(SF_NodeConnector other) { - if( other == null ) - return false; - - if( other.node == node ) - return false; // Disallow connecting to self - - if( other.conType == this.conType ) - return false; // Disallow connecting same types (i <- i & o <- o) - - if( conType == ConType.cOutput ) { // Disallow connecting loops - if( node.IsDescendantOf( other.node ) ) { - return false; - } - } else { - if( other.node.IsDescendantOf( node ) ) { - return false; - } - } - - return true; - } - - - - public bool CanValidlyConnectTo(SF_NodeConnector other) { - if(!CanConnectTo(other)) - return false; - - if(this.conType == ConType.cInput) - return SFNCG_Arithmetic.CompatibleTypes( this.valueTypeDefault, other.valueType ); - else - return SFNCG_Arithmetic.CompatibleTypes( other.valueTypeDefault, this.valueType ); - - - } - - - public void TryMakeConnection() { - - if(SF_NodeConnector.pendingConnectionSource == null) - return; - - if( !CanConnectTo( SF_NodeConnector.pendingConnectionSource ) ) { - return; // TODO: Display message - } - - LinkTo( SF_NodeConnector.pendingConnectionSource,LinkingMethod.Default, registerUndo:true ); - - SF_NodeConnector.pendingConnectionSource = null; - } - - public void ThrowLinkError() { - Debug.LogError( "Attempt to connect invalid types" ); - } - - - - - public void ResetValueType() { - //Debug.Log("Resetting value type on " + this.label); - valueType = valueTypeDefault; - } - - public void LinkTo( SF_NodeConnector other, LinkingMethod linkMethod = LinkingMethod.Default, bool registerUndo = false ) { - - - - - if( this.conType == other.conType ) { - Debug.Log("Invalid IO linking: " + other.node.nodeName + " con: " + other.label + " thisnode: " + node.nodeName + " con: " + this.label); - return; - } - - if( conType == ConType.cInput ) { - other.LinkTo( this, linkMethod, registerUndo ); // Reverse connection if dragged other way - return; - } - - if(this.node.isGhost) - linkMethod = LinkingMethod.NoUpdate; - - // Other is the input node - // [other] <---- [this] - - bool registeredUndo = false; - - - // Verify, if default. Not if it's without update - if( linkMethod == LinkingMethod.Default ) { - - if( !SFNCG_Arithmetic.CompatibleTypes( other.valueTypeDefault, this.valueType ) ) { - Debug.LogError( "Incompatible types: Type A: " + other.valueTypeDefault + " Type B: " + this.valueType ); - //ThrowLinkError(); - //other.ResetValueType(); - return; - } - - if(registerUndo && !registeredUndo){ - - string undoMsg = "connect " + other.node.nodeName + "["+other.label+"] <-- ["+ this.label +"]" + this.node.nodeName; - - this.node.UndoRecord(undoMsg); - other.node.UndoRecord(undoMsg); - - //Undo.RecordObject(this,undoMsg); - //Undo.RecordObject(other,undoMsg); - - registeredUndo = true; - - } - - // In case there's an existing one - if( other.IsConnected() ) - other.Disconnect(true,false,reconnection:true); - - } - - if(registerUndo && !registeredUndo){ - string undoMsg = "connect " + other.node.nodeName + "["+other.label+"] <-- ["+ this.label +"]" + this.node.nodeName; - this.node.UndoRecord(undoMsg); - other.node.UndoRecord(undoMsg); - //Undo.RecordObject(this,undoMsg); - //Undo.RecordObject(other,undoMsg); - - registeredUndo = true; - } - - //Debug.Log("Linking " + other.node.nodeName + "["+other.label+"] <--- ["+ this.label +"]" + this.node.nodeName ); - - - - // Connect - other.valueType = this.valueType; - other.inputCon = this; - - - - // TODO: Force types in connector group! - //if( linkMethod == LinkingMethod.Default ) { - if( other.node.conGroup != null ) - other.node.conGroup.Refresh(); - //} - - - this.outputCons.Add( other ); - - other.SetVisChildVisible(true); - - if( linkMethod == LinkingMethod.Default ) { - node.RefreshValue();// OnUpdateNode( NodeUpdateType.Soft, false ); // Update this value - other.node.OnUpdateNode(); // Update other, and following - - } - - other.conLine.ReconstructShapes(); - - } - - - // This is currenly meant to propagate its value type to its link partner - public void SetValueType(ValueType vt){ - if(conType == ConType.cOutput && this.valueType != vt){ - - this.valueType = vt; - foreach(SF_NodeConnector con in this.outputCons){ - if(con.valueTypeDefault == ValueType.VTvPending){ - con.valueType = this.valueType; - con.node.OnUpdateNode(); - } - } - } - } - - public void SetValueTypeAndDefault( ValueType vt ) { - SetValueType( vt ); - valueType = vt; - valueTypeDefault = vt; - } - - public bool IsConnectionHovering(bool world = true){ - - bool active = enableState == EnableState.Enabled && availableState == AvailableState.Available; - //bool free = !IsConnected(); - bool hoveringPending = SF_NodeConnector.IsConnecting() && Hovering(world) && !UnconnectableToPending(); - - return (active && /*free &&*/ hoveringPending); - } - - public bool IsDeleteHovering(bool world = true){ - - if(!IsConnected()) - return false; // There's no link to delete to begin with - if(!Hovering(world)) - return false; // You aren't hovering at all - if(node.editor.nodeView.selection.boxSelecting) - return false; // You're in the middle of a box selection - if(node.editor.nodeView.isCutting) - return false; // We're already doing a cut-deletion, don't mark it for click-deletion - - if(SF_NodeConnector.IsConnecting()){ - - if(SF_NodeConnector.pendingConnectionSource == this) - return false; // Hovering the pending connection, don't mark it for delete - - if(!UnconnectableToPending() && this.conType == ConType.cInput) - return true; // This will be a relink-delete! - } - - - - if(SF_GUI.HoldingAlt()) - return true; // RMB delete - - - return false; - } - - public Color GetConnectorColorRGB() { - - - bool delHov = IsDeleteHovering(); - bool conHov = IsConnectionHovering(true); - - if(conHov){ - return Color.green; - } else if(delHov){ - return Color.red; - } - - if( enableState != EnableState.Enabled ) - return Color.gray; - - //if( IsConnected() ) // DEBUG - // return Color.yellow; - - Color unselected = color; - - if( node.selected ) - return SF_GUI.selectionColor;//Color.Lerp(unselected, SF_GUI.selectionColor, 0.75f); - return unselected; - } - - public Color GetConnectorColor() { - Color c = GetConnectorColorRGB(); - if( DisplayAsValid() ) - c.a = SF_GUI.ProSkin ? 1f : 0.5f; - else - c.a = SF_GUI.ProSkin ? 0.25f : 0.125f; - return c; - } - - - public bool DisplayAsValid() { - return enableState == EnableState.Enabled && availableState == AvailableState.Available && (!UnconnectableToPending() || this == SF_NodeConnector.pendingConnectionSource); - } - - bool canValidlyConnectToPending = false; - - public void UpdateCanValidlyConnectToPending() { - canValidlyConnectToPending = CanValidlyConnectTo( SF_NodeConnector.pendingConnectionSource ); - } - - public bool UnconnectableToPending() { - if(enableState != EnableState.Enabled || availableState == AvailableState.Unavailable) - return true; - if(SF_NodeConnector.pendingConnectionSource == this) - return true; - if( SF_NodeConnector.pendingConnectionSource != null ) { - if( SF_NodeConnector.pendingConnectionSource != this ) - if( !canValidlyConnectToPending ) - return true; - } - return false; - } - - - public bool ValidlyPendingChild(){ - return (IsChild() && visControlParent.IsConnected() && CanConnectToPending() && enableState == EnableState.Enabled); - } - - public bool CanConnectToPending(){ - return SF_NodeConnector.pendingConnectionSource != null && !UnconnectableToPending(); - } - - public bool IsChild(){ - return visControlParent != null; - } - - - - - public bool ShouldBeInvisible(){ - bool hidden = enableState == EnableState.Hidden; - - bool isUnconnectedChild = IsChild() && !IsConnected(); - bool isHiddenExtraConnector = isUnconnectedChild && !ValidlyPendingChild(); - - if( isUnconnectedChild && node.ExhaustedOptionalInputs() ) - return true; - - if( hidden ){ - return true; - } else if(isHiddenExtraConnector){ // If it's flagged as enabled, but is an unconnected child, only draw it when it's either connected or has a pending valid connection - return true; - } else if( node.editor.ps.catLighting.renderPath == SFPSC_Lighting.RenderPath.Deferred && !node.availableInDeferredPrePass){ - if(IsConnected()){ - Disconnect(true); - } - return true; - } - return false; - } - - public const int defaultConnectorWidth = 25; - - public void Draw( Vector2 pos ) { - - bool isUnconnectedChild = IsChild() && !IsConnected(); - - if(ShouldBeInvisible()) - return; - - - // Don't draw if invalid - - rect = new Rect( pos.x, pos.y, defaultConnectorWidth, 14 ); - - if( conType == ConType.cInput ) { - rect.x -= node.rect.width + rect.width; - } - - if( conType == ConType.cInput ) { - rect.xMin -= node.extraWidthInput; - } else { - rect.width += node.extraWidthOutput; - } - - - - //GUIStyle cStyle = conType == ConType.cInput ? EditorStyles.miniButtonRight : EditorStyles.miniButtonLeft; - //GUIStyle cStyle = (GUIStyle)"ShurikenModuleTitle"; - - - - - - if(!DisplayLock()){ - GUI.color = GetConnectorColor(); - GUI.Box( rect, string.Empty ); - if( SF_GUI.ProSkin ) { - GUI.Box( rect, string.Empty ); - GUI.Box( rect, string.Empty ); - GUI.Box( rect, string.Empty ); - } - } - - if( SF_GUI.ProSkin ){ - GUI.color = DisplayAsValid() ? Color.white : Color.grey; - } else { - GUI.color = DisplayAsValid() ? Color.white : new Color(1f,1f,1f,0.25f); - } - - bool showConditionA = !(Hovering(true) && canValidlyConnectToPending); - bool showConditionB = !(SF_NodeConnector.pendingConnectionSource == this); - - if( HasErrors() && (showConditionA && showConditionB) ) { - Rect iconRect = new Rect( rect ); - iconRect.x -= SF_Styles.IconErrorSmall.width ; - iconRect.height = iconRect.width = 16; - iconRect.y -= 1; - GUI.DrawTexture( iconRect, SF_Styles.IconErrorSmall ); - } - - - - Rect labelRect = rect; - - - if( SF_Debug.nodes ) { - Rect typeRect = rect; - typeRect.width *= 3f; - - if( conType == ConType.cInput ) { - GUI.skin.label.alignment = TextAnchor.MiddleLeft; - typeRect.x += rect.width; - } else { - GUI.skin.label.alignment = TextAnchor.MiddleRight; - typeRect.x -= typeRect.width; - } - - GUI.Label( typeRect, valueType.ToString() ); - GUI.skin.label.alignment = TextAnchor.MiddleLeft; - } - - - - - if( outerLabel ) { - labelRect.width = node.rect.width; - //labelRect.x -= EditorStyles.miniLabel.CalcSize( new GUIContent( label ) ).x + 4; - labelRect.x += rect.width + 4; - } - - - - GUI.Label( labelRect, isUnconnectedChild ? "+" : label,isUnconnectedChild ? EditorStyles.boldLabel : SF_Styles.MiniLabelOverflow ); - - - if(DisplayLock()){ - Rect lockRect = labelRect; - lockRect.xMin = node.rect.xMin-lockRect.height-3; - lockRect.xMax = node.rect.xMax; - lockRect.yMin -= 3; - lockRect.yMax += 4; - GUI.color = new Color(0.8f,0.8f,0.8f,0.3f); - GUI.Box(lockRect,string.Empty,GUI.skin.button); - GUI.color = Color.white; - //GUI.color = Color.white; - //GUI.Label(lockRect,"//"); - //GUI.drawe - //GUI.Box(lockRect, "", ); - if(Event.current.type == EventType.repaint){ - SF_GUI.DrawLock(lockRect.PadTop(4),"Unavailable when using deferred rendering", TextAlignment.Right ); - - } - - } - - - CheckIfDeleted(); - - GUI.color = Color.white; - } - - - public SF_NodeConnector SetAvailable( bool b ) { - availableState = b ? AvailableState.Available : AvailableState.Unavailable; - return this; - } - - public bool HasErrors() { - if( required && !IsConnectedAndEnabled() ) { - return true; - } - return false; - } - - - - - - - } +using UnityEngine; +using UnityEditor; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using System; + + +namespace ShaderForge { + + public enum ConType { cInput, cOutput }; + public enum OutChannel { RGB, R, G, B, A, All, RG }; + + public enum EnableState { Enabled, Disabled, Hidden }; + public enum AvailableState { Available, Unavailable }; + + public enum LinkingMethod { Default, NoUpdate }; + + public enum ValueType { VTvPending, VTv1, VTv2, VTv3, VTv4, VTv1v2, VTv1v3, VTv1v4, TexAsset, VTm4x4, VTv4m4x4 }; + + [System.Serializable] + public class SF_NodeConnector : ScriptableObject { + + + public static SF_NodeConnector pendingConnectionSource = null; + public AvailableState availableState = AvailableState.Available; + public EnableState enableState = EnableState.Enabled; + public bool required = false; + + public ConType conType; + public OutChannel outputChannel = OutChannel.All; + public ValueType valueType; + public ValueType valueTypeDefault; + [SerializeField] + private CustomValueType customValueType; + public CustomValueType CustomValueType{ // This is used when dealing with custom nodes + get{ + return customValueType; + } + set{ + CustomValueType cvtBef = customValueType; + customValueType = value; + bool changed = (customValueType != cvtBef); + if(changed){ + switch(customValueType){ + case CustomValueType.Float: + this.TypecastTo(1).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv1); + break; + case CustomValueType.Float2: + this.TypecastTo(2).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv2); + break; + case CustomValueType.Float3: + this.TypecastTo(3).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv3); + break; + case CustomValueType.Float4: + this.TypecastTo(4).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv4); + break; + case CustomValueType.Half: + this.TypecastTo(1).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv1); + break; + case CustomValueType.Half2: + this.TypecastTo(2).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv2); + break; + case CustomValueType.Half3: + this.TypecastTo(3).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv3); + break; + case CustomValueType.Half4: + this.TypecastTo(4).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv4); + break; + case CustomValueType.Fixed: + this.TypecastTo(1).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv1); + break; + case CustomValueType.Fixed2: + this.TypecastTo(2).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv2); + break; + case CustomValueType.Fixed3: + this.TypecastTo(3).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv3); + break; + case CustomValueType.Fixed4: + this.TypecastTo(4).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTv4); + break; + case CustomValueType.Sampler2D: + this.TypecastTo(0).WithColor(SF_Node.colorExposed).SetValueType(this.valueTypeDefault = ValueType.TexAsset); + break; + case CustomValueType.Matrix4x4: + this.TypecastTo(0).WithColor(SF_NodeConnector.colorEnabledDefault).SetValueType(this.valueTypeDefault = ValueType.VTm4x4); + break; + } + + } + + + } + + } + public string label; + public SF_NodeConnector inputCon; + public SF_NodeConnectionLine conLine; + public List outputCons; + public SF_Node node; + public bool outerLabel = false; + public bool displayLockIfDeferredPrePassIsOn = false; + public Rect rect; + public int typecastTarget = 0; // 0 = No typecasting + + public int usageCount = 1; + + public string strID = null; + + [SerializeField] + private ShaderProgram forcedProgram = ShaderProgram.Any; + + [SerializeField] + private List skipPasses; + public List SkipPasses{ + get{ + if(skipPasses == null) + skipPasses = new List(); + return skipPasses; + } + } + + public static Color colorEnabledDefault{ + get{ + if(SF_GUI.ProSkin) + return new Color( 0.6f, 0.6f, 0.6f ); + else + return new Color( 1f, 1f, 1f ); + } + } + public Color color; + public string unconnectedEvaluationValue = null; + + public void OnEnable() { + base.hideFlags = HideFlags.HideAndDontSave; + if(color == default(Color)) + color = colorEnabledDefault; + } + + public SF_NodeConnector() { + //Debug.Log("NODE CONNECTION "); + } + + + public static SF_NodeConnector Create( SF_Node node, string strID, string label, ConType conType, ValueType valueType, bool outerLabel = false, string unconnectedEvaluationValue = null ) { + return ScriptableObject.CreateInstance< SF_NodeConnector>().Initialize(node, strID, label, conType,valueType, outerLabel, unconnectedEvaluationValue); + } + + public SF_NodeConnector Initialize( SF_Node node, string strID, string label, ConType conType, ValueType valueType, bool outerLabel = false, string unconnectedEvaluationValue = null ) { + this.node = node; + this.strID = strID; + this.label = label; + this.conType = conType; + + if(conType == ConType.cInput){ + conLine = ScriptableObject.CreateInstance().Initialize(node.editor, this); + } + + this.valueType = this.valueTypeDefault = valueType; + this.outerLabel = outerLabel; + this.unconnectedEvaluationValue = unconnectedEvaluationValue; + outputCons = new List(); + return this; + } + + // Chaining + public SF_NodeConnector SetRequired( bool b ) { + required = b; + return this; + } + public SF_NodeConnector WithColor( Color c ) { + color = c; + return this; + } + public SF_NodeConnector Outputting( OutChannel channel ) { + outputChannel = channel; + return this; + } + public SF_NodeConnector TypecastTo(int target) { + typecastTarget = target; + //Debug.Log("Typecasting " + label + " to " + target); + return this; + } + public SF_NodeConnector WithUseCount(int count){ + usageCount = count; + return this; + } + public SF_NodeConnector Skip( params PassType[] passes ) { + SkipPasses.AddRange( passes ); + return this; + } + public SF_NodeConnector ForceBlock(ShaderProgram block) { + forcedProgram = block; + return this; + } + public SF_NodeConnector DisplayLockIfDeferredPrePassIsOn(){ + displayLockIfDeferredPrePassIsOn = true; + return this; + } + + public SF_NodeConnector visControlChild; + public SF_NodeConnector visControlParent; + public SF_NodeConnector SetVisChild(SF_NodeConnector child){ // Used to make enable-chains (Connecting B enables the C connector etc) + visControlChild = child; + child.visControlParent = this; + child.enableState = EnableState.Hidden; + return this; + } + + public void SetVisChildVisible(bool visible){ + + if(visControlChild == null){ + return; + } + + EnableState targetState = visible ? EnableState.Enabled : EnableState.Hidden; + + if(visControlChild.enableState == targetState) + return; // Don't do anything if unchanged + + + if(!visible){ + visControlChild.Disconnect(true,false); // Disconnect if it goes invisible when linked + } + + visControlChild.enableState = targetState; + + } + + + + + public string ghostType = null; + public string ghostLinkStrId = null; + public SF_NodeConnector SetGhostNodeLink( Type ghostType, string ghostLinkStrId ) { + this.ghostType = ghostType.FullName; + this.ghostLinkStrId = ghostLinkStrId; + return this; + } + + + // Ghost nodes are default values assigned to unconnected node connectors + // They are instantiated when the shader is being evaluated, and then removed again + public void DefineGhostIfNeeded(ref List ghosts) { + + + // Skip nodes without ghosts + if( string.IsNullOrEmpty(ghostType) ) { + return; + } + + + if( IsConnected() ) // Skip already connected ones + return; + + + SF_Node ghost = null; + + // Search for existing ghost node + foreach( SF_Node exisGhost in ghosts ) { + if( exisGhost.GetType().FullName == ghostType ) { // TODO: Make sure serialized data matches too! + // Found! + ghost = exisGhost; + + if(SF_Debug.ghostNodes) + Debug.Log("Found matching existing ghost"); + break; + } + } + + // If no ghost was found, create one + if( ghost == null ) { + ghost = node.editor.AddNode( ghostType ); + ghost.isGhost = true; + ghosts.Add( ghost ); + if(SF_Debug.ghostNodes){ + Debug.Log("Adding ghost " + ghostType + " with connection count " + ghost.connectors.Length); + Debug.Log("Linked to " + node.nodeName + "["+this.label+"]" ); + Debug.Log("Ghost Count = " + node.editor.shaderEvaluator.ghostNodes.Count); + } + //Debug.Log( "Adding ghost of type " + ghostType ); + //Debug.Log( "Ghost in main node list = " + node.editor.nodes.Contains( ghost ) ); + } + + // Just to make sure... + if( ghost == null ) { + Debug.LogError( "Ghost is null, this should really not happen. Tried to find type " + ghostType ); + } + + // By this point, ghost is surely an existing node! + // Link it: + + //Debug.Log( "Linking ghost of type " + ghostType + " on " + this.node.nodeName + " Is COnnected = " + IsConnected()); + ghost.status.leadsToFinal = true; + ghost[ghostLinkStrId].LinkTo(this,LinkingMethod.NoUpdate); + + } + + // Get the index of this connector in the node array + public string GetIndex() { + if( this.HasID() ) + return strID; + for( int i = 0; i < node.connectors.Length; i++ ) + if( node.connectors[i] == this ) + return i.ToString(); + Debug.LogError( "Couldn't find index of a connector in " + node.nodeName ); + return "0"; + } + + public bool DisplayLock(){ + return displayLockIfDeferredPrePassIsOn && node.editor.ps.catLighting.renderPath == SFPSC_Lighting.RenderPath.Deferred; + } + + public bool HasID() { + return !string.IsNullOrEmpty( strID ); + } + + + public ShaderProgram GetProgram() { + if( forcedProgram == ShaderProgram.Any ) + return node.program; + return forcedProgram; + } + + + public int GetCompCount() { + + + if( conType == ConType.cInput){ + if( IsConnected() ) { + return inputCon.GetCompCount(); + } else { + int cc = 0; + if(SF_Tools.CompCountOf(valueType, out cc)){ + return cc; + } else { + Debug.LogWarning("[Shader Forge] - invalid component count in ["+label+"] of " + node.name + ""); + return node.texture.CompCount; // This is super weird, shouldn't read from the max comp count, read from the connection type instead + } + } + + } + + + + OutChannel oc = outputChannel; + if( oc == OutChannel.All ){ + + int cc = 0; + if(SF_Tools.CompCountOf(valueType, out cc)){ + return cc; + } else { + Debug.LogWarning("[Shader Forge] - invalid component count in ["+label+"] of " + node.name + ""); + return node.texture.CompCount; // This is super weird, shouldn't read from the max comp count, read from the connection type instead + } + + } else if( oc == OutChannel.RGB ) + return 3; + if( oc == OutChannel.RG ) + return 2; + + int custCount = SF_Tools.ComponentCountOf(customValueType); + if(custCount != 0){ + return custCount; + } + + return 1; + } + + + + + public string Evaluate() { + + string s = node.PreEvaluate(); + + switch( outputChannel ) { + case OutChannel.RGB: + return s + ".rgb"; + case OutChannel.RG: + return s + ".rg"; + case OutChannel.R: + return s + ".r"; + case OutChannel.G: + return s + ".g"; + case OutChannel.B: + return s + ".b"; + case OutChannel.A: + return s + ".a"; + } + + return s; + + } + + + public bool IsConnected() { + if( conType == ConType.cInput ) { + return inputCon != null; + } else { + if( outputCons == null ) + return false; + return ( outputCons.Count != 0 ); + } + + } + + public bool IsConnectedAndEnabled() { + return IsConnected() && (enableState == EnableState.Enabled || enableState == EnableState.Hidden); + } + + public bool IsConnectedEnabledAndAvailable(){ + return IsConnected() && ( enableState == EnableState.Enabled || enableState == EnableState.Hidden ) && availableState == AvailableState.Available; + } + + public bool IsConnectedEnabledAndAvailableInThisPass(PassType pass){ + if(SkipPasses.Contains(pass)){ + return false; + } + return IsConnectedEnabledAndAvailable(); + } + + + + public bool ConnectionInProgress() { + return ( SF_NodeConnector.pendingConnectionSource == this && IsConnecting() ); + } + + public static bool IsConnecting() { + if( SF_NodeConnector.pendingConnectionSource == null ) + return false; + /*else if( string.IsNullOrEmpty( SF_NodeConnection.pendingConnectionSource.node.name ) ) { + SF_NodeConnection.pendingConnectionSource=null; + return false; + }*/ + + return true; + } + + public bool Hovering(bool world) { + if( !node.editor.nodeView.MouseInsideNodeView(offset:world) ) + return false; + Rect r = SF_Tools.GetExpanded( rect, SF_Tools.connectorMargin ); + return r.Contains( world ? Event.current.mousePosition : MousePos() ); + } + + + + public bool Clicked(int button = 0) { + + + bool hovering = Hovering(world:false); + bool click = ( Event.current.type == EventType.MouseDown && Event.current.button == button ); + bool clickedCont = hovering && click; + //bool clickedCont=cont&&click; + //Debug.Log(); + return clickedCont; + } + + public bool Released() { + bool cont = Hovering(world:false); + bool release = ( Event.current.type == EventType.MouseUp ); + return cont && release; + } + + + public void OnClick() { + Debug.Log( "Clicked Button" ); + } + + public Vector2 MousePos() { + if( node.editor == null ) + return Vector2.zero; + return node.editor.nodeView.GetNodeSpaceMousePos(); + } + + // TODO: Pass nodes into actual line draw thingy + public float GetConnectionCenterY( SF_NodeConnector cA, SF_NodeConnector cB ) { + Rect a = cA.node.rect; + Rect b = cB.node.rect; + if( cA.GetConnectionPoint().y > cB.GetConnectionPoint().y ) + return 0.5f * ( a.yMax + b.yMin ); + else + return 0.5f * ( b.yMax + a.yMin ); + } + + public void CheckConnection( SF_Editor editor ) { + + + + if(ShouldBeInvisible()) + return; + + + + + if( conType == ConType.cInput && Event.current.type == EventType.Repaint ) { + DrawConnection( editor ); + } + + if( enableState == EnableState.Disabled || availableState == AvailableState.Unavailable ) + return; + + if( Clicked() ) { + SF_NodeConnector.pendingConnectionSource = this; + editor.nodeView.selection.DeselectAll(registerUndo:false); + foreach( SF_Node iNode in editor.nodes ) { + foreach( SF_NodeConnector con in iNode.connectors ) { + con.UpdateCanValidlyConnectToPending(); + } + } + Event.current.Use(); + } + + if( Clicked(1) && SF_GUI.HoldingAlt()){ + Disconnect(); + } + + if( !ConnectionInProgress() ) { + if( Released() ) + TryMakeConnection(); + return; + } + + + // Active connection: + + editor.ResetRunningOutdatedTimer(); + + //if(Event.current.type == EventType.repaint) + //node.Repaint(); + + + bool hovering = false; + foreach(SF_Node n in editor.nodes){ + foreach(SF_NodeConnector con in n.connectors){ + if(con.CanConnectToPending() && con.Hovering(false)){ + hovering = true; + break; + } + } + if(hovering) + break; + } + + if( Event.current.type == EventType.Repaint ) { + Color c = hovering ? Color.green : GetConnectionLineColor(); + + bool input = ( conType == ConType.cInput ); + Vector2 start = input ? GetConnectionPoint() : MousePos(); + Vector2 end = input ? MousePos() : GetConnectionPoint(); ; + + if( valueType == ValueType.VTm4x4 || valueType == ValueType.VTv4m4x4 ) { + GUILines.DrawMatrixConnection( editor, start, end, c ); + } else { + GUILines.DrawStyledConnection( editor, start, end, GetCompCount(), c ); + } + } + + + + + //Drawing.DrawLine(rect.center,MousePos(),Color.white,2,true); + + + } + + public Color GetConnectionLineColor() { + + Color def = EditorGUIUtility.isProSkin ? new Color( 1f, 1f, 1f, 0.3f ) : new Color( 0f, 0f, 0f, 0.4f ); + + + + + Color sel = SF_GUI.selectionColor; + + if( inputCon == null ) + return def; + else if( inputCon.color == SF_Node.colorExposed ) + def = SF_Node.colorExposedDark; + + if( node.selected || inputCon.node.selected ) + return sel; + + + if( !DisplayAsValid() ) + def.a = 0.1f; + + return def; + } + + void DrawConnection( SF_Editor editor ) { + + conLine.Draw(); + + /* + Vector2 a = GetConnectionPoint(); + Vector2 b = inputCon.GetConnectionPoint(); + int cc = GetCompCount(); + + + + GUILines.DrawStyledConnection( editor, a, b, cc, GetConnectionLineColor() ); + */ + + } + + public bool CanEvaluate() { + if( !IsConnectedAndEnabled() ) + if( !string.IsNullOrEmpty( unconnectedEvaluationValue ) ) + return true; + else + return false; // TODO: Something + if(conType == ConType.cInput) + if( !inputCon.node.CanEvaluate() ) + return false; + return true; + } + + public bool CanEvaluateAs( int target ) { + if( !CanEvaluate() ) + return false; + //int source = inputCon.GetCompCount(); + //if( target < source ) // TODO: Allow this? + // return false; + return true; + } + + + public string TryEvaluate() { + + //Debug.Log("TryEvaluate " + label + " typecast = " + typecastTarget); + + if( !IsConnectedAndEnabled() ) + if( !string.IsNullOrEmpty( unconnectedEvaluationValue ) ) + return unconnectedEvaluationValue; + if( !CanEvaluate() ) + return null; + + if( typecastTarget == 0 ){ + if(conType == ConType.cInput) + return inputCon.Evaluate(); + else + return Evaluate(); + } else { + //Debug.Log("Trying to evaluate node " + this.label + " on node " + this.node.nodeName); + return TryEvaluateAs( typecastTarget ); + } + + } + + public string TryEvaluateAs(int target) { + if( !CanEvaluateAs(target) ) + return null; // TODO: Throw errors etc + + int source = inputCon.GetCompCount(); + + int diff = target - source; + + + + if(diff == 0) // Same value type + return inputCon.Evaluate(); + if( diff < 0 ) { // Lowering component count, mask components + switch( target ) { + case 1: + return inputCon.Evaluate() + ".r"; + case 2: + return inputCon.Evaluate() + ".rg"; + case 3: + return inputCon.Evaluate() + ".rgb"; + } + } + + // Increasing component count: + + string cast; + + + if( source != 1 ) { // Evaluate + append zeroes + cast = "float" + target + "(" + inputCon.Evaluate(); + for( int i = 0; i < diff; i++ ) + cast += ",0.0"; + } else { + inputCon.node.DefineVariable(); + cast = "float" + target + "(" + inputCon.Evaluate(); + for( int i = 0; i < diff; i++ ) + cast += "," + inputCon.Evaluate(); + } + + + + cast += ")"; + return cast; + } + + + /* + public bool IsFocused() { + return rect.Contains( Event.current.mousePosition ); + }*/ + + public bool CheckIfDeleted() { + if( (Event.current.keyCode == KeyCode.Delete || Event.current.keyCode == KeyCode.Backspace) && Event.current.type == EventType.KeyDown && Hovering( world: true ) ) { + Disconnect(); + return true; + } + return false; + } + + + + + public bool IsDeleted() { + return ( node == null ); + } + + public void Disconnect( bool force = false, bool callback = true, bool reconnection = false ) { + + //Debug.Log( "Attempt to disconnect: " + node.name + "[" + label + "]" ); + + if( !IsConnected() ) { + //Debug.Log( "Aborted " + node.name + "[" + label + "]" ); + return; + } + + + if( conType == ConType.cInput ) { + //Debug.Log( "Input disconnecting " + node.name + "[" + label + "]" ); + ResetValueType(); + if( inputCon != null ) { + inputCon.outputCons.Remove( this ); + if(!reconnection) + SetVisChildVisible(false); // Don't hide the child if this was disconnected by reconnection + //Debug.Log( "Disconnecting " + label + "<--" + inputCon.label ); + } + inputCon = null; + if( callback && !SF_Parser.quickLoad ) + node.OnUpdateNode(); + } else { + //Debug.Log( "Output disconnecting " + node.name + "[" + label + "]" ); + SF_NodeConnector[] outputsArr = outputCons.ToArray(); + for( int i = 0; i < outputsArr.Length; i++ ) { + //Debug.Log( "Disconnecting " + outputsArr[i].label + "<--" + label ); + outputsArr[i].Disconnect( true, callback ); + } + outputCons.Clear(); + } + + // AceMatEditor.instance.CheckForBrokenConnections(); + + // node = null; // What? + } + + public Vector2 GetConnectionPoint() { + if( conType == ConType.cOutput ) + return new Vector2( rect.xMax, rect.center.y ); + else + return new Vector2( rect.xMin+1, rect.center.y ); + } + + + public bool CanConnectTo(SF_NodeConnector other) { + if( other == null ) + return false; + + if( other.node == node ) + return false; // Disallow connecting to self + + if( other.conType == this.conType ) + return false; // Disallow connecting same types (i <- i & o <- o) + + if( conType == ConType.cOutput ) { // Disallow connecting loops + if( node.IsDescendantOf( other.node ) ) { + return false; + } + } else { + if( other.node.IsDescendantOf( node ) ) { + return false; + } + } + + return true; + } + + + + public bool CanValidlyConnectTo(SF_NodeConnector other) { + if(!CanConnectTo(other)) + return false; + + if(this.conType == ConType.cInput) + return SFNCG_Arithmetic.CompatibleTypes( this.valueTypeDefault, other.valueType ); + else + return SFNCG_Arithmetic.CompatibleTypes( other.valueTypeDefault, this.valueType ); + + + } + + + public void TryMakeConnection() { + + if(SF_NodeConnector.pendingConnectionSource == null) + return; + + if( !CanConnectTo( SF_NodeConnector.pendingConnectionSource ) ) { + return; // TODO: Display message + } + + LinkTo( SF_NodeConnector.pendingConnectionSource,LinkingMethod.Default, registerUndo:true ); + + SF_NodeConnector.pendingConnectionSource = null; + } + + public void ThrowLinkError() { + Debug.LogError( "Attempt to connect invalid types" ); + } + + + + + public void ResetValueType() { + //Debug.Log("Resetting value type on " + this.label); + valueType = valueTypeDefault; + } + + public void LinkTo( SF_NodeConnector other, LinkingMethod linkMethod = LinkingMethod.Default, bool registerUndo = false ) { + + + + + if( this.conType == other.conType ) { + Debug.Log("Invalid IO linking: " + other.node.nodeName + " con: " + other.label + " thisnode: " + node.nodeName + " con: " + this.label); + return; + } + + if( conType == ConType.cInput ) { + other.LinkTo( this, linkMethod, registerUndo ); // Reverse connection if dragged other way + return; + } + + if(this.node.isGhost) + linkMethod = LinkingMethod.NoUpdate; + + // Other is the input node + // [other] <---- [this] + + bool registeredUndo = false; + + + // Verify, if default. Not if it's without update + if( linkMethod == LinkingMethod.Default ) { + + if( !SFNCG_Arithmetic.CompatibleTypes( other.valueTypeDefault, this.valueType ) ) { + Debug.LogError( "Incompatible types: Type A: " + other.valueTypeDefault + " Type B: " + this.valueType ); + //ThrowLinkError(); + //other.ResetValueType(); + return; + } + + if(registerUndo && !registeredUndo){ + + string undoMsg = "connect " + other.node.nodeName + "["+other.label+"] <-- ["+ this.label +"]" + this.node.nodeName; + + this.node.UndoRecord(undoMsg); + other.node.UndoRecord(undoMsg); + + //Undo.RecordObject(this,undoMsg); + //Undo.RecordObject(other,undoMsg); + + registeredUndo = true; + + } + + // In case there's an existing one + if( other.IsConnected() ) + other.Disconnect(true,false,reconnection:true); + + } + + if(registerUndo && !registeredUndo){ + string undoMsg = "connect " + other.node.nodeName + "["+other.label+"] <-- ["+ this.label +"]" + this.node.nodeName; + this.node.UndoRecord(undoMsg); + other.node.UndoRecord(undoMsg); + //Undo.RecordObject(this,undoMsg); + //Undo.RecordObject(other,undoMsg); + + registeredUndo = true; + } + + //Debug.Log("Linking " + other.node.nodeName + "["+other.label+"] <--- ["+ this.label +"]" + this.node.nodeName ); + + + + // Connect + other.valueType = this.valueType; + other.inputCon = this; + + + + // TODO: Force types in connector group! + //if( linkMethod == LinkingMethod.Default ) { + if( other.node.conGroup != null ) + other.node.conGroup.Refresh(); + //} + + + this.outputCons.Add( other ); + + other.SetVisChildVisible(true); + + if( linkMethod == LinkingMethod.Default ) { + node.RefreshValue();// OnUpdateNode( NodeUpdateType.Soft, false ); // Update this value + other.node.OnUpdateNode(); // Update other, and following + + } + + other.conLine.ReconstructShapes(); + + } + + + // This is currenly meant to propagate its value type to its link partner + public void SetValueType(ValueType vt){ + if(conType == ConType.cOutput && this.valueType != vt){ + + this.valueType = vt; + foreach(SF_NodeConnector con in this.outputCons){ + if(con.valueTypeDefault == ValueType.VTvPending){ + con.valueType = this.valueType; + con.node.OnUpdateNode(); + } + } + } + } + + public void SetValueTypeAndDefault( ValueType vt ) { + SetValueType( vt ); + valueType = vt; + valueTypeDefault = vt; + } + + public bool IsConnectionHovering(bool world = true){ + + bool active = enableState == EnableState.Enabled && availableState == AvailableState.Available; + //bool free = !IsConnected(); + bool hoveringPending = SF_NodeConnector.IsConnecting() && Hovering(world) && !UnconnectableToPending(); + + return (active && /*free &&*/ hoveringPending); + } + + public bool IsDeleteHovering(bool world = true){ + + if(!IsConnected()) + return false; // There's no link to delete to begin with + if(!Hovering(world)) + return false; // You aren't hovering at all + if(node.editor.nodeView.selection.boxSelecting) + return false; // You're in the middle of a box selection + if(node.editor.nodeView.isCutting) + return false; // We're already doing a cut-deletion, don't mark it for click-deletion + + if(SF_NodeConnector.IsConnecting()){ + + if(SF_NodeConnector.pendingConnectionSource == this) + return false; // Hovering the pending connection, don't mark it for delete + + if(!UnconnectableToPending() && this.conType == ConType.cInput) + return true; // This will be a relink-delete! + } + + + + if(SF_GUI.HoldingAlt()) + return true; // RMB delete + + + return false; + } + + public Color GetConnectorColorRGB() { + + + bool delHov = IsDeleteHovering(); + bool conHov = IsConnectionHovering(true); + + if(conHov){ + return Color.green; + } else if(delHov){ + return Color.red; + } + + if( enableState != EnableState.Enabled ) + return Color.gray; + + //if( IsConnected() ) // DEBUG + // return Color.yellow; + + Color unselected = color; + + if( node.selected ) + return SF_GUI.selectionColor;//Color.Lerp(unselected, SF_GUI.selectionColor, 0.75f); + return unselected; + } + + public Color GetConnectorColor() { + Color c = GetConnectorColorRGB(); + if( DisplayAsValid() ) + c.a = SF_GUI.ProSkin ? 1f : 0.5f; + else + c.a = SF_GUI.ProSkin ? 0.25f : 0.125f; + return c; + } + + + public bool DisplayAsValid() { + return enableState == EnableState.Enabled && availableState == AvailableState.Available && (!UnconnectableToPending() || this == SF_NodeConnector.pendingConnectionSource); + } + + bool canValidlyConnectToPending = false; + + public void UpdateCanValidlyConnectToPending() { + canValidlyConnectToPending = CanValidlyConnectTo( SF_NodeConnector.pendingConnectionSource ); + } + + public bool UnconnectableToPending() { + if(enableState != EnableState.Enabled || availableState == AvailableState.Unavailable) + return true; + if(SF_NodeConnector.pendingConnectionSource == this) + return true; + if( SF_NodeConnector.pendingConnectionSource != null ) { + if( SF_NodeConnector.pendingConnectionSource != this ) + if( !canValidlyConnectToPending ) + return true; + } + return false; + } + + + public bool ValidlyPendingChild(){ + return (IsChild() && visControlParent.IsConnected() && CanConnectToPending() && enableState == EnableState.Enabled); + } + + public bool CanConnectToPending(){ + return SF_NodeConnector.pendingConnectionSource != null && !UnconnectableToPending(); + } + + public bool IsChild(){ + return visControlParent != null; + } + + + + + public bool ShouldBeInvisible(){ + bool hidden = enableState == EnableState.Hidden; + + bool isUnconnectedChild = IsChild() && !IsConnected(); + bool isHiddenExtraConnector = isUnconnectedChild && !ValidlyPendingChild(); + + if( isUnconnectedChild && node.ExhaustedOptionalInputs() ) + return true; + + if( hidden ){ + return true; + } else if(isHiddenExtraConnector){ // If it's flagged as enabled, but is an unconnected child, only draw it when it's either connected or has a pending valid connection + return true; + } else if( node.editor.ps.catLighting.renderPath == SFPSC_Lighting.RenderPath.Deferred && !node.availableInDeferredPrePass){ + if(IsConnected()){ + Disconnect(true); + } + return true; + } + return false; + } + + public const int defaultConnectorWidth = 25; + + public void Draw( Vector2 pos ) { + + bool isUnconnectedChild = IsChild() && !IsConnected(); + + if(ShouldBeInvisible()) + return; + + + // Don't draw if invalid + + rect = new Rect( pos.x, pos.y, defaultConnectorWidth, 14 ); + + if( conType == ConType.cInput ) { + rect.x -= node.rect.width + rect.width; + } + + if( conType == ConType.cInput ) { + rect.xMin -= node.extraWidthInput; + } else { + rect.width += node.extraWidthOutput; + } + + + + //GUIStyle cStyle = conType == ConType.cInput ? EditorStyles.miniButtonRight : EditorStyles.miniButtonLeft; + //GUIStyle cStyle = (GUIStyle)"ShurikenModuleTitle"; + + + + + + if(!DisplayLock()){ + GUI.color = GetConnectorColor(); + GUI.Box( rect, string.Empty ); + if( SF_GUI.ProSkin ) { + GUI.Box( rect, string.Empty ); + GUI.Box( rect, string.Empty ); + GUI.Box( rect, string.Empty ); + } + } + + if( SF_GUI.ProSkin ){ + GUI.color = DisplayAsValid() ? Color.white : Color.grey; + } else { + GUI.color = DisplayAsValid() ? Color.white : new Color(1f,1f,1f,0.25f); + } + + bool showConditionA = !(Hovering(true) && canValidlyConnectToPending); + bool showConditionB = !(SF_NodeConnector.pendingConnectionSource == this); + + if( HasErrors() && (showConditionA && showConditionB) ) { + Rect iconRect = new Rect( rect ); + iconRect.x -= SF_Styles.IconErrorSmall.width ; + iconRect.height = iconRect.width = 16; + iconRect.y -= 1; + GUI.DrawTexture( iconRect, SF_Styles.IconErrorSmall ); + } + + + + Rect labelRect = rect; + + + if( SF_Debug.nodes ) { + Rect typeRect = rect; + typeRect.width *= 3f; + + if( conType == ConType.cInput ) { + GUI.skin.label.alignment = TextAnchor.MiddleLeft; + typeRect.x += rect.width; + } else { + GUI.skin.label.alignment = TextAnchor.MiddleRight; + typeRect.x -= typeRect.width; + } + + GUI.Label( typeRect, valueType.ToString() ); + GUI.skin.label.alignment = TextAnchor.MiddleLeft; + } + + + + + if( outerLabel ) { + labelRect.width = node.rect.width; + //labelRect.x -= EditorStyles.miniLabel.CalcSize( new GUIContent( label ) ).x + 4; + labelRect.x += rect.width + 4; + } + + + + GUI.Label( labelRect, isUnconnectedChild ? "+" : label,isUnconnectedChild ? EditorStyles.boldLabel : SF_Styles.MiniLabelOverflow ); + + + if(DisplayLock()){ + Rect lockRect = labelRect; + lockRect.xMin = node.rect.xMin-lockRect.height-3; + lockRect.xMax = node.rect.xMax; + lockRect.yMin -= 3; + lockRect.yMax += 4; + GUI.color = new Color(0.8f,0.8f,0.8f,0.3f); + GUI.Box(lockRect,string.Empty,GUI.skin.button); + GUI.color = Color.white; + //GUI.color = Color.white; + //GUI.Label(lockRect,"//"); + //GUI.drawe + //GUI.Box(lockRect, "", ); + if(Event.current.type == EventType.Repaint){ + SF_GUI.DrawLock(lockRect.PadTop(4),"Unavailable when using deferred rendering", TextAlignment.Right ); + + } + + } + + + CheckIfDeleted(); + + GUI.color = Color.white; + } + + + public SF_NodeConnector SetAvailable( bool b ) { + availableState = b ? AvailableState.Available : AvailableState.Unavailable; + return this; + } + + public bool HasErrors() { + if( required && !IsConnectedAndEnabled() ) { + return true; + } + return false; + } + + + + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeConnector.cs.meta b/Editor/Code/SF_NodeConnector.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeConnector.cs.meta rename to Editor/Code/SF_NodeConnector.cs.meta index 3da77e20..816b8ae9 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeConnector.cs.meta +++ b/Editor/Code/SF_NodeConnector.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: b6b55696f91bd42a186f23376406d9d6 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: b6b55696f91bd42a186f23376406d9d6 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodePreview.cs b/Editor/Code/SF_NodePreview.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodePreview.cs rename to Editor/Code/SF_NodePreview.cs index 0760d8d3..ab886cdb --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodePreview.cs +++ b/Editor/Code/SF_NodePreview.cs @@ -1,375 +1,375 @@ -using UnityEngine; -using System.Collections; -using System.Collections.Generic; -using UnityEditor; -using System; -using System.Linq; - -namespace ShaderForge { - [System.Serializable] - public class SF_NodePreview : ScriptableObject { - - public static int R = 0; - public static int G = 1; - public static int B = 2; - public static int A = 3; - - // The color representation - public RenderTexture texture; // RGBA combined - public RenderTexture[] textureChannels; // RGBA separated, created on-demand - - // Icons, if any - public Texture2D[] icons; - public Texture2D iconActive; - - public void SetIconId(int id){ - iconActive = icons[id]; - } - - - public Color iconColor = Color.white; - - // Whether or not it's uniform - // Vectors (Uniform = Same color regardless of position) - // Textures (Non-Uniform = Different color based on position)) - public bool uniform = false; - public bool coloredAlphaOverlay = false; // Used to render two images on top of eachother, as in the fog node - //public float[] dataUniform; - public Vector4 dataUniform; - public Color dataUniformColor{ - get { return (Color)dataUniform; } - } - - // My material node, used to get operators - public SF_Node node; - - // The amount of components used (1-4) // THIS SHOULDN'T BE USED. USE CONNECTOR COMP COUNT INSTEAD - [SerializeField] - private int compCount = 1; - public int CompCount { - get { return compCount; } - set { - if(compCount == value) - return; - if( value > 4 || value < 1 ) { - //Debug.LogError( "Component count out of range: " + value + " on " + node.nodeName + " " + node.id ); - compCount = 4; - } else { - compCount = value; - } - } - } - - - - public SF_NodePreview() { - } - - public void OnEnable() { - base.hideFlags = HideFlags.HideAndDontSave; - - if( texture == null ) { - InitializeTexture(); - if(node) - node.RefreshValue(); - } - - } - - public RenderTexture CreateNewNodeRT() { - RenderTexture rt = new RenderTexture( SF_Node.NODE_SIZE, SF_Node.NODE_SIZE, 0, RenderTextureFormat.ARGBFloat, RenderTextureReadWrite.Linear ); // TODO: Gamma/Linear? - rt.wrapMode = TextureWrapMode.Clamp; - rt.hideFlags = HideFlags.HideAndDontSave; - return rt; - } - - public SF_NodePreview Initialize( SF_Node node ) { - this.node = node; // Parent - return this; - } - - - public ColorSpace textureColorSpace = ColorSpace.Uninitialized; - - public void InitializeTexture() { - if(texture == null) - texture = CreateNewNodeRT(); - textureColorSpace = QualitySettings.activeColorSpace; - } - - - - public void DestroyTexture() { - if( RenderTexture.active == texture ) - RenderTexture.active = null; - if( texture != null ) { - texture.Release(); - DestroyImmediate( texture ); - } - - if( textureChannels != null ) { - for( int i = 0; i < textureChannels.Length; i++ ) { - if( textureChannels[i] != null ) { - if( RenderTexture.active == textureChannels[i] ) - RenderTexture.active = null; - textureChannels[i].Release(); - DestroyImmediate( textureChannels[i] ); - } - } - } - - iconActive = null; - texture = null; - } - - - - public void LoadAndInitializeIcons(Type type){ - string nodeNameLower = type.Name.ToLower(); - - - iconActive = SF_Resources.LoadNodeIcon(nodeNameLower); // Main icon - - - if(iconActive == null){ - //Debug.Log("No icon found for: " + nodeNameLower); - } else { - // See if additional ones exist, if it found the first - - List iconList = new List(); - iconList.Add(iconActive); - - Texture2D tmp; - for(int i = 2;i<16;i++){ // max 16, to prevent while-loop locking - tmp = SF_Resources.LoadNodeIcon(nodeNameLower + "_" + i); // Search for more - if(tmp == null) - break; - iconList.Add(tmp); - } - - if(iconList.Count > 1) - icons = iconList.ToArray(); - - //while( tmp = - } - } - - public void LoadDataTexture(Type type){ - LoadDataTexture("Data/" + type.Name.ToLower()); - } - - public void LoadDataTexture(Type type, string suffix){ - LoadDataTexture("Data/" + type.Name.ToLower() + "_" + suffix); - } - - public void LoadDataTexture(string path){ - Texture2D nodeIcon = SF_Resources.LoadNodeIcon(path); - SF_Blit.Render( texture, "ReadPackedData", nodeIcon ); - } - - public void GenerateBaseData( bool render3D = true ) { - SF_Blit.mat.SetVector( "_OutputMask", Vector4.one ); - - SF_Blit.currentNode = node; - - if( uniform ) { - BlitUniform(); - return; - } - - if( SF_Settings.nodeRenderMode == NodeRenderMode.Viewport ) { - SF_Blit.RenderUsingViewport( texture, node.GetBlitShaderPath() ); - } else { - if( render3D ) - SF_Blit.RenderUsingViewport( texture, node.GetBlitShaderPath() ); - else - SF_Blit.Render( texture, node.GetBlitShaderPath() ); - } - - - } - - public void BlitUniform() { - SF_Blit.Render(texture, dataUniformColor ); - } - - public void ReadData( Texture2D tex, SF_NodePreview uvTex = null ) { - Graphics.Blit( tex, texture ); - } - - - - - public void OnLostConnection() { - Fill( Color.black ); - } - - public void Fill( Color col ) { - SF_Blit.Render( texture, col ); - } - - public Texture RenderAndGetChannel(int ch){ - if(textureChannels == null) - textureChannels = new RenderTexture[4]; - if( ch < 0 || ch > 3 ) { - Debug.LogError( "RenderAndGetChannel() got invalid channel " + ch + " of node " + node.nodeName + ". Please report this!" ); - } - if( textureChannels[ch] == null ) { - textureChannels[ch] = CreateNewNodeRT(); - } - SF_Blit.matExtractChannel.SetFloat("_Channel", ch); - Graphics.Blit( texture, textureChannels[ch], SF_Blit.matExtractChannel ); - return textureChannels[ch]; - } - - public Texture GetTextureByOutputType( OutChannel ch ) { - if( ch == OutChannel.R ) { - return RenderAndGetChannel( 0 ); - } else if( ch == OutChannel.G ) { - return RenderAndGetChannel( 1 ); - } else if( ch == OutChannel.B ) { - return RenderAndGetChannel( 2 ); - } else if( ch == OutChannel.A ) { - return RenderAndGetChannel( 3 ); - } - return texture; - } - - - // When evaluating nodes, run the overridden operator from the node itself - public void Combine( /*SF_NodePreview a, SF_NodePreview b */) { - - // Check if it can combine first - if( !node.CanEvaluate() ) { - Debug.LogError( "Cannot evaluate" ); - Fill( Color.black ); - return; - } - - CompCount = node.GetEvaluatedComponentCount(); - - // It can combine! Since this node is dynamic, adapt its component count - //CompCount = Mathf.Max( a.CompCount, b.CompCount ); - - - uniform = node.IsUniformOutput(); - - // Combine the node textures, unless we're quickloading or don't want to load them - - dataUniform = node.EvalCPU(); - - SF_Blit.currentNode = node; - - //if( uniform ) { - //BlitUniform(); - //} else { - string shaderPath = node.GetBlitShaderPath(); - Texture[] inputTextures = node.ConnectedInputs.Select( x => x.inputCon.node.texture.GetTextureByOutputType( x.inputCon.outputChannel ) ).ToArray(); - string[] inputNames = node.ConnectedInputs.Select( x => x.strID ).ToArray(); - //OutChannel[] inputChannels = node.ConnectedInputs.Select( x => x.inputCon.outputChannel ).ToArray(); - if( SF_Settings.nodeRenderMode == NodeRenderMode.Viewport ) { - SF_Blit.RenderUsingViewport( texture, shaderPath, inputNames, inputTextures ); - } else if( SF_Settings.nodeRenderMode == NodeRenderMode.Mixed ) { - SF_Blit.Render( texture, shaderPath, inputNames, inputTextures ); - } - - //} - - - - - - - /* - if(!SF_Parser.quickLoad && SF_Settings.DrawNodePreviews) { - for( int y = 0; y < SF_NodeData.RES; y++ ) { - for( int x = 0; x < SF_NodeData.RES; x++ ) { - Color retVector = node.NodeOperator( x, y ); - for( int c = 0; c < 4; c++ ) { - data[x, y, c] = retVector[c]; - } - } - } - }* - - // Combine uniform - /*for( int i = 0; i < 4; i++ ) { - dataUniform[i] = node.NodeOperator( 0, 0, i ); - }*/ - - - - - } - - - - public void Draw( Rect r , bool dim = false) { - if( iconActive != null ) { - if(node is SFN_Final){ // Large node image - Rect tmp = new Rect(r.x,r.y-1, iconActive.width, iconActive.height); - GUI.color = new Color(1f,1f,1f,node.selected ? 1f : 0.5f); - GUI.DrawTexture( tmp, iconActive, ScaleMode.ScaleToFit, true ); - } else if( coloredAlphaOverlay ) { - GUI.DrawTexture( r, icons[0] ); - GUI.color = ConvertToDisplayColor( dataUniform, true ); - GUI.DrawTexture( r, icons[1], ScaleMode.ScaleToFit, true ); - } else { - GUI.color = iconColor; - if( dim ) { - GUI.color = new Color( GUI.color.r, GUI.color.g, GUI.color.b, 0.5f ); - } - GUI.DrawTexture( r, iconActive ); - } - GUI.color = Color.white; - } else if( uniform ) { - GUI.color = ConvertToDisplayColor( dataUniform, true ); - GUI.DrawTexture( r, EditorGUIUtility.whiteTexture ); - GUI.color = Color.white; - } else { - GUI.DrawTexture( r, texture, ScaleMode.ScaleAndCrop, false ); - if(node.displayVectorDataMask){ - GUI.DrawTexture( r, SF_GUI.VectorIconOverlay, ScaleMode.ScaleAndCrop, true); - } - } - - } - - public static float[] ColorToFloatArr( Color c ) { - return new float[] { c.r, c.g, c.b, c.a }; - } - - public Color ConvertToDisplayColor( Color fa, bool forceVisible = false ) { - if( CompCount == 1 ) { - return new Color( fa[0], fa[0], fa[0], forceVisible ? 1f : fa[0] ); - } else if( CompCount == 2 ) { - return new Color( fa[0], fa[1], 0f, forceVisible ? 1f : 0f ); - } else if( CompCount == 3 ) { - return new Color( fa[0], fa[1], fa[2], forceVisible ? 1f : 0f ); - } - return new Color( fa[0], fa[1], fa[2], forceVisible ? 1f : fa[3] ); - } - - - - public bool CanCombine( SF_NodePreview a, SF_NodePreview b ) { - if( a.CompCount == b.CompCount ) - return true; - if( a.CompCount == 1 || b.CompCount == 1 ) - return true; - return false; - } - - - - - - - - - - - - - } +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using UnityEditor; +using System; +using System.Linq; + +namespace ShaderForge { + [System.Serializable] + public class SF_NodePreview : ScriptableObject { + + public static int R = 0; + public static int G = 1; + public static int B = 2; + public static int A = 3; + + // The color representation + public RenderTexture texture; // RGBA combined + public RenderTexture[] textureChannels; // RGBA separated, created on-demand + + // Icons, if any + public Texture2D[] icons; + public Texture2D iconActive; + + public void SetIconId(int id){ + iconActive = icons[id]; + } + + + public Color iconColor = Color.white; + + // Whether or not it's uniform + // Vectors (Uniform = Same color regardless of position) + // Textures (Non-Uniform = Different color based on position)) + public bool uniform = false; + public bool coloredAlphaOverlay = false; // Used to render two images on top of eachother, as in the fog node + //public float[] dataUniform; + public Vector4 dataUniform; + public Color dataUniformColor{ + get { return (Color)dataUniform; } + } + + // My material node, used to get operators + public SF_Node node; + + // The amount of components used (1-4) // THIS SHOULDN'T BE USED. USE CONNECTOR COMP COUNT INSTEAD + [SerializeField] + private int compCount = 1; + public int CompCount { + get { return compCount; } + set { + if(compCount == value) + return; + if( value > 4 || value < 1 ) { + //Debug.LogError( "Component count out of range: " + value + " on " + node.nodeName + " " + node.id ); + compCount = 4; + } else { + compCount = value; + } + } + } + + + + public SF_NodePreview() { + } + + public void OnEnable() { + base.hideFlags = HideFlags.HideAndDontSave; + + if( texture == null ) { + InitializeTexture(); + if(node) + node.RefreshValue(); + } + + } + + public RenderTexture CreateNewNodeRT() { + RenderTexture rt = new RenderTexture( SF_Node.NODE_SIZE, SF_Node.NODE_SIZE, 0, RenderTextureFormat.ARGBFloat, RenderTextureReadWrite.Linear ); // TODO: Gamma/Linear? + rt.wrapMode = TextureWrapMode.Clamp; + rt.hideFlags = HideFlags.HideAndDontSave; + return rt; + } + + public SF_NodePreview Initialize( SF_Node node ) { + this.node = node; // Parent + return this; + } + + + public ColorSpace textureColorSpace = ColorSpace.Uninitialized; + + public void InitializeTexture() { + if(texture == null) + texture = CreateNewNodeRT(); + textureColorSpace = QualitySettings.activeColorSpace; + } + + + + public void DestroyTexture() { + if( RenderTexture.active == texture ) + RenderTexture.active = null; + if( texture != null ) { + texture.Release(); + DestroyImmediate( texture ); + } + + if( textureChannels != null ) { + for( int i = 0; i < textureChannels.Length; i++ ) { + if( textureChannels[i] != null ) { + if( RenderTexture.active == textureChannels[i] ) + RenderTexture.active = null; + textureChannels[i].Release(); + DestroyImmediate( textureChannels[i] ); + } + } + } + + iconActive = null; + texture = null; + } + + + + public void LoadAndInitializeIcons(Type type){ + string nodeNameLower = type.Name.ToLower(); + + + iconActive = SF_Resources.LoadNodeIcon(nodeNameLower); // Main icon + + + if(iconActive == null){ + //Debug.Log("No icon found for: " + nodeNameLower); + } else { + // See if additional ones exist, if it found the first + + List iconList = new List(); + iconList.Add(iconActive); + + Texture2D tmp; + for(int i = 2;i<16;i++){ // max 16, to prevent while-loop locking + tmp = SF_Resources.LoadNodeIcon(nodeNameLower + "_" + i); // Search for more + if(tmp == null) + break; + iconList.Add(tmp); + } + + if(iconList.Count > 1) + icons = iconList.ToArray(); + + //while( tmp = + } + } + + public void LoadDataTexture(Type type){ + LoadDataTexture("Data/" + type.Name.ToLower()); + } + + public void LoadDataTexture(Type type, string suffix){ + LoadDataTexture("Data/" + type.Name.ToLower() + "_" + suffix); + } + + public void LoadDataTexture(string path){ + Texture2D nodeIcon = SF_Resources.LoadNodeIcon(path); + SF_Blit.Render( texture, "ReadPackedData", nodeIcon ); + } + + public void GenerateBaseData( bool render3D = true ) { + SF_Blit.mat.SetVector( "_OutputMask", Vector4.one ); + + SF_Blit.currentNode = node; + + if( uniform ) { + BlitUniform(); + return; + } + + if( SF_Settings.nodeRenderMode == NodeRenderMode.Viewport ) { + SF_Blit.RenderUsingViewport( texture, node.GetBlitShaderPath() ); + } else { + if( render3D ) + SF_Blit.RenderUsingViewport( texture, node.GetBlitShaderPath() ); + else + SF_Blit.Render( texture, node.GetBlitShaderPath() ); + } + + + } + + public void BlitUniform() { + SF_Blit.Render(texture, dataUniformColor ); + } + + public void ReadData( Texture2D tex, SF_NodePreview uvTex = null ) { + Graphics.Blit( tex, texture ); + } + + + + + public void OnLostConnection() { + Fill( Color.black ); + } + + public void Fill( Color col ) { + SF_Blit.Render( texture, col ); + } + + public Texture RenderAndGetChannel(int ch){ + if(textureChannels == null) + textureChannels = new RenderTexture[4]; + if( ch < 0 || ch > 3 ) { + Debug.LogError( "RenderAndGetChannel() got invalid channel " + ch + " of node " + node.nodeName + ". Please report this!" ); + } + if( textureChannels[ch] == null ) { + textureChannels[ch] = CreateNewNodeRT(); + } + SF_Blit.matExtractChannel.SetFloat("_Channel", ch); + Graphics.Blit( texture, textureChannels[ch], SF_Blit.matExtractChannel ); + return textureChannels[ch]; + } + + public Texture GetTextureByOutputType( OutChannel ch ) { + if( ch == OutChannel.R ) { + return RenderAndGetChannel( 0 ); + } else if( ch == OutChannel.G ) { + return RenderAndGetChannel( 1 ); + } else if( ch == OutChannel.B ) { + return RenderAndGetChannel( 2 ); + } else if( ch == OutChannel.A ) { + return RenderAndGetChannel( 3 ); + } + return texture; + } + + + // When evaluating nodes, run the overridden operator from the node itself + public void Combine( /*SF_NodePreview a, SF_NodePreview b */) { + + // Check if it can combine first + if( !node.CanEvaluate() ) { + Debug.LogError( "Cannot evaluate" ); + Fill( Color.black ); + return; + } + + CompCount = node.GetEvaluatedComponentCount(); + + // It can combine! Since this node is dynamic, adapt its component count + //CompCount = Mathf.Max( a.CompCount, b.CompCount ); + + + uniform = node.IsUniformOutput(); + + // Combine the node textures, unless we're quickloading or don't want to load them + + dataUniform = node.EvalCPU(); + + SF_Blit.currentNode = node; + + //if( uniform ) { + //BlitUniform(); + //} else { + string shaderPath = node.GetBlitShaderPath(); + Texture[] inputTextures = node.ConnectedInputs.Select( x => x.inputCon.node.texture.GetTextureByOutputType( x.inputCon.outputChannel ) ).ToArray(); + string[] inputNames = node.ConnectedInputs.Select( x => x.strID ).ToArray(); + //OutChannel[] inputChannels = node.ConnectedInputs.Select( x => x.inputCon.outputChannel ).ToArray(); + if( SF_Settings.nodeRenderMode == NodeRenderMode.Viewport ) { + SF_Blit.RenderUsingViewport( texture, shaderPath, inputNames, inputTextures ); + } else if( SF_Settings.nodeRenderMode == NodeRenderMode.Mixed ) { + SF_Blit.Render( texture, shaderPath, inputNames, inputTextures ); + } + + //} + + + + + + + /* + if(!SF_Parser.quickLoad && SF_Settings.DrawNodePreviews) { + for( int y = 0; y < SF_NodeData.RES; y++ ) { + for( int x = 0; x < SF_NodeData.RES; x++ ) { + Color retVector = node.NodeOperator( x, y ); + for( int c = 0; c < 4; c++ ) { + data[x, y, c] = retVector[c]; + } + } + } + }* + + // Combine uniform + /*for( int i = 0; i < 4; i++ ) { + dataUniform[i] = node.NodeOperator( 0, 0, i ); + }*/ + + + + + } + + + + public void Draw( Rect r , bool dim = false) { + if( iconActive != null ) { + if(node is SFN_Final){ // Large node image + Rect tmp = new Rect(r.x,r.y-1, iconActive.width, iconActive.height); + GUI.color = new Color(1f,1f,1f,node.selected ? 1f : 0.5f); + GUI.DrawTexture( tmp, iconActive, ScaleMode.ScaleToFit, true ); + } else if( coloredAlphaOverlay ) { + GUI.DrawTexture( r, icons[0] ); + GUI.color = ConvertToDisplayColor( dataUniform, true ); + GUI.DrawTexture( r, icons[1], ScaleMode.ScaleToFit, true ); + } else { + GUI.color = iconColor; + if( dim ) { + GUI.color = new Color( GUI.color.r, GUI.color.g, GUI.color.b, 0.5f ); + } + GUI.DrawTexture( r, iconActive ); + } + GUI.color = Color.white; + } else if( uniform ) { + GUI.color = ConvertToDisplayColor( dataUniform, true ); + GUI.DrawTexture( r, EditorGUIUtility.whiteTexture ); + GUI.color = Color.white; + } else { + GUI.DrawTexture( r, texture, ScaleMode.ScaleAndCrop, false ); + if(node.displayVectorDataMask){ + GUI.DrawTexture( r, SF_GUI.VectorIconOverlay, ScaleMode.ScaleAndCrop, true); + } + } + + } + + public static float[] ColorToFloatArr( Color c ) { + return new float[] { c.r, c.g, c.b, c.a }; + } + + public Color ConvertToDisplayColor( Color fa, bool forceVisible = false ) { + if( CompCount == 1 ) { + return new Color( fa[0], fa[0], fa[0], forceVisible ? 1f : fa[0] ); + } else if( CompCount == 2 ) { + return new Color( fa[0], fa[1], 0f, forceVisible ? 1f : 0f ); + } else if( CompCount == 3 ) { + return new Color( fa[0], fa[1], fa[2], forceVisible ? 1f : 0f ); + } + return new Color( fa[0], fa[1], fa[2], forceVisible ? 1f : fa[3] ); + } + + + + public bool CanCombine( SF_NodePreview a, SF_NodePreview b ) { + if( a.CompCount == b.CompCount ) + return true; + if( a.CompCount == 1 || b.CompCount == 1 ) + return true; + return false; + } + + + + + + + + + + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodePreview.cs.meta b/Editor/Code/SF_NodePreview.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodePreview.cs.meta rename to Editor/Code/SF_NodePreview.cs.meta index f4c450f6..6d68697d --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodePreview.cs.meta +++ b/Editor/Code/SF_NodePreview.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 545752616b7004630871f3aba6d251d6 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 545752616b7004630871f3aba6d251d6 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeStatus.cs b/Editor/Code/SF_NodeStatus.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeStatus.cs rename to Editor/Code/SF_NodeStatus.cs index 5fd90d2c..7df93538 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeStatus.cs +++ b/Editor/Code/SF_NodeStatus.cs @@ -1,55 +1,55 @@ using UnityEngine; -using System.Collections; - -namespace ShaderForge { - [System.Serializable] - public class SF_NodeStatus : ScriptableObject { - - public SF_Node node; - public SF_NodeStatus Initialize( SF_Node node ) { - this.node = node; - Reset(); - return this; - } - - public void OnEnable() { - base.hideFlags = HideFlags.HideAndDontSave; - } - - - public bool leadsToFinal; // Whether or not this is in the end, used - - public void Reset() { - leadsToFinal = false; - } - - - - - public void SetLeadsToFinalRecursively(bool all = false, bool passDependent = true) { +using System.Collections; + +namespace ShaderForge { + [System.Serializable] + public class SF_NodeStatus : ScriptableObject { + + public SF_Node node; + public SF_NodeStatus Initialize( SF_Node node ) { + this.node = node; + Reset(); + return this; + } + + public void OnEnable() { + base.hideFlags = HideFlags.HideAndDontSave; + } + + + public bool leadsToFinal; // Whether or not this is in the end, used + + public void Reset() { + leadsToFinal = false; + } + + + + + public void SetLeadsToFinalRecursively(bool all = false, bool passDependent = true) { leadsToFinal = true; - //Debug.Log("Checking if " + node.nodeName + " leads to final..."); - foreach( SF_NodeConnector con in node.connectors ) { - if( con.conType == ConType.cOutput ) - continue; - if( !con.IsConnected() ) - continue; - //if( !con.IsConnectedEnabledAndAvailable() ) // Don't process data in disabled inputs, although maybe we should? - //continue; - if( passDependent && con.SkipPasses.Contains( SF_Evaluator.currentPass ) && !all ) // So it's enabled and all - But does this pass even use it? - continue; - con.inputCon.node.status.SetLeadsToFinalRecursively(); + //Debug.Log("Checking if " + node.nodeName + " leads to final..."); + foreach( SF_NodeConnector con in node.connectors ) { + if( con.conType == ConType.cOutput ) + continue; + if( !con.IsConnected() ) + continue; + //if( !con.IsConnectedEnabledAndAvailable() ) // Don't process data in disabled inputs, although maybe we should? + //continue; + if( passDependent && con.SkipPasses.Contains( SF_Evaluator.currentPass ) && !all ) // So it's enabled and all - But does this pass even use it? + continue; + con.inputCon.node.status.SetLeadsToFinalRecursively(); } - //Debug.Log("Yep, " + node.nodeName + " leads to final!"); - } - - - - - - - - + //Debug.Log("Yep, " + node.nodeName + " leads to final!"); + } + + + + + + + + } - + } diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeStatus.cs.meta b/Editor/Code/SF_NodeStatus.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeStatus.cs.meta rename to Editor/Code/SF_NodeStatus.cs.meta index e870c69f..ac6c8b81 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeStatus.cs.meta +++ b/Editor/Code/SF_NodeStatus.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 08efc211a31014f9db3606a96039defd -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 08efc211a31014f9db3606a96039defd +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeTreeStatus.cs b/Editor/Code/SF_NodeTreeStatus.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeTreeStatus.cs rename to Editor/Code/SF_NodeTreeStatus.cs index 40db03be..256a0a42 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeTreeStatus.cs +++ b/Editor/Code/SF_NodeTreeStatus.cs @@ -1,494 +1,494 @@ -using UnityEngine; -using System.Collections; -using System.Collections.Generic; -using System.Linq; - - - -namespace ShaderForge { - - [System.Serializable] - public class SF_NodeTreeStatus : ScriptableObject { - - public SF_Editor editor; - [SerializeField] List errors; - public List Errors { - get { - if( errors == null ) - errors = new List(); - return errors; - } - set { - errors = value; - } - } - - - - public bool mipInputUsed = false; // If this is true, only DX is allowed :< OR: Enable glsl pragma - public bool texturesInVertShader = false; - public bool viewDirectionInVertOffset = false; - public bool usesSceneData = false; - // public bool lightNodesUsed = false; // Used to re-enable light settings when shader is set to unlit - - - - // Contains references to all nodes with properties - // Used in the pass settings listing - public List propertyList = new List(); - - - public bool CanDisplayInstructionCount { - get { - bool dx = ( editor.statusBox.platform == RenderPlatform.d3d9 || editor.statusBox.platform == RenderPlatform.d3d11 ); - return !( mipInputUsed && !dx ); - } - - } - - - - public string SerializeProps() { - string s = "proporder:"; - for( int i = 0; i < propertyList.Count; i++ ) { - if( i != 0 ) - s += "-"; - s += propertyList[i].id.ToString(); - } - return s; - } - - public void DeserializeProps( string s ) { - //Debug.Log("Deserializing properties = " + s); - string[] split = s.Split( '-' ); - propertyList = new System.Collections.Generic.List(); - for( int i = 0; i < split.Length; i++ ) { - //Debug.Log("Found " + GetNodeByID( int.Parse( split[i] )).nodeName); - //Debug.Log ("Attempting deserialization. int parse of ["+split[i]+"]"); - - SF_Node foundNode = GetNodeByID( int.Parse( split[i] ) ); - if( foundNode != null ) - propertyList.Add( foundNode ); - - } - } - - public SF_Node GetNodeByID( int id ) { - foreach( SF_Node n in editor.nodes ) { - if( n.id == id ) - return n; - } - Debug.LogError( "Property node with ID " + id + " not found while deserializing, removing..." ); - return null; - } - - - - - - - public SF_NodeTreeStatus Initialize( SF_Editor editor ) { - this.editor = editor; - return this; - } - - public void OnEnable() { - base.hideFlags = HideFlags.HideAndDontSave; - } - - - public bool CheckCanCompile() { - - editor.nodeView.RefreshRelaySources(); - - if( Errors == null ){ - Errors = new List(); - } else if( Errors.Count > 0 ) { - for( int i = 0; i < Errors.Count; i++ ) { - DestroyImmediate( Errors[i] ); - } - Errors.Clear(); - } - - - - List cNodes = GetListOfConnectedNodesWithGhosts( out editor.shaderEvaluator.ghostNodes ); - - - // If any properties are now outside the node graph, remove them from the property list - /*if(!SF_Parser.settingUp) - for( int i = propertyList.Count - 1; i >= 0; i-- ) { - if( !cNodes.Contains( propertyList[i] ) ) { - propertyList.RemoveAt( i ); - } - }*/ - - - //if( editor.shaderEvaluator.ghostNodes != null ) - //Debug.Log( "Ghost nodes: " + editor.shaderEvaluator.ghostNodes.Count ); - - texturesInVertShader = false; - bool foundMipUsed = false; - //SF_Node mipNode = null; - usesSceneData = false; - - bool hasFacingNode = false; - - foreach( SF_Node n in cNodes ) { - - // Refresh property list - if( n.IsProperty() ) { - if( !n.IsGlobalProperty() ) { - // Add if it's local and doesn't contain it already - if( !propertyList.Contains( n ) ) { - propertyList.Add( n ); - } - } else { - // Remove it if it's global and inside the list - if( propertyList.Contains( n ) ) { - propertyList.Remove( n ); - } - } - } - - if( n is SFN_SceneColor ) { - usesSceneData = true; - } - - if( n is SFN_FaceSign ) { - hasFacingNode = true; - } - - - if( n is SFN_Tex2d || n is SFN_Cubemap ) { // Check MIP input - if( n.GetInputIsConnected( "MIP" ) ) { - foundMipUsed = true; - //mipNode = n; - } - } - - //if(SF_Debug.dynamicNodeLoad) - if( SF_Editor.NodeExistsAndIs( n, "SFN_SkyshopSpec" ) ) { - //if(n.GetInputIsConnected("GLOSS")){ - foundMipUsed = true; - //mipNode = n; - //} - } - - - - - - foreach( SF_NodeConnector con in n.connectors ) { - if( con.conType == ConType.cOutput ) - continue; - if( con.required && !con.IsConnected() ) { - string err = "Missing required"; - err += string.IsNullOrEmpty( con.label ) ? " " : " [" + con.label + "] "; - err += "input on " + con.node.nodeName; - Errors.Add( SF_ErrorEntry.Create( err, con, false ) ); - } - } - } - - - - // WARNINGS - - if( editor.ps.catBlending.autoSort ) { - - bool alphaConnected = editor.ps.HasAlpha(); - - - - if( editor.ps.catLighting.transparencyMode == SFPSC_Lighting.TransparencyMode.Fade ) { - - bool usingAlphaBlend = editor.ps.catBlending.blendSrc == BlendMode.SrcAlpha && editor.ps.catBlending.blendDst == BlendMode.OneMinusSrcAlpha; - - if( alphaConnected && !usingAlphaBlend ) { - SF_ErrorEntry error = SF_ErrorEntry.Create( "Opacity is connected, but your shader isn't alpha blended, which is required by the fade transparency mode. Click the icon to make it alpha blended!", true ); - error.action = () => { - UnityEditor.Undo.RecordObject( editor.ps.catBlending, "error correction" ); - editor.ps.catBlending.blendModePreset = BlendModePreset.AlphaBlended; - editor.ps.catBlending.ConformBlendsToPreset(); - }; - Errors.Add( error ); - } - - if( !alphaConnected && usingAlphaBlend ) { - SF_ErrorEntry error = SF_ErrorEntry.Create( "Opacity is not connected, but your shader is alpha blended. Click the icon to make it opaque!", true ); - error.action = () => { - UnityEditor.Undo.RecordObject( editor.ps.catBlending, "error correction" ); - editor.ps.catBlending.blendModePreset = BlendModePreset.Opaque; - editor.ps.catBlending.ConformBlendsToPreset(); - }; - Errors.Add( error ); - } - } - - - - - - if( editor.ps.catLighting.transparencyMode == SFPSC_Lighting.TransparencyMode.Reflective ) { - - bool usingAlphaBlendPremul = editor.ps.catBlending.blendSrc == BlendMode.One && editor.ps.catBlending.blendDst == BlendMode.OneMinusSrcAlpha; - - if( alphaConnected && !usingAlphaBlendPremul ) { - SF_ErrorEntry error = SF_ErrorEntry.Create( "Opacity is connected, but your shader isn't using premultiplied alpha blending, which is required by the reflective transparency mode. Click the icon to use premultiplied alpha blending!", true ); - error.action = () => { - UnityEditor.Undo.RecordObject( editor.ps.catBlending, "error correction" ); - editor.ps.catBlending.blendModePreset = BlendModePreset.AlphaBlendedPremultiplied; - editor.ps.catBlending.ConformBlendsToPreset(); - }; - Errors.Add( error ); - } - - if( !alphaConnected && usingAlphaBlendPremul ) { - SF_ErrorEntry error = SF_ErrorEntry.Create( "Opacity is not connected, but your shader is using premultiplied alpha blending. Click the icon to make it opaque!", true ); - error.action = () => { - UnityEditor.Undo.RecordObject( editor.ps.catBlending, "error correction" ); - editor.ps.catBlending.blendModePreset = BlendModePreset.Opaque; - editor.ps.catBlending.ConformBlendsToPreset(); - }; - Errors.Add( error ); - } - } - - - - } - - - - - /* - true, // - Direct3D 9 - true, // - Direct3D 11 - true, // - OpenGL - true, // - OpenGL ES 2.0 - false, // - Xbox 360 - false, // - PlayStation 3 - false, // - Flash - false // - Direct3D 11 for Windows RT - */ - bool osx = Application.platform == RuntimePlatform.OSXEditor; - bool windows = !osx; - bool ogl = editor.ps.catMeta.usedRenderers[2]; - bool dx9 = editor.ps.catMeta.usedRenderers[0]; - bool dx11 = editor.ps.catMeta.usedRenderers[1]; - -#if UNITY_5_0 - bool inDx11Mode = UnityEditor.PlayerSettings.useDirect3D11; -#else - bool inDx11Mode = true; -#endif - - if( osx && !ogl ) { - SF_ErrorEntry error = SF_ErrorEntry.Create( "Your shader will not render properly on your workstation - you need to have OpenGL enabled when working in OSX. Click the icon to enable OpenGL!", true ); - error.action = () => { - UnityEditor.Undo.RecordObject( editor.ps.catMeta, "error correction - enable OpenGL" ); - editor.ps.catMeta.usedRenderers[2] = true; - editor.OnShaderModified( NodeUpdateType.Hard ); - }; - Errors.Add( error ); - } else if( windows ) { - if( inDx11Mode && !dx11 ) { - SF_ErrorEntry error = SF_ErrorEntry.Create( "Your shader might not render properly on your workstation - you need to have Direct3D 11 enabled when working in DX11 mode on Windows. Click the icon to enable Direct3D 11!", true ); - error.action = () => { - UnityEditor.Undo.RecordObject( editor.ps.catMeta, "error correction - enable Direct3D 11" ); - editor.ps.catMeta.usedRenderers[1] = true; - editor.OnShaderModified( NodeUpdateType.Soft ); - }; - Errors.Add( error ); - } else if( !inDx11Mode && !dx9 ) { - SF_ErrorEntry error = SF_ErrorEntry.Create( "Your shader might not render properly on your workstation - you need to have Direct3D 9 enabled when working on Windows. Click the icon to enable Direct3D 9!", true ); - error.action = () => { - UnityEditor.Undo.RecordObject( editor.ps.catMeta, "error correction - enable Direct3D 9" ); - editor.ps.catMeta.usedRenderers[0] = true; - editor.OnShaderModified( NodeUpdateType.Soft ); - }; - Errors.Add( error ); - } - } - - - - - - if( editor.ps.catLighting.lightMode == SFPSC_Lighting.LightMode.PBL ) { - if( editor.ps.HasDiffuse() && !editor.ps.HasSpecular() ) { - Errors.Add( SF_ErrorEntry.Create( "Using PBL requires metallic/specular to be connected", false ) ); - } - if( !editor.ps.HasDiffuse() && editor.ps.HasSpecular() ) { - Errors.Add( SF_ErrorEntry.Create( "Using PBL requires metallic/specular to be connected", false ) ); - } - } - - - - - - - - - List dupes = new List(); - SF_Node[] propNodes = cNodes.Where(x=>x.IsProperty()).ToArray(); - for( int i = 0; i < propNodes.Length; i++ ) { - for( int j = i+1; j < propNodes.Length; j++ ) { - string nameA = propNodes[i].property.nameInternal; - string nameB = propNodes[j].property.nameInternal; - - if( nameA == nameB ) { - dupes.Add( propNodes[j] ); - } - - } - } - if( dupes.Count > 0 ) { - foreach( SF_Node dupe in dupes ) { - Errors.Add( SF_ErrorEntry.Create( "You have property nodes with conflicting internal names. Please rename one of the " + dupe.property.nameInternal + " nodes", dupe, false ) ); - } - } - - - - - List dupesVarname = new List(); - for( int i = 0; i < cNodes.Count; i++ ) { - for( int j = i + 1; j < cNodes.Count; j++ ) { - - string nameAvar = cNodes[i].variableName; - string nameBvar = cNodes[j].variableName; - - if( nameAvar == nameBvar && dupes.Contains( cNodes[j] ) == false ) { - dupesVarname.Add( cNodes[j] ); - } - } - } - if( dupesVarname.Count > 0 ) { - foreach( SF_Node dupeVarname in dupesVarname ) { - Errors.Add( SF_ErrorEntry.Create( "You have nodes with conflicting variable names. Please rename one of the " + dupeVarname.variableName + " nodes", dupeVarname, false ) ); - } - } - - - // Make sure you set the shader to double sided - if( !editor.ps.catGeometry.IsDoubleSided() && hasFacingNode ) { - SF_ErrorEntry error = SF_ErrorEntry.Create( "You are using the Face Sign node, but your shader isn't double-sided. Click the icon to fix", false ); - error.action = () => { - UnityEditor.Undo.RecordObject( editor.ps.catGeometry, "error correction - fix double sided" ); - editor.ps.catGeometry.cullMode = SFPSC_Geometry.CullMode.DoubleSided; - editor.OnShaderModified( NodeUpdateType.Hard ); - }; - Errors.Add( error ); - } - - - - - - - // Check if there are any textures in the vertex input - texturesInVertShader = HasNodeInput( editor.mainNode.vertexOffset ) || HasNodeInput( editor.mainNode.outlineWidth ); - viewDirectionInVertOffset = HasNodeInput( editor.mainNode.vertexOffset ); - - - - editor.shaderEvaluator.RemoveGhostNodes(); - - - if( foundMipUsed ) { - //if( !mipInputUsed ) // This should be fixed with #pragma glsl - // errors.Add( new SF_ErrorEntry( "MIP input is only supported in Direct X", mipNode ) ); - mipInputUsed = true; - } else { - mipInputUsed = false; - } - - - int errorCount = Errors.Count( x => !x.isWarning ); // Let it compile, even though it has warnings - - if( errorCount == 0 ) - return true; - //DisplayErrors(); - return false; - } - - private bool ConnectedNodeWithInternalNameExists( List cNodes, string s ) { - foreach( SF_Node n in cNodes.Where( x => x.IsProperty() ) ) { - if( n.property.nameInternal == s ) { - return true; - } - } - return false; - } - - - - public bool HasNodeInput( SF_NodeConnector con ) { - - if( con.IsConnectedEnabledAndAvailable() ) { - - if( con.inputCon.node is T ) { - return true; - } - - // Recursively loop through inputs of the connnected node - foreach( SF_NodeConnector c in con.inputCon.node.connectors ) { - if( c.conType == ConType.cOutput ) - continue; - if( !c.IsConnected() ) - continue; - if( HasNodeInput( c ) ) { - return true; - } - } - - } - return false; - } - - - - - - // Returns all nodes connected to the final node - public List GetListOfConnectedNodesWithGhosts( out List ghosts, bool passDependent = false ) { - //Debug.Log ("GetListOfConnectedNodesWithGhosts()"); - ResetAllNodeStatuses(); - editor.mainNode.status.SetLeadsToFinalRecursively( all: false, passDependent: passDependent ); - List filtered = new List(); - foreach( SF_Node n in editor.nodes ) { - if( n.status.leadsToFinal ) - filtered.Add( n ); - } - - // Now that's done, let's return the ghost nodes too, if any - editor.shaderEvaluator.RemoveGhostNodes(); // TODO: Really? - ghosts = new List(); - - foreach( SF_Node n in filtered ) { - n.DefineGhostsIfNeeded( ref ghosts ); - } - - //Debug.Log ("GetListOfConnectedNodesWithGhosts, ghosts.Count: " + ghosts.Count); - - filtered.AddRange( ghosts ); - - return filtered; - } - - // Resets all node statuses - public void ResetAllNodeStatuses() { - foreach( SF_Node n in editor.nodes ) { - n.status.Reset(); - } - } - - - - - - } +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + + + +namespace ShaderForge { + + [System.Serializable] + public class SF_NodeTreeStatus : ScriptableObject { + + public SF_Editor editor; + [SerializeField] List errors; + public List Errors { + get { + if( errors == null ) + errors = new List(); + return errors; + } + set { + errors = value; + } + } + + + + public bool mipInputUsed = false; // If this is true, only DX is allowed :< OR: Enable glsl pragma + public bool texturesInVertShader = false; + public bool viewDirectionInVertOffset = false; + public bool usesSceneData = false; + // public bool lightNodesUsed = false; // Used to re-enable light settings when shader is set to unlit + + + + // Contains references to all nodes with properties + // Used in the pass settings listing + public List propertyList = new List(); + + + public bool CanDisplayInstructionCount { + get { + bool dx = ( editor.statusBox.platform == RenderPlatform.d3d9 || editor.statusBox.platform == RenderPlatform.d3d11 ); + return !( mipInputUsed && !dx ); + } + + } + + + + public string SerializeProps() { + string s = "proporder:"; + for( int i = 0; i < propertyList.Count; i++ ) { + if( i != 0 ) + s += "-"; + s += propertyList[i].id.ToString(); + } + return s; + } + + public void DeserializeProps( string s ) { + //Debug.Log("Deserializing properties = " + s); + string[] split = s.Split( '-' ); + propertyList = new System.Collections.Generic.List(); + for( int i = 0; i < split.Length; i++ ) { + //Debug.Log("Found " + GetNodeByID( int.Parse( split[i] )).nodeName); + //Debug.Log ("Attempting deserialization. int parse of ["+split[i]+"]"); + + SF_Node foundNode = GetNodeByID( int.Parse( split[i] ) ); + if( foundNode != null ) + propertyList.Add( foundNode ); + + } + } + + public SF_Node GetNodeByID( int id ) { + foreach( SF_Node n in editor.nodes ) { + if( n.id == id ) + return n; + } + Debug.LogError( "Property node with ID " + id + " not found while deserializing, removing..." ); + return null; + } + + + + + + + public SF_NodeTreeStatus Initialize( SF_Editor editor ) { + this.editor = editor; + return this; + } + + public void OnEnable() { + base.hideFlags = HideFlags.HideAndDontSave; + } + + + public bool CheckCanCompile() { + + editor.nodeView.RefreshRelaySources(); + + if( Errors == null ){ + Errors = new List(); + } else if( Errors.Count > 0 ) { + for( int i = 0; i < Errors.Count; i++ ) { + DestroyImmediate( Errors[i] ); + } + Errors.Clear(); + } + + + + List cNodes = GetListOfConnectedNodesWithGhosts( out editor.shaderEvaluator.ghostNodes ); + + + // If any properties are now outside the node graph, remove them from the property list + /*if(!SF_Parser.settingUp) + for( int i = propertyList.Count - 1; i >= 0; i-- ) { + if( !cNodes.Contains( propertyList[i] ) ) { + propertyList.RemoveAt( i ); + } + }*/ + + + //if( editor.shaderEvaluator.ghostNodes != null ) + //Debug.Log( "Ghost nodes: " + editor.shaderEvaluator.ghostNodes.Count ); + + texturesInVertShader = false; + bool foundMipUsed = false; + //SF_Node mipNode = null; + usesSceneData = false; + + bool hasFacingNode = false; + + foreach( SF_Node n in cNodes ) { + + // Refresh property list + if( n.IsProperty() ) { + if( !n.IsGlobalProperty() ) { + // Add if it's local and doesn't contain it already + if( !propertyList.Contains( n ) ) { + propertyList.Add( n ); + } + } else { + // Remove it if it's global and inside the list + if( propertyList.Contains( n ) ) { + propertyList.Remove( n ); + } + } + } + + if( n is SFN_SceneColor ) { + usesSceneData = true; + } + + if( n is SFN_FaceSign ) { + hasFacingNode = true; + } + + + if( n is SFN_Tex2d || n is SFN_Cubemap ) { // Check MIP input + if( n.GetInputIsConnected( "MIP" ) ) { + foundMipUsed = true; + //mipNode = n; + } + } + + //if(SF_Debug.dynamicNodeLoad) + if( SF_Editor.NodeExistsAndIs( n, "SFN_SkyshopSpec" ) ) { + //if(n.GetInputIsConnected("GLOSS")){ + foundMipUsed = true; + //mipNode = n; + //} + } + + + + + + foreach( SF_NodeConnector con in n.connectors ) { + if( con.conType == ConType.cOutput ) + continue; + if( con.required && !con.IsConnected() ) { + string err = "Missing required"; + err += string.IsNullOrEmpty( con.label ) ? " " : " [" + con.label + "] "; + err += "input on " + con.node.nodeName; + Errors.Add( SF_ErrorEntry.Create( err, con, false ) ); + } + } + } + + + + // WARNINGS + + if( editor.ps.catBlending.autoSort ) { + + bool alphaConnected = editor.ps.HasAlpha(); + + + + if( editor.ps.catLighting.transparencyMode == SFPSC_Lighting.TransparencyMode.Fade ) { + + bool usingAlphaBlend = editor.ps.catBlending.blendSrc == BlendMode.SrcAlpha && editor.ps.catBlending.blendDst == BlendMode.OneMinusSrcAlpha; + + if( alphaConnected && !usingAlphaBlend ) { + SF_ErrorEntry error = SF_ErrorEntry.Create( "Opacity is connected, but your shader isn't alpha blended, which is required by the fade transparency mode. Click the icon to make it alpha blended!", true ); + error.action = () => { + UnityEditor.Undo.RecordObject( editor.ps.catBlending, "error correction" ); + editor.ps.catBlending.blendModePreset = BlendModePreset.AlphaBlended; + editor.ps.catBlending.ConformBlendsToPreset(); + }; + Errors.Add( error ); + } + + if( !alphaConnected && usingAlphaBlend ) { + SF_ErrorEntry error = SF_ErrorEntry.Create( "Opacity is not connected, but your shader is alpha blended. Click the icon to make it opaque!", true ); + error.action = () => { + UnityEditor.Undo.RecordObject( editor.ps.catBlending, "error correction" ); + editor.ps.catBlending.blendModePreset = BlendModePreset.Opaque; + editor.ps.catBlending.ConformBlendsToPreset(); + }; + Errors.Add( error ); + } + } + + + + + + if( editor.ps.catLighting.transparencyMode == SFPSC_Lighting.TransparencyMode.Reflective ) { + + bool usingAlphaBlendPremul = editor.ps.catBlending.blendSrc == BlendMode.One && editor.ps.catBlending.blendDst == BlendMode.OneMinusSrcAlpha; + + if( alphaConnected && !usingAlphaBlendPremul ) { + SF_ErrorEntry error = SF_ErrorEntry.Create( "Opacity is connected, but your shader isn't using premultiplied alpha blending, which is required by the reflective transparency mode. Click the icon to use premultiplied alpha blending!", true ); + error.action = () => { + UnityEditor.Undo.RecordObject( editor.ps.catBlending, "error correction" ); + editor.ps.catBlending.blendModePreset = BlendModePreset.AlphaBlendedPremultiplied; + editor.ps.catBlending.ConformBlendsToPreset(); + }; + Errors.Add( error ); + } + + if( !alphaConnected && usingAlphaBlendPremul ) { + SF_ErrorEntry error = SF_ErrorEntry.Create( "Opacity is not connected, but your shader is using premultiplied alpha blending. Click the icon to make it opaque!", true ); + error.action = () => { + UnityEditor.Undo.RecordObject( editor.ps.catBlending, "error correction" ); + editor.ps.catBlending.blendModePreset = BlendModePreset.Opaque; + editor.ps.catBlending.ConformBlendsToPreset(); + }; + Errors.Add( error ); + } + } + + + + } + + + + + /* + true, // - Direct3D 9 + true, // - Direct3D 11 + true, // - OpenGL + true, // - OpenGL ES 2.0 + false, // - Xbox 360 + false, // - PlayStation 3 + false, // - Flash + false // - Direct3D 11 for Windows RT + */ + bool osx = Application.platform == RuntimePlatform.OSXEditor; + bool windows = !osx; + bool ogl = editor.ps.catMeta.usedRenderers[2]; + bool dx9 = editor.ps.catMeta.usedRenderers[0]; + bool dx11 = editor.ps.catMeta.usedRenderers[1]; + +#if UNITY_5_0 + bool inDx11Mode = UnityEditor.PlayerSettings.useDirect3D11; +#else + bool inDx11Mode = true; +#endif + + if( osx && !ogl ) { + SF_ErrorEntry error = SF_ErrorEntry.Create( "Your shader will not render properly on your workstation - you need to have OpenGL enabled when working in OSX. Click the icon to enable OpenGL!", true ); + error.action = () => { + UnityEditor.Undo.RecordObject( editor.ps.catMeta, "error correction - enable OpenGL" ); + editor.ps.catMeta.usedRenderers[2] = true; + editor.OnShaderModified( NodeUpdateType.Hard ); + }; + Errors.Add( error ); + } else if( windows ) { + if( inDx11Mode && !dx11 ) { + SF_ErrorEntry error = SF_ErrorEntry.Create( "Your shader might not render properly on your workstation - you need to have Direct3D 11 enabled when working in DX11 mode on Windows. Click the icon to enable Direct3D 11!", true ); + error.action = () => { + UnityEditor.Undo.RecordObject( editor.ps.catMeta, "error correction - enable Direct3D 11" ); + editor.ps.catMeta.usedRenderers[1] = true; + editor.OnShaderModified( NodeUpdateType.Soft ); + }; + Errors.Add( error ); + } else if( !inDx11Mode && !dx9 ) { + SF_ErrorEntry error = SF_ErrorEntry.Create( "Your shader might not render properly on your workstation - you need to have Direct3D 9 enabled when working on Windows. Click the icon to enable Direct3D 9!", true ); + error.action = () => { + UnityEditor.Undo.RecordObject( editor.ps.catMeta, "error correction - enable Direct3D 9" ); + editor.ps.catMeta.usedRenderers[0] = true; + editor.OnShaderModified( NodeUpdateType.Soft ); + }; + Errors.Add( error ); + } + } + + + + + + if( editor.ps.catLighting.lightMode == SFPSC_Lighting.LightMode.PBL ) { + if( editor.ps.HasDiffuse() && !editor.ps.HasSpecular() ) { + Errors.Add( SF_ErrorEntry.Create( "Using PBL requires metallic/specular to be connected", false ) ); + } + if( !editor.ps.HasDiffuse() && editor.ps.HasSpecular() ) { + Errors.Add( SF_ErrorEntry.Create( "Using PBL requires metallic/specular to be connected", false ) ); + } + } + + + + + + + + + List dupes = new List(); + SF_Node[] propNodes = cNodes.Where(x=>x.IsProperty()).ToArray(); + for( int i = 0; i < propNodes.Length; i++ ) { + for( int j = i+1; j < propNodes.Length; j++ ) { + string nameA = propNodes[i].property.nameInternal; + string nameB = propNodes[j].property.nameInternal; + + if( nameA == nameB ) { + dupes.Add( propNodes[j] ); + } + + } + } + if( dupes.Count > 0 ) { + foreach( SF_Node dupe in dupes ) { + Errors.Add( SF_ErrorEntry.Create( "You have property nodes with conflicting internal names. Please rename one of the " + dupe.property.nameInternal + " nodes", dupe, false ) ); + } + } + + + + + List dupesVarname = new List(); + for( int i = 0; i < cNodes.Count; i++ ) { + for( int j = i + 1; j < cNodes.Count; j++ ) { + + string nameAvar = cNodes[i].variableName; + string nameBvar = cNodes[j].variableName; + + if( nameAvar == nameBvar && dupes.Contains( cNodes[j] ) == false ) { + dupesVarname.Add( cNodes[j] ); + } + } + } + if( dupesVarname.Count > 0 ) { + foreach( SF_Node dupeVarname in dupesVarname ) { + Errors.Add( SF_ErrorEntry.Create( "You have nodes with conflicting variable names. Please rename one of the " + dupeVarname.variableName + " nodes", dupeVarname, false ) ); + } + } + + + // Make sure you set the shader to double sided + if( !editor.ps.catGeometry.IsDoubleSided() && hasFacingNode ) { + SF_ErrorEntry error = SF_ErrorEntry.Create( "You are using the Face Sign node, but your shader isn't double-sided. Click the icon to fix", false ); + error.action = () => { + UnityEditor.Undo.RecordObject( editor.ps.catGeometry, "error correction - fix double sided" ); + editor.ps.catGeometry.cullMode = SFPSC_Geometry.CullMode.DoubleSided; + editor.OnShaderModified( NodeUpdateType.Hard ); + }; + Errors.Add( error ); + } + + + + + + + // Check if there are any textures in the vertex input + texturesInVertShader = HasNodeInput( editor.mainNode.vertexOffset ) || HasNodeInput( editor.mainNode.outlineWidth ); + viewDirectionInVertOffset = HasNodeInput( editor.mainNode.vertexOffset ); + + + + editor.shaderEvaluator.RemoveGhostNodes(); + + + if( foundMipUsed ) { + //if( !mipInputUsed ) // This should be fixed with #pragma glsl + // errors.Add( new SF_ErrorEntry( "MIP input is only supported in Direct X", mipNode ) ); + mipInputUsed = true; + } else { + mipInputUsed = false; + } + + + int errorCount = Errors.Count( x => !x.isWarning ); // Let it compile, even though it has warnings + + if( errorCount == 0 ) + return true; + //DisplayErrors(); + return false; + } + + private bool ConnectedNodeWithInternalNameExists( List cNodes, string s ) { + foreach( SF_Node n in cNodes.Where( x => x.IsProperty() ) ) { + if( n.property.nameInternal == s ) { + return true; + } + } + return false; + } + + + + public bool HasNodeInput( SF_NodeConnector con ) { + + if( con.IsConnectedEnabledAndAvailable() ) { + + if( con.inputCon.node is T ) { + return true; + } + + // Recursively loop through inputs of the connnected node + foreach( SF_NodeConnector c in con.inputCon.node.connectors ) { + if( c.conType == ConType.cOutput ) + continue; + if( !c.IsConnected() ) + continue; + if( HasNodeInput( c ) ) { + return true; + } + } + + } + return false; + } + + + + + + // Returns all nodes connected to the final node + public List GetListOfConnectedNodesWithGhosts( out List ghosts, bool passDependent = false ) { + //Debug.Log ("GetListOfConnectedNodesWithGhosts()"); + ResetAllNodeStatuses(); + editor.mainNode.status.SetLeadsToFinalRecursively( all: false, passDependent: passDependent ); + List filtered = new List(); + foreach( SF_Node n in editor.nodes ) { + if( n.status.leadsToFinal ) + filtered.Add( n ); + } + + // Now that's done, let's return the ghost nodes too, if any + editor.shaderEvaluator.RemoveGhostNodes(); // TODO: Really? + ghosts = new List(); + + foreach( SF_Node n in filtered ) { + n.DefineGhostsIfNeeded( ref ghosts ); + } + + //Debug.Log ("GetListOfConnectedNodesWithGhosts, ghosts.Count: " + ghosts.Count); + + filtered.AddRange( ghosts ); + + return filtered; + } + + // Resets all node statuses + public void ResetAllNodeStatuses() { + foreach( SF_Node n in editor.nodes ) { + n.status.Reset(); + } + } + + + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeTreeStatus.cs.meta b/Editor/Code/SF_NodeTreeStatus.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeTreeStatus.cs.meta rename to Editor/Code/SF_NodeTreeStatus.cs.meta index 34b8e4db..b176c970 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_NodeTreeStatus.cs.meta +++ b/Editor/Code/SF_NodeTreeStatus.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 9e9cc643ea4c843b2a52e98a499ad6bc -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 9e9cc643ea4c843b2a52e98a499ad6bc +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_Parser.cs b/Editor/Code/SF_Parser.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_Parser.cs rename to Editor/Code/SF_Parser.cs index 8927fb0d..38942306 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_Parser.cs +++ b/Editor/Code/SF_Parser.cs @@ -1,280 +1,283 @@ -using UnityEngine; -using UnityEditor; -using System.IO; -using System; -using System.Linq; -using System.Collections.Generic; - -namespace ShaderForge { - public static class SF_Parser { - - public static SF_Editor editor; - static List links; - public static bool quickLoad = false; - public static bool settingUp = false; - - - - - - /* - static void Temp() { - byte maj = 2; - byte min = 6; - - int combined = InternalVersion(maj,min); - Debug.Log( "Combined: " + combined ); - Debug.Log( "Resplit: " + ExternalVersion( combined ) ); - - } - - public static string ExternalVersion( int internalVersion ) { - byte oMaj = (byte)( internalVersion >> 8 ); - byte oMin = (byte)( internalVersion & 0x0000ffff ); - return oMaj + "." + oMin.ToString( "D2" ); - } - - public static int InternalVersion( byte maj, byte min ) { - return ( ( maj << 8 ) & 0xffff ) | min; - } - * */ - - - public static bool SerializedNodeIsProperty( string s ){ - return s.Contains(",ptlb:"); // Property label - } - - public static bool ParseNodeDataFromShader( SF_Editor editor, Shader s ) { - SF_Parser.editor = editor; - SF_Parser.links = new List(); - // Search for Shader Forge data - float version; - string data = ExtractShaderForgeData( s, out version ); - if( string.IsNullOrEmpty( data ) ) { - editor.CreateOutputNode(); - return true; // Empty shader - } - string missingNode; - bool didLoadFlawlessly = LoadFromNodeData( data, version, out missingNode ); - - if( !didLoadFlawlessly ) { - EditorUtility.DisplayDialog( "Failed to load shader", "Failed to open shader due to missing the node [" + missingNode + "]", "Close" ); - editor.Close(); -// editor.Init(); - //editor.closeMe = true; - //editor.initialized = false; - //SF_Editor.instance = null; - //editor.Close(); - return false; - } - - return true; - - } - - - - - private static bool LoadFromNodeData( string data, float version, out string missingNode ) { - // First, split by rows (;) - missingNode = ""; - string[] rows = data.Split( ';' ); // TODO: Escape ; and | characters in user created comments! - - // TODO: Subshaders etc - SF_Parser.settingUp = true; - SF_Parser.quickLoad = true; - foreach( string row in rows ) { - if( row.StartsWith( "n:" ) ) { - //Debug.Log("Deserializing node:" + row); - SF_Node node = SF_Node.Deserialize( row.Substring( 2 ), ref links ); - if( node == null ) { - missingNode = row.Substring( 2 ).Split(',')[0].Split(':')[1]; - SF_Parser.settingUp = false; - SF_Parser.quickLoad = false; - return false; // Interrupt node loading, node wasn't found - } - continue; - } - if( row.StartsWith( "ps:" ) ) { - editor.ps.Deserialize( row.Substring( 3 ) ); - continue; - } - if( row.StartsWith( "proporder:" ) ) { - editor.nodeView.treeStatus.DeserializeProps( row.Substring(10) ); - continue; - } - } - - // Create all node links - for( int i = 0; i < links.Count; i++ ) { - links[i].Establish( editor ); - } - - - // If this was created in a version older than 0.37, reverse the node tree around its center point - if( version <= 0.36f){ - - Debug.Log("Reversing node tree due to shader being created before the reversal in 0.37"); - - // Average node position - float avgX = editor.nodes.Average(x => x.rect.center.x); - - // Reverse all nodes - foreach(SF_Node node in editor.nodes){ - Vector2 old = node.rect.center; - node.rect.center = new Vector2(2 * avgX - old.x, old.y); - } - - } - - - - //Debug.Log("All links established, hierarchally refreshing..."); - // Refresh hierarchally - - //Profiler.BeginSample ("MyPieceOfCode"); - - //editor.nodeView.HierarchalRefresh(); - - //Profiler.EndSample(); - - - //Debug.Log( "Reconnect pending..." ); - - editor.nodeView.ReconnectConnectedPending(); - SF_Parser.quickLoad = false; - - //Debug.Log( "Reconnect done, updating auto settings..." ); - - // Update auto settings based on everything connected - editor.ps.UpdateAutoSettings(); - - //Debug.Log( "Auto settings done, centering camera..." ); - - // Center camera - editor.nodeView.CenterCamera(); - SF_Parser.settingUp = false; - SF_Parser.quickLoad = false; - - - // Update preview images by refreshing all outermost nodes - editor.nodeView.HierarchalRefresh(); - - //Debug.Log( "Centered camera, recompiling shader..." ); - editor.mainNode.OnUpdateNode( NodeUpdateType.Hard, true ); - - return true; - } - - - - - - - public static string ExtractShaderForgeData( Shader s, out float version, bool setPath = true, bool findRenderers = true, bool findLOD = true) { - - string path = AssetDatabase.GetAssetPath( s ); - string[] shaderData = File.ReadAllLines( path ); - - string returnString = ""; - - version = 0f; - - if( shaderData.Length == 0 || shaderData == null ) { - //Debug.LogWarning( "Shader file empty" ); - return null; - } - - bool found_data = false; - bool found_renderers = !findRenderers; - bool found_path = !setPath; - bool found_LOD = !findLOD; - - - for( int i = 0; i < shaderData.Length; i++ ) { - if(shaderData[i].Contains("Shader created with Shader Forge")){ - string[] split = shaderData[i].Trim().Split(' '); - string verStr = split[split.Length-1]; - - if( verStr.StartsWith( "v" ) ) - verStr = verStr.Substring( 1 ); - - version = float.Parse(verStr); - } - if( shaderData[i].StartsWith( "/*SF_DATA;" ) ) { - returnString = shaderData[i].Substring( 10, shaderData[i].Length - 12 ); // Exclude comment markup - found_data = true; - } - if( setPath ) - if( shaderData[i].StartsWith( "Shader" ) ) { - editor.currentShaderPath = shaderData[i].Split( '\"' )[1]; - found_path = true; - } - if( findRenderers ) { - if( shaderData[i].TrimStart().StartsWith( "#pragma only_renderers" ) ) { - ParseRenderer( shaderData[i].Trim().Split( ' ' ), true); - found_renderers = true; - } else if( shaderData[i].TrimStart().StartsWith( "#pragma exclude_renderers" ) ) { - ParseRenderer( shaderData[i].Trim().Split( ' ' ), false ); - found_renderers = true; - } - } - if( findLOD ) { - if( shaderData[i].TrimStart().StartsWith( "LOD " ) ) { - editor.ps.catMeta.LOD = int.Parse(shaderData[i].Trim().Split( ' ' )[1]); - found_LOD = true; - } - } - - if( found_data && found_path && found_renderers && found_LOD ) - break; - } - - - - if( string.IsNullOrEmpty( returnString ) ) { - //Debug.LogWarning( "Shader did not contain node data" ); - } - - // TODO: check when it was last changed! - // This is where it should ask you if you want to overwrite the existing data, - // if it's older than x minutes - - return returnString; - } - - - public static bool ContainsShaderForgeData(Shader s){ - float version; - string sfData = SF_Parser.ExtractShaderForgeData( s, out version, false, false, false ); - return !string.IsNullOrEmpty( sfData ); - } - - public static void ParseRenderer( string[] arr, bool only ) { - for( int i = 0; i < editor.ps.catMeta.usedRenderers.Length; i++ ) { - editor.ps.catMeta.usedRenderers[i] = !only; // Enable or disable all - } - for( int i = 2; i < arr.Length; i++ ) { // i = 2 to ignore #pragma x_renderers - string rndr = arr[i]; - if( rndr == "flash" ) { - Debug.LogWarning( "Flash is no longer supported by Unity, and was removed from the shader" ); - continue; - } - if( rndr == "ps3" ) { - Debug.LogWarning( "PS3 is no longer supported by Unity since 5.5, and was removed from the shader" ); - continue; - } - if( rndr == "xbox360" ) { - Debug.LogWarning( "Xbox 360 is no longer supported by Unity since 5.5, and was removed from the shader" ); - continue; - } - if( rndr == "opengl" ) { - rndr = "glcore"; - } - int enm = (int)((RenderPlatform)Enum.Parse( typeof( RenderPlatform ), rndr )); - editor.ps.catMeta.usedRenderers[enm] = only; // Disable or enable one - } - } - - } +using UnityEngine; +using UnityEditor; +using System.IO; +using System; +using System.Linq; +using System.Collections.Generic; + +namespace ShaderForge { + public static class SF_Parser { + + public static SF_Editor editor; + static List links; + public static bool quickLoad = false; + public static bool settingUp = false; + + + + + + /* + static void Temp() { + byte maj = 2; + byte min = 6; + + int combined = InternalVersion(maj,min); + Debug.Log( "Combined: " + combined ); + Debug.Log( "Resplit: " + ExternalVersion( combined ) ); + + } + + public static string ExternalVersion( int internalVersion ) { + byte oMaj = (byte)( internalVersion >> 8 ); + byte oMin = (byte)( internalVersion & 0x0000ffff ); + return oMaj + "." + oMin.ToString( "D2" ); + } + + public static int InternalVersion( byte maj, byte min ) { + return ( ( maj << 8 ) & 0xffff ) | min; + } + * */ + + + public static bool SerializedNodeIsProperty( string s ){ + return s.Contains(",ptlb:"); // Property label + } + + public static bool ParseNodeDataFromShader( SF_Editor editor, Shader s ) { + SF_Parser.editor = editor; + SF_Parser.links = new List(); + // Search for Shader Forge data + float version; + string data = ExtractShaderForgeData( s, out version ); + if( string.IsNullOrEmpty( data ) ) { + editor.CreateOutputNode(); + return true; // Empty shader + } + string missingNode; + bool didLoadFlawlessly = LoadFromNodeData( data, version, out missingNode ); + + if( !didLoadFlawlessly ) { + EditorUtility.DisplayDialog( "Failed to load shader", "Failed to open shader due to missing the node [" + missingNode + "]", "Close" ); + editor.Close(); +// editor.Init(); + //editor.closeMe = true; + //editor.initialized = false; + //SF_Editor.instance = null; + //editor.Close(); + return false; + } + + return true; + + } + + + + + private static bool LoadFromNodeData( string data, float version, out string missingNode ) { + // First, split by rows (;) + missingNode = ""; + string[] rows = data.Split( ';' ); // TODO: Escape ; and | characters in user created comments! + + // TODO: Subshaders etc + SF_Parser.settingUp = true; + SF_Parser.quickLoad = true; + foreach( string row in rows ) { + if( row.StartsWith( "n:" ) ) { + //Debug.Log("Deserializing node:" + row); + SF_Node node = SF_Node.Deserialize( row.Substring( 2 ), ref links ); + if( node == null ) { + missingNode = row.Substring( 2 ).Split(',')[0].Split(':')[1]; + SF_Parser.settingUp = false; + SF_Parser.quickLoad = false; + return false; // Interrupt node loading, node wasn't found + } + continue; + } + if( row.StartsWith( "ps:" ) ) { + editor.ps.Deserialize( row.Substring( 3 ) ); + continue; + } + if( row.StartsWith( "proporder:" ) ) { + editor.nodeView.treeStatus.DeserializeProps( row.Substring(10) ); + continue; + } + } + + // Create all node links + for( int i = 0; i < links.Count; i++ ) { + links[i].Establish( editor ); + } + + + // If this was created in a version older than 0.37, reverse the node tree around its center point + if( version <= 0.36f){ + + Debug.Log("Reversing node tree due to shader being created before the reversal in 0.37"); + + // Average node position + float avgX = editor.nodes.Average(x => x.rect.center.x); + + // Reverse all nodes + foreach(SF_Node node in editor.nodes){ + Vector2 old = node.rect.center; + node.rect.center = new Vector2(2 * avgX - old.x, old.y); + } + + } + + + + //Debug.Log("All links established, hierarchally refreshing..."); + // Refresh hierarchally + + //Profiler.BeginSample ("MyPieceOfCode"); + + //editor.nodeView.HierarchalRefresh(); + + //Profiler.EndSample(); + + + //Debug.Log( "Reconnect pending..." ); + + editor.nodeView.ReconnectConnectedPending(); + SF_Parser.quickLoad = false; + + //Debug.Log( "Reconnect done, updating auto settings..." ); + + // Update auto settings based on everything connected + editor.ps.UpdateAutoSettings(); + + //Debug.Log( "Auto settings done, centering camera..." ); + + // Center camera + editor.nodeView.CenterCamera(); + SF_Parser.settingUp = false; + SF_Parser.quickLoad = false; + + + // Update preview images by refreshing all outermost nodes + editor.nodeView.HierarchalRefresh(); + + //Debug.Log( "Centered camera, recompiling shader..." ); + editor.mainNode.OnUpdateNode( NodeUpdateType.Hard, true ); + + return true; + } + + + + + + + public static string ExtractShaderForgeData( Shader s, out float version, bool setPath = true, bool findRenderers = true, bool findLOD = true) { + + string path = AssetDatabase.GetAssetPath( s ); + string[] shaderData = File.ReadAllLines( path ); + + string returnString = ""; + + version = 0f; + + if( shaderData.Length == 0 || shaderData == null ) { + //Debug.LogWarning( "Shader file empty" ); + return null; + } + + bool found_data = false; + bool found_renderers = !findRenderers; + bool found_path = !setPath; + bool found_LOD = !findLOD; + + + for( int i = 0; i < shaderData.Length; i++ ) { + if(shaderData[i].Contains("Shader created with Shader Forge")){ + string[] split = shaderData[i].Trim().Split(' '); + string verStr = split[split.Length-1]; + + if( verStr.StartsWith( "v" ) ) + verStr = verStr.Substring( 1 ); + + version = float.Parse(verStr); + } + if( shaderData[i].StartsWith( "/*SF_DATA;" ) ) { + returnString = shaderData[i].Substring( 10, shaderData[i].Length - 12 ); // Exclude comment markup + found_data = true; + } + if( setPath ) + if( shaderData[i].StartsWith( "Shader" ) ) { + editor.currentShaderPath = shaderData[i].Split( '\"' )[1]; + found_path = true; + } + if( findRenderers ) { + if( shaderData[i].TrimStart().StartsWith( "#pragma only_renderers" ) ) { + ParseRenderer( shaderData[i].Trim().Split( ' ' ), true); + found_renderers = true; + } else if( shaderData[i].TrimStart().StartsWith( "#pragma exclude_renderers" ) ) { + ParseRenderer( shaderData[i].Trim().Split( ' ' ), false ); + found_renderers = true; + } + } + if( findLOD ) { + if( shaderData[i].TrimStart().StartsWith( "LOD " ) ) { + editor.ps.catMeta.LOD = int.Parse(shaderData[i].Trim().Split( ' ' )[1]); + found_LOD = true; + } + } + + if( found_data && found_path && found_renderers && found_LOD ) + break; + } + + + + if( string.IsNullOrEmpty( returnString ) ) { + //Debug.LogWarning( "Shader did not contain node data" ); + } + + // TODO: check when it was last changed! + // This is where it should ask you if you want to overwrite the existing data, + // if it's older than x minutes + + return returnString; + } + + + public static bool ContainsShaderForgeData(Shader s){ + float version; + string sfData = SF_Parser.ExtractShaderForgeData( s, out version, false, false, false ); + return !string.IsNullOrEmpty( sfData ); + } + + public static void ParseRenderer( string[] arr, bool only ) { + for( int i = 0; i < editor.ps.catMeta.usedRenderers.Length; i++ ) { + editor.ps.catMeta.usedRenderers[i] = !only; // Enable or disable all + } + for( int i = 2; i < arr.Length; i++ ) { // i = 2 to ignore #pragma x_renderers + string rndr = arr[i]; + if( rndr == "flash" ) { + Debug.LogWarning( "Flash is no longer supported by Unity, and was removed from the shader" ); + continue; + } + if( rndr == "ps3" ) { + Debug.LogWarning( "PS3 is no longer supported by Unity since 5.5, and was removed from the shader" ); + continue; + } + if( rndr == "xbox360" ) { + Debug.LogWarning( "Xbox 360 is no longer supported by Unity since 5.5, and was removed from the shader" ); + continue; + } + if( rndr == "opengl" ) { + rndr = "glcore"; + } + if( rndr == "switch" ) { + rndr = "nswitch"; + } + int enm = (int)((RenderPlatform)Enum.Parse( typeof( RenderPlatform ), rndr )); + editor.ps.catMeta.usedRenderers[enm] = only; // Disable or enable one + } + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_Parser.cs.meta b/Editor/Code/SF_Parser.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_Parser.cs.meta rename to Editor/Code/SF_Parser.cs.meta index 5c3d3717..f832423d --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_Parser.cs.meta +++ b/Editor/Code/SF_Parser.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 75956f9dcf7c14856949a94823268bb4 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 75956f9dcf7c14856949a94823268bb4 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_PassSettings.cs b/Editor/Code/SF_PassSettings.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_PassSettings.cs rename to Editor/Code/SF_PassSettings.cs index 18d62789..a3e60f93 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_PassSettings.cs +++ b/Editor/Code/SF_PassSettings.cs @@ -1,414 +1,421 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -using System.Collections.Generic; - -namespace ShaderForge { - - - [System.Serializable] - public class SF_PassSettings : ScriptableObject { - - // Mat ed - public SF_Editor editor; - public SF_FeatureChecker fChecker; - - - - - // SERIALIZATION OF VARS - public string Serialize() { - string s = "ps:"; - foreach(SFPS_Category cat in cats){ - s += cat.Serialize(); - } - return s.Substring(0,s.Length-1); - } - - - // TODO: Remove this, keep it in cats - private string Serialize( string key, string value, bool last = false ) { - return key + ":" + value + (last ? "" : ","); - } - - // DESERIALIZATION OF VARS - public void Deserialize(string s) { - string[] split = s.Split(','); - for( int i = 0; i < split.Length; i++ ) { - string[] keyval = split[i].Split(':'); - Deserialize( keyval[0], keyval[1] ); - } - } - - public void Deserialize( string key, string value ) { - foreach(SFPS_Category cat in cats){ - cat.Deserialize(key, value); - } - catBlending.UpdateAutoSort(); - } - - - - - - // END SERIALIZATION - - - // Node/auto vars - public string n_diffuse { - get { return mOut.diffuse.TryEvaluate(); } // Vector3 only - } - public string n_alpha { - get { return mOut.alpha.TryEvaluate(); } - } - public string n_alphaClip { - get { return mOut.alphaClip.TryEvaluate(); } - } - public string n_diffusePower { - get { return mOut.diffusePower.TryEvaluate(); } - } - public string n_gloss { - get { return mOut.gloss.TryEvaluate(); } - } - public string n_specular { - get { return mOut.specular.TryEvaluate(); } // Vector3 only - } - public string n_normals { - get { return mOut.normal.TryEvaluate(); } // Vector3 only - } - public string n_emissive { - get { return mOut.emissive.TryEvaluate(); } // Vector3 only - } - public string n_transmission { - get { return mOut.transmission.TryEvaluate(); } - } - public string n_lightWrap { - get { return mOut.lightWrap.TryEvaluate(); } - } - - public string n_ambientDiffuse { - get { return mOut.ambientDiffuse.TryEvaluate(); } - } - public string n_ambientSpecular { - get { return mOut.ambientSpecular.TryEvaluate(); } - } - public string n_diffuseOcclusion { - get { return mOut.diffuseOcclusion.TryEvaluate(); } - } - public string n_specularOcclusion { - get { return mOut.specularOcclusion.TryEvaluate(); } - } - public string n_customLighting { - get { return mOut.customLighting.TryEvaluate(); } - } - - public string n_outlineWidth { - get { return mOut.outlineWidth.TryEvaluate(); } - } - public string n_outlineColor { - get { return mOut.outlineColor.TryEvaluate(); } - } - public string n_distortion { - get { return mOut.refraction.TryEvaluate(); } - } - public string n_vertexOffset { - get { return mOut.vertexOffset.TryEvaluate(); } - } - public string n_displacement { - get { return mOut.displacement.TryEvaluate(); } - } - public string n_tessellation { - get { return mOut.tessellation.TryEvaluate(); } - } - public SFN_Final mOut { - get { return editor.mainNode; } - } - - - // GUI controls - //const int expIndent = 16; - - public List cats; - public SFPSC_Meta catMeta; - public SFPSC_Properties catProperties; - public SFPSC_Lighting catLighting; - public SFPSC_Geometry catGeometry; - public SFPSC_Blending catBlending; - public SFPSC_Experimental catExperimental; - public SFPSC_Console catConsole; - - // Add more here - - public int maxWidth; - - public SF_PassSettings() { - - } - - public void OnEnable() { - base.hideFlags = HideFlags.HideAndDontSave; - } - - public SF_PassSettings Initialize( SF_Editor materialEditor ) { - - this.editor = materialEditor; - fChecker = ScriptableObject.CreateInstance().Initialize(this, materialEditor); - - cats = new List(); - cats.Add( catMeta = NewCat ( "Shader Settings" )); - cats.Add( catProperties = NewCat ( "Properties" )); - cats.Add( catLighting = NewCat ( "Lighting" )); - cats.Add( catGeometry = NewCat ( "Geometry" )); - cats.Add( catBlending = NewCat ( "Blending" )); - cats.Add( catExperimental = NewCat ( "Experimental" )); - cats.Add( catConsole = NewCat ( "Console" )); - - return this; - } - - public T NewCat(string label) where T : SFPS_Category{ - return (T)ScriptableObject.CreateInstance().Initialize(this.editor, this, label); - } - - - Rect innerScrollRect = new Rect(0,0,0,0); - Vector2 scrollPos; - - float targetScrollWidth = 0f; - float currentScrollWidth = 0f; - - // Call this from the editor script - public bool guiChanged = false; - public int OnLocalGUI( int yOffset, int in_maxWidth ) { - - - if(Event.current.type == EventType.Repaint) - currentScrollWidth = Mathf.Lerp(currentScrollWidth, targetScrollWidth, 0.3f); - - this.maxWidth = in_maxWidth; - - Rect scrollRectPos = new Rect(0f,yOffset,in_maxWidth,Screen.height/EditorGUIUtility.pixelsPerPoint-yOffset-20); - bool useScrollbar = (innerScrollRect.height > scrollRectPos.height); - - targetScrollWidth = useScrollbar ? 15 : 0; - - int scrollBarWidth = (int)currentScrollWidth; - - - innerScrollRect.width = in_maxWidth-scrollBarWidth; - - guiChanged = false; - - int offset = 0; - - if(innerScrollRect.height < scrollRectPos.height) - innerScrollRect.height = scrollRectPos.height; - - this.maxWidth -= scrollBarWidth; - - int scrollPad = scrollBarWidth-15; - GUI.BeginGroup(scrollRectPos); - Rect scrollWrapper = scrollRectPos; - scrollWrapper.x = 0; - scrollWrapper.y = 0; // Since it's grouped - scrollPos = GUI.BeginScrollView(scrollWrapper.PadRight(scrollPad),scrollPos,innerScrollRect,false,true); - { - //offset = SettingsMeta( 0 ); - bool showErrors = editor.nodeView.treeStatus.Errors.Count > 0; - if( !showErrors ) - catConsole.expanded = false; - EditorGUI.BeginDisabledGroup( !showErrors ); - offset = catConsole.Draw( offset ); - offset = GUISeparator( offset ); // ---------------------------------------------- - EditorGUI.EndDisabledGroup(); - offset = catMeta.Draw( offset ); - offset = GUISeparator( offset ); // ---------------------------------------------- - offset = catProperties.Draw(offset); - offset = GUISeparator( offset ); // ---------------------------------------------- - offset = catLighting.Draw(offset); - offset = GUISeparator( offset ); // ---------------------------------------------- - offset = catGeometry.Draw( offset ); - offset = GUISeparator( offset ); // ---------------------------------------------- - offset = catBlending.Draw(offset); - offset = GUISeparator( offset ); // ---------------------------------------------- - offset = catExperimental.Draw(offset); - offset = GUISeparator( offset ); // ---------------------------------------------- - - } - GUI.EndScrollView(); - GUI.EndGroup(); - this.maxWidth += scrollBarWidth; - - - if( guiChanged ) { - editor.ps = this; - editor.OnShaderModified(NodeUpdateType.Hard); - } - - innerScrollRect.height = offset; - return offset; - - } - - - - private bool prevChangeState; - public void StartIgnoreChangeCheck() { - prevChangeState = EditorGUI.EndChangeCheck(); // Don't detect changes when toggling - } - - public void EndIgnoreChangeCheck() { - EditorGUI.BeginChangeCheck(); // Don't detect changes when toggling - if( prevChangeState ) { - GUI.changed = true; - } - } - - - - public void UpdateAutoSettings(){ - catBlending.UpdateAutoSettings(); - } - - - - public int GUISeparator(int yOffset) { - GUI.Box( new Rect(0,yOffset,maxWidth,1), "", EditorStyles.textField ); - return yOffset + 1; - } - - public bool IsOutlined(){ - return mOut.outlineWidth.IsConnectedEnabledAndAvailable(); - } - - public bool UseClipping() { - return mOut.alphaClip.IsConnectedEnabledAndAvailable(); - } - - public bool HasGloss(){ - return mOut.gloss.IsConnectedEnabledAndAvailable(); - } - - public bool HasNormalMap() { - return mOut.normal.IsConnectedEnabledAndAvailable(); - } - - public bool HasTangentSpaceNormalMap() { - return HasNormalMap() && catGeometry.normalSpace == SFPSC_Geometry.NormalSpace.Tangent; - } - public bool HasObjectSpaceNormalMap() { - return HasNormalMap() && catGeometry.normalSpace == SFPSC_Geometry.NormalSpace.Object; - } - public bool HasWorldSpaceNormalMap() { - return HasNormalMap() && catGeometry.normalSpace == SFPSC_Geometry.NormalSpace.World; - } - - public bool HasRefraction() { - return mOut.refraction.IsConnectedEnabledAndAvailable(); - } - - public bool HasTessellation() { - return mOut.tessellation.IsConnectedEnabledAndAvailable(); - } - public bool HasOutline() { - return mOut.outlineWidth.IsConnectedEnabledAndAvailable(); - } - - public bool HasDisplacement() { - return mOut.displacement.IsConnectedEnabledAndAvailable(); - } - - public bool HasEmissive() { - return mOut.emissive.IsConnectedEnabledAndAvailable(); - } - - public bool HasDiffuse(){ - return mOut.diffuse.IsConnectedEnabledAndAvailable(); - } - - public bool HasAlpha() { - return mOut.alpha.IsConnectedEnabledAndAvailable(); - } - - public bool HasAlphaClip() { - return mOut.alphaClip.IsConnectedEnabledAndAvailable(); - } - - public bool HasSpecular(){ - return mOut.specular.IsConnectedEnabledAndAvailable(); - } - - public bool HasDiffusePower(){ - return mOut.diffusePower.IsConnectedEnabledAndAvailable(); - } - - public bool HasAmbientDiffuse() { - return mOut.ambientDiffuse.IsConnectedEnabledAndAvailable(); - } - - public bool HasAmbientSpecular() { - return mOut.ambientSpecular.IsConnectedEnabledAndAvailable(); - } - - public bool HasAmbientOcclusionDiffuse() { - return mOut.diffuseOcclusion.IsConnectedEnabledAndAvailable(); - } - - public bool HasAmbientOcclusionSpecular() { - return mOut.specularOcclusion.IsConnectedEnabledAndAvailable(); - } - - public bool HasTransmission() { - return mOut.transmission.IsConnectedEnabledAndAvailable(); - } - - public bool HasAddedLight() { - return HasEmissive() || catLighting.HasSpecular(); - } - - public bool HasLightWrapping() { - return mOut.lightWrap.IsConnectedEnabledAndAvailable(); - } - } -} - -/* - public class SF_Serializeable{ - - public string key; - - public SF_Serializeable(){ - - } - - public virtual string Serialize(bool last = false){ - } - - public virtual void Deserialize(string key, string value){ - } - - protected string Serialize( string key, string value, bool last = false ) { - return key + ":" + value + (last ? "" : ","); - } - - } - - public class SFS_Int : SF_Serializeable{ - - int val; - - public SFS_Int(string key){ - this.key = key; - } - - public override string Serialize(bool last = false){ - return Serialize(key,val.ToString(),last); - } - - public override void Deserialize(string key, string value){ - if(key == this.key){ - val = int.Parse(value); - } - } - +using UnityEngine; +using UnityEditor; +using System.Collections; +using System.Collections.Generic; + +namespace ShaderForge { + + + [System.Serializable] + public class SF_PassSettings : ScriptableObject { + + // Mat ed + public SF_Editor editor; + public SF_FeatureChecker fChecker; + + + + + // SERIALIZATION OF VARS + public string Serialize() { + string s = "ps:"; + foreach(SFPS_Category cat in cats){ + s += cat.Serialize(); + } + return s.Substring(0,s.Length-1); + } + + + // TODO: Remove this, keep it in cats + private string Serialize( string key, string value, bool last = false ) { + return key + ":" + value + (last ? "" : ","); + } + + // DESERIALIZATION OF VARS + public void Deserialize(string s) { + string[] split = s.Split(','); + for( int i = 0; i < split.Length; i++ ) { + string[] keyval = split[i].Split(':'); + if(keyval.Length<2) + { + string[] newsplit=new string[2]; + newsplit[0]=keyval[0]; + newsplit[1]=""; + keyval=newsplit; + } + Deserialize( keyval[0], keyval[1] ); + } + } + + public void Deserialize( string key, string value ) { + foreach(SFPS_Category cat in cats){ + cat.Deserialize(key, value); + } + catBlending.UpdateAutoSort(); + } + + + + + + // END SERIALIZATION + + + // Node/auto vars + public string n_diffuse { + get { return mOut.diffuse.TryEvaluate(); } // Vector3 only + } + public string n_alpha { + get { return mOut.alpha.TryEvaluate(); } + } + public string n_alphaClip { + get { return mOut.alphaClip.TryEvaluate(); } + } + public string n_diffusePower { + get { return mOut.diffusePower.TryEvaluate(); } + } + public string n_gloss { + get { return mOut.gloss.TryEvaluate(); } + } + public string n_specular { + get { return mOut.specular.TryEvaluate(); } // Vector3 only + } + public string n_normals { + get { return mOut.normal.TryEvaluate(); } // Vector3 only + } + public string n_emissive { + get { return mOut.emissive.TryEvaluate(); } // Vector3 only + } + public string n_transmission { + get { return mOut.transmission.TryEvaluate(); } + } + public string n_lightWrap { + get { return mOut.lightWrap.TryEvaluate(); } + } + + public string n_ambientDiffuse { + get { return mOut.ambientDiffuse.TryEvaluate(); } + } + public string n_ambientSpecular { + get { return mOut.ambientSpecular.TryEvaluate(); } + } + public string n_diffuseOcclusion { + get { return mOut.diffuseOcclusion.TryEvaluate(); } + } + public string n_specularOcclusion { + get { return mOut.specularOcclusion.TryEvaluate(); } + } + public string n_customLighting { + get { return mOut.customLighting.TryEvaluate(); } + } + + public string n_outlineWidth { + get { return mOut.outlineWidth.TryEvaluate(); } + } + public string n_outlineColor { + get { return mOut.outlineColor.TryEvaluate(); } + } + public string n_distortion { + get { return mOut.refraction.TryEvaluate(); } + } + public string n_vertexOffset { + get { return mOut.vertexOffset.TryEvaluate(); } + } + public string n_displacement { + get { return mOut.displacement.TryEvaluate(); } + } + public string n_tessellation { + get { return mOut.tessellation.TryEvaluate(); } + } + public SFN_Final mOut { + get { return editor.mainNode; } + } + + + // GUI controls + //const int expIndent = 16; + + public List cats; + public SFPSC_Meta catMeta; + public SFPSC_Properties catProperties; + public SFPSC_Lighting catLighting; + public SFPSC_Geometry catGeometry; + public SFPSC_Blending catBlending; + public SFPSC_Experimental catExperimental; + public SFPSC_Console catConsole; + + // Add more here + + public int maxWidth; + + public SF_PassSettings() { + + } + + public void OnEnable() { + base.hideFlags = HideFlags.HideAndDontSave; + } + + public SF_PassSettings Initialize( SF_Editor materialEditor ) { + + this.editor = materialEditor; + fChecker = ScriptableObject.CreateInstance().Initialize(this, materialEditor); + + cats = new List(); + cats.Add( catMeta = NewCat ( "Shader Settings" )); + cats.Add( catProperties = NewCat ( "Properties" )); + cats.Add( catLighting = NewCat ( "Lighting" )); + cats.Add( catGeometry = NewCat ( "Geometry" )); + cats.Add( catBlending = NewCat ( "Blending" )); + cats.Add( catExperimental = NewCat ( "Experimental" )); + cats.Add( catConsole = NewCat ( "Console" )); + + return this; + } + + public T NewCat(string label) where T : SFPS_Category{ + return (T)ScriptableObject.CreateInstance().Initialize(this.editor, this, label); + } + + + Rect innerScrollRect = new Rect(0,0,0,0); + Vector2 scrollPos; + + float targetScrollWidth = 0f; + float currentScrollWidth = 0f; + + // Call this from the editor script + public bool guiChanged = false; + public int OnLocalGUI( int yOffset, int in_maxWidth ) { + + + if(Event.current.type == EventType.Repaint) + currentScrollWidth = Mathf.Lerp(currentScrollWidth, targetScrollWidth, 0.3f); + + this.maxWidth = in_maxWidth; + + Rect scrollRectPos = new Rect(0f,yOffset,in_maxWidth,Screen.height/EditorGUIUtility.pixelsPerPoint-yOffset-20); + bool useScrollbar = (innerScrollRect.height > scrollRectPos.height); + + targetScrollWidth = useScrollbar ? 15 : 0; + + int scrollBarWidth = (int)currentScrollWidth; + + + innerScrollRect.width = in_maxWidth-scrollBarWidth; + + guiChanged = false; + + int offset = 0; + + if(innerScrollRect.height < scrollRectPos.height) + innerScrollRect.height = scrollRectPos.height; + + this.maxWidth -= scrollBarWidth; + + int scrollPad = scrollBarWidth-15; + GUI.BeginGroup(scrollRectPos); + Rect scrollWrapper = scrollRectPos; + scrollWrapper.x = 0; + scrollWrapper.y = 0; // Since it's grouped + scrollPos = GUI.BeginScrollView(scrollWrapper.PadRight(scrollPad),scrollPos,innerScrollRect,false,true); + { + //offset = SettingsMeta( 0 ); + bool showErrors = editor.nodeView.treeStatus.Errors.Count > 0; + if( !showErrors ) + catConsole.expanded = false; + EditorGUI.BeginDisabledGroup( !showErrors ); + offset = catConsole.Draw( offset ); + offset = GUISeparator( offset ); // ---------------------------------------------- + EditorGUI.EndDisabledGroup(); + offset = catMeta.Draw( offset ); + offset = GUISeparator( offset ); // ---------------------------------------------- + offset = catProperties.Draw(offset); + offset = GUISeparator( offset ); // ---------------------------------------------- + offset = catLighting.Draw(offset); + offset = GUISeparator( offset ); // ---------------------------------------------- + offset = catGeometry.Draw( offset ); + offset = GUISeparator( offset ); // ---------------------------------------------- + offset = catBlending.Draw(offset); + offset = GUISeparator( offset ); // ---------------------------------------------- + offset = catExperimental.Draw(offset); + offset = GUISeparator( offset ); // ---------------------------------------------- + + } + GUI.EndScrollView(); + GUI.EndGroup(); + this.maxWidth += scrollBarWidth; + + + if( guiChanged ) { + editor.ps = this; + editor.OnShaderModified(NodeUpdateType.Hard); + } + + innerScrollRect.height = offset; + return offset; + + } + + + + private bool prevChangeState; + public void StartIgnoreChangeCheck() { + prevChangeState = EditorGUI.EndChangeCheck(); // Don't detect changes when toggling + } + + public void EndIgnoreChangeCheck() { + EditorGUI.BeginChangeCheck(); // Don't detect changes when toggling + if( prevChangeState ) { + GUI.changed = true; + } + } + + + + public void UpdateAutoSettings(){ + catBlending.UpdateAutoSettings(); + } + + + + public int GUISeparator(int yOffset) { + GUI.Box( new Rect(0,yOffset,maxWidth,1), "", EditorStyles.textField ); + return yOffset + 1; + } + + public bool IsOutlined(){ + return mOut.outlineWidth.IsConnectedEnabledAndAvailable(); + } + + public bool UseClipping() { + return mOut.alphaClip.IsConnectedEnabledAndAvailable(); + } + + public bool HasGloss(){ + return mOut.gloss.IsConnectedEnabledAndAvailable(); + } + + public bool HasNormalMap() { + return mOut.normal.IsConnectedEnabledAndAvailable(); + } + + public bool HasTangentSpaceNormalMap() { + return HasNormalMap() && catGeometry.normalSpace == SFPSC_Geometry.NormalSpace.Tangent; + } + public bool HasObjectSpaceNormalMap() { + return HasNormalMap() && catGeometry.normalSpace == SFPSC_Geometry.NormalSpace.Object; + } + public bool HasWorldSpaceNormalMap() { + return HasNormalMap() && catGeometry.normalSpace == SFPSC_Geometry.NormalSpace.World; + } + + public bool HasRefraction() { + return mOut.refraction.IsConnectedEnabledAndAvailable(); + } + + public bool HasTessellation() { + return mOut.tessellation.IsConnectedEnabledAndAvailable(); + } + public bool HasOutline() { + return mOut.outlineWidth.IsConnectedEnabledAndAvailable(); + } + + public bool HasDisplacement() { + return mOut.displacement.IsConnectedEnabledAndAvailable(); + } + + public bool HasEmissive() { + return mOut.emissive.IsConnectedEnabledAndAvailable(); + } + + public bool HasDiffuse(){ + return mOut.diffuse.IsConnectedEnabledAndAvailable(); + } + + public bool HasAlpha() { + return mOut.alpha.IsConnectedEnabledAndAvailable(); + } + + public bool HasAlphaClip() { + return mOut.alphaClip.IsConnectedEnabledAndAvailable(); + } + + public bool HasSpecular(){ + return mOut.specular.IsConnectedEnabledAndAvailable(); + } + + public bool HasDiffusePower(){ + return mOut.diffusePower.IsConnectedEnabledAndAvailable(); + } + + public bool HasAmbientDiffuse() { + return mOut.ambientDiffuse.IsConnectedEnabledAndAvailable(); + } + + public bool HasAmbientSpecular() { + return mOut.ambientSpecular.IsConnectedEnabledAndAvailable(); + } + + public bool HasAmbientOcclusionDiffuse() { + return mOut.diffuseOcclusion.IsConnectedEnabledAndAvailable(); + } + + public bool HasAmbientOcclusionSpecular() { + return mOut.specularOcclusion.IsConnectedEnabledAndAvailable(); + } + + public bool HasTransmission() { + return mOut.transmission.IsConnectedEnabledAndAvailable(); + } + + public bool HasAddedLight() { + return HasEmissive() || catLighting.HasSpecular(); + } + + public bool HasLightWrapping() { + return mOut.lightWrap.IsConnectedEnabledAndAvailable(); + } + } +} + +/* + public class SF_Serializeable{ + + public string key; + + public SF_Serializeable(){ + + } + + public virtual string Serialize(bool last = false){ + } + + public virtual void Deserialize(string key, string value){ + } + + protected string Serialize( string key, string value, bool last = false ) { + return key + ":" + value + (last ? "" : ","); + } + + } + + public class SFS_Int : SF_Serializeable{ + + int val; + + public SFS_Int(string key){ + this.key = key; + } + + public override string Serialize(bool last = false){ + return Serialize(key,val.ToString(),last); + } + + public override void Deserialize(string key, string value){ + if(key == this.key){ + val = int.Parse(value); + } + } + }*/ \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_PassSettings.cs.meta b/Editor/Code/SF_PassSettings.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_PassSettings.cs.meta rename to Editor/Code/SF_PassSettings.cs.meta index 929b76b9..14e05a86 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_PassSettings.cs.meta +++ b/Editor/Code/SF_PassSettings.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: dc6ba9da0a5ba4b01a67cbac50456748 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: dc6ba9da0a5ba4b01a67cbac50456748 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_PreviewSettings.cs b/Editor/Code/SF_PreviewSettings.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_PreviewSettings.cs rename to Editor/Code/SF_PreviewSettings.cs index d6d85bf6..d73a4da2 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_PreviewSettings.cs +++ b/Editor/Code/SF_PreviewSettings.cs @@ -1,22 +1,22 @@ -using UnityEngine; -using System.Collections; - -namespace ShaderForge { - [System.Serializable] - public class SF_PreviewSettings { - - //public SF_PreviewWindow preview; - - // TODO: Load/Save default settings - - public bool previewAutoRotate = true; - public Color colorBg = SF_GUI.ProSkin ? new Color( 0.2f, 0.2f, 0.2f, 1f ) : new Color( 0.6f, 0.6f, 0.6f, 1f ); - - - public SF_PreviewSettings( SF_PreviewWindow preview ) { - //this.preview = preview; - } - - - } +using UnityEngine; +using System.Collections; + +namespace ShaderForge { + [System.Serializable] + public class SF_PreviewSettings { + + //public SF_PreviewWindow preview; + + // TODO: Load/Save default settings + + public bool previewAutoRotate = true; + public Color colorBg = SF_GUI.ProSkin ? new Color( 0.2f, 0.2f, 0.2f, 1f ) : new Color( 0.6f, 0.6f, 0.6f, 1f ); + + + public SF_PreviewSettings( SF_PreviewWindow preview ) { + //this.preview = preview; + } + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_PreviewSettings.cs.meta b/Editor/Code/SF_PreviewSettings.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_PreviewSettings.cs.meta rename to Editor/Code/SF_PreviewSettings.cs.meta index dc54a197..833d8827 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_PreviewSettings.cs.meta +++ b/Editor/Code/SF_PreviewSettings.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 893d44f1243e74fbca6139978a92f372 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 893d44f1243e74fbca6139978a92f372 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_PreviewWindow.cs b/Editor/Code/SF_PreviewWindow.cs old mode 100755 new mode 100644 similarity index 92% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_PreviewWindow.cs rename to Editor/Code/SF_PreviewWindow.cs index 74ff2e0c..641e235f --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_PreviewWindow.cs +++ b/Editor/Code/SF_PreviewWindow.cs @@ -1,506 +1,507 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -using System.Reflection; -using System; - -namespace ShaderForge { - [Serializable] - public class SF_PreviewWindow { - - [SerializeField] - public SF_Editor editor; - [SerializeField] - public SF_PreviewSettings settings; - - // Preview assets - [SerializeField] - public Mesh mesh; - [SerializeField] - public Material internalMaterial; - public Material InternalMaterial { - get { - if(internalMaterial == null){ - internalMaterial = new Material(editor.currentShaderAsset); - } - return internalMaterial; - } - set { - internalMaterial = value; - } - } - - [SerializeField] - public RenderTexture render; // TODO: Why is this separated from the RT itself? - [SerializeField] - GUIStyle previewStyle; - [SerializeField] - public Texture2D backgroundTexture; - - bool previewIsSetUp = false; // Intentionally non-serialized - - - // Input/Rotation - [SerializeField] - public bool isDraggingLMB = false; - [SerializeField] - Vector2 dragStartPosLMB = Vector2.zero; - [SerializeField] - Vector2 rotMeshStart = new Vector2(-30f,0f); - [SerializeField] - Vector2 rotMesh = new Vector2(30f,0f); - [SerializeField] - Vector2 rotMeshSmooth = new Vector2(-30f,0f); - - // Light Input/Rotation - [SerializeField] - public bool isDraggingRMB = false; - - [SerializeField] - public Camera cam; - [SerializeField] - Transform camPivot; - [SerializeField] - Light[] lights; - - //public bool drawBgColor = true; - - Mesh _sphereMesh; - Mesh sphereMesh { - get { - if( _sphereMesh == null ) { - _sphereMesh = GetSFMesh( "sf_sphere" ); - } - return _sphereMesh; - } - } - - // Reflection to call Handles.SetCameraOnlyDrawMesh(this.m_Camera); - MethodInfo mSetCameraOnlyDrawMesh; - - public SF_PreviewWindow( SF_Editor editor ) { - settings = new SF_PreviewSettings( this ); - UpdatePreviewBackgroundColor(); - - this.editor = editor; - this.mesh = GetSFMesh( "sf_sphere" ); - SetupPreview(); - } - - [SerializeField] bool enabled = true; - public void OnEnable() { - enabled = true; - SetupPreview(); - } - public void OnDisable() { - enabled = false; - CleanupObjects(); - } - - public Mesh GetSFMesh(string find_name) { - UnityEngine.Object[] objs = SF_Resources.LoadAll( SF_Resources.pMeshes+"sf_meshes.fbx" ); - if( objs == null ) { - Debug.LogError( "sf_meshes.fbx missing" ); - return null; - } - if( objs.Length == 0 ) { - Debug.LogError( "sf_meshes.fbx missing sub assets" ); - return null; - } - foreach( UnityEngine.Object o in objs ) { - if( o.name == find_name && o.GetType() == typeof(Mesh)) { - return o as Mesh; - } - } - Debug.LogError("Mesh " + find_name + " could not be found in sf_meshes.fbx"); - return null; - } - - - public void SetupPreview() { - - previewIsSetUp = true; - - // Create preview camera - GameObject camObj = new GameObject("Shader Forge Camera"); - camObj.hideFlags = HideFlags.HideAndDontSave; - cam = camObj.AddComponent(); - cam.targetTexture = render; - cam.clearFlags = CameraClearFlags.SolidColor; - cam.renderingPath = RenderingPath.Forward; - cam.enabled = false; - cam.useOcclusionCulling = false; - cam.cameraType = CameraType.Preview; - cam.fieldOfView = targetFOV; - - // Make sure it only renders using DrawMesh, to make ignore the scene. This is a bit risky, due to using reflection :( - BindingFlags bfs = BindingFlags.Static | BindingFlags.NonPublic; - Type[] args = new Type[]{ typeof(Camera) }; - mSetCameraOnlyDrawMesh = typeof( Handles ).GetMethod( "SetCameraOnlyDrawMesh", bfs, null, args, null ); - mSetCameraOnlyDrawMesh.Invoke( null, new object[]{ cam } ); - - // Create pivot/transform to hold it - camPivot = new GameObject("Shader Forge Camera Pivot").transform; - camPivot.gameObject.hideFlags = HideFlags.HideAndDontSave; - cam.clearFlags = CameraClearFlags.Skybox; - cam.transform.parent = camPivot; - - // Create custom light sources - lights = new Light[] { - new GameObject("Light 0").AddComponent(), - new GameObject("Light 1").AddComponent() - }; - for( int i = 0; i < lights.Length; i++ ) { - lights[i].gameObject.hideFlags = HideFlags.HideAndDontSave; - lights[i].type = LightType.Directional; - lights[i].lightmapBakeType = LightmapBakeType.Realtime; - lights[i].enabled = false; - } - - lights[0].intensity = 1f; - lights[0].transform.rotation = Quaternion.Euler( 30f, 30f, 0f ); - lights[1].intensity = 0.75f; - lights[1].color = new Color( 1f, 0.5f, 0.25f ); - lights[1].transform.rotation = Quaternion.Euler( 340f, 218f, 177f ); - } - - void CleanupObjects() { - GameObject.DestroyImmediate( cam.gameObject ); - GameObject.DestroyImmediate( camPivot.gameObject ); - for( int i = 0; i < lights.Length; i++ ) { - GameObject.DestroyImmediate( lights[i].gameObject ); - } - } - - - public bool SkyboxOn{ - get{ - return cam.clearFlags == CameraClearFlags.Skybox; - } - set{ - if(SF_Debug.renderDataNodes) - cam.clearFlags = CameraClearFlags.Depth; - else - cam.clearFlags = value ? CameraClearFlags.Skybox : CameraClearFlags.SolidColor; - } - } - - static Vector2 rotMeshSphere = new Vector2( 22, -18 - 90 - 12 ); - const float fovSphere = 23.4f; - - public void PrepareForDataScreenshot(){ - - // Reset rotation - // Reset zoom - // Stop auto-rotate - - rotMesh.x = rotMeshSmooth.x = rotMeshSphere.x; - rotMesh.y = rotMeshSmooth.y = rotMeshSphere.y; - cam.fieldOfView = targetFOV = smoothFOV = fovSphere; - - } - - - public int OnGUI( int yOffset, int maxWidth ) { - - if( enabled == false ) - return yOffset; - - Rect topBar = new Rect( 0, yOffset, maxWidth, 18 ); - - - GUI.Box( topBar, "", EditorStyles.toolbar ); - - Rect r = new Rect( topBar ); - r.width = maxWidth / 3; - r.height = 16; - r.x += 10; - r.y += 1; - - //EditorGUILayout.BeginHorizontal(); - //{ - EditorGUI.BeginChangeCheck(); - mesh = (Mesh)EditorGUI.ObjectField(r, mesh, typeof( Mesh ), false ); - if( EditorGUI.EndChangeCheck() ) { - targetFOV = 35f; - //editor.Defocus(); // TODO: This is a bit hacky - } - - r.x += r.width + 10; - r.width *= 0.5f; - EditorGUI.BeginChangeCheck(); - GUI.enabled = cam.clearFlags != CameraClearFlags.Skybox; - //GUI.color = GUI.enabled ? Color.white : new Color(1f,1f,1f,0.5f); - settings.colorBg = EditorGUI.ColorField( r, "", settings.colorBg ); - cam.backgroundColor = settings.colorBg; - - GUI.enabled = true; - //GUI.color = Color.white; - if( EditorGUI.EndChangeCheck() ) - UpdatePreviewBackgroundColor(); - - - r.x += r.width + 10; - r.width += 10; - - - GUI.enabled = RenderSettings.skybox != null; - SkyboxOn = GUI.Toggle( r, SkyboxOn, "Skybox" ); - if(RenderSettings.skybox == null && SkyboxOn){ - SkyboxOn = false; - } - GUI.enabled = true; - - r.x += r.width + 10; - settings.previewAutoRotate = GUI.Toggle( r, settings.previewAutoRotate, "Rotate" ); - - - Rect previewRect = new Rect( topBar ); - previewRect.y += topBar.height; - previewRect.height = topBar.width; - - - UpdateCameraZoom(); - DrawMeshGUI( previewRect ); - if(SF_Debug.renderDataNodes) - GUI.Label(previewRect, "rotMesh.x = " + rotMesh.x + " rotMesh.y = " + rotMesh.y); - - return (int)previewRect.yMax; - } - - public void UpdateRenderPath(){ - SFPSC_Lighting.RenderPath rPath = editor.ps.catLighting.renderPath; - - if(rPath == SFPSC_Lighting.RenderPath.Forward){ - cam.renderingPath = RenderingPath.Forward; - } else if(rPath == SFPSC_Lighting.RenderPath.Deferred){ - cam.renderingPath = RenderingPath.DeferredLighting; - //pruCam.clearFlags == CameraClearFlags.Depth; - } - } - - public void UpdateRot(){ - if(settings.previewAutoRotate){ - rotMesh.y += (float)(editor.deltaTime * -22.5); - } - rotMeshSmooth = Vector2.Lerp(rotMeshSmooth,rotMesh,0.5f); - } - - public void StartDragLMB() { - isDraggingLMB = true; - if(settings.previewAutoRotate == true){ - settings.previewAutoRotate = false; - } - dragStartPosLMB = Event.current.mousePosition; - rotMeshStart = rotMesh; - } - - public void UpdateDragLMB() { - rotMesh.y = rotMeshStart.y + ( -(dragStartPosLMB.x - Event.current.mousePosition.x) ) * 0.4f; - rotMesh.x = Mathf.Clamp( rotMeshStart.x + ( -(dragStartPosLMB.y - Event.current.mousePosition.y) ) * 0.4f, -90f, 90f ); - } - - public void StopDragLMB() { - isDraggingLMB = false; - } - - - public void StartDragRMB() { - isDraggingRMB = true; - } - - public void UpdateDragRMB() { - - if( Event.current.isMouse && Event.current.type == EventType.mouseDrag ) { - float x = ( -( Event.current.delta.x ) ) * 0.4f; - float y = ( -( Event.current.delta.y ) ) * 0.4f; - for( int i = 0; i < lights.Length; i++ ) { - lights[i].transform.RotateAround( Vector3.zero, cam.transform.right, y ); - lights[i].transform.RotateAround( Vector3.zero, cam.transform.up, x ); - } - } - - - } - - public void StopDragRMB() { - isDraggingRMB = false; - } - - - public bool MouseOverPreview() { - return previewRect.Contains( Event.current.mousePosition ); - } - - [SerializeField] - Rect previewRect = new Rect(0f,0f,1f,1f); - public void DrawMeshGUI( Rect previewRect ) { - - if( previewRect == default( Rect ) ) { - previewRect = this.previewRect; - } - - if( previewRect.width > 1 ) - this.previewRect = previewRect; - - if( Event.current.rawType == EventType.mouseUp ) { - if( Event.current.button == 0 ) - StopDragLMB(); - else if( Event.current.button == 1 ) - StopDragRMB(); - } - - if( Event.current.type == EventType.mouseDown && MouseOverPreview() ) { - if( Event.current.button == 0 ) - StartDragLMB(); - else if( Event.current.button == 1 ) - StartDragRMB(); - } - - if( isDraggingLMB ) - UpdateDragLMB(); - if( isDraggingRMB ) - UpdateDragRMB(); - - - if( mesh == null || InternalMaterial == null || Event.current.type != EventType.repaint ) - return; - - - - if( previewStyle == null ) { - previewStyle = new GUIStyle( EditorStyles.textField ); - } - previewStyle.normal.background = backgroundTexture; - - - - bool makeNew = false; - if( render == null ) { - makeNew = true; - } else if( render.width != (int)previewRect.width || render.height != (int)previewRect.height ) { - RenderTexture.DestroyImmediate( render ); - makeNew = true; - } - - if( makeNew ) { - render = new RenderTexture( (int)previewRect.width, (int)previewRect.height, 24, RenderTextureFormat.ARGB32 ); - render.antiAliasing = 8; - } - - DrawMesh(); - GL.sRGBWrite = ( QualitySettings.activeColorSpace == ColorSpace.Linear ); - GUI.DrawTexture( previewRect, render, ScaleMode.StretchToFill, false ); - GL.sRGBWrite = false; - - } - - - - public void DrawMesh( RenderTexture overrideRT = null, Material overrideMaterial = null, bool sphere = false ) { - if( backgroundTexture == null ) - UpdatePreviewBackgroundColor(); - - // Make sure all objects are set up properly - if( previewIsSetUp == false ) { - SetupPreview(); - } - - - // TODO: Override RT is used for screenshots, probably - if( overrideRT != null ) - cam.targetTexture = overrideRT; - else if( cam.targetTexture == null ) - cam.targetTexture = render; - - UpdateRenderPath(); - - SetCustomLight(on:true); - - Mesh drawMesh = sphere ? sphereMesh : mesh; - - float A = sphere ? rotMeshSphere.y : rotMeshSmooth.y; - float B = sphere ? rotMeshSphere.x : rotMeshSmooth.x; - Quaternion rotA = Quaternion.Euler( 0f, A, 0f ); - Quaternion rotB = Quaternion.Euler( B, 0f, 0f ); - Quaternion finalRot = rotA * rotB; - camPivot.rotation = finalRot; - float meshExtents = drawMesh.bounds.extents.magnitude; - - - Vector3 pos = new Vector3( -drawMesh.bounds.center.x, -drawMesh.bounds.center.y, -drawMesh.bounds.center.z ); - cam.transform.localPosition = new Vector3( 0f, 0f, -3f * meshExtents ); - - int smCount = drawMesh.subMeshCount; - - Material mat = (overrideMaterial == null) ? InternalMaterial : overrideMaterial; - for( int i=0; i < smCount; i++ ) { - Graphics.DrawMesh( drawMesh, Quaternion.identity * pos, Quaternion.identity, mat, 31, cam, i ); - } - - cam.farClipPlane = 3f * meshExtents * 2f; - cam.nearClipPlane = 0.1f; - cam.fieldOfView = sphere ? fovSphere : smoothFOV; - cam.Render(); - - // Reset things - SetCustomLight( on: false ); - - if( overrideRT != null ) - cam.targetTexture = render; - - if( sphere ) // Reset if needed. // TODO: What? - cam.fieldOfView = smoothFOV; - } - - - - - [SerializeField] - const float minFOV = 1f; - [SerializeField] - float targetFOV = 30f; - [SerializeField] - float smoothFOV = 30f; - [SerializeField] - const float maxFOV = 60f; - - public void UpdateCameraZoom() { - - if( Event.current.type == EventType.scrollWheel && MouseOverPreview() ) { - if(Event.current.delta.y > 0f){ - targetFOV+=2f; - } else if( Event.current.delta.y < 0f ){ - targetFOV-=2f; - } - } - if( Event.current.type == EventType.repaint ) { - targetFOV = Mathf.Clamp( targetFOV, minFOV, maxFOV ); - smoothFOV = Mathf.Lerp( cam.fieldOfView, targetFOV, 0.5f ); - } - } - - - public void UpdatePreviewBackgroundColor() { - if( backgroundTexture == null ){ - backgroundTexture = new Texture2D( 1, 1, TextureFormat.ARGB32, false, QualitySettings.activeColorSpace == ColorSpace.Linear ); - backgroundTexture.hideFlags = HideFlags.HideAndDontSave; - } - Color c = settings.colorBg; - backgroundTexture.SetPixels( new Color[] { c } ); - backgroundTexture.Apply(); - } - - public void SetCustomLight(bool on) { - if( on ) { - UnityEditorInternal.InternalEditorUtility.SetCustomLighting( lights, RenderSettings.ambientLight ); - } else { - UnityEditorInternal.InternalEditorUtility.RemoveCustomLighting(); - } - } - - - - - } +using UnityEngine; +using UnityEditor; +using System.Collections; +using System.Reflection; +using System; + +namespace ShaderForge { + [Serializable] + public class SF_PreviewWindow { + + [SerializeField] + public SF_Editor editor; + [SerializeField] + public SF_PreviewSettings settings; + + // Preview assets + [SerializeField] + public Mesh mesh; + [SerializeField] + public Material internalMaterial; + public Material InternalMaterial { + get { + if(internalMaterial == null){ + internalMaterial = new Material(editor.currentShaderAsset); + } + return internalMaterial; + } + set { + internalMaterial = value; + } + } + + [SerializeField] + public RenderTexture render; // TODO: Why is this separated from the RT itself? + [SerializeField] + GUIStyle previewStyle; + [SerializeField] + public Texture2D backgroundTexture; + + bool previewIsSetUp = false; // Intentionally non-serialized + + + // Input/Rotation + [SerializeField] + public bool isDraggingLMB = false; + [SerializeField] + Vector2 dragStartPosLMB = Vector2.zero; + [SerializeField] + Vector2 rotMeshStart = new Vector2(-30f,0f); + [SerializeField] + Vector2 rotMesh = new Vector2(30f,0f); + [SerializeField] + Vector2 rotMeshSmooth = new Vector2(-30f,0f); + + // Light Input/Rotation + [SerializeField] + public bool isDraggingRMB = false; + + [SerializeField] + public Camera cam; + [SerializeField] + Transform camPivot; + [SerializeField] + Light[] lights; + + //public bool drawBgColor = true; + + Mesh _sphereMesh; + Mesh sphereMesh { + get { + if( _sphereMesh == null ) { + _sphereMesh = GetSFMesh( "sf_sphere" ); + } + return _sphereMesh; + } + } + + // Reflection to call Handles.SetCameraOnlyDrawMesh(this.m_Camera); + MethodInfo mSetCameraOnlyDrawMesh; + + public SF_PreviewWindow( SF_Editor editor ) { + settings = new SF_PreviewSettings( this ); + UpdatePreviewBackgroundColor(); + + this.editor = editor; + this.mesh = GetSFMesh( "sf_sphere" ); + SetupPreview(); + } + + [SerializeField] bool enabled = true; + public void OnEnable() { + enabled = true; + SetupPreview(); + } + public void OnDisable() { + enabled = false; + CleanupObjects(); + } + + public Mesh GetSFMesh(string find_name) { + UnityEngine.Object[] objs = SF_Resources.LoadAll( SF_Resources.pMeshes+"sf_meshes.fbx" ); + if( objs == null ) { + Debug.LogError( "sf_meshes.fbx missing" ); + return null; + } + if( objs.Length == 0 ) { + Debug.LogError( "sf_meshes.fbx missing sub assets" ); + return null; + } + foreach( UnityEngine.Object o in objs ) { + if( o.name == find_name && o.GetType() == typeof(Mesh)) { + return o as Mesh; + } + } + Debug.LogError("Mesh " + find_name + " could not be found in sf_meshes.fbx"); + return null; + } + + + public void SetupPreview() { + + previewIsSetUp = true; + + // Create preview camera + GameObject camObj = new GameObject("Shader Forge Camera"); + camObj.hideFlags = HideFlags.HideAndDontSave; + cam = camObj.AddComponent(); + cam.targetTexture = render; + cam.clearFlags = CameraClearFlags.SolidColor; + cam.renderingPath = RenderingPath.Forward; + cam.enabled = false; + cam.useOcclusionCulling = false; + cam.cameraType = CameraType.Preview; + cam.fieldOfView = targetFOV; + + // Make sure it only renders using DrawMesh, to make ignore the scene. This is a bit risky, due to using reflection :( + // BindingFlags bfs = BindingFlags.Static | BindingFlags.NonPublic; + // Type[] args = new Type[]{ typeof(Camera) }; + // mSetCameraOnlyDrawMesh = typeof( Handles ).GetMethod( "SetCameraOnlyDrawMesh", bfs, null, args, null ); + // mSetCameraOnlyDrawMesh.Invoke( null, new object[]{ cam } ); + + // Create pivot/transform to hold it + camPivot = new GameObject("Shader Forge Camera Pivot").transform; + camPivot.gameObject.hideFlags = HideFlags.HideAndDontSave; + cam.clearFlags = CameraClearFlags.Skybox; + cam.transform.parent = camPivot; + + // Create custom light sources + lights = new Light[] { + new GameObject("Light 0").AddComponent(), + new GameObject("Light 1").AddComponent() + }; + for( int i = 0; i < lights.Length; i++ ) { + lights[i].gameObject.hideFlags = HideFlags.HideAndDontSave; + lights[i].type = LightType.Directional; + lights[i].lightmapBakeType = LightmapBakeType.Realtime; + lights[i].enabled = false; + } + + lights[0].intensity = 1f; + lights[0].transform.rotation = Quaternion.Euler( 30f, 30f, 0f ); + lights[1].intensity = 0.75f; + lights[1].color = new Color( 1f, 0.5f, 0.25f ); + lights[1].transform.rotation = Quaternion.Euler( 340f, 218f, 177f ); + } + + void CleanupObjects() { + GameObject.DestroyImmediate( cam.gameObject ); + GameObject.DestroyImmediate( camPivot.gameObject ); + for( int i = 0; i < lights.Length; i++ ) { + GameObject.DestroyImmediate( lights[i].gameObject ); + } + } + + + public bool SkyboxOn{ + get{ + return cam.clearFlags == CameraClearFlags.Skybox; + } + set{ + if(SF_Debug.renderDataNodes) + cam.clearFlags = CameraClearFlags.Depth; + else + cam.clearFlags = value ? CameraClearFlags.Skybox : CameraClearFlags.SolidColor; + } + } + + static Vector2 rotMeshSphere = new Vector2( 22, -18 - 90 - 12 ); + const float fovSphere = 23.4f; + + public void PrepareForDataScreenshot(){ + + // Reset rotation + // Reset zoom + // Stop auto-rotate + + rotMesh.x = rotMeshSmooth.x = rotMeshSphere.x; + rotMesh.y = rotMeshSmooth.y = rotMeshSphere.y; + cam.fieldOfView = targetFOV = smoothFOV = fovSphere; + + } + + + public int OnGUI( int yOffset, int maxWidth ) { + + if( enabled == false ) + return yOffset; + + Rect topBar = new Rect( 0, yOffset, maxWidth, 18 ); + + + GUI.Box( topBar, "", EditorStyles.toolbar ); + + Rect r = new Rect( topBar ); + r.width = maxWidth / 3; + r.height = 16; + r.x += 10; + r.y += 1; + + //EditorGUILayout.BeginHorizontal(); + //{ + EditorGUI.BeginChangeCheck(); + mesh = (Mesh)EditorGUI.ObjectField(r, mesh, typeof( Mesh ), false ); + if( EditorGUI.EndChangeCheck() ) { + targetFOV = 35f; + //editor.Defocus(); // TODO: This is a bit hacky + } + + r.x += r.width + 10; + r.width *= 0.5f; + EditorGUI.BeginChangeCheck(); + GUI.enabled = cam.clearFlags != CameraClearFlags.Skybox; + //GUI.color = GUI.enabled ? Color.white : new Color(1f,1f,1f,0.5f); + settings.colorBg = EditorGUI.ColorField( r, "", settings.colorBg ); + cam.backgroundColor = settings.colorBg; + + GUI.enabled = true; + //GUI.color = Color.white; + if( EditorGUI.EndChangeCheck() ) + UpdatePreviewBackgroundColor(); + + + r.x += r.width + 10; + r.width += 10; + + + GUI.enabled = RenderSettings.skybox != null; + SkyboxOn = GUI.Toggle( r, SkyboxOn, "Skybox" ); + if(RenderSettings.skybox == null && SkyboxOn){ + SkyboxOn = false; + } + GUI.enabled = true; + + r.x += r.width + 10; + settings.previewAutoRotate = GUI.Toggle( r, settings.previewAutoRotate, "Rotate" ); + + + Rect previewRect = new Rect( topBar ); + previewRect.y += topBar.height; + previewRect.height = topBar.width; + + + UpdateCameraZoom(); + DrawMeshGUI( previewRect ); + if(SF_Debug.renderDataNodes) + GUI.Label(previewRect, "rotMesh.x = " + rotMesh.x + " rotMesh.y = " + rotMesh.y); + + return (int)previewRect.yMax; + } + + public void UpdateRenderPath(){ + SFPSC_Lighting.RenderPath rPath = editor.ps.catLighting.renderPath; + + if(rPath == SFPSC_Lighting.RenderPath.Forward){ + cam.renderingPath = RenderingPath.Forward; + } else if(rPath == SFPSC_Lighting.RenderPath.Deferred){ + cam.renderingPath = RenderingPath.DeferredLighting; + //pruCam.clearFlags == CameraClearFlags.Depth; + } + } + + public void UpdateRot(){ + if(settings.previewAutoRotate){ + rotMesh.y += (float)(editor.deltaTime * -22.5); + } + rotMeshSmooth = Vector2.Lerp(rotMeshSmooth,rotMesh,0.5f); + } + + public void StartDragLMB() { + isDraggingLMB = true; + if(settings.previewAutoRotate == true){ + settings.previewAutoRotate = false; + } + dragStartPosLMB = Event.current.mousePosition; + rotMeshStart = rotMesh; + } + + public void UpdateDragLMB() { + rotMesh.y = rotMeshStart.y + ( -(dragStartPosLMB.x - Event.current.mousePosition.x) ) * 0.4f; + rotMesh.x = Mathf.Clamp( rotMeshStart.x + ( -(dragStartPosLMB.y - Event.current.mousePosition.y) ) * 0.4f, -90f, 90f ); + } + + public void StopDragLMB() { + isDraggingLMB = false; + } + + + public void StartDragRMB() { + isDraggingRMB = true; + } + + public void UpdateDragRMB() { + + if( Event.current.isMouse && Event.current.type == EventType.MouseDrag ) { + float x = ( -( Event.current.delta.x ) ) * 0.4f; + float y = ( -( Event.current.delta.y ) ) * 0.4f; + for( int i = 0; i < lights.Length; i++ ) { + lights[i].transform.RotateAround( Vector3.zero, cam.transform.right, y ); + lights[i].transform.RotateAround( Vector3.zero, cam.transform.up, x ); + } + } + + + } + + public void StopDragRMB() { + isDraggingRMB = false; + } + + + public bool MouseOverPreview() { + return previewRect.Contains( Event.current.mousePosition ); + } + + [SerializeField] + Rect previewRect = new Rect(0f,0f,1f,1f); + public void DrawMeshGUI( Rect previewRect ) { + + if( previewRect == default( Rect ) ) { + previewRect = this.previewRect; + } + + if( previewRect.width > 1 ) + this.previewRect = previewRect; + + if( Event.current.rawType == EventType.MouseUp ) { + if( Event.current.button == 0 ) + StopDragLMB(); + else if( Event.current.button == 1 ) + StopDragRMB(); + } + + if( Event.current.type == EventType.MouseDown && MouseOverPreview() ) { + if( Event.current.button == 0 ) + StartDragLMB(); + else if( Event.current.button == 1 ) + StartDragRMB(); + } + + if( isDraggingLMB ) + UpdateDragLMB(); + if( isDraggingRMB ) + UpdateDragRMB(); + + + if( mesh == null || InternalMaterial == null || Event.current.type != EventType.Repaint ) + return; + + + + if( previewStyle == null ) { + previewStyle = new GUIStyle( EditorStyles.textField ); + } + previewStyle.normal.background = backgroundTexture; + + + + bool makeNew = false; + if( render == null ) { + makeNew = true; + } else if( render.width != (int)previewRect.width || render.height != (int)previewRect.height ) { + RenderTexture.DestroyImmediate( render ); + makeNew = true; + } + + if( makeNew ) { + render = new RenderTexture( (int)previewRect.width, (int)previewRect.height, 24, RenderTextureFormat.ARGB32 ); + render.antiAliasing = 8; + } + + DrawMesh(); + bool b=GL.sRGBWrite; + GL.sRGBWrite = ( QualitySettings.activeColorSpace == ColorSpace.Linear ); + GUI.DrawTexture( previewRect, render, ScaleMode.StretchToFill, false ); + GL.sRGBWrite = b; + + } + + + + public void DrawMesh( RenderTexture overrideRT = null, Material overrideMaterial = null, bool sphere = false ) { + if( backgroundTexture == null ) + UpdatePreviewBackgroundColor(); + + // Make sure all objects are set up properly + if( previewIsSetUp == false ) { + SetupPreview(); + } + + + // TODO: Override RT is used for screenshots, probably + if( overrideRT != null ) + cam.targetTexture = overrideRT; + else if( cam.targetTexture == null ) + cam.targetTexture = render; + + UpdateRenderPath(); + + SetCustomLight(on:true); + + Mesh drawMesh = sphere ? sphereMesh : mesh; + + float A = sphere ? rotMeshSphere.y : rotMeshSmooth.y; + float B = sphere ? rotMeshSphere.x : rotMeshSmooth.x; + Quaternion rotA = Quaternion.Euler( 0f, A, 0f ); + Quaternion rotB = Quaternion.Euler( B, 0f, 0f ); + Quaternion finalRot = rotA * rotB; + camPivot.rotation = finalRot; + float meshExtents = drawMesh.bounds.extents.magnitude; + + + Vector3 pos = new Vector3( -drawMesh.bounds.center.x, -drawMesh.bounds.center.y, -drawMesh.bounds.center.z ); + cam.transform.localPosition = new Vector3( 0f, 0f, -3f * meshExtents ); + + int smCount = drawMesh.subMeshCount; + + Material mat = (overrideMaterial == null) ? InternalMaterial : overrideMaterial; + for( int i=0; i < smCount; i++ ) { + Graphics.DrawMesh( drawMesh, Quaternion.identity * pos, Quaternion.identity, mat, 31, cam, i ); + } + + cam.farClipPlane = 3f * meshExtents * 2f; + cam.nearClipPlane = 0.1f; + cam.fieldOfView = sphere ? fovSphere : smoothFOV; + cam.Render(); + + // Reset things + SetCustomLight( on: false ); + + if( overrideRT != null ) + cam.targetTexture = render; + + if( sphere ) // Reset if needed. // TODO: What? + cam.fieldOfView = smoothFOV; + } + + + + + [SerializeField] + const float minFOV = 1f; + [SerializeField] + float targetFOV = 30f; + [SerializeField] + float smoothFOV = 30f; + [SerializeField] + const float maxFOV = 60f; + + public void UpdateCameraZoom() { + + if( Event.current.type == EventType.ScrollWheel && MouseOverPreview() ) { + if(Event.current.delta.y > 0f){ + targetFOV+=2f; + } else if( Event.current.delta.y < 0f ){ + targetFOV-=2f; + } + } + if( Event.current.type == EventType.Repaint ) { + targetFOV = Mathf.Clamp( targetFOV, minFOV, maxFOV ); + smoothFOV = Mathf.Lerp( cam.fieldOfView, targetFOV, 0.5f ); + } + } + + + public void UpdatePreviewBackgroundColor() { + if( backgroundTexture == null ){ + backgroundTexture = new Texture2D( 1, 1, TextureFormat.ARGB32, false, QualitySettings.activeColorSpace == ColorSpace.Linear ); + backgroundTexture.hideFlags = HideFlags.HideAndDontSave; + } + Color c = settings.colorBg; + backgroundTexture.SetPixels( new Color[] { c } ); + backgroundTexture.Apply(); + } + + public void SetCustomLight(bool on) { + if( on ) { + UnityEditorInternal.InternalEditorUtility.SetCustomLighting( lights, RenderSettings.ambientLight ); + } else { + UnityEditorInternal.InternalEditorUtility.RemoveCustomLighting(); + } + } + + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_PreviewWindow.cs.meta b/Editor/Code/SF_PreviewWindow.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_PreviewWindow.cs.meta rename to Editor/Code/SF_PreviewWindow.cs.meta index 183dfa08..8d9fa4bb --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_PreviewWindow.cs.meta +++ b/Editor/Code/SF_PreviewWindow.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 143d65d02bb214ab39919bad663ed37d -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 143d65d02bb214ab39919bad663ed37d +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_SelectionManager.cs b/Editor/Code/SF_SelectionManager.cs old mode 100755 new mode 100644 similarity index 98% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_SelectionManager.cs rename to Editor/Code/SF_SelectionManager.cs index 473f5a98..ac2edae9 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_SelectionManager.cs +++ b/Editor/Code/SF_SelectionManager.cs @@ -1,90 +1,90 @@ using UnityEngine; using UnityEditor; -using System.Collections; -using System.Collections.Generic; - -namespace ShaderForge { - [System.Serializable] - public class SF_SelectionManager : ScriptableObject { - - [SerializeField] - SF_Editor editor; - [SerializeField] - List selection; - public List Selection { - get { - if( selection == null ) - selection = new List(); - return selection; - } - } - - public void OnEnable() { - base.hideFlags = HideFlags.HideAndDontSave; - } - - [SerializeField] - Rect selectionBox = new Rect(256,32,32,64); - - [SerializeField] - public bool boxSelecting = false; - - public void MoveSelection(Vector2 delta, SF_Node ignore) { - foreach(SF_Node n in Selection){ - if( n == ignore ) +using System.Collections; +using System.Collections.Generic; + +namespace ShaderForge { + [System.Serializable] + public class SF_SelectionManager : ScriptableObject { + + [SerializeField] + SF_Editor editor; + [SerializeField] + List selection; + public List Selection { + get { + if( selection == null ) + selection = new List(); + return selection; + } + } + + public void OnEnable() { + base.hideFlags = HideFlags.HideAndDontSave; + } + + [SerializeField] + Rect selectionBox = new Rect(256,32,32,64); + + [SerializeField] + public bool boxSelecting = false; + + public void MoveSelection(Vector2 delta, SF_Node ignore) { + foreach(SF_Node n in Selection){ + if( n == ignore ) continue; //if(selection.Count > 1){ //Debug.Log("Selection count = " + selection.Count + " thus nodes"); Undo.RecordObject(n,"move nodes"); - //} - n.rect.x += delta.x; - n.rect.y += delta.y; - } - } - - - - public void DrawBoxSelection() { - if( boxSelecting ) { - Rect r = new Rect( selectionBox ); - SF_Tools.FlipNegative( ref r ); + //} + n.rect.x += delta.x; + n.rect.y += delta.y; + } + } + + + + public void DrawBoxSelection() { + if( boxSelecting ) { + Rect r = new Rect( selectionBox ); + SF_Tools.FlipNegative( ref r ); GUI.Box( r, string.Empty, SF_Styles.SelectionStyle ); - //GUI.Label(r,selectionBox.ToString().Replace(' ','\n')); - } - } - - public void OnGUI() { - - /* - selectionBox.x = Event.current.mousePosition.x; - selectionBox.y = Event.current.mousePosition.y; - selectionBox.width = 128; - selectionBox.height = 128; - */ - - - if( SF_GUI.ReleasedRawLMB() && boxSelecting) { - ExecuteBoxSelect(); - } - - - if( SF_GUI.PressedLMB() && SF_GUI.HoldingBoxSelect() ) { - boxSelecting = true; - - if( !SF_GUI.MultiSelectModifierHeld() ) - DeselectAll(registerUndo:true); - - selectionBox.x = Event.current.mousePosition.x; - selectionBox.y = Event.current.mousePosition.y; - Event.current.Use(); + //GUI.Label(r,selectionBox.ToString().Replace(' ','\n')); + } + } + + public void OnGUI() { + + /* + selectionBox.x = Event.current.mousePosition.x; + selectionBox.y = Event.current.mousePosition.y; + selectionBox.width = 128; + selectionBox.height = 128; + */ + + + if( SF_GUI.ReleasedRawLMB() && boxSelecting) { + ExecuteBoxSelect(); + } + + + if( SF_GUI.PressedLMB() && SF_GUI.HoldingBoxSelect() ) { + boxSelecting = true; + + if( !SF_GUI.MultiSelectModifierHeld() ) + DeselectAll(registerUndo:true); + + selectionBox.x = Event.current.mousePosition.x; + selectionBox.y = Event.current.mousePosition.y; + Event.current.Use(); } - // Duplicate, copy, cut, paste + // Duplicate, copy, cut, paste EventType et = Application.platform == RuntimePlatform.OSXEditor ? EventType.KeyDown : EventType.KeyUp; // TODO: Use KeyDown for Windows too - - + + if( SF_GUI.HoldingControl() && Event.current.type == et && !SF_Node.isEditingAnyNodeTextField ) { switch(Event.current.keyCode){ @@ -102,39 +102,39 @@ public void OnGUI() { break; } - } - - // Selection box - if( boxSelecting ) { - - selectionBox.width = Event.current.mousePosition.x - selectionBox.x; - selectionBox.height = Event.current.mousePosition.y - selectionBox.y; - - if(Event.current.isMouse) - Event.current.Use(); - } - - if( SF_GUI.PressedDelete() && !SF_Node.isEditingAnyNodeTextField ) { + } + + // Selection box + if( boxSelecting ) { + + selectionBox.width = Event.current.mousePosition.x - selectionBox.x; + selectionBox.height = Event.current.mousePosition.y - selectionBox.y; + + if(Event.current.isMouse) + Event.current.Use(); + } + + if( SF_GUI.PressedDelete() && !SF_Node.isEditingAnyNodeTextField ) { DeleteSelected(); - Event.current.Use(); - } + Event.current.Use(); + } } - - - - public void ExecuteBoxSelect() { - boxSelecting = false; - foreach( SF_Node n in editor.nodes ) { - if( SF_Tools.Intersects( n.rect, selectionBox ) ){ - n.Select(registerUndo:true); - } - } - Event.current.Use(); - } - - - + + + + public void ExecuteBoxSelect() { + boxSelecting = false; + foreach( SF_Node n in editor.nodes ) { + if( SF_Tools.Intersects( n.rect, selectionBox ) ){ + n.Select(registerUndo:true); + } + } + Event.current.Use(); + } + + + public void DeleteSelected() { @@ -175,9 +175,9 @@ public void DeleteSelected() { - + for( int i = editor.nodes.Count - 1; i >= 0; i-- ) { - SF_Node n = editor.nodes[i]; + SF_Node n = editor.nodes[i]; if( n.selected ) { if(n is SFN_Relay){ @@ -202,10 +202,10 @@ public void DeleteSelected() { editor.nodes[i].Deselect(registerUndo:false); editor.nodes.RemoveAt(i); - - //editor.nodes[i].Delete(registerUndo:false, undoMsg:undoMsg); - } - } + + //editor.nodes[i].Delete(registerUndo:false, undoMsg:undoMsg); + } + } } @@ -305,17 +305,17 @@ void InstantiateNodes(string[] serializedNodes, Vector2 posOffset, string undoMs int[] idNew = new int[serializedNodes.Length]; for(int i=0;i CloneNodeAndGetLinks(){ return links; } - - - public SF_SelectionManager Initialize( SF_Editor editor ) { - this.editor = editor; - return this; - } - - public void Add(SF_Node n) { - Selection.Add( n ); - } - - public void Remove( SF_Node n ) { - Selection.Remove( n ); - } - + + + public SF_SelectionManager Initialize( SF_Editor editor ) { + this.editor = editor; + return this; + } + + public void Add(SF_Node n) { + Selection.Add( n ); + } + + public void Remove( SF_Node n ) { + Selection.Remove( n ); + } + public void DeselectAll(bool registerUndo, string undoMsg = null) { - editor.ResetRunningOutdatedTimer(); - foreach( SF_Node n in editor.nodes ) { - n.Deselect(registerUndo, undoMsg); - } - } - - - } + editor.ResetRunningOutdatedTimer(); + foreach( SF_Node n in editor.nodes ) { + n.Deselect(registerUndo, undoMsg); + } + } + + + } } diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_SelectionManager.cs.meta b/Editor/Code/SF_SelectionManager.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_SelectionManager.cs.meta rename to Editor/Code/SF_SelectionManager.cs.meta index f5092cdf..8afde125 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_SelectionManager.cs.meta +++ b/Editor/Code/SF_SelectionManager.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 43463d546def04200b133ba2feb5737d -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 43463d546def04200b133ba2feb5737d +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_Settings.cs b/Editor/Code/SF_Settings.cs old mode 100755 new mode 100644 similarity index 97% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_Settings.cs rename to Editor/Code/SF_Settings.cs index 75198613..8b8f234b --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_Settings.cs +++ b/Editor/Code/SF_Settings.cs @@ -1,154 +1,154 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -using System.Collections.Generic; -using System; - - -namespace ShaderForge { - - public enum SF_Setting{ - CurveShape, // int Bezier/Linear/etc - AutoCompile, // bool True/False - HierarchalNodeMove, // bool True/False - RealTimeNodePreviews, // bool True/False - QuickPickScrollWheel, // bool True/False - ControlMode, // int Shader Forge / Unity / Unreal - ShowVariableSettings, // bool True/False - ShowNodeSidebar, // bool True/False - NodeRenderMode // int Mixed / MixedRealtime / Spheres / SpheresRealtime / ViewportRealtime - }; - - public enum ControlMode { ShaderForge, UnityMaya, Unreal }; - public enum NodeRenderMode { Mixed, Spheres, Viewport }; - - public class SF_Settings { - - public const string prefix = "shaderforge_"; - public const string suffixDefault = "_default"; - - public SF_Settings() { - - } - - public static void InitializeSettings() { - // Set up all defaults - SetDefaultBool( SF_Setting.HierarchalNodeMove, false ); - SetDefaultBool( SF_Setting.QuickPickScrollWheel, true ); - SetDefaultBool( SF_Setting.ShowVariableSettings, false ); - SetDefaultBool( SF_Setting.ShowNodeSidebar, true ); - SetDefaultBool( SF_Setting.RealTimeNodePreviews, true ); - SetDefaultInt( SF_Setting.NodeRenderMode, (int)NodeRenderMode.Mixed ); - } - - - // Cached, for speed - public static bool autoCompile; - public static bool hierarchalNodeMove; - public static bool quickPickScrollWheel; - public static bool showVariableSettings; - public static bool showNodeSidebar; - public static bool realtimeNodePreviews; - public static NodeRenderMode nodeRenderMode; - - // These two are called in OnEnable and OnDisable in SF_Editor - public static void LoadAllFromDisk() { - autoCompile = LoadBool( SF_Setting.AutoCompile ); - hierarchalNodeMove = LoadBool( SF_Setting.HierarchalNodeMove ); - quickPickScrollWheel = LoadBool( SF_Setting.QuickPickScrollWheel ); - showVariableSettings = LoadBool( SF_Setting.ShowVariableSettings ); - showNodeSidebar = LoadBool( SF_Setting.ShowNodeSidebar ); - realtimeNodePreviews = LoadBool( SF_Setting.RealTimeNodePreviews ); - nodeRenderMode = NodeRenderMode.Mixed; // nodeRenderMode = (NodeRenderMode)LoadInt( SF_Setting.NodeRenderMode ); - - } - public static void SaveAllToDisk() { - SaveBool( SF_Setting.AutoCompile, autoCompile ); - SaveBool( SF_Setting.HierarchalNodeMove, hierarchalNodeMove ); - SaveBool( SF_Setting.QuickPickScrollWheel, quickPickScrollWheel ); - SaveBool( SF_Setting.ShowVariableSettings, showVariableSettings ); - SaveBool( SF_Setting.ShowNodeSidebar, showNodeSidebar ); - SaveBool( SF_Setting.RealTimeNodePreviews, realtimeNodePreviews ); - SaveInt( SF_Setting.NodeRenderMode, (int)nodeRenderMode ); - } - - - - // -------------------------------------------------- - // Special functions - - public static bool RenderNodesInRealtime() { - return realtimeNodePreviews || nodeRenderMode == NodeRenderMode.Viewport; - } - - // -------------------------------------------------- - public static bool LoadBool( SF_Setting setting ) { - string key = KeyOf(setting); - return EditorPrefs.GetBool( key, EditorPrefs.GetBool( key + suffixDefault ) ); - } - public static string LoadString( SF_Setting setting ) { - string key = KeyOf(setting); - return EditorPrefs.GetString( key, EditorPrefs.GetString( key + suffixDefault ) ); - } - public static int LoadInt( SF_Setting setting ) { - string key = KeyOf(setting); - return EditorPrefs.GetInt( key, EditorPrefs.GetInt( key + suffixDefault) ); - } - public static float LoadFloat( SF_Setting setting ) { - string key = KeyOf(setting); - return EditorPrefs.GetFloat( key, EditorPrefs.GetFloat( key + suffixDefault) ); - } - // -------------------------------------------------- - private static string KeyOf( SF_Setting setting ){ - return prefix + setting.ToString(); - } - // -------------------------------------------------- - private static void SetDefaultBool( SF_Setting setting, bool value ){ - string key = KeyOf(setting); - EditorPrefs.SetBool(key + suffixDefault, value); - if(!EditorPrefs.HasKey(key)){ - SaveBool(setting, value); - } - } - private static void SetDefaultString(SF_Setting setting, string value){ - string key = KeyOf(setting); - EditorPrefs.SetString(key + suffixDefault, value); - if(!EditorPrefs.HasKey(key)){ - SaveString(setting, value); - } - } - private static void SetDefaultInt(SF_Setting setting, int value){ - string key = KeyOf(setting); - EditorPrefs.SetInt(key + suffixDefault, value); - if(!EditorPrefs.HasKey(key)){ - SaveInt(setting, value); - } - } - private static void SetDefaultFloat(SF_Setting setting, float value){ - string key = KeyOf(setting); - EditorPrefs.SetFloat(key + suffixDefault, value); - if(!EditorPrefs.HasKey(key)){ - SaveFloat(setting, value); - } - } - // -------------------------------------------------- - public static void SaveBool( SF_Setting setting, bool value ){ - string key = KeyOf(setting); - EditorPrefs.SetBool(key, value); - } - public static void SaveString(SF_Setting setting, string value){ - string key = KeyOf(setting); - EditorPrefs.SetString(key, value); - } - public static void SaveInt(SF_Setting setting, int value){ - string key = KeyOf(setting); - EditorPrefs.SetInt(key, value); - } - public static void SaveFloat(SF_Setting setting, float value){ - string key = KeyOf(setting); - EditorPrefs.SetFloat(key, value); - } - - } - -} +using UnityEngine; +using UnityEditor; +using System.Collections; +using System.Collections.Generic; +using System; + + +namespace ShaderForge { + + public enum SF_Setting{ + CurveShape, // int Bezier/Linear/etc + AutoCompile, // bool True/False + HierarchalNodeMove, // bool True/False + RealTimeNodePreviews, // bool True/False + QuickPickScrollWheel, // bool True/False + ControlMode, // int Shader Forge / Unity / Unreal + ShowVariableSettings, // bool True/False + ShowNodeSidebar, // bool True/False + NodeRenderMode // int Mixed / MixedRealtime / Spheres / SpheresRealtime / ViewportRealtime + }; + + public enum ControlMode { ShaderForge, UnityMaya, Unreal }; + public enum NodeRenderMode { Mixed, Spheres, Viewport }; + + public class SF_Settings { + + public const string prefix = "shaderforge_"; + public const string suffixDefault = "_default"; + + public SF_Settings() { + + } + + public static void InitializeSettings() { + // Set up all defaults + SetDefaultBool( SF_Setting.HierarchalNodeMove, false ); + SetDefaultBool( SF_Setting.QuickPickScrollWheel, true ); + SetDefaultBool( SF_Setting.ShowVariableSettings, false ); + SetDefaultBool( SF_Setting.ShowNodeSidebar, true ); + SetDefaultBool( SF_Setting.RealTimeNodePreviews, true ); + SetDefaultInt( SF_Setting.NodeRenderMode, (int)NodeRenderMode.Mixed ); + } + + + // Cached, for speed + public static bool autoCompile; + public static bool hierarchalNodeMove; + public static bool quickPickScrollWheel; + public static bool showVariableSettings; + public static bool showNodeSidebar; + public static bool realtimeNodePreviews; + public static NodeRenderMode nodeRenderMode; + + // These two are called in OnEnable and OnDisable in SF_Editor + public static void LoadAllFromDisk() { + autoCompile = LoadBool( SF_Setting.AutoCompile ); + hierarchalNodeMove = LoadBool( SF_Setting.HierarchalNodeMove ); + quickPickScrollWheel = LoadBool( SF_Setting.QuickPickScrollWheel ); + showVariableSettings = LoadBool( SF_Setting.ShowVariableSettings ); + showNodeSidebar = LoadBool( SF_Setting.ShowNodeSidebar ); + realtimeNodePreviews = LoadBool( SF_Setting.RealTimeNodePreviews ); + nodeRenderMode = NodeRenderMode.Mixed; // nodeRenderMode = (NodeRenderMode)LoadInt( SF_Setting.NodeRenderMode ); + + } + public static void SaveAllToDisk() { + SaveBool( SF_Setting.AutoCompile, autoCompile ); + SaveBool( SF_Setting.HierarchalNodeMove, hierarchalNodeMove ); + SaveBool( SF_Setting.QuickPickScrollWheel, quickPickScrollWheel ); + SaveBool( SF_Setting.ShowVariableSettings, showVariableSettings ); + SaveBool( SF_Setting.ShowNodeSidebar, showNodeSidebar ); + SaveBool( SF_Setting.RealTimeNodePreviews, realtimeNodePreviews ); + SaveInt( SF_Setting.NodeRenderMode, (int)nodeRenderMode ); + } + + + + // -------------------------------------------------- + // Special functions + + public static bool RenderNodesInRealtime() { + return realtimeNodePreviews || nodeRenderMode == NodeRenderMode.Viewport; + } + + // -------------------------------------------------- + public static bool LoadBool( SF_Setting setting ) { + string key = KeyOf(setting); + return EditorPrefs.GetBool( key, EditorPrefs.GetBool( key + suffixDefault ) ); + } + public static string LoadString( SF_Setting setting ) { + string key = KeyOf(setting); + return EditorPrefs.GetString( key, EditorPrefs.GetString( key + suffixDefault ) ); + } + public static int LoadInt( SF_Setting setting ) { + string key = KeyOf(setting); + return EditorPrefs.GetInt( key, EditorPrefs.GetInt( key + suffixDefault) ); + } + public static float LoadFloat( SF_Setting setting ) { + string key = KeyOf(setting); + return EditorPrefs.GetFloat( key, EditorPrefs.GetFloat( key + suffixDefault) ); + } + // -------------------------------------------------- + private static string KeyOf( SF_Setting setting ){ + return prefix + setting.ToString(); + } + // -------------------------------------------------- + private static void SetDefaultBool( SF_Setting setting, bool value ){ + string key = KeyOf(setting); + EditorPrefs.SetBool(key + suffixDefault, value); + if(!EditorPrefs.HasKey(key)){ + SaveBool(setting, value); + } + } + private static void SetDefaultString(SF_Setting setting, string value){ + string key = KeyOf(setting); + EditorPrefs.SetString(key + suffixDefault, value); + if(!EditorPrefs.HasKey(key)){ + SaveString(setting, value); + } + } + private static void SetDefaultInt(SF_Setting setting, int value){ + string key = KeyOf(setting); + EditorPrefs.SetInt(key + suffixDefault, value); + if(!EditorPrefs.HasKey(key)){ + SaveInt(setting, value); + } + } + private static void SetDefaultFloat(SF_Setting setting, float value){ + string key = KeyOf(setting); + EditorPrefs.SetFloat(key + suffixDefault, value); + if(!EditorPrefs.HasKey(key)){ + SaveFloat(setting, value); + } + } + // -------------------------------------------------- + public static void SaveBool( SF_Setting setting, bool value ){ + string key = KeyOf(setting); + EditorPrefs.SetBool(key, value); + } + public static void SaveString(SF_Setting setting, string value){ + string key = KeyOf(setting); + EditorPrefs.SetString(key, value); + } + public static void SaveInt(SF_Setting setting, int value){ + string key = KeyOf(setting); + EditorPrefs.SetInt(key, value); + } + public static void SaveFloat(SF_Setting setting, float value){ + string key = KeyOf(setting); + EditorPrefs.SetFloat(key, value); + } + + } + +} diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_Settings.cs.meta b/Editor/Code/SF_Settings.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_Settings.cs.meta rename to Editor/Code/SF_Settings.cs.meta index ef32682c..35c66761 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_Settings.cs.meta +++ b/Editor/Code/SF_Settings.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 94c65d8d5218043a49bf95b2ae42fc31 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 94c65d8d5218043a49bf95b2ae42fc31 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_StatusBox.cs b/Editor/Code/SF_StatusBox.cs old mode 100755 new mode 100644 similarity index 94% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_StatusBox.cs rename to Editor/Code/SF_StatusBox.cs index b9949efc..e223abfa --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_StatusBox.cs +++ b/Editor/Code/SF_StatusBox.cs @@ -1,328 +1,329 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -using System.Collections.Generic; - -namespace ShaderForge { - [System.Serializable] - public class SF_StatusBox { - - [SerializeField] - private SF_Editor editor; - [SerializeField] - SF_MinMax vCount = new SF_MinMax(); - [SerializeField] - SF_MinMax fCount = new SF_MinMax(); - [SerializeField] - SF_MinMax vtCount = new SF_MinMax(); - [SerializeField] - SF_MinMax ftCount = new SF_MinMax(); - [SerializeField] - public RenderPlatform platform; - - [SerializeField] - private GUIStyle labelStyle; - [SerializeField] - private GUIStyle labelStyleCentered; - [SerializeField] - private GUIStyle holderStyle; - [SerializeField] - private GUIStyle headerStyle; - - public SF_StatusBox() { - - - - } - - public void Initialize( SF_Editor editor) { - this.editor = editor; - labelStyle = new GUIStyle( EditorStyles.label ); - labelStyle.margin = new RectOffset( 0, 0, 0, 0 ); - labelStyle.padding = new RectOffset( 8, 0, 3, 1 ); - - labelStyleCentered = new GUIStyle( labelStyle ); - labelStyleCentered.alignment = TextAnchor.MiddleCenter; - - holderStyle = new GUIStyle(); - holderStyle.margin = new RectOffset( 0, 0, 0, 0 ); - holderStyle.padding = new RectOffset( 0, 0, 0, 0 ); - - - headerStyle = new GUIStyle( EditorStyles.toolbar ); - headerStyle.alignment = TextAnchor.MiddleLeft; - headerStyle.fontSize = 10; - //headerStyle.fontStyle = FontStyle.Bold; - } - - - public int OnGUI( int yOffset, int in_maxWidth ) { - - Rect r = new Rect( 0, yOffset, in_maxWidth, 18 ); - - //string tmp = "Instructions: "; - - //if( Compiled() ) { - headerStyle.normal.textColor = EditorGUIUtility.isProSkin ? Color.white : Color.black; - //} else { - //headerStyle.normal.textColor = new Color( 0f, 0f, 0f, 0.75f ); - //tmp = "(Shader not compiled yet)"; - //} - - GUI.Label( r, string.Empty, EditorStyles.toolbar ); // Toolbar - - Rect iRect = r; - - //Rect rTmp = iRect; - //rTmp = rTmp.MovedUp(); - - //GUI.Label(rTmp, "MIP USED; " + editor.nodeView.treeStatus.mipInputUsed); - - iRect.width = 64f; - - - GUI.color = new Color(1f,1f,1f,0.5f); - if( GUI.Button( iRect, "Select", EditorStyles.toolbarButton) ) { - Selection.activeObject = editor.currentShaderAsset; - EditorGUIUtility.PingObject(editor.currentShaderAsset); - } - GUI.color = Color.white; - - /* Instruction count disabled. - if(!editor.nodeView.treeStatus.CanDisplayInstructionCount){ - InstructionLabel( ref iRect, SF_Styles.IconWarningSmall, "Instruction count unavailable"); - } else { - - InstructionLabel( ref iRect, SF_GUI.Inst_vert, vCount.ToString() ); - InstructionLabel( ref iRect, SF_GUI.Inst_frag, fCount.ToString() ); - if( !vtCount.Empty() ) - InstructionLabel( ref iRect, SF_GUI.Inst_vert_tex, vtCount.ToString() ); - if( !ftCount.Empty() ) - InstructionLabel( ref iRect, SF_GUI.Inst_frag_tex, ftCount.ToString() ); - } - */ - - - - - - - - - - //if(Compiled()){ - Color c = GUI.color; - c.a = 0.5f; - GUI.color = c; - r.xMin += iRect.x; - r.xMax -= 4; - GUI.Label(r, SF_Tools.rendererLabels[(int)platform],SF_Styles.InstructionCountRenderer); - GUI.color = Color.white; - //} - - - - - - - GUI.color = Color.white; - - return (int)r.yMax; - } - - - public void InstructionLabel(ref Rect iRect, Texture2D icon, string label) { - - iRect.width = icon.width; - GUI.DrawTexture( iRect, icon ); - iRect.x += iRect.width; - iRect.width = SF_GUI.WidthOf( label, headerStyle )+2; - GUI.Label( iRect, label, headerStyle ); - iRect.x += iRect.width; - } - - - private bool Compiled() { - if( vCount.min == 0 ) - return false; - return true; - } - - //private enum LookingFor{ }; - - public void UpdateInstructionCount( Shader sh ) { - // Compiled shader string: - string[] css = ( new SerializedObject( sh ) ).FindProperty( "m_Script" ).stringValue.Split( '\n' ); - - Debug.Log( ( new SerializedObject( sh ) ).FindProperty( "m_Script" ).stringValue ); - Debug.Log(css.Length); - - if(css.Length < 2){ - return; - } - - ShaderProgram prog = ShaderProgram.Vert; - - - List passes = new List(); - SFIns_Pass cPass; // current pass - - for( int i = 0; i < css.Length; i++ ) { - if( css[i].Contains( "Pass {" ) ) { // Found a pass! - - bool ignoreMin = false; - i++; - - // Shadow passes - if( css[i].Contains( "Name \"ShadowCaster\"" ) || css[i].Contains( "Name \"ShadowCollector\"" ) || css[i].Contains( "Name \"ForwardAdd\"" ) ) - continue; - - if( (css[i].Contains("Name \"PrePassBase\"") || css[i].Contains("Name \"PrePassFinal\"") ) && editor.ps.catLighting.renderPath == SFPSC_Lighting.RenderPath.Forward ) - continue; - - if( (css[i].Contains("Name \"ForwardBase\"") || css[i].Contains("Name \"ForwardAdd\"") ) && editor.ps.catLighting.renderPath == SFPSC_Lighting.RenderPath.Deferred ) - continue; - - - //ignoreMin = true; - - cPass = new SFIns_Pass(); - - for ( ; i < css.Length; i++ ) { - - if(css[i].StartsWith("// Vertex combos")){ - prog = ShaderProgram.Vert; - } else if(css[i].StartsWith("// Fragment combos")){ - prog = ShaderProgram.Frag; - } else { - continue; - } - - // Program found! - i++; // Next line... - // Scan following lines for shader platform data - for ( ; i < css.Length; i++ ) { - if(css[i].StartsWith( "//" )){ - cPass.Parse( prog, css[i], ignoreMin ); - } else { - // No more platform data - break; - } - } - // Leave this loop and start searching for the next pass if we just found the frag data - if( prog == ShaderProgram.Frag ) - break; - } - // Add the current pass to the list - passes.Add(cPass); - } - } - - - // All passes scanned! - // Show, some sort of instruction count - // Show sum of all passes min for now - vCount.Reset(); - fCount.Reset(); - vtCount.Reset(); - ftCount.Reset(); - - // Find which program to display instruction count for! - // if(mac) opengl - // if(win) d3d9 - // else gles - // else *any enabled* - - - - platform = GetPrimaryPlatform(); - int primPlat = (int)platform; - - - - // Debug.Log("Primary platform: " + (RenderPlatform)primPlat); - - - - foreach( SFIns_Pass p in passes ) { - vCount += p.plats[primPlat].vert; // Only d3d9 for now // TODO - fCount += p.plats[primPlat].frag; - vtCount += p.plats[primPlat].vTex; - ftCount += p.plats[primPlat].fTex; - } - - - //Debug.Log("vCount = " + vCount); - - - - - /* - int programID = 0; // 0 = vert | 1 = frag - for( int i = 0; i < css.Length; i++ ) { - if( css[i].Contains( "instructions" ) ) - continue; - if( css[i].Contains( "# " ) ) { - if( programID == 0 ) { - string[] split = css[i].Trim().Split( ' ' ); - vCount = int.Parse( split[1] ); // Vertex instructions TODO: Textures in vertex program - programID++; // Search for fragment - } else if( programID == 1 ) { - string[] split = css[i].Trim().Split( ' ' ); - fCount = int.Parse( split[1] ); // Fragment instructions - try { - tCount = int.Parse( split[3] ); // Textures - } catch { - - } - - } - } - } - */ - - - - - } - - - public RenderPlatform GetPrimaryPlatform() { - - // Let's check our build target! - BuildTarget active = EditorUserBuildSettings.activeBuildTarget; - - // Mobile platforms - // 9 = BuildTarget.iPhone // Unity 4.x - // 9 = BuildTarget.iOS // Unity 5.x - // 28 = BuildTarget.BB10 // Unity 4.x - // 28 = BuildTarget.BlackBerry // Unity 5.x - - bool mobile = ( active == BuildTarget.Android || (int)active == 9 || (int)active == 28 ); - if(mobile && editor.ps.catMeta.usedRenderers[(int)RenderPlatform.gles]) - return RenderPlatform.gles; - - // Standalone / Webplayer. In this case, it depends on what the user is using - // Pick the one that is currently running - if( Application.platform == RuntimePlatform.OSXEditor && editor.ps.catMeta.usedRenderers[(int)RenderPlatform.glcore] ) - return RenderPlatform.glcore; - if( Application.platform == RuntimePlatform.WindowsEditor && editor.ps.catMeta.usedRenderers[(int)RenderPlatform.d3d9] ) - return RenderPlatform.d3d9; - if( Application.platform == RuntimePlatform.WindowsEditor && editor.ps.catMeta.usedRenderers[(int)RenderPlatform.d3d11] ) - return RenderPlatform.d3d11; - - - Debug.LogWarning( "[SF] Unhandled platform settings. Make sure your build target (" + active + ") is sensible, and that you've got platforms enabled to compile for" ); - // You're using some weird setup, pick first active one - for(int i=0;i<12;i++){ - if(editor.ps.catMeta.usedRenderers[i]) - return (RenderPlatform)i; - } - - Debug.LogError("No renderers compilable, defaulting to d3d9"); - return RenderPlatform.d3d9; - } - - - } +using UnityEngine; +using UnityEditor; +using System.Collections; +using System.Collections.Generic; + +namespace ShaderForge { + [System.Serializable] + public class SF_StatusBox { + + [SerializeField] + private SF_Editor editor; + [SerializeField] + SF_MinMax vCount = new SF_MinMax(); + [SerializeField] + SF_MinMax fCount = new SF_MinMax(); + [SerializeField] + SF_MinMax vtCount = new SF_MinMax(); + [SerializeField] + SF_MinMax ftCount = new SF_MinMax(); + [SerializeField] + public RenderPlatform platform; + + [SerializeField] + private GUIStyle labelStyle; + [SerializeField] + private GUIStyle labelStyleCentered; + [SerializeField] + private GUIStyle holderStyle; + [SerializeField] + private GUIStyle headerStyle; + + public SF_StatusBox() { + + + + } + + public void Initialize( SF_Editor editor) { + this.editor = editor; + labelStyle = new GUIStyle( EditorStyles.label ); + labelStyle.margin = new RectOffset( 0, 0, 0, 0 ); + labelStyle.padding = new RectOffset( 8, 0, 3, 1 ); + + labelStyleCentered = new GUIStyle( labelStyle ); + labelStyleCentered.alignment = TextAnchor.MiddleCenter; + + holderStyle = new GUIStyle(); + holderStyle.margin = new RectOffset( 0, 0, 0, 0 ); + holderStyle.padding = new RectOffset( 0, 0, 0, 0 ); + + + headerStyle = new GUIStyle( EditorStyles.toolbar ); + headerStyle.alignment = TextAnchor.MiddleLeft; + headerStyle.fontSize = 10; + //headerStyle.fontStyle = FontStyle.Bold; + } + + + public int OnGUI( int yOffset, int in_maxWidth ) { + + Rect r = new Rect( 0, yOffset, in_maxWidth, 18 ); + + //string tmp = "Instructions: "; + + //if( Compiled() ) { + headerStyle.normal.textColor = EditorGUIUtility.isProSkin ? Color.white : Color.black; + //} else { + //headerStyle.normal.textColor = new Color( 0f, 0f, 0f, 0.75f ); + //tmp = "(Shader not compiled yet)"; + //} + + GUI.Label( r, string.Empty, EditorStyles.toolbar ); // Toolbar + + Rect iRect = r; + + //Rect rTmp = iRect; + //rTmp = rTmp.MovedUp(); + + //GUI.Label(rTmp, "MIP USED; " + editor.nodeView.treeStatus.mipInputUsed); + + iRect.width = 64f; + + + GUI.color = new Color(1f,1f,1f,0.5f); + if( GUI.Button( iRect, "Select", EditorStyles.toolbarButton) ) { + Selection.activeObject = editor.currentShaderAsset; + EditorGUIUtility.PingObject(editor.currentShaderAsset); + } + GUI.color = Color.white; + + /* Instruction count disabled. + if(!editor.nodeView.treeStatus.CanDisplayInstructionCount){ + InstructionLabel( ref iRect, SF_Styles.IconWarningSmall, "Instruction count unavailable"); + } else { + + InstructionLabel( ref iRect, SF_GUI.Inst_vert, vCount.ToString() ); + InstructionLabel( ref iRect, SF_GUI.Inst_frag, fCount.ToString() ); + if( !vtCount.Empty() ) + InstructionLabel( ref iRect, SF_GUI.Inst_vert_tex, vtCount.ToString() ); + if( !ftCount.Empty() ) + InstructionLabel( ref iRect, SF_GUI.Inst_frag_tex, ftCount.ToString() ); + } + */ + + + + + + + + + + //if(Compiled()){ + Color c = GUI.color; + c.a = 0.5f; + GUI.color = c; + r.xMin += iRect.x; + r.xMax -= 4; + GUI.Label(r, SF_Tools.rendererLabels[(int)platform],SF_Styles.InstructionCountRenderer); + GUI.color = Color.white; + //} + + + + + + + GUI.color = Color.white; + + return (int)r.yMax; + } + + + public void InstructionLabel(ref Rect iRect, Texture2D icon, string label) { + + iRect.width = icon.width; + GUI.DrawTexture( iRect, icon ); + iRect.x += iRect.width; + iRect.width = SF_GUI.WidthOf( label, headerStyle )+2; + GUI.Label( iRect, label, headerStyle ); + iRect.x += iRect.width; + } + + + private bool Compiled() { + if( vCount.min == 0 ) + return false; + return true; + } + + //private enum LookingFor{ }; + + public void UpdateInstructionCount( Shader sh ) { + // Compiled shader string: + string[] css = ( new SerializedObject( sh ) ).FindProperty( "m_Script" ).stringValue.Split( '\n' ); + + Debug.Log( ( new SerializedObject( sh ) ).FindProperty( "m_Script" ).stringValue ); + Debug.Log(css.Length); + + if(css.Length < 2){ + return; + } + + ShaderProgram prog = ShaderProgram.Vert; + + + List passes = new List(); + SFIns_Pass cPass; // current pass + + for( int i = 0; i < css.Length; i++ ) { + if( css[i].Contains( "Pass {" ) ) { // Found a pass! + + bool ignoreMin = false; + i++; + + // Shadow passes + if( css[i].Contains( "Name \"ShadowCaster\"" ) || css[i].Contains( "Name \"ShadowCollector\"" ) || css[i].Contains( "Name \"ForwardAdd\"" ) ) + continue; + + if( (css[i].Contains("Name \"PrePassBase\"") || css[i].Contains("Name \"PrePassFinal\"") ) && editor.ps.catLighting.renderPath == SFPSC_Lighting.RenderPath.Forward ) + continue; + + if( (css[i].Contains("Name \"ForwardBase\"") || css[i].Contains("Name \"ForwardAdd\"") ) && editor.ps.catLighting.renderPath == SFPSC_Lighting.RenderPath.Deferred ) + continue; + + + //ignoreMin = true; + + cPass = new SFIns_Pass(); + + for ( ; i < css.Length; i++ ) { + + if(css[i].StartsWith("// Vertex combos")){ + prog = ShaderProgram.Vert; + } else if(css[i].StartsWith("// Fragment combos")){ + prog = ShaderProgram.Frag; + } else { + continue; + } + + // Program found! + i++; // Next line... + // Scan following lines for shader platform data + for ( ; i < css.Length; i++ ) { + if(css[i].StartsWith( "//" )){ + cPass.Parse( prog, css[i], ignoreMin ); + } else { + // No more platform data + break; + } + } + // Leave this loop and start searching for the next pass if we just found the frag data + if( prog == ShaderProgram.Frag ) + break; + } + // Add the current pass to the list + passes.Add(cPass); + } + } + + + // All passes scanned! + // Show, some sort of instruction count + // Show sum of all passes min for now + vCount.Reset(); + fCount.Reset(); + vtCount.Reset(); + ftCount.Reset(); + + // Find which program to display instruction count for! + // if(mac) opengl + // if(win) d3d9 + // else gles + // else *any enabled* + + + + platform = GetPrimaryPlatform(); + int primPlat = (int)platform; + + + + // Debug.Log("Primary platform: " + (RenderPlatform)primPlat); + + + + foreach( SFIns_Pass p in passes ) { + vCount += p.plats[primPlat].vert; // Only d3d9 for now // TODO + fCount += p.plats[primPlat].frag; + vtCount += p.plats[primPlat].vTex; + ftCount += p.plats[primPlat].fTex; + } + + + //Debug.Log("vCount = " + vCount); + + + + + /* + int programID = 0; // 0 = vert | 1 = frag + for( int i = 0; i < css.Length; i++ ) { + if( css[i].Contains( "instructions" ) ) + continue; + if( css[i].Contains( "# " ) ) { + if( programID == 0 ) { + string[] split = css[i].Trim().Split( ' ' ); + vCount = int.Parse( split[1] ); // Vertex instructions TODO: Textures in vertex program + programID++; // Search for fragment + } else if( programID == 1 ) { + string[] split = css[i].Trim().Split( ' ' ); + fCount = int.Parse( split[1] ); // Fragment instructions + try { + tCount = int.Parse( split[3] ); // Textures + } catch { + + } + + } + } + } + */ + + + + + } + + + public RenderPlatform GetPrimaryPlatform() { + + // Let's check our build target! + BuildTarget active = EditorUserBuildSettings.activeBuildTarget; + + // Mobile platforms + // 9 = BuildTarget.iPhone // Unity 4.x + // 9 = BuildTarget.iOS // Unity 5.x + // 28 = BuildTarget.BB10 // Unity 4.x + // 28 = BuildTarget.BlackBerry // Unity 5.x + + bool mobile = ( active == BuildTarget.Android || (int)active == 9 || (int)active == 28 ); + if(mobile && editor.ps.catMeta.usedRenderers[(int)RenderPlatform.gles]) + return RenderPlatform.gles; + + // Standalone / Webplayer. In this case, it depends on what the user is using + // Pick the one that is currently running + if( Application.platform == RuntimePlatform.OSXEditor && editor.ps.catMeta.usedRenderers[(int)RenderPlatform.glcore] ) + return RenderPlatform.glcore; + if( Application.platform == RuntimePlatform.WindowsEditor && editor.ps.catMeta.usedRenderers[(int)RenderPlatform.d3d9] ) + return RenderPlatform.d3d9; + if( Application.platform == RuntimePlatform.WindowsEditor && editor.ps.catMeta.usedRenderers[(int)RenderPlatform.d3d11] ) + return RenderPlatform.d3d11; + if( Application.platform == RuntimePlatform.WindowsEditor && editor.ps.catMeta.usedRenderers[(int)RenderPlatform.vulkan] ) + return RenderPlatform.vulkan; + + Debug.LogWarning( "[SF] Unhandled platform settings. Make sure your build target (" + active + ") is sensible, and that you've got platforms enabled to compile for" ); + // You're using some weird setup, pick first active one + for(int i=0;i<12;i++){ + if(editor.ps.catMeta.usedRenderers[i]) + return (RenderPlatform)i; + } + + Debug.LogError("No renderers compilable, defaulting to d3d9"); + return RenderPlatform.d3d9; + } + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_StatusBox.cs.meta b/Editor/Code/SF_StatusBox.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/SF_StatusBox.cs.meta rename to Editor/Code/SF_StatusBox.cs.meta index 848efa0d..290901e6 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/SF_StatusBox.cs.meta +++ b/Editor/Code/SF_StatusBox.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: bdeadd90c5eb14af9b16fdf9babcd447 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: bdeadd90c5eb14af9b16fdf9babcd447 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups.meta b/Editor/Code/_ConnectionGroups.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups.meta rename to Editor/Code/_ConnectionGroups.meta index 240e0c3b..f4151bb8 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups.meta +++ b/Editor/Code/_ConnectionGroups.meta @@ -1,5 +1,5 @@ -fileFormatVersion: 2 -guid: 69c81e70ae39d4265890a1da43af2896 -folderAsset: yes -DefaultImporter: - userData: +fileFormatVersion: 2 +guid: 69c81e70ae39d4265890a1da43af2896 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SFNCG_Append.cs b/Editor/Code/_ConnectionGroups/SFNCG_Append.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SFNCG_Append.cs rename to Editor/Code/_ConnectionGroups/SFNCG_Append.cs index 7eb5d3bf..ab875e8b --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SFNCG_Append.cs +++ b/Editor/Code/_ConnectionGroups/SFNCG_Append.cs @@ -1,213 +1,213 @@ -using UnityEngine; -using System.Collections; - - -namespace ShaderForge { - - // Used to detect types based on input - [System.Serializable] - public class SFNCG_Append : SF_NodeConnectionGroup { - - - - public SFNCG_Append Initialize( SF_NodeConnector output, params SF_NodeConnector[] inputs ) { - this.output = output; - this.inputs = inputs; - return this; - } - - - public int GetOutputComponentCount() { - - int cc = 0; - for( int i = 0; i < 4; i++ ) { - if(inputs[i].IsConnectedAndEnabled()) - cc += inputs[i].inputCon.GetCompCount(); - } - - if( cc == 0 ) - return 1; - else - return cc; - - } - - - public override void Refresh() { - - - // ALLOWED COMBOS - /* - * v1 v1 = v2 - * - * v1 v1 v1 = v3 - * v1 v2 = v3 - * - * v1 v1 v1 v1 = v4 - * v2 v1 v1 = v4 - * v2 v2 = v4 - * v1 v3 = v4 - */ - - // Are none of the inputs connected? In that case, it's all default - if( NoInputsConnected() ) - ResetValueTypes(); - - if( !inputs[0].node.InputsConnected() ) - return; - - - - int inCompSum = GetOutputComponentCount(); - - - - - if( inCompSum < 2 ) { - Debug.LogError( "Input sum is somehow " + inCompSum + " on " + inputs[0].node.nodeName ); - inputs[1].Disconnect(); // This should never happen - return; - } - - if( inCompSum > 4 ) { // TODO: Error message - Debug.LogWarning( "Connected too many components in Append node! Disconnecting all" ); - - for( int i = 0; i < 4; i++ ) { - if( inputs[i].IsConnectedAndEnabled() ) - Debug.LogWarning( "["+i+"]: " + inputs[i].inputCon.node.nodeName + " with " + inputs[i].inputCon.GetCompCount() + " components" ); - inputs[i].Disconnect(); - } - - return; - } - - - switch( inCompSum ) { - case 2: - output.valueType = ValueType.VTv2; - break; - case 3: - output.valueType = ValueType.VTv3; - break; - case 4: - output.valueType = ValueType.VTv4; - break; - } - - - - - - - /* - - - // If any input is non-pending, use that as base to assign the rest. - // Inputs: - ValueType baseInType = GetBaseInputType(); - ValueType genericInType = GetGenericInputType(); - AssignToEmptyInputs( genericInType ); - - // Output: - if( InputsMissing() ) { - if( baseInType == ValueType.VTv1 ) - output.valueType = ValueType.VTvPending; - else - output.valueType = baseInType; - } else { - output.valueType = GetDominantInputType(); - } - */ - } - - /* - - public ValueType GetGenericInputType() { - ValueType vt = GetBaseInputType(); - switch( vt ) { - case ValueType.VTv1: - return ValueType.VTvPending; - case ValueType.VTv2: - return ValueType.VTv1v2; - case ValueType.VTv3: - return ValueType.VTv1v3; - case ValueType.VTv4: - return ValueType.VTv1v4; - default: - Debug.LogError( "Invalid attempt to get generic input type from " + vt ); - return ValueType.VTvPending; - } - } - - public ValueType GetDominantInputType() { - ValueType dom = inputs[0].valueType; - for( int i = 1 ; i < inputs.Length ; i++ ) { - dom = GetDominantType( dom, inputs[i].valueType); - } - return dom; - } - - public ValueType GetDominantType(ValueType a, ValueType b) { - if( a == b ) - return a; - - if( a == ValueType.VTvPending ) - return b; - - if( b == ValueType.VTvPending ) - return a; - - if( a == ValueType.VTv1 ) { - if( IsVectorType( b ) ) - return b; - else - return a; - } - if( b == ValueType.VTv1 ) { - if( IsVectorType( a ) ) - return a; - else - return b; - } - - Debug.LogError( "You should not be able to get here! Dominant pending type returned" ); - return ValueType.VTvPending; - } - - - public ValueType GetBaseInputType() { - - ValueType retType = ValueType.VTvPending; - - foreach( SF_NodeConnection nc in inputs ) { - retType = GetDominantType( retType, nc.valueType ); - } - - if( retType == ValueType.VTvPending ) - Debug.LogError( "You should not be able to get here! Pending type returned" ); - return retType; - } - - public static bool CompatibleTypes( ValueType tInput, ValueType tOutput ) { - - // If they are the same type, they are of course compatible - if( tInput == tOutput ) - return true; - // If the input is a pending vector, any output vector is compatible - if( tInput == ValueType.VTvPending && IsVectorType( tOutput ) ) - return true; - // Check multi-type for v1/v2 - if( tInput == ValueType.VTv1v2 && ( tOutput == ValueType.VTv1 || tOutput == ValueType.VTv2 ) ) - return true; - // Check multi-type for v1/v3 - if( tInput == ValueType.VTv1v3 && ( tOutput == ValueType.VTv1 || tOutput == ValueType.VTv3 ) ) - return true; - // Check multi-type for v1/v4 - if( tInput == ValueType.VTv1v4 && ( tOutput == ValueType.VTv1 || tOutput == ValueType.VTv4 ) ) - return true; - // Didn't find any allowed link, return false - return false; - } - */ - } +using UnityEngine; +using System.Collections; + + +namespace ShaderForge { + + // Used to detect types based on input + [System.Serializable] + public class SFNCG_Append : SF_NodeConnectionGroup { + + + + public SFNCG_Append Initialize( SF_NodeConnector output, params SF_NodeConnector[] inputs ) { + this.output = output; + this.inputs = inputs; + return this; + } + + + public int GetOutputComponentCount() { + + int cc = 0; + for( int i = 0; i < 4; i++ ) { + if(inputs[i].IsConnectedAndEnabled()) + cc += inputs[i].inputCon.GetCompCount(); + } + + if( cc == 0 ) + return 1; + else + return cc; + + } + + + public override void Refresh() { + + + // ALLOWED COMBOS + /* + * v1 v1 = v2 + * + * v1 v1 v1 = v3 + * v1 v2 = v3 + * + * v1 v1 v1 v1 = v4 + * v2 v1 v1 = v4 + * v2 v2 = v4 + * v1 v3 = v4 + */ + + // Are none of the inputs connected? In that case, it's all default + if( NoInputsConnected() ) + ResetValueTypes(); + + if( !inputs[0].node.InputsConnected() ) + return; + + + + int inCompSum = GetOutputComponentCount(); + + + + + if( inCompSum < 2 ) { + Debug.LogError( "Input sum is somehow " + inCompSum + " on " + inputs[0].node.nodeName ); + inputs[1].Disconnect(); // This should never happen + return; + } + + if( inCompSum > 4 ) { // TODO: Error message + Debug.LogWarning( "Connected too many components in Append node! Disconnecting all" ); + + for( int i = 0; i < 4; i++ ) { + if( inputs[i].IsConnectedAndEnabled() ) + Debug.LogWarning( "["+i+"]: " + inputs[i].inputCon.node.nodeName + " with " + inputs[i].inputCon.GetCompCount() + " components" ); + inputs[i].Disconnect(); + } + + return; + } + + + switch( inCompSum ) { + case 2: + output.valueType = ValueType.VTv2; + break; + case 3: + output.valueType = ValueType.VTv3; + break; + case 4: + output.valueType = ValueType.VTv4; + break; + } + + + + + + + /* + + + // If any input is non-pending, use that as base to assign the rest. + // Inputs: + ValueType baseInType = GetBaseInputType(); + ValueType genericInType = GetGenericInputType(); + AssignToEmptyInputs( genericInType ); + + // Output: + if( InputsMissing() ) { + if( baseInType == ValueType.VTv1 ) + output.valueType = ValueType.VTvPending; + else + output.valueType = baseInType; + } else { + output.valueType = GetDominantInputType(); + } + */ + } + + /* + + public ValueType GetGenericInputType() { + ValueType vt = GetBaseInputType(); + switch( vt ) { + case ValueType.VTv1: + return ValueType.VTvPending; + case ValueType.VTv2: + return ValueType.VTv1v2; + case ValueType.VTv3: + return ValueType.VTv1v3; + case ValueType.VTv4: + return ValueType.VTv1v4; + default: + Debug.LogError( "Invalid attempt to get generic input type from " + vt ); + return ValueType.VTvPending; + } + } + + public ValueType GetDominantInputType() { + ValueType dom = inputs[0].valueType; + for( int i = 1 ; i < inputs.Length ; i++ ) { + dom = GetDominantType( dom, inputs[i].valueType); + } + return dom; + } + + public ValueType GetDominantType(ValueType a, ValueType b) { + if( a == b ) + return a; + + if( a == ValueType.VTvPending ) + return b; + + if( b == ValueType.VTvPending ) + return a; + + if( a == ValueType.VTv1 ) { + if( IsVectorType( b ) ) + return b; + else + return a; + } + if( b == ValueType.VTv1 ) { + if( IsVectorType( a ) ) + return a; + else + return b; + } + + Debug.LogError( "You should not be able to get here! Dominant pending type returned" ); + return ValueType.VTvPending; + } + + + public ValueType GetBaseInputType() { + + ValueType retType = ValueType.VTvPending; + + foreach( SF_NodeConnection nc in inputs ) { + retType = GetDominantType( retType, nc.valueType ); + } + + if( retType == ValueType.VTvPending ) + Debug.LogError( "You should not be able to get here! Pending type returned" ); + return retType; + } + + public static bool CompatibleTypes( ValueType tInput, ValueType tOutput ) { + + // If they are the same type, they are of course compatible + if( tInput == tOutput ) + return true; + // If the input is a pending vector, any output vector is compatible + if( tInput == ValueType.VTvPending && IsVectorType( tOutput ) ) + return true; + // Check multi-type for v1/v2 + if( tInput == ValueType.VTv1v2 && ( tOutput == ValueType.VTv1 || tOutput == ValueType.VTv2 ) ) + return true; + // Check multi-type for v1/v3 + if( tInput == ValueType.VTv1v3 && ( tOutput == ValueType.VTv1 || tOutput == ValueType.VTv3 ) ) + return true; + // Check multi-type for v1/v4 + if( tInput == ValueType.VTv1v4 && ( tOutput == ValueType.VTv1 || tOutput == ValueType.VTv4 ) ) + return true; + // Didn't find any allowed link, return false + return false; + } + */ + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SFNCG_Append.cs.meta b/Editor/Code/_ConnectionGroups/SFNCG_Append.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SFNCG_Append.cs.meta rename to Editor/Code/_ConnectionGroups/SFNCG_Append.cs.meta index c3319736..3fa1ca06 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SFNCG_Append.cs.meta +++ b/Editor/Code/_ConnectionGroups/SFNCG_Append.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 381cd199b81c0e343ad58f37ef1030e1 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 381cd199b81c0e343ad58f37ef1030e1 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SFNCG_Arithmetic.cs b/Editor/Code/_ConnectionGroups/SFNCG_Arithmetic.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SFNCG_Arithmetic.cs rename to Editor/Code/_ConnectionGroups/SFNCG_Arithmetic.cs index 684627b7..585b5703 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SFNCG_Arithmetic.cs +++ b/Editor/Code/_ConnectionGroups/SFNCG_Arithmetic.cs @@ -1,270 +1,270 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - // Used to detect types based on input - [System.Serializable] - public class SFNCG_Arithmetic : SF_NodeConnectionGroup { - - - public bool lockedOutput = false; - - public SFNCG_Arithmetic() { - - } - - public SFNCG_Arithmetic Initialize( SF_NodeConnector output, params SF_NodeConnector[] inputs ) { - this.output = output; - this.inputs = inputs; - return this; - } - - public SFNCG_Arithmetic LockOutType() { - lockedOutput = true; - return this; - } - - - public override void Refresh() { - // Are none of the inputs connected? In that case, it's all default - if( NoInputsConnected() ) - ResetValueTypes(); - - // If any input is non-pending, use that as base to assign the rest. - // Inputs: - ValueType baseInType = GetBaseInputType(); - ValueType genericInType = GetGenericInputType(); - AssignToEmptyInputs( genericInType ); - - //Debug.Log("Refreshing connection group of " + output.node.nodeName ); - - // Output: - if( !lockedOutput ){ - if( RequiredInputsMissing() ) { - if( baseInType == ValueType.VTv1 ) - output.valueType = ValueType.VTvPending; - else - SetOutputValueType(baseInType); - } else { - ValueType vtDom = GetDominantInputType(); - SetOutputValueType(vtDom); - - UpdateTypecasts(); - } - } - } - - - public void SetOutputValueType(ValueType vt){ - - - //Debug.Log("Trying to set to " + vt); - - if(vt == ValueType.VTv1v2) - vt = ValueType.VTv2; - if(vt == ValueType.VTv1v3) - vt = ValueType.VTv3; - if(vt == ValueType.VTv1v4) - vt = ValueType.VTv4; - - - output.SetValueType(vt); - - int ccCalc; - if(SF_Tools.CompCountOf(vt, out ccCalc)){ - if(ccCalc != output.node.texture.CompCount){ - //Debug.Log("Trying to set to " + ccCalc + " from " + vt); - output.node.texture.CompCount = ccCalc; - } - } - - - //Debug.Log("Setting output type of " + output.node.nodeName + " to " + output.valueType); // THIS IS SET TO PENDING VOR VEC1 INPUTS - } - - - - - // This is only run if there are no inputs missing! - public void UpdateTypecasts(){ - ValueType domType = output.valueType; - - - - // Reset typecasts - foreach(SF_NodeConnector con in inputs) - con.typecastTarget = 0; - - if(domType == ValueType.VTv1 || domType == ValueType.VTv1v2 || domType == ValueType.VTv2) - return; // No typecasting - - int typeTarget = 0; - // If the dominant type is Vector3, cast all Vector2 to v3 - if(domType == ValueType.VTv1v3 || domType == ValueType.VTv3){ - typeTarget = 3; - } else if(domType == ValueType.VTv1v4 || domType == ValueType.VTv4){ - typeTarget = 4; - } else { - //Debug.LogError("Shouldn't be able to get here, invalid casting on "+base.output.node.GetType().ToString() + " domType = " + domType.ToString()); - } - - foreach(SF_NodeConnector con in inputs){ - - if(con.IsChild() && !con.IsConnected()) - continue; // This is fine, childs aren't required - - if(con.GetCompCount() == 2) - con.TypecastTo(typeTarget); - } - - } - - - public ValueType GetGenericInputType() { - ValueType vt = GetBaseInputType(); -// Debug.Log("Getting base input type on "+output.node.nodeName+" = " + vt); - switch( vt ) { - case ValueType.VTv1: - if(inputs.Length > 1) - return ValueType.VTvPending; // TODO: Really? - else - return ValueType.VTv1; // TODO: This feels weird - case ValueType.VTv2: - return ValueType.VTv1v2; - case ValueType.VTv3: - return ValueType.VTv1v3; - case ValueType.VTv4: - return ValueType.VTv1v4; - default: - //Debug.LogWarning( "Invalid attempt to get generic input type from " + vt ); - return ValueType.VTvPending; - } - } - - public virtual ValueType GetDominantInputType() { - - ValueType dom = inputs[0].valueType; - - - //ValueType dom = inputs[0].valueType; - //Debug.Log("Val 0 is " + inputs[0].valueType.ToString()); - //Debug.Log("Val 1 is " + inputs[1].valueType.ToString()); - - - for( int i = 1; i < inputs.Length; i++ ) { - dom = GetDominantType( dom, inputs[i].valueType ); - } - //Debug.Log("Found dominant type:" + dom.ToString()); - return dom; - } - - public ValueType GetDominantType( ValueType a, ValueType b ) { - - //if( SF_Debug.nodes) - // Debug.Log("DOM a:" + a.ToString() + " b:" + b.ToString()); - - if( a == b ) - return a; - - if( a == ValueType.VTvPending ) - return b; - - if( b == ValueType.VTvPending ) - return a; - - if( a == ValueType.VTv1 ) { - if( IsVectorType( b ) ) - return b; - else - return a; - } - if( b == ValueType.VTv1 ) { - if( IsVectorType( a ) ) - return a; - else - return b; - } - - if(a == ValueType.VTv2 || a == ValueType.VTv1v2) - return b; - if(b == ValueType.VTv2 || b == ValueType.VTv1v2) - return a; - - - if(a == ValueType.VTv3 && b == ValueType.VTv4) - return b; - if(b == ValueType.VTv3 && a == ValueType.VTv4) - return a; - - if(a == ValueType.VTv1v2 && b == ValueType.VTv2){ - return b; - } - if(b == ValueType.VTv1v2 && a == ValueType.VTv2){ - return a; - } - - if(a == ValueType.VTv1v3 && b == ValueType.VTv3){ - return b; - } - if(b == ValueType.VTv1v3 && a == ValueType.VTv3){ - return a; - } - - if(a == ValueType.VTv1v4 && b == ValueType.VTv4){ - return b; - } - if(b == ValueType.VTv1v4 && a == ValueType.VTv4){ - return a; - } - - - - - // Debug.LogWarning( "You should not be able to get here! Dominant pending type returned" ); - return ValueType.VTvPending; - } - - - public virtual ValueType GetBaseInputType() { - - ValueType retType = ValueType.VTvPending; - - foreach( SF_NodeConnector nc in inputs ) { - retType = GetDominantType( retType, nc.valueType ); - } - - //Debug.Log("Base input type is " + retType); - - //if( retType == ValueType.VTvPending ) - //Debug.LogWarning( "You should not be able to get here! Pending type returned" ); - return retType; - } - - public static bool CompatibleTypes( ValueType tInput, ValueType tOutput ) { - - // If they are the same type, they are of course compatible - if( tInput == tOutput ) - return true; - // If the input is a pending vector, any output vector is compatible - if( tInput == ValueType.VTvPending && IsVectorType( tOutput ) ) - return true; - // Check multi-type for v1/v2 - if( tInput == ValueType.VTv1v2 && ( tOutput == ValueType.VTv1 || tOutput == ValueType.VTv2 ) ) - return true; - // Check multi-type for v1/v3 - if( tInput == ValueType.VTv1v3 && ( tOutput == ValueType.VTv1 || tOutput == ValueType.VTv3 ) ) - return true; - // Check multi-type for v1/v4 - if( tInput == ValueType.VTv1v4 && ( tOutput == ValueType.VTv1 || tOutput == ValueType.VTv4 ) ) - return true; - // Matrices - if( tInput == ValueType.VTv4m4x4 && ( tOutput == ValueType.VTv4 || tOutput == ValueType.VTm4x4 ) ) - return true; - // Didn't find any allowed link, return false - return false; - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + // Used to detect types based on input + [System.Serializable] + public class SFNCG_Arithmetic : SF_NodeConnectionGroup { + + + public bool lockedOutput = false; + + public SFNCG_Arithmetic() { + + } + + public SFNCG_Arithmetic Initialize( SF_NodeConnector output, params SF_NodeConnector[] inputs ) { + this.output = output; + this.inputs = inputs; + return this; + } + + public SFNCG_Arithmetic LockOutType() { + lockedOutput = true; + return this; + } + + + public override void Refresh() { + // Are none of the inputs connected? In that case, it's all default + if( NoInputsConnected() ) + ResetValueTypes(); + + // If any input is non-pending, use that as base to assign the rest. + // Inputs: + ValueType baseInType = GetBaseInputType(); + ValueType genericInType = GetGenericInputType(); + AssignToEmptyInputs( genericInType ); + + //Debug.Log("Refreshing connection group of " + output.node.nodeName ); + + // Output: + if( !lockedOutput ){ + if( RequiredInputsMissing() ) { + if( baseInType == ValueType.VTv1 ) + output.valueType = ValueType.VTvPending; + else + SetOutputValueType(baseInType); + } else { + ValueType vtDom = GetDominantInputType(); + SetOutputValueType(vtDom); + + UpdateTypecasts(); + } + } + } + + + public void SetOutputValueType(ValueType vt){ + + + //Debug.Log("Trying to set to " + vt); + + if(vt == ValueType.VTv1v2) + vt = ValueType.VTv2; + if(vt == ValueType.VTv1v3) + vt = ValueType.VTv3; + if(vt == ValueType.VTv1v4) + vt = ValueType.VTv4; + + + output.SetValueType(vt); + + int ccCalc; + if(SF_Tools.CompCountOf(vt, out ccCalc)){ + if(ccCalc != output.node.texture.CompCount){ + //Debug.Log("Trying to set to " + ccCalc + " from " + vt); + output.node.texture.CompCount = ccCalc; + } + } + + + //Debug.Log("Setting output type of " + output.node.nodeName + " to " + output.valueType); // THIS IS SET TO PENDING VOR VEC1 INPUTS + } + + + + + // This is only run if there are no inputs missing! + public void UpdateTypecasts(){ + ValueType domType = output.valueType; + + + + // Reset typecasts + foreach(SF_NodeConnector con in inputs) + con.typecastTarget = 0; + + if(domType == ValueType.VTv1 || domType == ValueType.VTv1v2 || domType == ValueType.VTv2) + return; // No typecasting + + int typeTarget = 0; + // If the dominant type is Vector3, cast all Vector2 to v3 + if(domType == ValueType.VTv1v3 || domType == ValueType.VTv3){ + typeTarget = 3; + } else if(domType == ValueType.VTv1v4 || domType == ValueType.VTv4){ + typeTarget = 4; + } else { + //Debug.LogError("Shouldn't be able to get here, invalid casting on "+base.output.node.GetType().ToString() + " domType = " + domType.ToString()); + } + + foreach(SF_NodeConnector con in inputs){ + + if(con.IsChild() && !con.IsConnected()) + continue; // This is fine, childs aren't required + + if(con.GetCompCount() == 2) + con.TypecastTo(typeTarget); + } + + } + + + public ValueType GetGenericInputType() { + ValueType vt = GetBaseInputType(); +// Debug.Log("Getting base input type on "+output.node.nodeName+" = " + vt); + switch( vt ) { + case ValueType.VTv1: + if(inputs.Length > 1) + return ValueType.VTvPending; // TODO: Really? + else + return ValueType.VTv1; // TODO: This feels weird + case ValueType.VTv2: + return ValueType.VTv1v2; + case ValueType.VTv3: + return ValueType.VTv1v3; + case ValueType.VTv4: + return ValueType.VTv1v4; + default: + //Debug.LogWarning( "Invalid attempt to get generic input type from " + vt ); + return ValueType.VTvPending; + } + } + + public virtual ValueType GetDominantInputType() { + + ValueType dom = inputs[0].valueType; + + + //ValueType dom = inputs[0].valueType; + //Debug.Log("Val 0 is " + inputs[0].valueType.ToString()); + //Debug.Log("Val 1 is " + inputs[1].valueType.ToString()); + + + for( int i = 1; i < inputs.Length; i++ ) { + dom = GetDominantType( dom, inputs[i].valueType ); + } + //Debug.Log("Found dominant type:" + dom.ToString()); + return dom; + } + + public ValueType GetDominantType( ValueType a, ValueType b ) { + + //if( SF_Debug.nodes) + // Debug.Log("DOM a:" + a.ToString() + " b:" + b.ToString()); + + if( a == b ) + return a; + + if( a == ValueType.VTvPending ) + return b; + + if( b == ValueType.VTvPending ) + return a; + + if( a == ValueType.VTv1 ) { + if( IsVectorType( b ) ) + return b; + else + return a; + } + if( b == ValueType.VTv1 ) { + if( IsVectorType( a ) ) + return a; + else + return b; + } + + if(a == ValueType.VTv2 || a == ValueType.VTv1v2) + return b; + if(b == ValueType.VTv2 || b == ValueType.VTv1v2) + return a; + + + if(a == ValueType.VTv3 && b == ValueType.VTv4) + return b; + if(b == ValueType.VTv3 && a == ValueType.VTv4) + return a; + + if(a == ValueType.VTv1v2 && b == ValueType.VTv2){ + return b; + } + if(b == ValueType.VTv1v2 && a == ValueType.VTv2){ + return a; + } + + if(a == ValueType.VTv1v3 && b == ValueType.VTv3){ + return b; + } + if(b == ValueType.VTv1v3 && a == ValueType.VTv3){ + return a; + } + + if(a == ValueType.VTv1v4 && b == ValueType.VTv4){ + return b; + } + if(b == ValueType.VTv1v4 && a == ValueType.VTv4){ + return a; + } + + + + + // Debug.LogWarning( "You should not be able to get here! Dominant pending type returned" ); + return ValueType.VTvPending; + } + + + public virtual ValueType GetBaseInputType() { + + ValueType retType = ValueType.VTvPending; + + foreach( SF_NodeConnector nc in inputs ) { + retType = GetDominantType( retType, nc.valueType ); + } + + //Debug.Log("Base input type is " + retType); + + //if( retType == ValueType.VTvPending ) + //Debug.LogWarning( "You should not be able to get here! Pending type returned" ); + return retType; + } + + public static bool CompatibleTypes( ValueType tInput, ValueType tOutput ) { + + // If they are the same type, they are of course compatible + if( tInput == tOutput ) + return true; + // If the input is a pending vector, any output vector is compatible + if( tInput == ValueType.VTvPending && IsVectorType( tOutput ) ) + return true; + // Check multi-type for v1/v2 + if( tInput == ValueType.VTv1v2 && ( tOutput == ValueType.VTv1 || tOutput == ValueType.VTv2 ) ) + return true; + // Check multi-type for v1/v3 + if( tInput == ValueType.VTv1v3 && ( tOutput == ValueType.VTv1 || tOutput == ValueType.VTv3 ) ) + return true; + // Check multi-type for v1/v4 + if( tInput == ValueType.VTv1v4 && ( tOutput == ValueType.VTv1 || tOutput == ValueType.VTv4 ) ) + return true; + // Matrices + if( tInput == ValueType.VTv4m4x4 && ( tOutput == ValueType.VTv4 || tOutput == ValueType.VTm4x4 ) ) + return true; + // Didn't find any allowed link, return false + return false; + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SFNCG_Arithmetic.cs.meta b/Editor/Code/_ConnectionGroups/SFNCG_Arithmetic.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SFNCG_Arithmetic.cs.meta rename to Editor/Code/_ConnectionGroups/SFNCG_Arithmetic.cs.meta index a1210a15..88a56377 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SFNCG_Arithmetic.cs.meta +++ b/Editor/Code/_ConnectionGroups/SFNCG_Arithmetic.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: af887491ef5675d4bac8f00faf209745 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: af887491ef5675d4bac8f00faf209745 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SFNCG_ChannelBlend.cs b/Editor/Code/_ConnectionGroups/SFNCG_ChannelBlend.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SFNCG_ChannelBlend.cs rename to Editor/Code/_ConnectionGroups/SFNCG_ChannelBlend.cs index 6b3590fd..355f8812 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SFNCG_ChannelBlend.cs +++ b/Editor/Code/_ConnectionGroups/SFNCG_ChannelBlend.cs @@ -1,26 +1,26 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - // Used to detect types based on input - [System.Serializable] - public class SFNCG_ChannelBlend : SFNCG_Arithmetic { - - - public SFNCG_ChannelBlend() { - - } - - public new SFNCG_ChannelBlend Initialize( SF_NodeConnector output, params SF_NodeConnector[] inputs ) { - SF_NodeConnector[] inputsWithoutFirst = new SF_NodeConnector[inputs.Length-1]; - for(int i=1;i 4 ) { // TODO: Error message - Debug.LogWarning( "User connected vectors summing to " + inputs[0].node.nodeName ); - inputs[1].Disconnect(); - return; - } - - - switch( inCompSum ) { - case 2: - output.valueType = ValueType.VTv2; - break; - case 3: - output.valueType = ValueType.VTv3; - break; - case 4: - output.valueType = ValueType.VTv4; - break; - } - - - - - - - /* - - - // If any input is non-pending, use that as base to assign the rest. - // Inputs: - ValueType baseInType = GetBaseInputType(); - ValueType genericInType = GetGenericInputType(); - AssignToEmptyInputs( genericInType ); - - // Output: - if( InputsMissing() ) { - if( baseInType == ValueType.VTv1 ) - output.valueType = ValueType.VTvPending; - else - output.valueType = baseInType; - } else { - output.valueType = GetDominantInputType(); - } - */ - } - - /* - - public ValueType GetGenericInputType() { - ValueType vt = GetBaseInputType(); - switch( vt ) { - case ValueType.VTv1: - return ValueType.VTvPending; - case ValueType.VTv2: - return ValueType.VTv1v2; - case ValueType.VTv3: - return ValueType.VTv1v3; - case ValueType.VTv4: - return ValueType.VTv1v4; - default: - Debug.LogError( "Invalid attempt to get generic input type from " + vt ); - return ValueType.VTvPending; - } - } - - public ValueType GetDominantInputType() { - ValueType dom = inputs[0].valueType; - for( int i = 1 ; i < inputs.Length ; i++ ) { - dom = GetDominantType( dom, inputs[i].valueType); - } - return dom; - } - - public ValueType GetDominantType(ValueType a, ValueType b) { - if( a == b ) - return a; - - if( a == ValueType.VTvPending ) - return b; - - if( b == ValueType.VTvPending ) - return a; - - if( a == ValueType.VTv1 ) { - if( IsVectorType( b ) ) - return b; - else - return a; - } - if( b == ValueType.VTv1 ) { - if( IsVectorType( a ) ) - return a; - else - return b; - } - - Debug.LogError( "You should not be able to get here! Dominant pending type returned" ); - return ValueType.VTvPending; - } - - - public ValueType GetBaseInputType() { - - ValueType retType = ValueType.VTvPending; - - foreach( SF_NodeConnection nc in inputs ) { - retType = GetDominantType( retType, nc.valueType ); - } - - if( retType == ValueType.VTvPending ) - Debug.LogError( "You should not be able to get here! Pending type returned" ); - return retType; - } - - public static bool CompatibleTypes( ValueType tInput, ValueType tOutput ) { - - // If they are the same type, they are of course compatible - if( tInput == tOutput ) - return true; - // If the input is a pending vector, any output vector is compatible - if( tInput == ValueType.VTvPending && IsVectorType( tOutput ) ) - return true; - // Check multi-type for v1/v2 - if( tInput == ValueType.VTv1v2 && ( tOutput == ValueType.VTv1 || tOutput == ValueType.VTv2 ) ) - return true; - // Check multi-type for v1/v3 - if( tInput == ValueType.VTv1v3 && ( tOutput == ValueType.VTv1 || tOutput == ValueType.VTv3 ) ) - return true; - // Check multi-type for v1/v4 - if( tInput == ValueType.VTv1v4 && ( tOutput == ValueType.VTv1 || tOutput == ValueType.VTv4 ) ) - return true; - // Didn't find any allowed link, return false - return false; - } - */ - } - +using UnityEngine; +using System.Collections; + + +namespace ShaderForge { + + // Used to detect types based on input + [System.Serializable] + public class SFNCG_ComponentMask : SF_NodeConnectionGroup { + + + + public void Initialize( SF_NodeConnector output, params SF_NodeConnector[] inputs ) { + this.output = output; + this.inputs = inputs; + } + + + public int GetOutputComponentCount() { + return inputs[0].inputCon.GetCompCount();// + (inputs[0].node as SFN_ComponentMask).outputComponentCount ; + } + + + public override void Refresh() { + // Are none of the inputs connected? In that case, it's all default + + // ALLOWED COMBOS + /* + * v1 v1 = v2 + * v1 v2 = v3 + * v1 v3 = v4 + * v2 v1 = v3 + * v2 v2 = v4 + * v3 v1 = v4 + */ + + if( NoInputsConnected() ) + ResetValueTypes(); + + // If a matrix is plugged in here, disconnect it immediately + if( inputs[0].inputCon.valueType == ValueType.VTm4x4 || inputs[0].inputCon.valueType == ValueType.VTv4m4x4 ) { + inputs[0].Disconnect(); + return; + } + + if( !inputs[0].node.InputsConnected() ) + return; + + int inCompSum = GetOutputComponentCount(); + + if( inCompSum < 2 ) { + Debug.LogError( "Input sum is somehow " + inCompSum + " on " + inputs[0].node.nodeName ); + inputs[1].Disconnect(); // This should never happen + return; + } + + if( inCompSum > 4 ) { // TODO: Error message + Debug.LogWarning( "User connected vectors summing to " + inputs[0].node.nodeName ); + inputs[1].Disconnect(); + return; + } + + + switch( inCompSum ) { + case 2: + output.valueType = ValueType.VTv2; + break; + case 3: + output.valueType = ValueType.VTv3; + break; + case 4: + output.valueType = ValueType.VTv4; + break; + } + + + + + + + /* + + + // If any input is non-pending, use that as base to assign the rest. + // Inputs: + ValueType baseInType = GetBaseInputType(); + ValueType genericInType = GetGenericInputType(); + AssignToEmptyInputs( genericInType ); + + // Output: + if( InputsMissing() ) { + if( baseInType == ValueType.VTv1 ) + output.valueType = ValueType.VTvPending; + else + output.valueType = baseInType; + } else { + output.valueType = GetDominantInputType(); + } + */ + } + + /* + + public ValueType GetGenericInputType() { + ValueType vt = GetBaseInputType(); + switch( vt ) { + case ValueType.VTv1: + return ValueType.VTvPending; + case ValueType.VTv2: + return ValueType.VTv1v2; + case ValueType.VTv3: + return ValueType.VTv1v3; + case ValueType.VTv4: + return ValueType.VTv1v4; + default: + Debug.LogError( "Invalid attempt to get generic input type from " + vt ); + return ValueType.VTvPending; + } + } + + public ValueType GetDominantInputType() { + ValueType dom = inputs[0].valueType; + for( int i = 1 ; i < inputs.Length ; i++ ) { + dom = GetDominantType( dom, inputs[i].valueType); + } + return dom; + } + + public ValueType GetDominantType(ValueType a, ValueType b) { + if( a == b ) + return a; + + if( a == ValueType.VTvPending ) + return b; + + if( b == ValueType.VTvPending ) + return a; + + if( a == ValueType.VTv1 ) { + if( IsVectorType( b ) ) + return b; + else + return a; + } + if( b == ValueType.VTv1 ) { + if( IsVectorType( a ) ) + return a; + else + return b; + } + + Debug.LogError( "You should not be able to get here! Dominant pending type returned" ); + return ValueType.VTvPending; + } + + + public ValueType GetBaseInputType() { + + ValueType retType = ValueType.VTvPending; + + foreach( SF_NodeConnection nc in inputs ) { + retType = GetDominantType( retType, nc.valueType ); + } + + if( retType == ValueType.VTvPending ) + Debug.LogError( "You should not be able to get here! Pending type returned" ); + return retType; + } + + public static bool CompatibleTypes( ValueType tInput, ValueType tOutput ) { + + // If they are the same type, they are of course compatible + if( tInput == tOutput ) + return true; + // If the input is a pending vector, any output vector is compatible + if( tInput == ValueType.VTvPending && IsVectorType( tOutput ) ) + return true; + // Check multi-type for v1/v2 + if( tInput == ValueType.VTv1v2 && ( tOutput == ValueType.VTv1 || tOutput == ValueType.VTv2 ) ) + return true; + // Check multi-type for v1/v3 + if( tInput == ValueType.VTv1v3 && ( tOutput == ValueType.VTv1 || tOutput == ValueType.VTv3 ) ) + return true; + // Check multi-type for v1/v4 + if( tInput == ValueType.VTv1v4 && ( tOutput == ValueType.VTv1 || tOutput == ValueType.VTv4 ) ) + return true; + // Didn't find any allowed link, return false + return false; + } + */ + } + } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SFNCG_ComponentMask.cs.meta b/Editor/Code/_ConnectionGroups/SFNCG_ComponentMask.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SFNCG_ComponentMask.cs.meta rename to Editor/Code/_ConnectionGroups/SFNCG_ComponentMask.cs.meta index a3d42950..50850744 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SFNCG_ComponentMask.cs.meta +++ b/Editor/Code/_ConnectionGroups/SFNCG_ComponentMask.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: f3ed7ab8c44ddc5429852ca5ffbb4850 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: f3ed7ab8c44ddc5429852ca5ffbb4850 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SFNCG_MatrixMultiply.cs b/Editor/Code/_ConnectionGroups/SFNCG_MatrixMultiply.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SFNCG_MatrixMultiply.cs rename to Editor/Code/_ConnectionGroups/SFNCG_MatrixMultiply.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SFNCG_MatrixMultiply.cs.meta b/Editor/Code/_ConnectionGroups/SFNCG_MatrixMultiply.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SFNCG_MatrixMultiply.cs.meta rename to Editor/Code/_ConnectionGroups/SFNCG_MatrixMultiply.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SF_NodeConnectionGroup.cs b/Editor/Code/_ConnectionGroups/SF_NodeConnectionGroup.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SF_NodeConnectionGroup.cs rename to Editor/Code/_ConnectionGroups/SF_NodeConnectionGroup.cs index b1cf97fc..0377a8aa --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SF_NodeConnectionGroup.cs +++ b/Editor/Code/_ConnectionGroups/SF_NodeConnectionGroup.cs @@ -1,83 +1,83 @@ -using UnityEngine; -using System.Collections; - - -namespace ShaderForge { - - // Used to detect types based on input - [System.Serializable] - public class SF_NodeConnectionGroup : ScriptableObject { - - - public SF_NodeConnector output; - public SF_NodeConnector[] inputs; - - - - public void OnEnable() { - base.hideFlags = HideFlags.HideAndDontSave; - } - - - public SF_NodeConnectionGroup() { - // Empty - } - - - /* - public void Initialize( SF_NodeConnection output, params SF_NodeConnection[] inputs ) { - this.output = output; - this.inputs = inputs; - }*/ - - - public virtual void Refresh() { - // Override - } - - public void AssignToEmptyInputs( ValueType vt ) { - //Debug.Log("AssignToEmptInputs: " + vt + " on output of " + output.node.nodeName); - foreach( SF_NodeConnector nc in inputs ) { - if( !nc.IsConnected() ) - nc.valueType = vt; - } - } - - public bool RequiredInputsMissing() { - foreach( SF_NodeConnector nc in inputs ) { - if( !nc.IsConnected() && nc.required ) - return true; - } - return false; - } - - public void ResetValueTypes() { - output.ResetValueType(); - foreach( SF_NodeConnector nc in inputs ) { - nc.ResetValueType(); - } - } - - public bool NoInputsConnected() { - foreach( SF_NodeConnector nc in inputs ) { - if( nc.IsConnected() ) - return false; - } - return true; - } - - public static bool IsVectorType( ValueType vTinput ) { - if( vTinput == ValueType.VTv1 ) - return true; - if( vTinput == ValueType.VTv2 ) - return true; - if( vTinput == ValueType.VTv3 ) - return true; - if( vTinput == ValueType.VTv4 ) - return true; - return false; - } - - - } +using UnityEngine; +using System.Collections; + + +namespace ShaderForge { + + // Used to detect types based on input + [System.Serializable] + public class SF_NodeConnectionGroup : ScriptableObject { + + + public SF_NodeConnector output; + public SF_NodeConnector[] inputs; + + + + public void OnEnable() { + base.hideFlags = HideFlags.HideAndDontSave; + } + + + public SF_NodeConnectionGroup() { + // Empty + } + + + /* + public void Initialize( SF_NodeConnection output, params SF_NodeConnection[] inputs ) { + this.output = output; + this.inputs = inputs; + }*/ + + + public virtual void Refresh() { + // Override + } + + public void AssignToEmptyInputs( ValueType vt ) { + //Debug.Log("AssignToEmptInputs: " + vt + " on output of " + output.node.nodeName); + foreach( SF_NodeConnector nc in inputs ) { + if( !nc.IsConnected() ) + nc.valueType = vt; + } + } + + public bool RequiredInputsMissing() { + foreach( SF_NodeConnector nc in inputs ) { + if( !nc.IsConnected() && nc.required ) + return true; + } + return false; + } + + public void ResetValueTypes() { + output.ResetValueType(); + foreach( SF_NodeConnector nc in inputs ) { + nc.ResetValueType(); + } + } + + public bool NoInputsConnected() { + foreach( SF_NodeConnector nc in inputs ) { + if( nc.IsConnected() ) + return false; + } + return true; + } + + public static bool IsVectorType( ValueType vTinput ) { + if( vTinput == ValueType.VTv1 ) + return true; + if( vTinput == ValueType.VTv2 ) + return true; + if( vTinput == ValueType.VTv3 ) + return true; + if( vTinput == ValueType.VTv4 ) + return true; + return false; + } + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SF_NodeConnectionGroup.cs.meta b/Editor/Code/_ConnectionGroups/SF_NodeConnectionGroup.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SF_NodeConnectionGroup.cs.meta rename to Editor/Code/_ConnectionGroups/SF_NodeConnectionGroup.cs.meta index e3adb3cf..3f08b525 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ConnectionGroups/SF_NodeConnectionGroup.cs.meta +++ b/Editor/Code/_ConnectionGroups/SF_NodeConnectionGroup.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 29f1f79c469e47d4fbd337efdb4e4cb5 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 29f1f79c469e47d4fbd337efdb4e4cb5 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Enums.meta b/Editor/Code/_Enums.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Enums.meta rename to Editor/Code/_Enums.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Enums/SF_VarTypeEnums.cs b/Editor/Code/_Enums/SF_VarTypeEnums.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Enums/SF_VarTypeEnums.cs rename to Editor/Code/_Enums/SF_VarTypeEnums.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Enums/SF_VarTypeEnums.cs.meta b/Editor/Code/_Enums/SF_VarTypeEnums.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Enums/SF_VarTypeEnums.cs.meta rename to Editor/Code/_Enums/SF_VarTypeEnums.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Evaluator.meta b/Editor/Code/_Evaluator.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Evaluator.meta rename to Editor/Code/_Evaluator.meta index b8ece89a..9365489f --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Evaluator.meta +++ b/Editor/Code/_Evaluator.meta @@ -1,5 +1,5 @@ -fileFormatVersion: 2 -guid: 5f94f7f57d35346a79fe37c5394b46bf -folderAsset: yes -DefaultImporter: - userData: +fileFormatVersion: 2 +guid: 5f94f7f57d35346a79fe37c5394b46bf +folderAsset: yes +DefaultImporter: + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Evaluator/Pass_FwdAdd.cs b/Editor/Code/_Evaluator/Pass_FwdAdd.cs old mode 100755 new mode 100644 similarity index 93% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Evaluator/Pass_FwdAdd.cs rename to Editor/Code/_Evaluator/Pass_FwdAdd.cs index 555c872b..c86470c9 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Evaluator/Pass_FwdAdd.cs +++ b/Editor/Code/_Evaluator/Pass_FwdAdd.cs @@ -2,49 +2,49 @@ using System.Collections; namespace ShaderForge{ - public class Pass_FrwAdd : MonoBehaviour { - - public SF_Evaluator eval; - - - public Pass_FrwAdd( SF_Evaluator eval ) { - this.eval = eval; - } - - - public void ForwardAddPass() { - eval.ResetDefinedState(); - - - - } - - - - //////////////////////////////////////////////////////////// - - - public void StartPass() { - App( "Pass {" ); - eval.scope++; - } - - - - - - public void EndPass() { - eval.scope--; - App( "}" ); - } - - //////////////////////////////////////////////////////////// - - public void App( string s ) { - eval.App( s ); - } + public class Pass_FrwAdd : MonoBehaviour { + + public SF_Evaluator eval; + + + public Pass_FrwAdd( SF_Evaluator eval ) { + this.eval = eval; + } + + + public void ForwardAddPass() { + eval.ResetDefinedState(); + + + + } + + + + //////////////////////////////////////////////////////////// + + + public void StartPass() { + App( "Pass {" ); + eval.scope++; + } + + + + + + public void EndPass() { + eval.scope--; + App( "}" ); + } + + //////////////////////////////////////////////////////////// + + public void App( string s ) { + eval.App( s ); + } - } + } } diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Evaluator/Pass_FwdAdd.cs.meta b/Editor/Code/_Evaluator/Pass_FwdAdd.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Evaluator/Pass_FwdAdd.cs.meta rename to Editor/Code/_Evaluator/Pass_FwdAdd.cs.meta index ac70217a..bcd38d57 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Evaluator/Pass_FwdAdd.cs.meta +++ b/Editor/Code/_Evaluator/Pass_FwdAdd.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 22b57f25fa43b034dbe3965c4be91970 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 22b57f25fa43b034dbe3965c4be91970 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Evaluator/SF_Evaluator.cs b/Editor/Code/_Evaluator/SF_Evaluator.cs old mode 100755 new mode 100644 similarity index 98% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Evaluator/SF_Evaluator.cs rename to Editor/Code/_Evaluator/SF_Evaluator.cs index 7448c77d..01efba45 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Evaluator/SF_Evaluator.cs +++ b/Editor/Code/_Evaluator/SF_Evaluator.cs @@ -562,19 +562,29 @@ void BeginCG() { switch( currentPass ) { case PassType.FwdBase: + App( "#ifndef UNITY_PASS_FORWARDBASE" ); App( "#define UNITY_PASS_FORWARDBASE" ); + App( "#endif //UNITY_PASS_FORWARDBASE" ); break; case PassType.FwdAdd: + App( "#ifndef UNITY_PASS_FORWARDADD" ); App( "#define UNITY_PASS_FORWARDADD" ); + App( "#endif //UNITY_PASS_FORWARDADD" ); break; case PassType.Deferred: + App( "#ifndef UNITY_PASS_DEFERRED" ); App( "#define UNITY_PASS_DEFERRED" ); + App( "#endif //UNITY_PASS_DEFERRED" ); break; case PassType.ShadCast: + App( "#ifndef UNITY_PASS_SHADOWCASTER" ); App( "#define UNITY_PASS_SHADOWCASTER" ); + App( "#endif //UNITY_PASS_SHADOWCASTER" ); break; case PassType.Meta: + App( "#ifndef UNITY_PASS_META" ); App( "#define UNITY_PASS_META 1" ); + App( "#endif UNITY_PASS_META" ); break; } @@ -583,7 +593,7 @@ void BeginCG() { App( "#define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) )" ); } - + if(ps.catLighting.reflectprobed ){ App ("#define _GLOSSYENV 1"); } @@ -640,7 +650,7 @@ void BeginCG() { if( UseUnity5Fog() ) App( "#pragma multi_compile_fog" ); - + List groups = new List(); @@ -876,7 +886,7 @@ void CGvars() { if( dependencies.grabPass ) { App( "uniform sampler2D " + ps.catBlending.GetGrabTextureName() + ";" ); } - + if( dependencies.depthTexture ) App( "uniform sampler2D _CameraDepthTexture;" ); @@ -885,7 +895,7 @@ void CGvars() { } - + PropertiesCG(); } @@ -917,7 +927,7 @@ void PrepareLightmapVars() { if( !LightmapThisPass() ) return; - + // TODO U5 LMs @@ -957,12 +967,30 @@ void InitHalfVector() { void InitAttenuation() { if( SF_Evaluator.inVert && ps.catLighting.IsVertexLit() && ShouldUseLightMacros() ) + { +#if UNITY_2018_1_OR_NEWER + App( "UNITY_TRANSFER_LIGHTING(o, " + (LightmappedAndLit() ? "v.texcoord1" : "float2(0,0)") + ");" ); +#else App( "TRANSFER_VERTEX_TO_FRAGMENT(o)" ); +#endif + } +#if UNITY_2018_1_OR_NEWER + if (ShouldUseLightMacros()) + { + string s = ( ( currentProgram == ShaderProgram.Frag ) ? "i" : "o" ); + App( "UNITY_LIGHT_ATTENUATION(attenuation, " + s + ", " + s + ".posWorld.xyz);" ); + } + else + { + App( "float attenuation = 1;" ); + } +#else //UNITY_2018_1_OR_NEWER string atten = "LIGHT_ATTENUATION(" + ( ( currentProgram == ShaderProgram.Frag ) ? "i" : "o" ) + ")"; string inner = ( ShouldUseLightMacros() ? atten : "1" ); App( "float attenuation = " + inner + ";" ); +#endif //UNITY_2018_1_OR_NEWER if( ps.catLighting.lightMode != SFPSC_Lighting.LightMode.Unlit ) App( "float3 attenColor = attenuation * _LightColor0.xyz;" ); } @@ -1001,7 +1029,7 @@ void CalcDiffuse() { if( ps.HasTransmission() || ps.HasLightWrapping() ) { - + if( !InDeferredPass() ) { if( !definedNdotL ) { @@ -1023,7 +1051,7 @@ void CalcDiffuse() { App( "float3 NdotLWrap = NdotL * ( 1.0 - w );" ); definedNdotLwrap = true; } - + App( fwdLight + GetWithDiffPow( "max(float3(0.0,0.0,0.0), NdotLWrap + w )" ) + ";" ); if( ps.HasTransmission() ) { App( backLight + GetWithDiffPow( "max(float3(0.0,0.0,0.0), -NdotLWrap + w )" ) + " * " + ps.n_transmission + ";" ); @@ -1104,7 +1132,7 @@ void CalcDiffuse() { lmbStr += ";"; App( lmbStr ); } - + bool ambDiff = ps.mOut.ambientDiffuse.IsConnectedEnabledAndAvailableInThisPass( currentPass ); @@ -1115,7 +1143,7 @@ void CalcDiffuse() { bool hasIndirectLight = ambDiff || shLight || ambLight; // TODO: Missing lightmaps - + if( hasIndirectLight ) { App( "float3 indirectDiffuse = float3(0,0,0);" ); @@ -1123,9 +1151,9 @@ void CalcDiffuse() { - - - + + + @@ -1141,9 +1169,12 @@ void CalcDiffuse() { App( "indirectDiffuse += " + ps.n_ambientDiffuse + "; // Diffuse Ambient Light" ); - if( LightmappedAndLit() ) { - - + if( LightmappedAndLit() ) + { + if (currentPass == PassType.Deferred) + { + App("#pragma multi_compile ___ LIGHTPROBE_SH"); + } App( "indirectDiffuse += gi.indirect.diffuse;" ); @@ -1187,13 +1218,13 @@ void CalcDiffuse() { } } - + //if( SF_Tools.UsingUnity5plus && ps.catLighting.lightMode == SFPSC_Lighting.LightMode.PBL ) { // App( "diffuse *= 0.75;" ); //} - + } @@ -1283,7 +1314,7 @@ void CalcGloss() { } App( "float roughness = perceptualRoughness * perceptualRoughness;" ); } - + if( !InDeferredPass() ) { if( ps.catLighting.remapGlossExponentially ) { App( "float specPow = exp2( gloss * 10.0 + 1.0 );" ); @@ -1291,9 +1322,9 @@ void CalcGloss() { App( "float specPow = gloss;" ); } } - - - + + + } bool DoAmbientSpecThisPass() { @@ -1307,7 +1338,7 @@ void CalcSpecular() { AppDebug( "Specular" ); - + if( currentPass != PassType.Deferred ) { App( "float NdotL = saturate(dot( " + VarNormalDir() + ", lightDirection ));" ); @@ -1382,7 +1413,7 @@ void CalcSpecular() { } else { indirectSpecular += "(0"; } - + if( ambSpec ) { indirectSpecular += " + " + ps.n_ambientSpecular + ")"; @@ -1408,7 +1439,7 @@ void CalcSpecular() { App( "float LdotH = saturate(dot(lightDirection, halfDirection));" ); - + //s += "*NdotL"; // TODO: Really? Is this the cosine part? @@ -1444,13 +1475,13 @@ void CalcSpecular() { } else if( ps.catLighting.energyConserving && DoPassDiffuse() && DoPassSpecular() ){ App( "float specularMonochrome = max( max(specularColor.r, specularColor.g), specularColor.b);" ); } - - - - - + + + + + string specularPBL = ""; // PBL SHADING, normalization term comes after this @@ -1460,9 +1491,9 @@ void CalcSpecular() { // FRESNEL TERM //App( "float3 specularColor = " + ps.n_specular + ";" ); - - + + //specularPBL += "*NdotL"; @@ -1474,7 +1505,7 @@ void CalcSpecular() { initialized_NdotV = true; } - + if( !initialized_NdotH ) { App( "float NdotH = saturate(dot( " + VarNormalDir() + ", halfDirection ));" ); initialized_NdotH = true; @@ -1488,9 +1519,9 @@ void CalcSpecular() { specularPBL += "*visTerm"; - - - + + + } else { @@ -1515,7 +1546,7 @@ void CalcSpecular() { App( "float normTerm = GGXTerm(NdotH, roughness);" ); specularPBL += "*normTerm"; - + } else { App( "float normTerm = (specPow + 8.0 ) / (8.0 * Pi);" ); directSpecular += "*normTerm"; @@ -1543,12 +1574,12 @@ void CalcSpecular() { App( "float NdotV = max(0.0,dot( " + VarNormalDir() + ", viewDirection ));" ); initialized_NdotV = true; } - + specularPBL = specularPBL.Substring( 1 ); // Remove first * symbol specularPBL = "float specularPBL = (" + specularPBL + ") * UNITY_PI;"; - + App( specularPBL ); App( "#ifdef UNITY_COLORSPACE_GAMMA" ); @@ -1576,7 +1607,7 @@ void CalcSpecular() { scope--; App( "#endif" ); } - + // Kill spec if color = 0 App( "specularPBL *= any(specularColor) ? 1.0 : 0.0;" ); @@ -1599,7 +1630,7 @@ void CalcSpecular() { } - + string specular = ""; @@ -1627,7 +1658,7 @@ void CalcSpecular() { if( !InDeferredPass() ) { specular = "float3 specular = (directSpecular + indirectSpecular);"; } - + } else if(!InDeferredPass()){ specular = "float3 specular = directSpecular;"; } @@ -1635,7 +1666,7 @@ void CalcSpecular() { if( !InDeferredPass() ) App( specular ); // Specular - + @@ -1890,7 +1921,7 @@ void Lighting() { //if( !InDeferredPass() ) //CalcGloss(); CalcSpecular(); - //AppDebug("Spec done"); + //AppDebug("Spec done"); } if( DoPassDiffuse() ) // Diffuse + texture (If not vertex lit) @@ -1911,11 +1942,11 @@ void Lighting() { /* bool fresnelIndirectPBL = Unity5PBL() && - ( ps.catLighting.reflectprobed || ps.HasAmbientSpecular() ) && + ( ps.catLighting.reflectprobed || ps.HasAmbientSpecular() ) && (currentPass == PassType.FwdBase || currentPass == PassType.PrePassFinal) ;*/ - + if(!InDeferredPass()){ @@ -1927,11 +1958,11 @@ void Lighting() { new string[] { diffuse, "specular", "emissive" }, "0" ); - + App( "float3 finalColor = " + s + ";" ); } - - + + } } @@ -1967,9 +1998,9 @@ void CalcGIdata(){ scope--; App( "#endif" ); } - - - + + + App("UnityGIInput d;"); App("d.light = light;"); App("d.worldPos = i.posWorld.xyz;"); @@ -1991,8 +2022,8 @@ void CalcGIdata(){ scope--; App( "#endif" ); } - - + + if(DoPassSpecular() && ps.catLighting.reflectprobed){ @@ -2017,7 +2048,7 @@ void CalcGIdata(){ } - + string glossStr = DoPassSpecular() ? "gloss" : "0"; App( "Unity_GlossyEnvironmentData ugls_en_data;" ); @@ -2031,8 +2062,8 @@ void CalcGIdata(){ App ("lightDirection = gi.light.dir;"); App ("lightColor = gi.light.color;"); } - - + + } @@ -2250,7 +2281,13 @@ void VertexOutputStruct() { if( dependencies.frag_projPos ) App( "float4 projPos" + GetVertOutTexcoord() ); if( ShouldUseLightMacros() ) + { +#if UNITY_2018_1_OR_NEWER + App( "UNITY_LIGHTING_COORDS(" + GetVertOutTexcoord( true ) + "," + GetVertOutTexcoord( true ) + ")" ); +#else App( "LIGHTING_COORDS(" + GetVertOutTexcoord( true ) + "," + GetVertOutTexcoord( true ) + ")" ); +#endif + } if( UseUnity5FogInThisPass() ) App( "UNITY_FOG_COORDS(" + GetVertOutTexcoord( true ) + ")" ); // New in Unity 5 @@ -2269,13 +2306,13 @@ void VertexOutputStruct() { scope--; App( "#endif" ); } - - + + } @@ -2383,7 +2420,7 @@ void Vertex() { InitObjectScale(); if( editor.mainNode.vertexOffset.IsConnectedAndEnabled() ) { - + if( ps.catGeometry.vertexOffsetMode == SFPSC_Geometry.VertexOffsetMode.Relative ) App( "v.vertex.xyz += " + ps.n_vertexOffset + ";" ); else @@ -2401,7 +2438,7 @@ void Vertex() { if( !editor.nodeView.treeStatus.viewDirectionInVertOffset ) { InitViewDirVert(); } - + InitReflectionDir(); if( dependencies.frag_lightDirection ) { InitLightDir(); @@ -2414,9 +2451,9 @@ void Vertex() { if( ps.catExperimental.forceSkipModelProjection ){ positioningPrefix = "mul(UNITY_MATRIX_VP, "; // Local space. Broken for shadows due to TRANSFER_SHADOW_CASTER assuming model projections } else { - positioningPrefix = "UnityObjectToClipPos( "; // World space + positioningPrefix = "UnityObjectToClipPos( "; // World space } - + string positioningSuffix = " );"; if( ps.catGeometry.vertexPositioning == SFPSC_Geometry.VertexPositioning.ClipSpace ) { positioningPrefix = ""; @@ -2466,7 +2503,7 @@ void Vertex() { scope--; App( "#endif" ); } - + // New in Unity 5 if( UseUnity5FogInThisPass() ) { @@ -2516,7 +2553,13 @@ void Vertex() { if( ps.catLighting.IsVertexLit() ) Lighting(); else if( ShouldUseLightMacros() ) + { +#if UNITY_2018_1_OR_NEWER + App( "UNITY_TRANSFER_LIGHTING(o, " + (LightmappedAndLit() ? "v.texcoord1" : "float2(0,0)") + ");" ); +#else App( "TRANSFER_VERTEX_TO_FRAGMENT(o)" ); +#endif + } } App( "return o;" ); @@ -2557,7 +2600,7 @@ void Fragment() { } App( "float4 frag(VertexOutput i" + vface + ") : COLOR {" ); } - + scope++; if( dependencies.frag_facing ) { @@ -2601,9 +2644,9 @@ void Fragment() { - + Lighting(); // This is ignored in shadow passes - + if( currentPass == PassType.Meta ) { LightmapMetaPassFrag(); @@ -2662,7 +2705,7 @@ void DeferredFragReturn() { } else { App( "outSpecSmoothness = half4(0,0,0,0);" ); } - + // NORMALS App( "outNormal = half4( normalDirection * 0.5 + 0.5, 1 );" ); @@ -2688,13 +2731,13 @@ void DeferredFragReturn() { App( "outEmission.rgb += indirectDiffuse * diffuseColor;" ); // No need for diffuse AO, since that's covered already } - + App( "#ifndef UNITY_HDR_ON" ); scope++; App( "outEmission.rgb = exp2(-outEmission.rgb);" ); scope--; App( "#endif" ); - + } @@ -2707,7 +2750,7 @@ void LightmapMetaPassFrag() { bool hasDiffuse = ps.mOut.diffuse.IsConnectedEnabledAndAvailable(); bool hasSpec = ps.mOut.specular.IsConnectedEnabledAndAvailable(); bool hasGloss = ps.mOut.gloss.IsConnectedEnabledAndAvailable(); - + App( "UnityMetaInput o;" ); App( "UNITY_INITIALIZE_OUTPUT( UnityMetaInput, o );" ); @@ -2719,7 +2762,7 @@ void LightmapMetaPassFrag() { } App( "" ); - + if(hasDiffuse) App( "float3 diffColor = " + ps.n_diffuse + ";" ); else @@ -2752,7 +2795,7 @@ void LightmapMetaPassFrag() { App( "float roughness = 1.0 - " + ps.n_gloss + ";" ); } } - + if( hasSpec ) App( "o.Albedo = diffColor + specColor * roughness * roughness * 0.5;" ); else @@ -2764,9 +2807,9 @@ void LightmapMetaPassFrag() { else App( "o.Albedo = diffColor;" ); } - - - + + + App( "" ); //App( "o.Albedo = float3(0,1,0);" ); // Debug @@ -2877,7 +2920,7 @@ void TransferBarycentric( string s ) { void FuncTessellation() { - + switch( ps.catGeometry.tessellationMode ) { case SFPSC_Geometry.TessellationMode.Regular: @@ -2905,7 +2948,7 @@ void FuncTessellation() { App( "}" ); break; } - + } void FuncDisplacement() { @@ -2965,7 +3008,7 @@ void CheckClip() { string ditherStr = SFPSC_Blending.strDithering[(int)ps.catBlending.dithering].ToString().Split( ' ' )[0]; App( "clip( BinaryDither" + ditherStr + "(" + ps.n_alphaClip + " - 1.5, sceneUVs) );" ); } - + } @@ -2991,7 +3034,7 @@ public void GrabPass() { App( "GrabPass{ }" ); else App( "GrabPass{ \"" + ps.catBlending.GetGrabTextureName() + "\" }" ); - + } //////////////////////////////////////////////////////////////// DEFERRED diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Evaluator/SF_Evaluator.cs.meta b/Editor/Code/_Evaluator/SF_Evaluator.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Evaluator/SF_Evaluator.cs.meta rename to Editor/Code/_Evaluator/SF_Evaluator.cs.meta index 0bf50688..17f82502 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Evaluator/SF_Evaluator.cs.meta +++ b/Editor/Code/_Evaluator/SF_Evaluator.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 8d4397298714b429da31207ae8e1b476 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 8d4397298714b429da31207ae8e1b476 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Evaluator/_NewSystem.meta b/Editor/Code/_Evaluator/_NewSystem.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Evaluator/_NewSystem.meta rename to Editor/Code/_Evaluator/_NewSystem.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Evaluator/_NewSystem/DependencyTree.cs b/Editor/Code/_Evaluator/_NewSystem/DependencyTree.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Evaluator/_NewSystem/DependencyTree.cs rename to Editor/Code/_Evaluator/_NewSystem/DependencyTree.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Evaluator/_NewSystem/DependencyTree.cs.meta b/Editor/Code/_Evaluator/_NewSystem/DependencyTree.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Evaluator/_NewSystem/DependencyTree.cs.meta rename to Editor/Code/_Evaluator/_NewSystem/DependencyTree.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes.meta b/Editor/Code/_Nodes.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes.meta rename to Editor/Code/_Nodes.meta index e7c74516..18bbeb17 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes.meta +++ b/Editor/Code/_Nodes.meta @@ -1,5 +1,5 @@ -fileFormatVersion: 2 -guid: 08f7249e4b23143d4983841458970d80 -folderAsset: yes -DefaultImporter: - userData: +fileFormatVersion: 2 +guid: 08f7249e4b23143d4983841458970d80 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Abs.cs b/Editor/Code/_Nodes/SFN_Abs.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Abs.cs rename to Editor/Code/_Nodes/SFN_Abs.cs index f5721864..31219ff7 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Abs.cs +++ b/Editor/Code/_Nodes/SFN_Abs.cs @@ -1,26 +1,26 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Abs : SF_Node_Arithmetic { - - public SFN_Abs() { - } - - public override void Initialize() { - base.Initialize( "Abs" ); - base.PrepareArithmetic( 1 ); - base.shaderGenMode = ShaderGenerationMode.SimpleFunction; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "abs(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; - } - - public override float EvalCPU( int c ) { - return Mathf.Abs( GetInputData( "IN", c ) ); - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Abs : SF_Node_Arithmetic { + + public SFN_Abs() { + } + + public override void Initialize() { + base.Initialize( "Abs" ); + base.PrepareArithmetic( 1 ); + base.shaderGenMode = ShaderGenerationMode.SimpleFunction; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "abs(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; + } + + public override float EvalCPU( int c ) { + return Mathf.Abs( GetInputData( "IN", c ) ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Abs.cs.meta b/Editor/Code/_Nodes/SFN_Abs.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Abs.cs.meta rename to Editor/Code/_Nodes/SFN_Abs.cs.meta index 6ec553bf..889e05bb --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Abs.cs.meta +++ b/Editor/Code/_Nodes/SFN_Abs.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 3980422c66600a74794dc56059bbec9c -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 3980422c66600a74794dc56059bbec9c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Add.cs b/Editor/Code/_Nodes/SFN_Add.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Add.cs rename to Editor/Code/_Nodes/SFN_Add.cs index 4d6d0e62..a31b57e3 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Add.cs +++ b/Editor/Code/_Nodes/SFN_Add.cs @@ -1,72 +1,72 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Add : SF_Node_Arithmetic { - - public SFN_Add() { - - } - - public override void Initialize() { - base.Initialize( "Add" ); - //base.PrepareArithmetic(5); - base.showColor = true; - base.shaderGenMode = ShaderGenerationMode.ModularInput; - UseLowerReadonlyValues( true ); - - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTvPending,false), - SF_NodeConnector.Create(this,"A","A",ConType.cInput,ValueType.VTvPending,false).SetRequired(true), - SF_NodeConnector.Create(this,"B","B",ConType.cInput,ValueType.VTvPending,false).SetRequired(true), - SF_NodeConnector.Create(this,"C","C",ConType.cInput,ValueType.VTvPending,false).SetRequired(false), - SF_NodeConnector.Create(this,"D","D",ConType.cInput,ValueType.VTvPending,false).SetRequired(false), - SF_NodeConnector.Create(this,"E","E",ConType.cInput,ValueType.VTvPending,false).SetRequired(false) - }; - - - SetExtensionConnectorChain("B", "C", "D", "E"); - - base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1], connectors[2], connectors[3], connectors[4], connectors[5] ); - - } - - public override void GetModularShaderFixes( out string prefix, out string infix, out string suffix ) { - prefix = ""; - infix = " + "; - suffix = ""; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - - - string evalStr = ""; - - evalStr += GetConnectorByStringID( "A" ).TryEvaluate() + "+" + GetConnectorByStringID( "B" ).TryEvaluate(); - - ChainAppendIfConnected(ref evalStr, "+", "C", "D", "E"); - - return "(" + evalStr + ")"; - } - - - public override float EvalCPU( int c ) { - - float result = GetInputData( "A", c ) + GetInputData( "B", c ); - - if(GetInputIsConnected("C")){ - result += GetInputData( "C", c ); - } - if(GetInputIsConnected("D")){ - result += GetInputData( "D", c ); - } - if(GetInputIsConnected("E")){ - result += GetInputData( "E", c ); - } - - return result; - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Add : SF_Node_Arithmetic { + + public SFN_Add() { + + } + + public override void Initialize() { + base.Initialize( "Add" ); + //base.PrepareArithmetic(5); + base.showColor = true; + base.shaderGenMode = ShaderGenerationMode.ModularInput; + UseLowerReadonlyValues( true ); + + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTvPending,false), + SF_NodeConnector.Create(this,"A","A",ConType.cInput,ValueType.VTvPending,false).SetRequired(true), + SF_NodeConnector.Create(this,"B","B",ConType.cInput,ValueType.VTvPending,false).SetRequired(true), + SF_NodeConnector.Create(this,"C","C",ConType.cInput,ValueType.VTvPending,false).SetRequired(false), + SF_NodeConnector.Create(this,"D","D",ConType.cInput,ValueType.VTvPending,false).SetRequired(false), + SF_NodeConnector.Create(this,"E","E",ConType.cInput,ValueType.VTvPending,false).SetRequired(false) + }; + + + SetExtensionConnectorChain("B", "C", "D", "E"); + + base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1], connectors[2], connectors[3], connectors[4], connectors[5] ); + + } + + public override void GetModularShaderFixes( out string prefix, out string infix, out string suffix ) { + prefix = ""; + infix = " + "; + suffix = ""; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + + + string evalStr = ""; + + evalStr += GetConnectorByStringID( "A" ).TryEvaluate() + "+" + GetConnectorByStringID( "B" ).TryEvaluate(); + + ChainAppendIfConnected(ref evalStr, "+", "C", "D", "E"); + + return "(" + evalStr + ")"; + } + + + public override float EvalCPU( int c ) { + + float result = GetInputData( "A", c ) + GetInputData( "B", c ); + + if(GetInputIsConnected("C")){ + result += GetInputData( "C", c ); + } + if(GetInputIsConnected("D")){ + result += GetInputData( "D", c ); + } + if(GetInputIsConnected("E")){ + result += GetInputData( "E", c ); + } + + return result; + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Add.cs.meta b/Editor/Code/_Nodes/SFN_Add.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Add.cs.meta rename to Editor/Code/_Nodes/SFN_Add.cs.meta index d482a3e8..bb4560c1 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Add.cs.meta +++ b/Editor/Code/_Nodes/SFN_Add.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: eee5e454a0aa7ce44b9ccc1adb7349d9 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: eee5e454a0aa7ce44b9ccc1adb7349d9 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_AmbientLight.cs b/Editor/Code/_Nodes/SFN_AmbientLight.cs old mode 100755 new mode 100644 similarity index 97% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_AmbientLight.cs rename to Editor/Code/_Nodes/SFN_AmbientLight.cs index 1c8f2f18..22393963 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_AmbientLight.cs +++ b/Editor/Code/_Nodes/SFN_AmbientLight.cs @@ -1,63 +1,63 @@ using UnityEngine; using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_AmbientLight : SF_Node { - - - public SFN_AmbientLight() { - - } - - public override void Initialize() { - base.Initialize( "Ambient Light" ); - base.showColor = true; - base.UseLowerPropertyBox( false ); - base.texture.CompCount = 4; - base.texture.uniform = true; - base.neverDefineVariable = true; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_AmbientLight : SF_Node { + + + public SFN_AmbientLight() { + + } + + public override void Initialize() { + base.Initialize( "Ambient Light" ); + base.showColor = true; + base.UseLowerPropertyBox( false ); + base.texture.CompCount = 4; + base.texture.uniform = true; + base.neverDefineVariable = true; connectors = new SF_NodeConnector[]{ SF_NodeConnector.Create(this, "RGB", "RGB",ConType.cOutput,ValueType.VTv3,false).Outputting(OutChannel.RGB), SF_NodeConnector.Create(this, "R", "R",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.R).WithColor(Color.red), SF_NodeConnector.Create(this, "G", "G",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.G).WithColor(Color.green), SF_NodeConnector.Create(this, "B", "B",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.B).WithColor(Color.blue), SF_NodeConnector.Create(this, "A", "A",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.A) - }; - } - - public override bool IsUniformOutput() { - return true; - } - - public Color GetIconTint() { - Color c = texture.dataUniform; - c.a = 1.0f; - for( int i = 0; i < 3; i++ ) { - c[i] = 1f - Mathf.Pow( 1f - c[i], 2 ); - c[i] = Mathf.Lerp( 0.5f, 1f, c[i] ); - } - return c; - } - - public override void Update() { - if( ((Color)texture.dataUniform) != RenderSettings.ambientLight ) { - texture.dataUniform = RenderSettings.ambientLight; - texture.iconColor = GetIconTint(); - OnUpdateNode(NodeUpdateType.Soft, true); - } - - } - - public override void OnPreGetPreviewData() { - texture.dataUniform = RenderSettings.ambientLight; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "UNITY_LIGHTMODEL_AMBIENT"; - } - - } + }; + } + + public override bool IsUniformOutput() { + return true; + } + + public Color GetIconTint() { + Color c = texture.dataUniform; + c.a = 1.0f; + for( int i = 0; i < 3; i++ ) { + c[i] = 1f - Mathf.Pow( 1f - c[i], 2 ); + c[i] = Mathf.Lerp( 0.5f, 1f, c[i] ); + } + return c; + } + + public override void Update() { + if( ((Color)texture.dataUniform) != RenderSettings.ambientLight ) { + texture.dataUniform = RenderSettings.ambientLight; + texture.iconColor = GetIconTint(); + OnUpdateNode(NodeUpdateType.Soft, true); + } + + } + + public override void OnPreGetPreviewData() { + texture.dataUniform = RenderSettings.ambientLight; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "UNITY_LIGHTMODEL_AMBIENT"; + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_AmbientLight.cs.meta b/Editor/Code/_Nodes/SFN_AmbientLight.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_AmbientLight.cs.meta rename to Editor/Code/_Nodes/SFN_AmbientLight.cs.meta index 372ab98c..569690d4 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_AmbientLight.cs.meta +++ b/Editor/Code/_Nodes/SFN_AmbientLight.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: c293c5aea07b3ff40912d575d5ac542d -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: c293c5aea07b3ff40912d575d5ac542d +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Append.cs b/Editor/Code/_Nodes/SFN_Append.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Append.cs rename to Editor/Code/_Nodes/SFN_Append.cs index a2b37b37..e3d804cd --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Append.cs +++ b/Editor/Code/_Nodes/SFN_Append.cs @@ -1,190 +1,190 @@ using UnityEngine; using UnityEditor; using System.Collections; -using System; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Append : SF_Node { - - public override void Initialize() { - base.Initialize( "Append" ); - base.showColor = true; - UseLowerReadonlyValues( true ); - SFN_Append.channelColors[3] = SF_NodeConnector.colorEnabledDefault; - +using System; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Append : SF_Node { + + public override void Initialize() { + base.Initialize( "Append" ); + base.showColor = true; + UseLowerReadonlyValues( true ); + SFN_Append.channelColors[3] = SF_NodeConnector.colorEnabledDefault; + connectors = new SF_NodeConnector[]{ SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTvPending,false), SF_NodeConnector.Create(this,"A","",ConType.cInput,ValueType.VTvPending,false).SetRequired(true), SF_NodeConnector.Create(this,"B","",ConType.cInput,ValueType.VTvPending,false).SetRequired(true), SF_NodeConnector.Create(this,"C","",ConType.cInput,ValueType.VTvPending,false).SetRequired(false), SF_NodeConnector.Create(this,"D","",ConType.cInput,ValueType.VTvPending,false).SetRequired(false) - }; - - base.conGroup = ScriptableObject.CreateInstance(); - (base.conGroup as SFNCG_Append).Initialize( connectors[0], connectors[1], connectors[2], connectors[3], connectors[4] ); - - - SetExtensionConnectorChain( "B", "C", "D" ); - } - - public override int GetEvaluatedComponentCount() { - return ( (SFNCG_Append)conGroup ).GetOutputComponentCount(); - } - - public override bool IsUniformOutput() { - - bool a = GetInputIsConnected( "A" ); - bool b = GetInputIsConnected( "B" ); - bool c = GetInputIsConnected( "C" ); - bool d = GetInputIsConnected( "D" ); - - if( a && b && c && d ) - return ( GetInputData( "A" ).uniform && GetInputData( "B" ).uniform && GetInputData( "C" ).uniform && GetInputData( "D" ).uniform ); - else if( a && b && c ) - return ( GetInputData( "A" ).uniform && GetInputData( "B" ).uniform && GetInputData( "C" ).uniform); - - return ( GetInputData( "A" ).uniform && GetInputData( "B" ).uniform ); - } - - - // New system - public override void RefreshValue() { - UpdateInputLabels(); - RefreshValue( 1, 2 ); - } - - public override bool ExhaustedOptionalInputs() { - return GetEvaluatedComponentCount() >= 4; - } - - - - - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - - string varName = "float"; - int compCount = GetEvaluatedComponentCount(); - if( compCount > 1 ) - varName += compCount; - - bool a = GetInputIsConnected( "A" ); - bool b = GetInputIsConnected( "B" ); - bool c = GetInputIsConnected( "C" ); - bool d = GetInputIsConnected( "D" ); - - string line = varName + "("; - - if( a && b && c && d ) - line += GetConnectorByStringID( "A" ).TryEvaluate() + "," + GetConnectorByStringID( "B" ).TryEvaluate() + "," + GetConnectorByStringID( "C" ).TryEvaluate() + "," + GetConnectorByStringID( "D" ).TryEvaluate(); - else if( a && b && c ) - line += GetConnectorByStringID( "A" ).TryEvaluate() + "," + GetConnectorByStringID( "B" ).TryEvaluate() + "," + GetConnectorByStringID( "C" ).TryEvaluate(); - else - line += GetConnectorByStringID( "A" ).TryEvaluate() + "," + GetConnectorByStringID( "B" ).TryEvaluate(); - - return line + ")"; - } - - public int GetAmountOfConnectedInputs() { - bool a = GetInputIsConnected( "A" ); - bool b = GetInputIsConnected( "B" ); - bool c = GetInputIsConnected( "C" ); - bool d = GetInputIsConnected( "D" ); - - if( a && b && c && d ) - return 4; - else if( a && b && c && !d ) - return 3; - else if( a && b && !c && !d ) - return 2; - else if( a && !b && !c && !d ) - return 1; - else if( !a && !b && !c && !d ) - return 0; - - return 0; - } - - public override float EvalCPU( int c ) { - - int conCount = GetAmountOfConnectedInputs(); - - int cSub = 0; - for( int i = 0; i < conCount; i++ ) { - int cc = connectors[i+1].GetCompCount(); - if(c < cc + cSub){ - return GetInputData( connectors[i+1].strID, c - cSub ); - } else { - cSub += cc; - continue; - } - } - return 0; - } - - - static Color[] channelColors = new Color[4] { Color.red, Color.green, Color.blue, Color.white }; - - public override void PrepareRendering( Material mat ) { - - Vector4[] masks = new Vector4[] { - Vector4.zero, - Vector4.zero, - Vector4.zero, - Vector4.zero - }; - Vector4 offsets = Vector4.zero; - int head = 0; - for( int i = 0; i < GetAmountOfConnectedInputs(); i++ ) { - SF_NodeConnector con = connectors[i + 1]; - if( GetInputIsConnected( con.strID ) ) { - int cc = con.GetCompCount(); - for( int j = head; j < cc + head; j++ ) { - masks[i][j] = 1f; - } - offsets[i] = head; - head += cc; - } - } - - //for( int i = 0; i < 4; i++ ) { - // Debug.Log("Masks: " + masks[i]); - //} - - mat.SetVector( "_A_mask", masks[0] ); - mat.SetVector( "_B_mask", masks[1] ); - mat.SetVector( "_C_mask", masks[2] ); - mat.SetVector( "_D_mask", masks[3] ); - mat.SetVector( "_offsets", offsets ); - - } - - public void UpdateInputLabels() { - - string rgba = "RGBA"; - - int conCount = 4; - int cSub = 0; - for( int i = 0; i < conCount; i++ ) { - SF_NodeConnector con = connectors[i + 1]; - if( GetInputIsConnected( con.strID ) ) { - - int cc = con.GetCompCount(); - con.label = rgba.Substring( cSub, cc ); - if( cc == 1 ) - con.color = channelColors[cSub]; - cSub += cc; - - } else { - con.label = ""; - con.color = SF_NodeConnector.colorEnabledDefault; - cSub++; - } - } - } - - - } + }; + + base.conGroup = ScriptableObject.CreateInstance(); + (base.conGroup as SFNCG_Append).Initialize( connectors[0], connectors[1], connectors[2], connectors[3], connectors[4] ); + + + SetExtensionConnectorChain( "B", "C", "D" ); + } + + public override int GetEvaluatedComponentCount() { + return ( (SFNCG_Append)conGroup ).GetOutputComponentCount(); + } + + public override bool IsUniformOutput() { + + bool a = GetInputIsConnected( "A" ); + bool b = GetInputIsConnected( "B" ); + bool c = GetInputIsConnected( "C" ); + bool d = GetInputIsConnected( "D" ); + + if( a && b && c && d ) + return ( GetInputData( "A" ).uniform && GetInputData( "B" ).uniform && GetInputData( "C" ).uniform && GetInputData( "D" ).uniform ); + else if( a && b && c ) + return ( GetInputData( "A" ).uniform && GetInputData( "B" ).uniform && GetInputData( "C" ).uniform); + + return ( GetInputData( "A" ).uniform && GetInputData( "B" ).uniform ); + } + + + // New system + public override void RefreshValue() { + UpdateInputLabels(); + RefreshValue( 1, 2 ); + } + + public override bool ExhaustedOptionalInputs() { + return GetEvaluatedComponentCount() >= 4; + } + + + + + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + + string varName = "float"; + int compCount = GetEvaluatedComponentCount(); + if( compCount > 1 ) + varName += compCount; + + bool a = GetInputIsConnected( "A" ); + bool b = GetInputIsConnected( "B" ); + bool c = GetInputIsConnected( "C" ); + bool d = GetInputIsConnected( "D" ); + + string line = varName + "("; + + if( a && b && c && d ) + line += GetConnectorByStringID( "A" ).TryEvaluate() + "," + GetConnectorByStringID( "B" ).TryEvaluate() + "," + GetConnectorByStringID( "C" ).TryEvaluate() + "," + GetConnectorByStringID( "D" ).TryEvaluate(); + else if( a && b && c ) + line += GetConnectorByStringID( "A" ).TryEvaluate() + "," + GetConnectorByStringID( "B" ).TryEvaluate() + "," + GetConnectorByStringID( "C" ).TryEvaluate(); + else + line += GetConnectorByStringID( "A" ).TryEvaluate() + "," + GetConnectorByStringID( "B" ).TryEvaluate(); + + return line + ")"; + } + + public int GetAmountOfConnectedInputs() { + bool a = GetInputIsConnected( "A" ); + bool b = GetInputIsConnected( "B" ); + bool c = GetInputIsConnected( "C" ); + bool d = GetInputIsConnected( "D" ); + + if( a && b && c && d ) + return 4; + else if( a && b && c && !d ) + return 3; + else if( a && b && !c && !d ) + return 2; + else if( a && !b && !c && !d ) + return 1; + else if( !a && !b && !c && !d ) + return 0; + + return 0; + } + + public override float EvalCPU( int c ) { + + int conCount = GetAmountOfConnectedInputs(); + + int cSub = 0; + for( int i = 0; i < conCount; i++ ) { + int cc = connectors[i+1].GetCompCount(); + if(c < cc + cSub){ + return GetInputData( connectors[i+1].strID, c - cSub ); + } else { + cSub += cc; + continue; + } + } + return 0; + } + + + static Color[] channelColors = new Color[4] { Color.red, Color.green, Color.blue, Color.white }; + + public override void PrepareRendering( Material mat ) { + + Vector4[] masks = new Vector4[] { + Vector4.zero, + Vector4.zero, + Vector4.zero, + Vector4.zero + }; + Vector4 offsets = Vector4.zero; + int head = 0; + for( int i = 0; i < GetAmountOfConnectedInputs(); i++ ) { + SF_NodeConnector con = connectors[i + 1]; + if( GetInputIsConnected( con.strID ) ) { + int cc = con.GetCompCount(); + for( int j = head; j < cc + head; j++ ) { + masks[i][j] = 1f; + } + offsets[i] = head; + head += cc; + } + } + + //for( int i = 0; i < 4; i++ ) { + // Debug.Log("Masks: " + masks[i]); + //} + + mat.SetVector( "_A_mask", masks[0] ); + mat.SetVector( "_B_mask", masks[1] ); + mat.SetVector( "_C_mask", masks[2] ); + mat.SetVector( "_D_mask", masks[3] ); + mat.SetVector( "_offsets", offsets ); + + } + + public void UpdateInputLabels() { + + string rgba = "RGBA"; + + int conCount = 4; + int cSub = 0; + for( int i = 0; i < conCount; i++ ) { + SF_NodeConnector con = connectors[i + 1]; + if( GetInputIsConnected( con.strID ) ) { + + int cc = con.GetCompCount(); + con.label = rgba.Substring( cSub, cc ); + if( cc == 1 ) + con.color = channelColors[cSub]; + cSub += cc; + + } else { + con.label = ""; + con.color = SF_NodeConnector.colorEnabledDefault; + cSub++; + } + } + } + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Append.cs.meta b/Editor/Code/_Nodes/SFN_Append.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Append.cs.meta rename to Editor/Code/_Nodes/SFN_Append.cs.meta index 14a1a0b2..7a6789eb --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Append.cs.meta +++ b/Editor/Code/_Nodes/SFN_Append.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 162e89da5a50d9e4d8a4e894cbcdeb15 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 162e89da5a50d9e4d8a4e894cbcdeb15 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcCos.cs b/Editor/Code/_Nodes/SFN_ArcCos.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcCos.cs rename to Editor/Code/_Nodes/SFN_ArcCos.cs index c341e985..0564b172 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcCos.cs +++ b/Editor/Code/_Nodes/SFN_ArcCos.cs @@ -1,30 +1,30 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_ArcCos : SF_Node_Arithmetic { - - public SFN_ArcCos() { - } - - public override void Initialize() { - base.Initialize( "ArcCos" ); - base.PrepareArithmetic( 1 ); - base.shaderGenMode = ShaderGenerationMode.CustomFunction; - } - - public override string[] GetBlitOutputLines() { - return new string[] { "acos(_in)" }; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "acos(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; - } - - public override float EvalCPU( int c ) { - return Mathf.Acos( GetInputData( "IN", c ) ); - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_ArcCos : SF_Node_Arithmetic { + + public SFN_ArcCos() { + } + + public override void Initialize() { + base.Initialize( "ArcCos" ); + base.PrepareArithmetic( 1 ); + base.shaderGenMode = ShaderGenerationMode.CustomFunction; + } + + public override string[] GetBlitOutputLines() { + return new string[] { "acos(_in)" }; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "acos(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; + } + + public override float EvalCPU( int c ) { + return Mathf.Acos( GetInputData( "IN", c ) ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcCos.cs.meta b/Editor/Code/_Nodes/SFN_ArcCos.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcCos.cs.meta rename to Editor/Code/_Nodes/SFN_ArcCos.cs.meta index c81a7618..521be8ae --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcCos.cs.meta +++ b/Editor/Code/_Nodes/SFN_ArcCos.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 1267f09847e198948b8685321890f373 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 1267f09847e198948b8685321890f373 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcSin.cs b/Editor/Code/_Nodes/SFN_ArcSin.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcSin.cs rename to Editor/Code/_Nodes/SFN_ArcSin.cs index c48836d2..b987334a --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcSin.cs +++ b/Editor/Code/_Nodes/SFN_ArcSin.cs @@ -1,30 +1,30 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_ArcSin : SF_Node_Arithmetic { - - public SFN_ArcSin() { - } - - public override void Initialize() { - base.Initialize( "ArcSin" ); - base.PrepareArithmetic( 1 ); - base.shaderGenMode = ShaderGenerationMode.CustomFunction; - } - - public override string[] GetBlitOutputLines() { - return new string[] { "asin(_in)" }; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "asin(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; - } - - public override float EvalCPU( int c ) { - return Mathf.Asin( GetInputData( "IN", c ) ); - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_ArcSin : SF_Node_Arithmetic { + + public SFN_ArcSin() { + } + + public override void Initialize() { + base.Initialize( "ArcSin" ); + base.PrepareArithmetic( 1 ); + base.shaderGenMode = ShaderGenerationMode.CustomFunction; + } + + public override string[] GetBlitOutputLines() { + return new string[] { "asin(_in)" }; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "asin(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; + } + + public override float EvalCPU( int c ) { + return Mathf.Asin( GetInputData( "IN", c ) ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcSin.cs.meta b/Editor/Code/_Nodes/SFN_ArcSin.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcSin.cs.meta rename to Editor/Code/_Nodes/SFN_ArcSin.cs.meta index 5c097895..1853ca84 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcSin.cs.meta +++ b/Editor/Code/_Nodes/SFN_ArcSin.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 51a1743e634ae48499fec247d6ee111f -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 51a1743e634ae48499fec247d6ee111f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcTan.cs b/Editor/Code/_Nodes/SFN_ArcTan.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcTan.cs rename to Editor/Code/_Nodes/SFN_ArcTan.cs index d8013314..873fd935 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcTan.cs +++ b/Editor/Code/_Nodes/SFN_ArcTan.cs @@ -1,30 +1,30 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_ArcTan : SF_Node_Arithmetic { - - public SFN_ArcTan() { - } - - public override void Initialize() { - base.Initialize( "ArcTan" ); - base.PrepareArithmetic( 1 ); - base.shaderGenMode = ShaderGenerationMode.CustomFunction; - } - - public override string[] GetBlitOutputLines() { - return new string[] { "atan(_in)" }; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "atan(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; - } - - public override float EvalCPU( int c ) { - return Mathf.Atan( GetInputData( "IN", c ) ); - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_ArcTan : SF_Node_Arithmetic { + + public SFN_ArcTan() { + } + + public override void Initialize() { + base.Initialize( "ArcTan" ); + base.PrepareArithmetic( 1 ); + base.shaderGenMode = ShaderGenerationMode.CustomFunction; + } + + public override string[] GetBlitOutputLines() { + return new string[] { "atan(_in)" }; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "atan(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; + } + + public override float EvalCPU( int c ) { + return Mathf.Atan( GetInputData( "IN", c ) ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcTan.cs.meta b/Editor/Code/_Nodes/SFN_ArcTan.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcTan.cs.meta rename to Editor/Code/_Nodes/SFN_ArcTan.cs.meta index f59d6992..20a1ba50 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcTan.cs.meta +++ b/Editor/Code/_Nodes/SFN_ArcTan.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: b0f13cb74c6cdd346ad7a92d8af2bda7 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: b0f13cb74c6cdd346ad7a92d8af2bda7 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcTan2.cs b/Editor/Code/_Nodes/SFN_ArcTan2.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcTan2.cs rename to Editor/Code/_Nodes/SFN_ArcTan2.cs index 848a892c..f20dd4c2 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcTan2.cs +++ b/Editor/Code/_Nodes/SFN_ArcTan2.cs @@ -1,118 +1,118 @@ -using UnityEngine; -using UnityEditor; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_ArcTan2 : SF_Node_Arithmetic { - - public enum ArcTan2Type { NegPiToPi, NegOneToOne, ZeroToOne, ZeroToOneWrapped }; - public static string[] atanTypeStr = new string[] { "-\u03C0 to \u03C0", "-1 to 1", "0 to 1", "0 to 1 Wrapped" }; - - public ArcTan2Type arcTanType = ArcTan2Type.NegPiToPi; - - public SFN_ArcTan2() { - } - - public override void Initialize() { - base.Initialize( "ArcTan2" ); - base.UseLowerPropertyBox( true, true ); - base.PrepareArithmetic(2); - base.shaderGenMode = ShaderGenerationMode.Modal; - connectors[1].label = "y"; - connectors[2].label = "x"; - } - - public override string[] GetModalModes() { - return new string[]{ - "NPTP", - "NOTO", - "ZTO", - "ZTOW" - }; - } - - public override string GetCurrentModalMode() { - switch( arcTanType ) { - case ArcTan2Type.NegOneToOne: - return "NOTO"; - case ArcTan2Type.ZeroToOne: - return "ZTO"; - case ArcTan2Type.ZeroToOneWrapped: - return "ZTOW"; - default: - return "NPTP"; - } - } - - public override string[] GetBlitOutputLines( string mode ) { - - - string s = "atan2(_a,_b)"; - - switch( mode ) { - case "NOTO": - s = "(" + s + "/3.14159265359)"; - break; - case "ZTO": - s = "(" + s + "/6.28318530718)+0.5"; - break; - case "ZTOW": - s = "(1-abs(" + s + ")/3.14159265359)"; - break; - } - return new string[] { s }; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - - string aStr = GetConnectorByStringID( "A" ).TryEvaluate(); - string bStr = GetConnectorByStringID( "B" ).TryEvaluate(); - - - if( arcTanType == ArcTan2Type.NegOneToOne ) - return "(atan2(" + aStr + "," + bStr + ")/3.14159265359)"; - if( arcTanType == ArcTan2Type.ZeroToOne ) - return "((atan2(" + aStr + "," + bStr + ")/6.28318530718)+0.5)"; - if( arcTanType == ArcTan2Type.ZeroToOneWrapped ) - return "(1-abs(atan2(" + aStr + "," + bStr + ")/3.14159265359))"; - //if( arcTanType == ArcTan2Type.NegPiToPi ) - return "atan2(" + aStr + "," + bStr + ")"; - } - - public override float EvalCPU( int c ) { - - float a = GetInputData( "A", c ); - float b = GetInputData( "B", c ); - - if( arcTanType == ArcTan2Type.NegOneToOne ) - return Mathf.Atan2( a, b ) / Mathf.PI; - if( arcTanType == ArcTan2Type.ZeroToOne ) - return (Mathf.Atan2( a, b ) / (2*Mathf.PI)) + 0.5f; - if( arcTanType == ArcTan2Type.ZeroToOneWrapped ) - return 1f-(Mathf.Abs(Mathf.Atan2( a, b ) / Mathf.PI)); - //if( arcTanType == ArcTan2Type.NegPiToPi ) - return Mathf.Atan2( a, b ); - } - - public override void DrawLowerPropertyBox() { - EditorGUI.BeginChangeCheck(); - arcTanType = (ArcTan2Type)UndoableEnumPopupNamed( lowerRect, (int)arcTanType, atanTypeStr, "ArcTan2 type" ); - if( EditorGUI.EndChangeCheck() ) - OnUpdateNode(); - } - - public override string SerializeSpecialData() { - return "attp:" + (int)arcTanType; - } - - public override void DeserializeSpecialData( string key, string value ) { - switch( key ) { - case "attp": - arcTanType = (ArcTan2Type)int.Parse( value ); - break; - } - } - - } +using UnityEngine; +using UnityEditor; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_ArcTan2 : SF_Node_Arithmetic { + + public enum ArcTan2Type { NegPiToPi, NegOneToOne, ZeroToOne, ZeroToOneWrapped }; + public static string[] atanTypeStr = new string[] { "-\u03C0 to \u03C0", "-1 to 1", "0 to 1", "0 to 1 Wrapped" }; + + public ArcTan2Type arcTanType = ArcTan2Type.NegPiToPi; + + public SFN_ArcTan2() { + } + + public override void Initialize() { + base.Initialize( "ArcTan2" ); + base.UseLowerPropertyBox( true, true ); + base.PrepareArithmetic(2); + base.shaderGenMode = ShaderGenerationMode.Modal; + connectors[1].label = "y"; + connectors[2].label = "x"; + } + + public override string[] GetModalModes() { + return new string[]{ + "NPTP", + "NOTO", + "ZTO", + "ZTOW" + }; + } + + public override string GetCurrentModalMode() { + switch( arcTanType ) { + case ArcTan2Type.NegOneToOne: + return "NOTO"; + case ArcTan2Type.ZeroToOne: + return "ZTO"; + case ArcTan2Type.ZeroToOneWrapped: + return "ZTOW"; + default: + return "NPTP"; + } + } + + public override string[] GetBlitOutputLines( string mode ) { + + + string s = "atan2(_a,_b)"; + + switch( mode ) { + case "NOTO": + s = "(" + s + "/3.14159265359)"; + break; + case "ZTO": + s = "(" + s + "/6.28318530718)+0.5"; + break; + case "ZTOW": + s = "(1-abs(" + s + ")/3.14159265359)"; + break; + } + return new string[] { s }; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + + string aStr = GetConnectorByStringID( "A" ).TryEvaluate(); + string bStr = GetConnectorByStringID( "B" ).TryEvaluate(); + + + if( arcTanType == ArcTan2Type.NegOneToOne ) + return "(atan2(" + aStr + "," + bStr + ")/3.14159265359)"; + if( arcTanType == ArcTan2Type.ZeroToOne ) + return "((atan2(" + aStr + "," + bStr + ")/6.28318530718)+0.5)"; + if( arcTanType == ArcTan2Type.ZeroToOneWrapped ) + return "(1-abs(atan2(" + aStr + "," + bStr + ")/3.14159265359))"; + //if( arcTanType == ArcTan2Type.NegPiToPi ) + return "atan2(" + aStr + "," + bStr + ")"; + } + + public override float EvalCPU( int c ) { + + float a = GetInputData( "A", c ); + float b = GetInputData( "B", c ); + + if( arcTanType == ArcTan2Type.NegOneToOne ) + return Mathf.Atan2( a, b ) / Mathf.PI; + if( arcTanType == ArcTan2Type.ZeroToOne ) + return (Mathf.Atan2( a, b ) / (2*Mathf.PI)) + 0.5f; + if( arcTanType == ArcTan2Type.ZeroToOneWrapped ) + return 1f-(Mathf.Abs(Mathf.Atan2( a, b ) / Mathf.PI)); + //if( arcTanType == ArcTan2Type.NegPiToPi ) + return Mathf.Atan2( a, b ); + } + + public override void DrawLowerPropertyBox() { + EditorGUI.BeginChangeCheck(); + arcTanType = (ArcTan2Type)UndoableEnumPopupNamed( lowerRect, (int)arcTanType, atanTypeStr, "ArcTan2 type" ); + if( EditorGUI.EndChangeCheck() ) + OnUpdateNode(); + } + + public override string SerializeSpecialData() { + return "attp:" + (int)arcTanType; + } + + public override void DeserializeSpecialData( string key, string value ) { + switch( key ) { + case "attp": + arcTanType = (ArcTan2Type)int.Parse( value ); + break; + } + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcTan2.cs.meta b/Editor/Code/_Nodes/SFN_ArcTan2.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcTan2.cs.meta rename to Editor/Code/_Nodes/SFN_ArcTan2.cs.meta index 8f8c7199..276099ad --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ArcTan2.cs.meta +++ b/Editor/Code/_Nodes/SFN_ArcTan2.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 0792bd3dbd79d854f9d4c5ba334b03da -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 0792bd3dbd79d854f9d4c5ba334b03da +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Bitangent.cs b/Editor/Code/_Nodes/SFN_Bitangent.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Bitangent.cs rename to Editor/Code/_Nodes/SFN_Bitangent.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Bitangent.cs.meta b/Editor/Code/_Nodes/SFN_Bitangent.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Bitangent.cs.meta rename to Editor/Code/_Nodes/SFN_Bitangent.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Blend.cs b/Editor/Code/_Nodes/SFN_Blend.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Blend.cs rename to Editor/Code/_Nodes/SFN_Blend.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Blend.cs.meta b/Editor/Code/_Nodes/SFN_Blend.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Blend.cs.meta rename to Editor/Code/_Nodes/SFN_Blend.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Ceil.cs b/Editor/Code/_Nodes/SFN_Ceil.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Ceil.cs rename to Editor/Code/_Nodes/SFN_Ceil.cs index 668520b7..c3f2de4f --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Ceil.cs +++ b/Editor/Code/_Nodes/SFN_Ceil.cs @@ -1,26 +1,26 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Ceil : SF_Node_Arithmetic { - - public SFN_Ceil() { - } - - public override void Initialize() { - base.Initialize( "Ceil" ); - base.PrepareArithmetic( 1 ); - base.shaderGenMode = ShaderGenerationMode.SimpleFunction; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "ceil(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; - } - - public override float EvalCPU( int c ) { - return Mathf.Ceil( GetInputData( "IN", c ) ); - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Ceil : SF_Node_Arithmetic { + + public SFN_Ceil() { + } + + public override void Initialize() { + base.Initialize( "Ceil" ); + base.PrepareArithmetic( 1 ); + base.shaderGenMode = ShaderGenerationMode.SimpleFunction; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "ceil(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; + } + + public override float EvalCPU( int c ) { + return Mathf.Ceil( GetInputData( "IN", c ) ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Ceil.cs.meta b/Editor/Code/_Nodes/SFN_Ceil.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Ceil.cs.meta rename to Editor/Code/_Nodes/SFN_Ceil.cs.meta index 87aa1c9b..79558e54 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Ceil.cs.meta +++ b/Editor/Code/_Nodes/SFN_Ceil.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 3f60d482333b50040ac5e3679061069c -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 3f60d482333b50040ac5e3679061069c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ChannelBlend.cs b/Editor/Code/_Nodes/SFN_ChannelBlend.cs old mode 100755 new mode 100644 similarity index 99% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ChannelBlend.cs rename to Editor/Code/_Nodes/SFN_ChannelBlend.cs index 4327a63a..71f57815 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ChannelBlend.cs +++ b/Editor/Code/_Nodes/SFN_ChannelBlend.cs @@ -22,7 +22,7 @@ public override void Initialize() { base.Initialize( "Channel Blend" ); base.PrepareArithmetic(6); base.extraWidthInput = 3; - base.UseLowerPropertyBox( true, true ); + base.UseLowerPropertyBox( true, true ); base.shaderGenMode = ShaderGenerationMode.Manual; //SF_NodeConnection lerpCon; @@ -60,10 +60,10 @@ public override bool IsUniformOutput() { public override int GetEvaluatedComponentCount() { return this["R"].GetCompCount(); - } - - public override void PrepareRendering( Material mat ) { - mat.SetFloat( "_Type", channelBlendType == ChannelBlendType.Summed ? 0 : 1 ); + } + + public override void PrepareRendering( Material mat ) { + mat.SetFloat( "_Type", channelBlendType == ChannelBlendType.Summed ? 0 : 1 ); } diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ChannelBlend.cs.meta b/Editor/Code/_Nodes/SFN_ChannelBlend.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ChannelBlend.cs.meta rename to Editor/Code/_Nodes/SFN_ChannelBlend.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Clamp.cs b/Editor/Code/_Nodes/SFN_Clamp.cs old mode 100755 new mode 100644 similarity index 97% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Clamp.cs rename to Editor/Code/_Nodes/SFN_Clamp.cs index 6690ee30..d8567889 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Clamp.cs +++ b/Editor/Code/_Nodes/SFN_Clamp.cs @@ -1,66 +1,66 @@ using UnityEngine; using UnityEditor; using System.Collections; -//using System; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Clamp : SF_Node { - - // SF_Node tNode; - - public SFN_Clamp() { - - } - - - public override void Initialize() { - base.Initialize( "Clamp" ); - base.showColor = true; - base.shaderGenMode = ShaderGenerationMode.SimpleFunction; - UseLowerReadonlyValues( true ); - - //SF_NodeConnection lerpCon; +//using System; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Clamp : SF_Node { + + // SF_Node tNode; + + public SFN_Clamp() { + + } + + + public override void Initialize() { + base.Initialize( "Clamp" ); + base.showColor = true; + base.shaderGenMode = ShaderGenerationMode.SimpleFunction; + UseLowerReadonlyValues( true ); + + //SF_NodeConnection lerpCon; connectors = new SF_NodeConnector[]{ SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTvPending,false), SF_NodeConnector.Create(this,"IN","",ConType.cInput,ValueType.VTvPending,false).SetRequired(true), SF_NodeConnector.Create(this,"MIN","Min",ConType.cInput,ValueType.VTvPending,false).SetRequired(true), SF_NodeConnector.Create(this,"MAX","Max",ConType.cInput,ValueType.VTvPending,false).SetRequired(true) - }; - - base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1], connectors[2] ); - } - - public override void OnUpdateNode( NodeUpdateType updType, bool cascade = true ) { - if( InputsConnected() ) - RefreshValue( 1, 2 ); - base.OnUpdateNode( updType ); - } - - public override bool IsUniformOutput() { - if( InputsConnected() ) - return ( GetInputData( "IN" ).uniform && GetInputData( "MIN" ).uniform && GetInputData( "MAX" ).uniform ); - return true; - } - - public override int GetEvaluatedComponentCount() { - return Mathf.Max( connectors[1].GetCompCount(), connectors[2].GetCompCount() ); - } - - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "clamp(" + GetConnectorByStringID( "IN" ).TryEvaluate() + "," + GetInputCon( "MIN" ).Evaluate() + "," + GetInputCon( "MAX" ).Evaluate() + ")"; - } - - - public override float EvalCPU( int c ) { - //if( c + 1 > GetEvaluatedComponentCount() && GetEvaluatedComponentCount() > 1 ) // Why was this needed before? - // return 0f; - return Mathf.Clamp( GetInputData( "IN", c ), GetInputData( "MIN", c ), GetInputData( "MAX", c ) ); - } - - - - } + }; + + base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1], connectors[2] ); + } + + public override void OnUpdateNode( NodeUpdateType updType, bool cascade = true ) { + if( InputsConnected() ) + RefreshValue( 1, 2 ); + base.OnUpdateNode( updType ); + } + + public override bool IsUniformOutput() { + if( InputsConnected() ) + return ( GetInputData( "IN" ).uniform && GetInputData( "MIN" ).uniform && GetInputData( "MAX" ).uniform ); + return true; + } + + public override int GetEvaluatedComponentCount() { + return Mathf.Max( connectors[1].GetCompCount(), connectors[2].GetCompCount() ); + } + + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "clamp(" + GetConnectorByStringID( "IN" ).TryEvaluate() + "," + GetInputCon( "MIN" ).Evaluate() + "," + GetInputCon( "MAX" ).Evaluate() + ")"; + } + + + public override float EvalCPU( int c ) { + //if( c + 1 > GetEvaluatedComponentCount() && GetEvaluatedComponentCount() > 1 ) // Why was this needed before? + // return 0f; + return Mathf.Clamp( GetInputData( "IN", c ), GetInputData( "MIN", c ), GetInputData( "MAX", c ) ); + } + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Clamp.cs.meta b/Editor/Code/_Nodes/SFN_Clamp.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Clamp.cs.meta rename to Editor/Code/_Nodes/SFN_Clamp.cs.meta index 02c7e14e..f024d788 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Clamp.cs.meta +++ b/Editor/Code/_Nodes/SFN_Clamp.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 8f0e557ea28785e489136b0286b4a244 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 8f0e557ea28785e489136b0286b4a244 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Clamp01.cs b/Editor/Code/_Nodes/SFN_Clamp01.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Clamp01.cs rename to Editor/Code/_Nodes/SFN_Clamp01.cs index 9deb90c7..d894d408 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Clamp01.cs +++ b/Editor/Code/_Nodes/SFN_Clamp01.cs @@ -1,30 +1,30 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Clamp01 : SF_Node_Arithmetic { - - public SFN_Clamp01() { - } - - public override void Initialize() { - base.Initialize( "Clamp 0-1" ); - base.PrepareArithmetic( 1 ); - base.shaderGenMode = ShaderGenerationMode.CustomFunction; - } - - public override string[] GetBlitOutputLines() { - return new string[] { "saturate(_in)" }; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "saturate(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; - } - - public override float EvalCPU( int c ) { - return Mathf.Clamp01( GetInputData( "IN", c ) ); - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Clamp01 : SF_Node_Arithmetic { + + public SFN_Clamp01() { + } + + public override void Initialize() { + base.Initialize( "Clamp 0-1" ); + base.PrepareArithmetic( 1 ); + base.shaderGenMode = ShaderGenerationMode.CustomFunction; + } + + public override string[] GetBlitOutputLines() { + return new string[] { "saturate(_in)" }; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "saturate(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; + } + + public override float EvalCPU( int c ) { + return Mathf.Clamp01( GetInputData( "IN", c ) ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Clamp01.cs.meta b/Editor/Code/_Nodes/SFN_Clamp01.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Clamp01.cs.meta rename to Editor/Code/_Nodes/SFN_Clamp01.cs.meta index d2e6395e..7d41bfdc --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Clamp01.cs.meta +++ b/Editor/Code/_Nodes/SFN_Clamp01.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 24cede14d15605b4e804eccab2542450 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 24cede14d15605b4e804eccab2542450 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Code.cs b/Editor/Code/_Nodes/SFN_Code.cs old mode 100755 new mode 100644 similarity index 94% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Code.cs rename to Editor/Code/_Nodes/SFN_Code.cs index fd51d014..9c451f49 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Code.cs +++ b/Editor/Code/_Nodes/SFN_Code.cs @@ -1,609 +1,609 @@ -using UnityEngine; -using UnityEditor; -using System.Collections.Generic; - -namespace ShaderForge { - - - public enum CustomValueType{ - Float, - Float2, - Float3, - Float4, - Half, - Half2, - Half3, - Half4, - Fixed, - Fixed2, - Fixed3, - Fixed4, - Sampler2D, - Matrix4x4 - /*, Texture*/ }; - - [System.Serializable] - public class SFN_Code : SF_Node_Resizeable { - - - public string code = ""; - public string functionName = "Function_node_"; - - private bool isEditing = false; - - public SFN_Code() { - } - - public override void Initialize() { - base.Initialize( "Code" ); - functionName = "Function_node_" + base.id; - base.minWidth = (int)(NODE_WIDTH * 2.5f); - base.minHeight = NODE_HEIGHT; - base.ClampSize(); - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"OUT","Out",ConType.cOutput,ValueType.VTvPending) - }; - controlName = base.id + "_codeArea"; - connectors[0].CustomValueType = CustomValueType.Float3; - //Debug.Log("Creating thing " + base.id); - } - - public string GetFunctionName(){ - return functionName; - //return "CustomCode_" + id; - } - - public override int GetEvaluatedComponentCount (){ - return SF_Tools.ComponentCountOf(connectors[0].CustomValueType); - } - - public override string GetPrepareUniformsAndFunctions(){ - return GetFunctionHeader() + "\n" + code + "\n}\n"; - } - - public string GetFunctionHeader(){ - string outputType = ToCodeType(connectors[0].CustomValueType); // Output type - string inputs = "("; - foreach(SF_NodeConnector con in connectors){ - if(con.conType == ConType.cOutput) - continue; - inputs += " " + ToCodeType(con.CustomValueType) + " " + con.label + " "; - - if(con != connectors[connectors.Length-1]) // Add comma if it's not the last one - inputs += ","; - } - inputs += "){"; - return outputType + " " + GetFunctionName() + inputs; - } - - private string ToCodeType(CustomValueType cvt){ - if(cvt == CustomValueType.Sampler2D) - return "sampler2D"; // Uppercase D - if( cvt == CustomValueType.Matrix4x4 ) - return "float4x4"; - return cvt.ToString().ToLower(); - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - string s = GetFunctionName(); - s += "("; - foreach(SF_NodeConnector con in connectors){ - if(con.conType == ConType.cOutput) - continue; - s += " " + con.TryEvaluate() + " "; - - if(con != connectors[connectors.Length-1]) // Add comma if it's not the last one - s += ","; - } - - s += ")"; - return s; - } - - public override float EvalCPU( int c ) { - return 1f; - } - - string controlName; - - - float targetSideButtonWidth; - float currentSideButtonWidth; - - //CustomValueType outType = CustomValueType.Float3; - - bool hoveringNode = false; - - int guiIncID = 0; - - bool justFocused = false; - int pressedTabLastFrameCounter = 0; - int pressedEditLastFrameCounter = 0; - int savedCaretPosition; - - TextEditor txtEditor; - - public override void DrawInner(Rect r){ - - - - //Debug.Log("GUI THREAD: " + Event.current.type + " - " + GUI.GetNameOfFocusedControl()); - - //if(Event.current.type == EventType.layout) - //return; - - if(Event.current.type == EventType.repaint) - guiIncID++; - - //if(Event.current.type == EventType.repaint) - //if(hoveringNode){ - //hoveringNode = r.Margin(128).Contains(Event.current.mousePosition); - //} else { - hoveringNode = r.Contains(Event.current.mousePosition); - //} - - - if(!isEditing) // Don't resize while editing - targetSideButtonWidth = (selected) ? 70f : 0f; - - - int sideButtonHeight = 16; - int buttonTextMargin = 4; - - int sideButtonWidth = Mathf.RoundToInt(currentSideButtonWidth); - if(Event.current.type == EventType.repaint){ - currentSideButtonWidth = Mathf.Lerp(currentSideButtonWidth, targetSideButtonWidth, 0.6f); - } - - Rect txtRect = r; - - - - txtRect = txtRect.PadRight(/*(int)sideButtonWidth +*/ buttonTextMargin); - txtRect = txtRect.PadLeft((int)sideButtonWidth*2 + buttonTextMargin); - txtRect = txtRect.PadBottom(buttonTextMargin); - - - // BUTTONS - if(sideButtonWidth > 12f){ - - Rect btnOutput = txtRect; - Rect btnInput = txtRect; - btnOutput.width = sideButtonWidth; - btnInput.width = sideButtonWidth*2; - btnOutput.height = btnInput.height = sideButtonHeight; - btnOutput.x += txtRect.width - sideButtonWidth; - btnInput.x += - buttonTextMargin / 2 - sideButtonWidth*2; - - DrawTypecastButtons( btnOutput, btnInput ); - - } - - - txtRect = txtRect.PadTop((int)(sideButtonWidth*0.32f)); - - - - if(isEditing && !justFocused && Event.current.type == EventType.repaint){ - //Debug.Log("GUI THREAD " + Event.current.type + " LOWER"); - if(GUI.GetNameOfFocusedControl() != controlName){ - //Debug.Log("DEFOCUS - " + Event.current.type + " fc: " + GUI.GetNameOfFocusedControl() ); - isEditing = false; - isEditingAnyNodeTextField = false; - } - } - - - - if(Event.current.type == EventType.repaint){ - justFocused = false; - } - - //Debug.Log("GUI THREAD B: " + Event.current.type + " - " + GUI.GetNameOfFocusedControl()); - - if(isEditing){ - - controlName = base.id + "_codeArea"; - - GUI.SetNextControlName(controlName); - - string codeBefore = code; - //code = GUI.TextArea(txtRect,code,SF_Styles.CodeTextArea); - code = UndoableTextArea(txtRect, code, "code", SF_Styles.CodeTextArea); - - SF_GUI.AssignCursor( txtRect , MouseCursor.Text ); - - //if(copied){ - // code = codeBefore; - // txtEditor.pos += copyLength-1; - //} - - - txtEditor = (TextEditor)GUIUtility.GetStateObject(typeof(TextEditor), GUIUtility.keyboardControl); - savedCaretPosition = txtEditor.cursorIndex; - //txtEditor.selectPos = 4; - - - - - //if(SF_GUI.HoldingControl() && Event.current.type == EventType.keyDown && Event.current.keyCode == KeyCode.C) - - - if(Event.current.keyCode == KeyCode.Tab && Event.current.type == EventType.keyDown){ - //Debug.Log("Tab"); - UndoRecord("insert tab in " + functionName + " code"); - code = code.Insert( txtEditor.cursorIndex, "\t" ); - //Debug.Log("Caret position = " + txtEditor.pos); - savedCaretPosition = txtEditor.cursorIndex; - pressedTabLastFrameCounter = 5; // Force it for five GUI frames - Event.current.Use(); - GUI.FocusControl(controlName); - } - - if(pressedTabLastFrameCounter > 0 /*&& GUI.GetNameOfFocusedControl() != controlName*/){ - GUI.FocusControl(controlName); - txtEditor = (TextEditor)GUIUtility.GetStateObject(typeof(TextEditor), GUIUtility.keyboardControl); - txtEditor.cursorIndex = savedCaretPosition + 1; - txtEditor.selectIndex = savedCaretPosition+1; - pressedTabLastFrameCounter--; - } - - /* - if(Event.current.keyCode == KeyCode.Tab && Event.current.type == EventType.keyUp){ - GUI.FocusControl(controlName); - Event.current.Use(); - GUI.FocusControl(controlName); - } - - if(Event.current.Equals( Event.KeyboardEvent("tab") )){ - GUI.FocusControl(controlName); - Event.current.Use(); - GUI.FocusControl(controlName); - }*/ - - - - if(code != codeBefore){ - OnUpdateNode(NodeUpdateType.Soft, false); - } - //if(focusBefore != string.Empty && GUI.GetNameOfFocusedControl() != focusBefore){ - // GUI.FocusControl(focusBefore); - //} - //Debug.Log("GUI THREAD B_A_1: " + Event.current.type + " - " + GUI.GetNameOfFocusedControl()); - - }else{ - //Debug.Log("GUI THREAD " + Event.current.type + " UPPER"); - //Debug.Log("GUI THREAD B_B_0: " + Event.current.type + " - " + GUI.GetNameOfFocusedControl()); - GUI.Box(txtRect.PadBottom(1),code,SF_Styles.CodeTextArea); - if(hoveringNode){ - - bool doubleClicked = Event.current.isMouse && Event.current.type == EventType.mouseDown && Event.current.clickCount == 2; - - Rect btnRect = new Rect(txtRect.xMax,txtRect.yMax,46,16).MovedUp().MovedLeft(); - btnRect.x -= 3; - btnRect.y -= 4; - - btnRect.xMin -= 3; - btnRect.yMin -= 4; - - // Workaround for a weird issue - //bool clickedBtn = btnRect.Contains(Event.current.mousePosition) && Event.current.type == EventType.mouseUp && Event.current.button == 0; - - //Debug.Log("GUI THREAD B_B_1: " + Event.current.type + " - " + GUI.GetNameOfFocusedControl()); - if(GUI.Button(btnRect,"Edit",EditorStyles.miniButton) || doubleClicked && Event.current.type == EventType.repaint){ - isEditing = true; - //Debug.Log("FOCUS - " + Event.current.type + " fc: " + GUI.GetNameOfFocusedControl() ); - pressedEditLastFrameCounter = 5; - isEditingAnyNodeTextField = true; - GUI.FocusControl(controlName); - // forceFocusCodeField = true; - Event.current.Use(); - justFocused = true; - } - //Debug.Log("GUI THREAD B_B_2: " + Event.current.type + " - " + GUI.GetNameOfFocusedControl()); - } - } - - if(pressedEditLastFrameCounter > 0){ - GUI.FocusControl(controlName); - //Debug.Log("REFOCUSING " + controlName + " fc: " + GUI.GetNameOfFocusedControl() ); - pressedEditLastFrameCounter--; - } - - //Debug.Log("GUI THREAD C: " + Event.current.type + " - " + GUI.GetNameOfFocusedControl()); - - - - /* - if (forceFocusCodeField) { - //GUI.SetNextControlName("focusChange"); - if (GUI.GetNameOfFocusedControl() != controlName) { - GUI.FocusControl(controlName); - } else { - forceFocusCodeField = false; - } - - }*/ - - - - - //Debug.Log("GUI THREAD END: " + Event.current.type + " - " + GUI.GetNameOfFocusedControl()); - } - - //bool forceFocusCodeField = false; - - public void DrawTypecastButtons(Rect btnL, Rect btnR){ - - - // OUTPUT - DrawTypecastButton(btnL, connectors[0]); - - - // INPUTS - foreach(SF_NodeConnector con in connectors){ - if(con.conType == ConType.cOutput) - continue; - DrawTypecastButton(btnR, con, isInput:true); - btnR.y += btnR.height+4; - } - - // ADD INPUT BUTTON - GUI.color = new Color(0.7f,1f,0.7f,1f); - if(GUI.Button(btnR,"Add input", EditorStyles.miniButton)){ - UndoRecord("add input to " + functionName); - AddInput(); - } - GUI.color = Color.white; - - - } - - - - - public void AddInput(){ - - - SF_NodeConnector[] savedCons = new SF_NodeConnector[connectors.Length+1]; - for(int i=0;i conList = new List(); - foreach(SF_NodeConnector c in connectors){ - if(c != con){ - conList.Add(c); - } - } - - if(undoRecord) - Undo.DestroyObjectImmediate(con); - else - DestroyImmediate(con); - connectors = conList.ToArray(); - - RefreshConnectorStringIDs(); - UpdateMinHeight(); - - OnUpdateNode(NodeUpdateType.Hard, false); - } - - public void RefreshConnectorStringIDs(){ - int nameIndex = 0; - foreach(SF_NodeConnector c in connectors){ - if(c.conType == ConType.cInput){ - c.strID = SF_Tools.alphabetUpper[nameIndex].ToString(); - nameIndex++; - } - } - } - - - string EncodeCode(){ - return SF_Tools.StringToBase64String( code ); - } - - string DecodeCode(string encoded){ - return SF_Tools.Base64StringToString( encoded ); - } - - public class SF_Serializer{ - - List keys; - List values; - - public SF_Serializer(){ - keys = new List(); - values = new List(); - } - - public SF_Serializer Add(string key, string value){ - keys.Add(key); - values.Add(value); - return this; - } - - public SF_Serializer Add(string key, int value){ - return Add(key, value.ToString()); - } - - public SF_Serializer Add(string key, float value){ - return Add(key, value.ToString()); - } - - public SF_Serializer Add(string key, bool value){ - return Add(key, value.ToString()); - } - - public override string ToString(){ - string s = ""; - for(int i=0;i 0) - s += ","; - s += keys[i] + ":" + values[i]; - } - return s; - } - - } - - - public override string SerializeSpecialData() { - /* - string s = ""; - s += "code:" + EncodeCode() + ","; - - s += "output:" + (int)connectors[0].CustomValueType + ","; - - s += "fnme:" + functionName + ","; - - for(int i=1;i 0){ - con.label = SF_ShaderProperty.FormatInternalName(con.label); - UpdateExtraInputWidth(); - OnUpdateNode(NodeUpdateType.Soft); - } - } else { - int cvtccBef = SF_Tools.ComponentCountOf(con.CustomValueType ); - //con.CustomValueType = (CustomValueType)EditorGUI.EnumPopup(r, con.CustomValueType); - con.CustomValueType = (CustomValueType)UndoableEnumPopup(r, con.CustomValueType, "set output value type"); - if(cvtccBef != SF_Tools.ComponentCountOf(con.CustomValueType)){ - con.Disconnect(); - } - } - - } - - public void UpdateExtraInputWidth(){ - - int widest = SF_NodeConnector.defaultConnectorWidth; - - foreach(SF_NodeConnector con in connectors){ - if(con.conType == ConType.cOutput) - continue; - - widest = Mathf.Max( SF_GUI.WidthOf(con.label, SF_Styles.MiniLabelOverflow)+2, widest); - } - - extraWidthInput = widest - SF_NodeConnector.defaultConnectorWidth; - - - - } - - - - - - - } +using UnityEngine; +using UnityEditor; +using System.Collections.Generic; + +namespace ShaderForge { + + + public enum CustomValueType{ + Float, + Float2, + Float3, + Float4, + Half, + Half2, + Half3, + Half4, + Fixed, + Fixed2, + Fixed3, + Fixed4, + Sampler2D, + Matrix4x4 + /*, Texture*/ }; + + [System.Serializable] + public class SFN_Code : SF_Node_Resizeable { + + + public string code = ""; + public string functionName = "Function_node_"; + + private bool isEditing = false; + + public SFN_Code() { + } + + public override void Initialize() { + base.Initialize( "Code" ); + functionName = "Function_node_" + base.id; + base.minWidth = (int)(NODE_WIDTH * 2.5f); + base.minHeight = NODE_HEIGHT; + base.ClampSize(); + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"OUT","Out",ConType.cOutput,ValueType.VTvPending) + }; + controlName = base.id + "_codeArea"; + connectors[0].CustomValueType = CustomValueType.Float3; + //Debug.Log("Creating thing " + base.id); + } + + public string GetFunctionName(){ + return functionName; + //return "CustomCode_" + id; + } + + public override int GetEvaluatedComponentCount (){ + return SF_Tools.ComponentCountOf(connectors[0].CustomValueType); + } + + public override string GetPrepareUniformsAndFunctions(){ + return GetFunctionHeader() + "\n" + code + "\n}\n"; + } + + public string GetFunctionHeader(){ + string outputType = ToCodeType(connectors[0].CustomValueType); // Output type + string inputs = "("; + foreach(SF_NodeConnector con in connectors){ + if(con.conType == ConType.cOutput) + continue; + inputs += " " + ToCodeType(con.CustomValueType) + " " + con.label + " "; + + if(con != connectors[connectors.Length-1]) // Add comma if it's not the last one + inputs += ","; + } + inputs += "){"; + return outputType + " " + GetFunctionName() + inputs; + } + + private string ToCodeType(CustomValueType cvt){ + if(cvt == CustomValueType.Sampler2D) + return "sampler2D"; // Uppercase D + if( cvt == CustomValueType.Matrix4x4 ) + return "float4x4"; + return cvt.ToString().ToLower(); + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + string s = GetFunctionName(); + s += "("; + foreach(SF_NodeConnector con in connectors){ + if(con.conType == ConType.cOutput) + continue; + s += " " + con.TryEvaluate() + " "; + + if(con != connectors[connectors.Length-1]) // Add comma if it's not the last one + s += ","; + } + + s += ")"; + return s; + } + + public override float EvalCPU( int c ) { + return 1f; + } + + string controlName; + + + float targetSideButtonWidth; + float currentSideButtonWidth; + + //CustomValueType outType = CustomValueType.Float3; + + bool hoveringNode = false; + + int guiIncID = 0; + + bool justFocused = false; + int pressedTabLastFrameCounter = 0; + int pressedEditLastFrameCounter = 0; + int savedCaretPosition; + + TextEditor txtEditor; + + public override void DrawInner(Rect r){ + + + + //Debug.Log("GUI THREAD: " + Event.current.type + " - " + GUI.GetNameOfFocusedControl()); + + //if(Event.current.type == EventType.layout) + //return; + + if(Event.current.type == EventType.Repaint) + guiIncID++; + + //if(Event.current.type == EventType.repaint) + //if(hoveringNode){ + //hoveringNode = r.Margin(128).Contains(Event.current.mousePosition); + //} else { + hoveringNode = r.Contains(Event.current.mousePosition); + //} + + + if(!isEditing) // Don't resize while editing + targetSideButtonWidth = (selected) ? 70f : 0f; + + + int sideButtonHeight = 16; + int buttonTextMargin = 4; + + int sideButtonWidth = Mathf.RoundToInt(currentSideButtonWidth); + if(Event.current.type == EventType.Repaint){ + currentSideButtonWidth = Mathf.Lerp(currentSideButtonWidth, targetSideButtonWidth, 0.6f); + } + + Rect txtRect = r; + + + + txtRect = txtRect.PadRight(/*(int)sideButtonWidth +*/ buttonTextMargin); + txtRect = txtRect.PadLeft((int)sideButtonWidth*2 + buttonTextMargin); + txtRect = txtRect.PadBottom(buttonTextMargin); + + + // BUTTONS + if(sideButtonWidth > 12f){ + + Rect btnOutput = txtRect; + Rect btnInput = txtRect; + btnOutput.width = sideButtonWidth; + btnInput.width = sideButtonWidth*2; + btnOutput.height = btnInput.height = sideButtonHeight; + btnOutput.x += txtRect.width - sideButtonWidth; + btnInput.x += - buttonTextMargin / 2 - sideButtonWidth*2; + + DrawTypecastButtons( btnOutput, btnInput ); + + } + + + txtRect = txtRect.PadTop((int)(sideButtonWidth*0.32f)); + + + + if(isEditing && !justFocused && Event.current.type == EventType.Repaint){ + //Debug.Log("GUI THREAD " + Event.current.type + " LOWER"); + if(GUI.GetNameOfFocusedControl() != controlName){ + //Debug.Log("DEFOCUS - " + Event.current.type + " fc: " + GUI.GetNameOfFocusedControl() ); + isEditing = false; + isEditingAnyNodeTextField = false; + } + } + + + + if(Event.current.type == EventType.Repaint){ + justFocused = false; + } + + //Debug.Log("GUI THREAD B: " + Event.current.type + " - " + GUI.GetNameOfFocusedControl()); + + if(isEditing){ + + controlName = base.id + "_codeArea"; + + GUI.SetNextControlName(controlName); + + string codeBefore = code; + //code = GUI.TextArea(txtRect,code,SF_Styles.CodeTextArea); + code = UndoableTextArea(txtRect, code, "code", SF_Styles.CodeTextArea); + + SF_GUI.AssignCursor( txtRect , MouseCursor.Text ); + + //if(copied){ + // code = codeBefore; + // txtEditor.pos += copyLength-1; + //} + + + txtEditor = (TextEditor)GUIUtility.GetStateObject(typeof(TextEditor), GUIUtility.keyboardControl); + savedCaretPosition = txtEditor.cursorIndex; + //txtEditor.selectPos = 4; + + + + + //if(SF_GUI.HoldingControl() && Event.current.type == EventType.keyDown && Event.current.keyCode == KeyCode.C) + + + if(Event.current.keyCode == KeyCode.Tab && Event.current.type == EventType.KeyDown){ + //Debug.Log("Tab"); + UndoRecord("insert tab in " + functionName + " code"); + code = code.Insert( txtEditor.cursorIndex, "\t" ); + //Debug.Log("Caret position = " + txtEditor.pos); + savedCaretPosition = txtEditor.cursorIndex; + pressedTabLastFrameCounter = 5; // Force it for five GUI frames + Event.current.Use(); + GUI.FocusControl(controlName); + } + + if(pressedTabLastFrameCounter > 0 /*&& GUI.GetNameOfFocusedControl() != controlName*/){ + GUI.FocusControl(controlName); + txtEditor = (TextEditor)GUIUtility.GetStateObject(typeof(TextEditor), GUIUtility.keyboardControl); + txtEditor.cursorIndex = savedCaretPosition + 1; + txtEditor.selectIndex = savedCaretPosition+1; + pressedTabLastFrameCounter--; + } + + /* + if(Event.current.keyCode == KeyCode.Tab && Event.current.type == EventType.keyUp){ + GUI.FocusControl(controlName); + Event.current.Use(); + GUI.FocusControl(controlName); + } + + if(Event.current.Equals( Event.KeyboardEvent("tab") )){ + GUI.FocusControl(controlName); + Event.current.Use(); + GUI.FocusControl(controlName); + }*/ + + + + if(code != codeBefore){ + OnUpdateNode(NodeUpdateType.Soft, false); + } + //if(focusBefore != string.Empty && GUI.GetNameOfFocusedControl() != focusBefore){ + // GUI.FocusControl(focusBefore); + //} + //Debug.Log("GUI THREAD B_A_1: " + Event.current.type + " - " + GUI.GetNameOfFocusedControl()); + + }else{ + //Debug.Log("GUI THREAD " + Event.current.type + " UPPER"); + //Debug.Log("GUI THREAD B_B_0: " + Event.current.type + " - " + GUI.GetNameOfFocusedControl()); + GUI.Box(txtRect.PadBottom(1),code,SF_Styles.CodeTextArea); + if(hoveringNode){ + + bool doubleClicked = Event.current.isMouse && Event.current.type == EventType.MouseDown && Event.current.clickCount == 2; + + Rect btnRect = new Rect(txtRect.xMax,txtRect.yMax,46,16).MovedUp().MovedLeft(); + btnRect.x -= 3; + btnRect.y -= 4; + + btnRect.xMin -= 3; + btnRect.yMin -= 4; + + // Workaround for a weird issue + //bool clickedBtn = btnRect.Contains(Event.current.mousePosition) && Event.current.type == EventType.mouseUp && Event.current.button == 0; + + //Debug.Log("GUI THREAD B_B_1: " + Event.current.type + " - " + GUI.GetNameOfFocusedControl()); + if(GUI.Button(btnRect,"Edit",EditorStyles.miniButton) || doubleClicked && Event.current.type == EventType.Repaint){ + isEditing = true; + //Debug.Log("FOCUS - " + Event.current.type + " fc: " + GUI.GetNameOfFocusedControl() ); + pressedEditLastFrameCounter = 5; + isEditingAnyNodeTextField = true; + GUI.FocusControl(controlName); + // forceFocusCodeField = true; + Event.current.Use(); + justFocused = true; + } + //Debug.Log("GUI THREAD B_B_2: " + Event.current.type + " - " + GUI.GetNameOfFocusedControl()); + } + } + + if(pressedEditLastFrameCounter > 0){ + GUI.FocusControl(controlName); + //Debug.Log("REFOCUSING " + controlName + " fc: " + GUI.GetNameOfFocusedControl() ); + pressedEditLastFrameCounter--; + } + + //Debug.Log("GUI THREAD C: " + Event.current.type + " - " + GUI.GetNameOfFocusedControl()); + + + + /* + if (forceFocusCodeField) { + //GUI.SetNextControlName("focusChange"); + if (GUI.GetNameOfFocusedControl() != controlName) { + GUI.FocusControl(controlName); + } else { + forceFocusCodeField = false; + } + + }*/ + + + + + //Debug.Log("GUI THREAD END: " + Event.current.type + " - " + GUI.GetNameOfFocusedControl()); + } + + //bool forceFocusCodeField = false; + + public void DrawTypecastButtons(Rect btnL, Rect btnR){ + + + // OUTPUT + DrawTypecastButton(btnL, connectors[0]); + + + // INPUTS + foreach(SF_NodeConnector con in connectors){ + if(con.conType == ConType.cOutput) + continue; + DrawTypecastButton(btnR, con, isInput:true); + btnR.y += btnR.height+4; + } + + // ADD INPUT BUTTON + GUI.color = new Color(0.7f,1f,0.7f,1f); + if(GUI.Button(btnR,"Add input", EditorStyles.miniButton)){ + UndoRecord("add input to " + functionName); + AddInput(); + } + GUI.color = Color.white; + + + } + + + + + public void AddInput(){ + + + SF_NodeConnector[] savedCons = new SF_NodeConnector[connectors.Length+1]; + for(int i=0;i conList = new List(); + foreach(SF_NodeConnector c in connectors){ + if(c != con){ + conList.Add(c); + } + } + + if(undoRecord) + Undo.DestroyObjectImmediate(con); + else + DestroyImmediate(con); + connectors = conList.ToArray(); + + RefreshConnectorStringIDs(); + UpdateMinHeight(); + + OnUpdateNode(NodeUpdateType.Hard, false); + } + + public void RefreshConnectorStringIDs(){ + int nameIndex = 0; + foreach(SF_NodeConnector c in connectors){ + if(c.conType == ConType.cInput){ + c.strID = SF_Tools.alphabetUpper[nameIndex].ToString(); + nameIndex++; + } + } + } + + + string EncodeCode(){ + return SF_Tools.StringToBase64String( code ); + } + + string DecodeCode(string encoded){ + return SF_Tools.Base64StringToString( encoded ); + } + + public class SF_Serializer{ + + List keys; + List values; + + public SF_Serializer(){ + keys = new List(); + values = new List(); + } + + public SF_Serializer Add(string key, string value){ + keys.Add(key); + values.Add(value); + return this; + } + + public SF_Serializer Add(string key, int value){ + return Add(key, value.ToString()); + } + + public SF_Serializer Add(string key, float value){ + return Add(key, value.ToString()); + } + + public SF_Serializer Add(string key, bool value){ + return Add(key, value.ToString()); + } + + public override string ToString(){ + string s = ""; + for(int i=0;i 0) + s += ","; + s += keys[i] + ":" + values[i]; + } + return s; + } + + } + + + public override string SerializeSpecialData() { + /* + string s = ""; + s += "code:" + EncodeCode() + ","; + + s += "output:" + (int)connectors[0].CustomValueType + ","; + + s += "fnme:" + functionName + ","; + + for(int i=1;i 0){ + con.label = SF_ShaderProperty.FormatInternalName(con.label); + UpdateExtraInputWidth(); + OnUpdateNode(NodeUpdateType.Soft); + } + } else { + int cvtccBef = SF_Tools.ComponentCountOf(con.CustomValueType ); + //con.CustomValueType = (CustomValueType)EditorGUI.EnumPopup(r, con.CustomValueType); + con.CustomValueType = (CustomValueType)UndoableEnumPopup(r, con.CustomValueType, "set output value type"); + if(cvtccBef != SF_Tools.ComponentCountOf(con.CustomValueType)){ + con.Disconnect(); + } + } + + } + + public void UpdateExtraInputWidth(){ + + int widest = SF_NodeConnector.defaultConnectorWidth; + + foreach(SF_NodeConnector con in connectors){ + if(con.conType == ConType.cOutput) + continue; + + widest = Mathf.Max( SF_GUI.WidthOf(con.label, SF_Styles.MiniLabelOverflow)+2, widest); + } + + extraWidthInput = widest - SF_NodeConnector.defaultConnectorWidth; + + + + } + + + + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Code.cs.meta b/Editor/Code/_Nodes/SFN_Code.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Code.cs.meta rename to Editor/Code/_Nodes/SFN_Code.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Color.cs b/Editor/Code/_Nodes/SFN_Color.cs old mode 100755 new mode 100644 similarity index 97% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Color.cs rename to Editor/Code/_Nodes/SFN_Color.cs index e97e8727..695ac8d1 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Color.cs +++ b/Editor/Code/_Nodes/SFN_Color.cs @@ -1,58 +1,58 @@ using UnityEngine; using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Color : SF_Node { - - - public SFN_Color() { - - } - - public override void Initialize() { - //node_height /= 2; - base.Initialize( "Color" ); - base.showColor = true; - base.UseLowerPropertyBox( true ); - base.property = ScriptableObject.CreateInstance().Initialize( this ); +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Color : SF_Node { + + + public SFN_Color() { + + } + + public override void Initialize() { + //node_height /= 2; + base.Initialize( "Color" ); + base.showColor = true; + base.UseLowerPropertyBox( true ); + base.property = ScriptableObject.CreateInstance().Initialize( this ); base.texture.uniform = true; - base.neverDefineVariable = true; - base.texture.dataUniform = new Color( 0.5f, 0.5f, 0.5f, 1.0f ); - base.texture.CompCount = 4; - base.shaderGenMode = ShaderGenerationMode.OffUniform; - lowerRect.width /= 4; + base.neverDefineVariable = true; + base.texture.dataUniform = new Color( 0.5f, 0.5f, 0.5f, 1.0f ); + base.texture.CompCount = 4; + base.shaderGenMode = ShaderGenerationMode.OffUniform; + lowerRect.width /= 4; connectors = new SF_NodeConnector[]{ SF_NodeConnector.Create(this,"RGB","RGB",ConType.cOutput,ValueType.VTv3) .Outputting(OutChannel.RGB), SF_NodeConnector.Create(this,"R","R",ConType.cOutput, ValueType.VTv1) .WithColor(Color.red) .Outputting(OutChannel.R), SF_NodeConnector.Create(this,"G","G",ConType.cOutput,ValueType.VTv1) .WithColor(Color.green) .Outputting(OutChannel.G), SF_NodeConnector.Create(this,"B","B",ConType.cOutput,ValueType.VTv1) .WithColor(Color.blue) .Outputting(OutChannel.B), SF_NodeConnector.Create(this,"A","A",ConType.cOutput,ValueType.VTv1) .Outputting(OutChannel.A) - }; - } - - public void OnUpdateValue() { - editor.shaderEvaluator.ApplyProperty( this ); - OnUpdateNode( NodeUpdateType.Soft ); - } - - public override bool IsUniformOutput() { - return true; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return property.GetVariable(); - } - - public override void DrawLowerPropertyBox() { - - if(selected && !SF_GUI.MultiSelectModifierHeld() && !IsGlobalProperty()) - ColorPickerCorner( lowerRect ); - - Vector4 vecPrev = texture.dataUniform; - PrepareWindowColor(); + }; + } + + public void OnUpdateValue() { + editor.shaderEvaluator.ApplyProperty( this ); + OnUpdateNode( NodeUpdateType.Soft ); + } + + public override bool IsUniformOutput() { + return true; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return property.GetVariable(); + } + + public override void DrawLowerPropertyBox() { + + if(selected && !SF_GUI.MultiSelectModifierHeld() && !IsGlobalProperty()) + ColorPickerCorner( lowerRect ); + + Vector4 vecPrev = texture.dataUniform; + PrepareWindowColor(); Rect tRect = lowerRect; if(IsGlobalProperty()){ @@ -60,64 +60,64 @@ public override void DrawLowerPropertyBox() { texture.dataUniform[3] = 1f; GUI.enabled = false; } - + texture.dataUniform[0] = UndoableFloatField(tRect, texture.dataUniform[0], "R channel"); tRect.x += tRect.width; texture.dataUniform[1] = UndoableFloatField(tRect, texture.dataUniform[1], "G channel"); tRect.x += tRect.width; texture.dataUniform[2] = UndoableFloatField(tRect, texture.dataUniform[2], "B channel"); tRect.x += tRect.width; - texture.dataUniform[3] = UndoableFloatField(tRect, texture.dataUniform[3], "A channel"); - ResetWindowColor(); - if( texture.dataUniform != vecPrev ) { - OnUpdateValue(); - OnUpdateNode(); + texture.dataUniform[3] = UndoableFloatField(tRect, texture.dataUniform[3], "A channel"); + ResetWindowColor(); + if( texture.dataUniform != vecPrev ) { + OnUpdateValue(); + OnUpdateNode(); } if(IsGlobalProperty()){ GUI.enabled = true; - } - - } - - public Color GetColor() { - return texture.dataUniform; - } - - public override string SerializeSpecialData() { + } + + } + + public Color GetColor() { + return texture.dataUniform; + } + + public override string SerializeSpecialData() { string s = property.Serialize() + ","; - s += "c1:" + texture.dataUniform[0] + ","; - s += "c2:" + texture.dataUniform[1] + ","; - s += "c3:" + texture.dataUniform[2] + ","; - s += "c4:" + texture.dataUniform[3]; - return s; - } - + s += "c1:" + texture.dataUniform[0] + ","; + s += "c2:" + texture.dataUniform[1] + ","; + s += "c3:" + texture.dataUniform[2] + ","; + s += "c4:" + texture.dataUniform[3]; + return s; + } + public override void DeserializeSpecialData( string key, string value ) { - property.Deserialize(key,value); - switch( key ) { - case "c1": - float fVal1 = float.Parse( value ); - texture.dataUniform[0] = fVal1; - break; - case "c2": - float fVal2 = float.Parse( value ); - texture.dataUniform[1] = fVal2; - break; - case "c3": - float fVal3 = float.Parse( value ); - texture.dataUniform[2] = fVal3; - break; - case "c4": - float fVal4 = float.Parse( value ); - texture.dataUniform[3] = fVal4; - break; - } - } - - - - - - } + property.Deserialize(key,value); + switch( key ) { + case "c1": + float fVal1 = float.Parse( value ); + texture.dataUniform[0] = fVal1; + break; + case "c2": + float fVal2 = float.Parse( value ); + texture.dataUniform[1] = fVal2; + break; + case "c3": + float fVal3 = float.Parse( value ); + texture.dataUniform[2] = fVal3; + break; + case "c4": + float fVal4 = float.Parse( value ); + texture.dataUniform[3] = fVal4; + break; + } + } + + + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Color.cs.meta b/Editor/Code/_Nodes/SFN_Color.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Color.cs.meta rename to Editor/Code/_Nodes/SFN_Color.cs.meta index 9c23e3c4..f1a331e9 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Color.cs.meta +++ b/Editor/Code/_Nodes/SFN_Color.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 8bc17ab9cbfedf04dad0a0b49038cb4f -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 8bc17ab9cbfedf04dad0a0b49038cb4f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_CommentBox.cs b/Editor/Code/_Nodes/SFN_CommentBox.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_CommentBox.cs rename to Editor/Code/_Nodes/SFN_CommentBox.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_CommentBox.cs.meta b/Editor/Code/_Nodes/SFN_CommentBox.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_CommentBox.cs.meta rename to Editor/Code/_Nodes/SFN_CommentBox.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ComponentMask.cs b/Editor/Code/_Nodes/SFN_ComponentMask.cs old mode 100755 new mode 100644 similarity index 97% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ComponentMask.cs rename to Editor/Code/_Nodes/SFN_ComponentMask.cs index 41c444a2..62725d7e --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ComponentMask.cs +++ b/Editor/Code/_Nodes/SFN_ComponentMask.cs @@ -1,19 +1,19 @@ using UnityEngine; using UnityEditor; using System.Collections; -using System; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_ComponentMask : SF_Node { - - public enum CompChannel {off = -1, r = 0, g = 1, b = 2, a = 3 }; - const string R = "R"; - const string G = "G"; - const string B = "B"; - const string A = "A"; - const string OFF = "-"; +using System; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_ComponentMask : SF_Node { + + public enum CompChannel {off = -1, r = 0, g = 1, b = 2, a = 3 }; + const string R = "R"; + const string G = "G"; + const string B = "B"; + const string A = "A"; + const string OFF = "-"; public string[][] compLabels = new string[][]{ new string[] { OFF, R }, new string[] { OFF, R, G }, @@ -42,54 +42,54 @@ public enum CompChannel {off = -1, r = 0, g = 1, b = 2, a = 3 }; Color.green, Color.blue, Color.white - }; - - - - public GUIStyle popupStyle; - - public CompChannel[] components = new CompChannel[] { - CompChannel.r, - CompChannel.off, - CompChannel.off, - CompChannel.off - }; - - public SFN_ComponentMask() { - /* + }; + + + + public GUIStyle popupStyle; + + public CompChannel[] components = new CompChannel[] { + CompChannel.r, + CompChannel.off, + CompChannel.off, + CompChannel.off + }; + + public SFN_ComponentMask() { + /* Initialize("Comp. Mask"); base.showColor = true; - UseLowerReadonlyValues(true); - UseLowerPropertyBox( true, true ); - - popupStyle = new GUIStyle( EditorStyles.miniButton ); - popupStyle.alignment = TextAnchor.MiddleCenter; - popupStyle.fontSize = 12; + UseLowerReadonlyValues(true); + UseLowerPropertyBox( true, true ); + + popupStyle = new GUIStyle( EditorStyles.miniButton ); + popupStyle.alignment = TextAnchor.MiddleCenter; + popupStyle.fontSize = 12; popupStyle.fontStyle = FontStyle.Bold; connectors = new SF_NodeConnection[]{ new SF_NodeConnection(this,"-",ConType.cOutput,ValueType.VTvPending,false).Outputting(OutChannel.All), new SF_NodeConnection(this,"In",ConType.cInput,ValueType.VTvPending,false).SetRequired(true) - }; - */ - //base.conGroup = new SFNCG_Append( connectors[0], connectors[1], connectors[2] ); - } - - public override void Initialize() { + }; + */ + //base.conGroup = new SFNCG_Append( connectors[0], connectors[1], connectors[2] ); + } + + public override void Initialize() { base.Initialize( "Comp. Mask" ); - base.SearchName = "ComponentMask"; - base.showColor = true; - base.shaderGenMode = ShaderGenerationMode.Modal; - UseLowerReadonlyValues( true ); - UseLowerPropertyBox( true, true ); - SFN_ComponentMask.outputChanColors[3] = SF_NodeConnector.colorEnabledDefault; - - - popupStyle = new GUIStyle( EditorStyles.miniButton ); - popupStyle.alignment = TextAnchor.MiddleCenter; - popupStyle.fontSize = 12; - popupStyle.fontStyle = FontStyle.Bold; - + base.SearchName = "ComponentMask"; + base.showColor = true; + base.shaderGenMode = ShaderGenerationMode.Modal; + UseLowerReadonlyValues( true ); + UseLowerPropertyBox( true, true ); + SFN_ComponentMask.outputChanColors[3] = SF_NodeConnector.colorEnabledDefault; + + + popupStyle = new GUIStyle( EditorStyles.miniButton ); + popupStyle.alignment = TextAnchor.MiddleCenter; + popupStyle.fontSize = 12; + popupStyle.fontStyle = FontStyle.Bold; + connectors = new SF_NodeConnector[]{ SF_NodeConnector.Create(this,"OUT", "-", ConType.cOutput, ValueType.VTvPending,false) .Outputting(OutChannel.All), SF_NodeConnector.Create(this,"IN", "In", ConType.cInput, ValueType.VTvPending,false) .SetRequired(true), @@ -97,115 +97,115 @@ public override void Initialize() { SF_NodeConnector.Create(this,"G", "G", ConType.cOutput, ValueType.VTv1) .WithColor(Color.green) .Outputting(OutChannel.G), SF_NodeConnector.Create(this,"B", "B", ConType.cOutput, ValueType.VTv1) .WithColor(Color.blue) .Outputting(OutChannel.B), SF_NodeConnector.Create(this,"A", "A", ConType.cOutput, ValueType.VTv1) .Outputting(OutChannel.A) - }; - outCompCount = 1; - UpdateOutput(); - } - - - public override int GetEvaluatedComponentCount() { - return outCompCount; - } - - public override bool IsUniformOutput() { - if( GetInputIsConnected("IN") && !GetInputData( "IN" ).uniform ) - return false; - return true; - } - - - // New system - public override void RefreshValue() { - RefreshValue( 1, 1 ); - } - - public override string[] ExtraPassedFloatProperties() { - return new string[]{ - "ChR", - "ChG", - "ChB", - "ChA" - }; - } - - public override string[] GetModalModes() { - return new string[]{ - "CC1", - "CC2", - "CC3", - "CC4" - }; - } - - public override void PrepareRendering( Material mat ) { - mat.SetFloat( "_chr", (int)components[0] ); - mat.SetFloat( "_chg", (int)components[1] ); - mat.SetFloat( "_chb", (int)components[2] ); - mat.SetFloat( "_cha", (int)components[3] ); - } - - public override string GetCurrentModalMode() { - if( components[1] == CompChannel.off ) - return "CC1"; - if( components[2] == CompChannel.off ) - return "CC2"; - if( components[3] == CompChannel.off ) - return "CC3"; - return "CC4"; - } - - public override string[] GetBlitOutputLines( string mode ) { - - string s = ""; - if( mode == "CC1" ) - s = "_in[_chr].xxxx"; - if( mode == "CC2" ) - s = "float4(_in[_chr],_in[_chg],0,0)"; - if( mode == "CC3" ) - s = "float4(_in[_chr],_in[_chg],_in[_chb],0)"; - if( mode == "CC4" ) - s = "float4(_in[_chr],_in[_chg],_in[_chb],_in[_cha])"; - - return new string[]{ s }; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - - //if( outCompCount == inCompCount ) - // return GetConnectorByStringID( "IN" ).TryEvaluate(); // Unchanged // No! - - - string componentString = "."; - - for( int i = 0; i < outCompCount; i++ ) { // Build component string - componentString += components[i].ToString(); - } - - return GetConnectorByStringID( "IN" ).TryEvaluate() + componentString; - } - - static string[] writtenNumber = new string[]{"first", "second", "third", "fourth"}; - - int outCompCount = 1; - int inCompCount = 4; - - public override void DrawLowerPropertyBox() { - - inCompCount = 4; - if( !connectors[1].IsConnected() ) { - GUI.enabled = false; - } else { - inCompCount = connectors[1].GetCompCount(); - if( inCompCount > 4 ) - inCompCount = 4; - } - - Rect r = lowerRect; + }; + outCompCount = 1; + UpdateOutput(); + } + + + public override int GetEvaluatedComponentCount() { + return outCompCount; + } + + public override bool IsUniformOutput() { + if( GetInputIsConnected("IN") && !GetInputData( "IN" ).uniform ) + return false; + return true; + } + + + // New system + public override void RefreshValue() { + RefreshValue( 1, 1 ); + } + + public override string[] ExtraPassedFloatProperties() { + return new string[]{ + "ChR", + "ChG", + "ChB", + "ChA" + }; + } + + public override string[] GetModalModes() { + return new string[]{ + "CC1", + "CC2", + "CC3", + "CC4" + }; + } + + public override void PrepareRendering( Material mat ) { + mat.SetFloat( "_chr", (int)components[0] ); + mat.SetFloat( "_chg", (int)components[1] ); + mat.SetFloat( "_chb", (int)components[2] ); + mat.SetFloat( "_cha", (int)components[3] ); + } + + public override string GetCurrentModalMode() { + if( components[1] == CompChannel.off ) + return "CC1"; + if( components[2] == CompChannel.off ) + return "CC2"; + if( components[3] == CompChannel.off ) + return "CC3"; + return "CC4"; + } + + public override string[] GetBlitOutputLines( string mode ) { + + string s = ""; + if( mode == "CC1" ) + s = "_in[_chr].xxxx"; + if( mode == "CC2" ) + s = "float4(_in[_chr],_in[_chg],0,0)"; + if( mode == "CC3" ) + s = "float4(_in[_chr],_in[_chg],_in[_chb],0)"; + if( mode == "CC4" ) + s = "float4(_in[_chr],_in[_chg],_in[_chb],_in[_cha])"; + + return new string[]{ s }; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + + //if( outCompCount == inCompCount ) + // return GetConnectorByStringID( "IN" ).TryEvaluate(); // Unchanged // No! + + + string componentString = "."; + + for( int i = 0; i < outCompCount; i++ ) { // Build component string + componentString += components[i].ToString(); + } + + return GetConnectorByStringID( "IN" ).TryEvaluate() + componentString; + } + + static string[] writtenNumber = new string[]{"first", "second", "third", "fourth"}; + + int outCompCount = 1; + int inCompCount = 4; + + public override void DrawLowerPropertyBox() { + + inCompCount = 4; + if( !connectors[1].IsConnected() ) { + GUI.enabled = false; + } else { + inCompCount = connectors[1].GetCompCount(); + if( inCompCount > 4 ) + inCompCount = 4; + } + + Rect r = lowerRect; r.width /= 4; - bool changed = false; - - EditorGUI.BeginChangeCheck(); + bool changed = false; + + EditorGUI.BeginChangeCheck(); for( int i = 0; i < 4; i++ ) { @@ -232,81 +232,81 @@ public override void DrawLowerPropertyBox() { //components[i] = (CompChannel)(EditorGUI.Popup( r, curDisplayIndex, dispLabels, popupStyle )+labelOffset); } - - - if( components[i] == CompChannel.off ) - GUI.enabled = false; // Disable following buttons - - r.x += r.width; - } - - bool changedCompCount = UpdateOutCompCount(); - UpdateOutput(); - if( EditorGUI.EndChangeCheck() || changedCompCount || changed ) { - - OnUpdateNode(); - } - - - GUI.enabled = true; - - } - + + + if( components[i] == CompChannel.off ) + GUI.enabled = false; // Disable following buttons + + r.x += r.width; + } + + bool changedCompCount = UpdateOutCompCount(); + UpdateOutput(); + if( EditorGUI.EndChangeCheck() || changedCompCount || changed ) { + + OnUpdateNode(); + } + + + GUI.enabled = true; + + } + bool UpdateOutCompCount() { // returns true if changed - int prev = outCompCount; - outCompCount = 0; - for( int i = 0; i < 4; i++ ) { - if( components[i] != CompChannel.off ) - outCompCount++; - } - if( outCompCount == 0 ) { - outCompCount = 1; + int prev = outCompCount; + outCompCount = 0; + for( int i = 0; i < 4; i++ ) { + if( components[i] != CompChannel.off ) + outCompCount++; + } + if( outCompCount == 0 ) { + outCompCount = 1; } if(outCompCount != prev) return true; - return false; - - } - - void UpdateOutput() { - - // Set proper value types and component count - UpdateOutCompCount(); - texture.CompCount = outCompCount; - switch( outCompCount ) { - case 1: - connectors[0].valueType = ValueType.VTv1; - break; - case 2: - connectors[0].valueType = ValueType.VTv2; - break; - case 3: - connectors[0].valueType = ValueType.VTv3; - break; - case 4: - connectors[0].valueType = ValueType.VTv4; - break; - default: - connectors[0].valueType = ValueType.VTvPending; - texture.CompCount = 4; - break; - } - - - - // Rename the label - - string label = ""; - - if( connectors[0].valueType == ValueType.VTvPending ) { - label = "-"; - } else { - for( int i = 0; i < outCompCount; i++ ) { // Build component string - int id = (int)components[i]; - label += compLabels[3][id+1]; - } - } + return false; + + } + + void UpdateOutput() { + + // Set proper value types and component count + UpdateOutCompCount(); + texture.CompCount = outCompCount; + switch( outCompCount ) { + case 1: + connectors[0].valueType = ValueType.VTv1; + break; + case 2: + connectors[0].valueType = ValueType.VTv2; + break; + case 3: + connectors[0].valueType = ValueType.VTv3; + break; + case 4: + connectors[0].valueType = ValueType.VTv4; + break; + default: + connectors[0].valueType = ValueType.VTvPending; + texture.CompCount = 4; + break; + } + + + + // Rename the label + + string label = ""; + + if( connectors[0].valueType == ValueType.VTvPending ) { + label = "-"; + } else { + for( int i = 0; i < outCompCount; i++ ) { // Build component string + int id = (int)components[i]; + label += compLabels[3][id+1]; + } + } connectors[0].label = label; connectors[0].color = outCompCount == 1 ? outputChanColors[Mathf.Clamp((int)components[0],0,3)] : SF_NodeConnector.colorEnabledDefault; @@ -331,57 +331,57 @@ void UpdateOutput() { connectors[i+2].color = outputChanColors[Mathf.Clamp(id,0,3)]; } - } - } - - - public override float EvalCPU( int c ) { - CompChannel channel = components[c]; // Get the channel the user selected for component i - if( channel == CompChannel.off ) { - if(outCompCount > 1) - return 0f; // Make remaining channels black if using more than one component - return GetInputData( "IN", (int)components[0] ); // Repeat same value when using one component - } - return GetInputData( "IN", (int)channel); - } - - public override string SerializeSpecialData() { - string s = ""; - s += "cc1:" + (int)components[0] + ","; - s += "cc2:" + (int)components[1] + ","; - s += "cc3:" + (int)components[2] + ","; - s += "cc4:" + (int)components[3]; - return s; - } - + } + } + + + public override float EvalCPU( int c ) { + CompChannel channel = components[c]; // Get the channel the user selected for component i + if( channel == CompChannel.off ) { + if(outCompCount > 1) + return 0f; // Make remaining channels black if using more than one component + return GetInputData( "IN", (int)components[0] ); // Repeat same value when using one component + } + return GetInputData( "IN", (int)channel); + } + + public override string SerializeSpecialData() { + string s = ""; + s += "cc1:" + (int)components[0] + ","; + s += "cc2:" + (int)components[1] + ","; + s += "cc3:" + (int)components[2] + ","; + s += "cc4:" + (int)components[3]; + return s; + } + public override void DeserializeSpecialData( string key, string value ) { - - switch( key ) { + + switch( key ) { case ( "cc1" ): if(value == "4") - value = "-1"; - components[0] = (CompChannel)int.Parse( value ); - break; + value = "-1"; + components[0] = (CompChannel)int.Parse( value ); + break; case ( "cc2" ): if(value == "4") - value = "-1"; - components[1] = (CompChannel)int.Parse( value ); - break; + value = "-1"; + components[1] = (CompChannel)int.Parse( value ); + break; case ( "cc3" ): if(value == "4") - value = "-1"; - components[2] = (CompChannel)int.Parse( value ); - break; + value = "-1"; + components[2] = (CompChannel)int.Parse( value ); + break; case ( "cc4" ): if(value == "4") - value = "-1"; - components[3] = (CompChannel)int.Parse( value ); - break; - } - - UpdateOutput(); - OnUpdateNode(); - } - - } + value = "-1"; + components[3] = (CompChannel)int.Parse( value ); + break; + } + + UpdateOutput(); + OnUpdateNode(); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ComponentMask.cs.meta b/Editor/Code/_Nodes/SFN_ComponentMask.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ComponentMask.cs.meta rename to Editor/Code/_Nodes/SFN_ComponentMask.cs.meta index 1b06d91f..564a0cf7 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ComponentMask.cs.meta +++ b/Editor/Code/_Nodes/SFN_ComponentMask.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: c5cee9180050a794790a872678f78ed5 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: c5cee9180050a794790a872678f78ed5 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ConstantClamp.cs b/Editor/Code/_Nodes/SFN_ConstantClamp.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ConstantClamp.cs rename to Editor/Code/_Nodes/SFN_ConstantClamp.cs index 306a0c86..0d336203 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ConstantClamp.cs +++ b/Editor/Code/_Nodes/SFN_ConstantClamp.cs @@ -1,126 +1,126 @@ using UnityEngine; using UnityEditor; using System.Collections; -//using System; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_ConstantClamp : SF_Node { - - // SF_Node tNode; - - public float min = 0f; - public float max = 1f; - - - public SFN_ConstantClamp() { - - } - - - public override void Initialize() { +//using System; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_ConstantClamp : SF_Node { + + // SF_Node tNode; + + public float min = 0f; + public float max = 1f; + + + public SFN_ConstantClamp() { + + } + + + public override void Initialize() { base.Initialize( "Clamp (Simple)" ); - base.SearchName = "Clamp Simple"; - base.showColor = true; - UseLowerReadonlyValues( true ); - base.UseLowerPropertyBox( true, true ); - base.shaderGenMode = ShaderGenerationMode.ValuePassing; - - //SF_NodeConnection lerpCon; + base.SearchName = "Clamp Simple"; + base.showColor = true; + UseLowerReadonlyValues( true ); + base.UseLowerPropertyBox( true, true ); + base.shaderGenMode = ShaderGenerationMode.ValuePassing; + + //SF_NodeConnection lerpCon; connectors = new SF_NodeConnector[]{ SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTvPending,false), SF_NodeConnector.Create(this,"IN","",ConType.cInput,ValueType.VTvPending,false).SetRequired(true) - }; - - base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1] ); - } - - public override void OnUpdateNode( NodeUpdateType updType, bool cascade = true ) { - if( InputsConnected() ) - RefreshValue( 1, 1 ); - base.OnUpdateNode( updType ); - } - - public override bool IsUniformOutput() { - return GetInputData( "IN" ).uniform; - } - - public override int GetEvaluatedComponentCount() { - return Mathf.Max( this["IN"].GetCompCount() ); - } - - public override string[] ExtraPassedFloatProperties() { - return new string[]{ - "ClampMin", - "ClampMax" - }; - } - - public override void PrepareRendering( Material mat ) { - mat.SetFloat( "_clampmin", min ); - mat.SetFloat( "_clampmax", max ); - } - - public override string[] GetBlitOutputLines( ) { - return new string[] { "clamp( _in, _clampmin, _clampmax )" }; + }; + + base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1] ); + } + + public override void OnUpdateNode( NodeUpdateType updType, bool cascade = true ) { + if( InputsConnected() ) + RefreshValue( 1, 1 ); + base.OnUpdateNode( updType ); + } + + public override bool IsUniformOutput() { + return GetInputData( "IN" ).uniform; + } + + public override int GetEvaluatedComponentCount() { + return Mathf.Max( this["IN"].GetCompCount() ); + } + + public override string[] ExtraPassedFloatProperties() { + return new string[]{ + "ClampMin", + "ClampMax" + }; + } + + public override void PrepareRendering( Material mat ) { + mat.SetFloat( "_clampmin", min ); + mat.SetFloat( "_clampmax", max ); + } + + public override string[] GetBlitOutputLines( ) { + return new string[] { "clamp( _in, _clampmin, _clampmax )" }; } /* public void UndoableEnterableFloatField(Rect r, ref float value, string undoMessage, GUIStyle style){ SF_GUI.EnterableFloatField(this, r, ref value, null ); - } -*/ - - - - public override void DrawLowerPropertyBox() { - - EditorGUI.BeginChangeCheck(); - Rect r = lowerRect; - r.width /= 4; - GUI.Label( r, "Min", EditorStyles.miniLabel ); - r.x += r.width; + } +*/ + + + + public override void DrawLowerPropertyBox() { + + EditorGUI.BeginChangeCheck(); + Rect r = lowerRect; + r.width /= 4; + GUI.Label( r, "Min", EditorStyles.miniLabel ); + r.x += r.width; //SF_GUI.EnterableFloatField(this, r, ref min, null ); - UndoableEnterableFloatField(r, ref min, "min value", null); - r.x += r.width; - GUI.Label( r, "Max", EditorStyles.miniLabel ); - r.x += r.width; + UndoableEnterableFloatField(r, ref min, "min value", null); + r.x += r.width; + GUI.Label( r, "Max", EditorStyles.miniLabel ); + r.x += r.width; //SF_GUI.EnterableFloatField( this, r, ref max, null ); - UndoableEnterableFloatField(r, ref max, "max value", null); - - } - - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "clamp(" + GetConnectorByStringID( "IN" ).TryEvaluate() + "," + min + "," + max + ")"; - } - - // TODO Expose more out here! - public override float EvalCPU( int c ) { - if( GetEvaluatedComponentCount() != 1 ) - if( c + 1 > GetEvaluatedComponentCount() ) - return 0f; - return Mathf.Clamp( GetInputData( "IN", c ), min, max ); - } - - public override string SerializeSpecialData() { - string s = "min:" + min + ","; - s += "max:" + max; - return s; - } - - public override void DeserializeSpecialData( string key, string value ) { - switch( key ) { - case "min": - min = float.Parse( value ); - break; - case "max": - max = float.Parse( value ); - break; - } - } - - - } + UndoableEnterableFloatField(r, ref max, "max value", null); + + } + + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "clamp(" + GetConnectorByStringID( "IN" ).TryEvaluate() + "," + min + "," + max + ")"; + } + + // TODO Expose more out here! + public override float EvalCPU( int c ) { + if( GetEvaluatedComponentCount() != 1 ) + if( c + 1 > GetEvaluatedComponentCount() ) + return 0f; + return Mathf.Clamp( GetInputData( "IN", c ), min, max ); + } + + public override string SerializeSpecialData() { + string s = "min:" + min + ","; + s += "max:" + max; + return s; + } + + public override void DeserializeSpecialData( string key, string value ) { + switch( key ) { + case "min": + min = float.Parse( value ); + break; + case "max": + max = float.Parse( value ); + break; + } + } + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ConstantClamp.cs.meta b/Editor/Code/_Nodes/SFN_ConstantClamp.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ConstantClamp.cs.meta rename to Editor/Code/_Nodes/SFN_ConstantClamp.cs.meta index c1003961..db201c9b --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ConstantClamp.cs.meta +++ b/Editor/Code/_Nodes/SFN_ConstantClamp.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: e17f3f3b88cf18843b95000bfd9c1bba -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: e17f3f3b88cf18843b95000bfd9c1bba +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ConstantLerp.cs b/Editor/Code/_Nodes/SFN_ConstantLerp.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ConstantLerp.cs rename to Editor/Code/_Nodes/SFN_ConstantLerp.cs index ee86fbf9..c5489179 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ConstantLerp.cs +++ b/Editor/Code/_Nodes/SFN_ConstantLerp.cs @@ -1,125 +1,125 @@ using UnityEngine; using UnityEditor; using System.Collections; -//using System; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_ConstantLerp : SF_Node { - - // SF_Node tNode; - - public float lerp_a = 0f; - public float lerp_b = 1f; - - - public SFN_ConstantLerp() { - - } - - - public override void Initialize() { +//using System; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_ConstantLerp : SF_Node { + + // SF_Node tNode; + + public float lerp_a = 0f; + public float lerp_b = 1f; + + + public SFN_ConstantLerp() { + + } + + + public override void Initialize() { base.Initialize( "Lerp (Simple)" ); - base.SearchName = "Lerp Simple"; - base.showColor = true; - UseLowerReadonlyValues( true ); - base.UseLowerPropertyBox( true, true ); - base.shaderGenMode = ShaderGenerationMode.ValuePassing; - - //SF_NodeConnection lerpCon; + base.SearchName = "Lerp Simple"; + base.showColor = true; + UseLowerReadonlyValues( true ); + base.UseLowerPropertyBox( true, true ); + base.shaderGenMode = ShaderGenerationMode.ValuePassing; + + //SF_NodeConnection lerpCon; connectors = new SF_NodeConnector[]{ SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTvPending,false), SF_NodeConnector.Create(this,"IN","T",ConType.cInput,ValueType.VTvPending,false).SetRequired(true) - }; - - base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1] ); - } - - public override void OnUpdateNode( NodeUpdateType updType, bool cascade = true ) { - if( InputsConnected() ) - RefreshValue( 1, 1 ); - base.OnUpdateNode( updType ); - } - - public override bool IsUniformOutput() { - return GetInputData( "IN" ).uniform; - } - - public override int GetEvaluatedComponentCount() { - return Mathf.Max( this["IN"].GetCompCount() ); - } - - - - public override string[] ExtraPassedFloatProperties() { - return new string[]{ - "LerpA", - "LerpB" - }; - } - - public override void PrepareRendering( Material mat ) { - mat.SetFloat( "_lerpa", lerp_a ); - mat.SetFloat( "_lerpb", lerp_b ); - } - - public override string[] GetBlitOutputLines( ) { - return new string[] { "lerp(_lerpa, _lerpb, _in)" }; - } - - - - public override void DrawLowerPropertyBox() { - - //EditorGUI.BeginChangeCheck(); - Rect r = lowerRect; - r.width /= 8; - GUI.Label( r, "A" ); - r.x += r.width; - r.width *= 3; + }; + + base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1] ); + } + + public override void OnUpdateNode( NodeUpdateType updType, bool cascade = true ) { + if( InputsConnected() ) + RefreshValue( 1, 1 ); + base.OnUpdateNode( updType ); + } + + public override bool IsUniformOutput() { + return GetInputData( "IN" ).uniform; + } + + public override int GetEvaluatedComponentCount() { + return Mathf.Max( this["IN"].GetCompCount() ); + } + + + + public override string[] ExtraPassedFloatProperties() { + return new string[]{ + "LerpA", + "LerpB" + }; + } + + public override void PrepareRendering( Material mat ) { + mat.SetFloat( "_lerpa", lerp_a ); + mat.SetFloat( "_lerpb", lerp_b ); + } + + public override string[] GetBlitOutputLines( ) { + return new string[] { "lerp(_lerpa, _lerpb, _in)" }; + } + + + + public override void DrawLowerPropertyBox() { + + //EditorGUI.BeginChangeCheck(); + Rect r = lowerRect; + r.width /= 8; + GUI.Label( r, "A" ); + r.x += r.width; + r.width *= 3; //SF_GUI.EnterableFloatField(this, r, ref lerp_a, null ); - UndoableEnterableFloatField(r, ref lerp_a, "A value",null); - r.x += r.width; - r.width /= 3; - GUI.Label( r, "B" ); - r.x += r.width; - r.width *= 3; + UndoableEnterableFloatField(r, ref lerp_a, "A value",null); + r.x += r.width; + r.width /= 3; + GUI.Label( r, "B" ); + r.x += r.width; + r.width *= 3; //SF_GUI.EnterableFloatField( this, r, ref lerp_b, null ); - UndoableEnterableFloatField(r, ref lerp_b, "B value",null); - - } - - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "lerp(" + lerp_a + "," + lerp_b + "," + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; - } - - public override float EvalCPU( int c ) { - return Lerp( lerp_a, lerp_b, GetInputData( "IN", c ) ); - } - - public float Lerp( float a, float b, float t ) { - return ( ( 1f - t ) * a + t * b ); - } - - public override string SerializeSpecialData() { - string s = "a:" + lerp_a + ","; - s += "b:" + lerp_b; - return s; - } - - public override void DeserializeSpecialData( string key, string value ) { - switch( key ) { - case "a": - lerp_a = float.Parse( value ); - break; - case "b": - lerp_b = float.Parse( value ); - break; - } - } - - - } + UndoableEnterableFloatField(r, ref lerp_b, "B value",null); + + } + + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "lerp(" + lerp_a + "," + lerp_b + "," + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; + } + + public override float EvalCPU( int c ) { + return Lerp( lerp_a, lerp_b, GetInputData( "IN", c ) ); + } + + public float Lerp( float a, float b, float t ) { + return ( ( 1f - t ) * a + t * b ); + } + + public override string SerializeSpecialData() { + string s = "a:" + lerp_a + ","; + s += "b:" + lerp_b; + return s; + } + + public override void DeserializeSpecialData( string key, string value ) { + switch( key ) { + case "a": + lerp_a = float.Parse( value ); + break; + case "b": + lerp_b = float.Parse( value ); + break; + } + } + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ConstantLerp.cs.meta b/Editor/Code/_Nodes/SFN_ConstantLerp.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ConstantLerp.cs.meta rename to Editor/Code/_Nodes/SFN_ConstantLerp.cs.meta index d6332e5d..d698ecd2 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ConstantLerp.cs.meta +++ b/Editor/Code/_Nodes/SFN_ConstantLerp.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 922be1943b72bf34ab001061c89b1aa8 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 922be1943b72bf34ab001061c89b1aa8 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Cos.cs b/Editor/Code/_Nodes/SFN_Cos.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Cos.cs rename to Editor/Code/_Nodes/SFN_Cos.cs index 048aa935..1176345a --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Cos.cs +++ b/Editor/Code/_Nodes/SFN_Cos.cs @@ -1,26 +1,26 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Cos : SF_Node_Arithmetic { - - public SFN_Cos() { - } - - public override void Initialize() { - base.Initialize( "Cos" ); - base.PrepareArithmetic( 1 ); - base.shaderGenMode = ShaderGenerationMode.SimpleFunction; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "cos(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; - } - - public override float EvalCPU( int c ) { - return Mathf.Cos( GetInputData( "IN", c ) ); - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Cos : SF_Node_Arithmetic { + + public SFN_Cos() { + } + + public override void Initialize() { + base.Initialize( "Cos" ); + base.PrepareArithmetic( 1 ); + base.shaderGenMode = ShaderGenerationMode.SimpleFunction; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "cos(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; + } + + public override float EvalCPU( int c ) { + return Mathf.Cos( GetInputData( "IN", c ) ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Cos.cs.meta b/Editor/Code/_Nodes/SFN_Cos.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Cos.cs.meta rename to Editor/Code/_Nodes/SFN_Cos.cs.meta index 9139ce4b..96126f0d --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Cos.cs.meta +++ b/Editor/Code/_Nodes/SFN_Cos.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 980e537a5b3f41d43a7ed5b48d568bc4 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 980e537a5b3f41d43a7ed5b48d568bc4 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Cross.cs b/Editor/Code/_Nodes/SFN_Cross.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Cross.cs rename to Editor/Code/_Nodes/SFN_Cross.cs index a92c095c..58973676 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Cross.cs +++ b/Editor/Code/_Nodes/SFN_Cross.cs @@ -1,36 +1,36 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Cross : SF_Node_Arithmetic { - - public SFN_Cross() { - - } - - public override void Initialize() { - base.Initialize( "Cross" ); - base.PrepareArithmetic( 2, ValueType.VTv3, ValueType.VTv3 ); - base.shaderGenMode = ShaderGenerationMode.CustomFunction; - } - - public override int GetEvaluatedComponentCount() { - return 3; - } - - public override string[] GetBlitOutputLines() { - return new string[] { "float4(cross(_a.xyz,_b.xyz),0);" }; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "cross(" + GetConnectorByStringID( "A" ).TryEvaluate() + "," + GetConnectorByStringID( "B" ).TryEvaluate() + ")"; - } - - public override Vector4 EvalCPU() { - return SF_Tools.Cross( GetInputData( "A" ).dataUniform, GetInputData( "B" ).dataUniform ); - } - - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Cross : SF_Node_Arithmetic { + + public SFN_Cross() { + + } + + public override void Initialize() { + base.Initialize( "Cross" ); + base.PrepareArithmetic( 2, ValueType.VTv3, ValueType.VTv3 ); + base.shaderGenMode = ShaderGenerationMode.CustomFunction; + } + + public override int GetEvaluatedComponentCount() { + return 3; + } + + public override string[] GetBlitOutputLines() { + return new string[] { "float4(cross(_a.xyz,_b.xyz),0);" }; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "cross(" + GetConnectorByStringID( "A" ).TryEvaluate() + "," + GetConnectorByStringID( "B" ).TryEvaluate() + ")"; + } + + public override Vector4 EvalCPU() { + return SF_Tools.Cross( GetInputData( "A" ).dataUniform, GetInputData( "B" ).dataUniform ); + } + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Cross.cs.meta b/Editor/Code/_Nodes/SFN_Cross.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Cross.cs.meta rename to Editor/Code/_Nodes/SFN_Cross.cs.meta index 5f1377ab..82500531 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Cross.cs.meta +++ b/Editor/Code/_Nodes/SFN_Cross.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 859cb746c02cece4a83a6c8ac12751c8 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 859cb746c02cece4a83a6c8ac12751c8 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Cubemap.cs b/Editor/Code/_Nodes/SFN_Cubemap.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Cubemap.cs rename to Editor/Code/_Nodes/SFN_Cubemap.cs index 0991951b..be11f905 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Cubemap.cs +++ b/Editor/Code/_Nodes/SFN_Cubemap.cs @@ -1,203 +1,203 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -using System.Reflection; -using System; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Cubemap : SF_Node { - - - public Cubemap cubemapAsset; - Texture2D textureAsset; - - - public CubemapFace previewFace; - - public SFN_Cubemap() { - - } - - - public override void Initialize() { - base.Initialize( "Cubemap" ); - base.UseLowerPropertyBox( true, true ); - base.texture.CompCount = 4; - property = ScriptableObject.CreateInstance().Initialize( this ); - - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"DIR","DIR",ConType.cInput,ValueType.VTv3), - SF_NodeConnector.Create(this,"MIP","MIP",ConType.cInput,ValueType.VTv1), - SF_NodeConnector.Create(this,"RGB","RGB",ConType.cOutput,ValueType.VTv3) .Outputting(OutChannel.RGB), - SF_NodeConnector.Create(this,"R","R",ConType.cOutput, ValueType.VTv1) .WithColor(Color.red) .Outputting(OutChannel.R), - SF_NodeConnector.Create(this,"G","G",ConType.cOutput,ValueType.VTv1) .WithColor(Color.green) .Outputting(OutChannel.G), - SF_NodeConnector.Create(this,"B","B",ConType.cOutput,ValueType.VTv1) .WithColor(Color.blue) .Outputting(OutChannel.B), - SF_NodeConnector.Create(this,"A","A",ConType.cOutput,ValueType.VTv1) .Outputting(OutChannel.A) - }; - } - - - public override bool IsUniformOutput() { - return false; - } - - // TODO: MIP selection - public override string Evaluate( OutChannel channel = OutChannel.All ) { - - - //float3 reflectDirection = reflect( -viewDirection, normalDirection ); - - string DIR = GetInputIsConnected( "DIR" ) ? GetConnectorByStringID( "DIR" ).TryEvaluate() : "viewReflectDirection"; - string func = GetInputIsConnected( "MIP" ) ? "texCUBElod" : "texCUBE"; - - if( GetInputIsConnected( "MIP" ) ) { - DIR = "float4(" + DIR + "," + GetConnectorByStringID( "MIP" ).TryEvaluate() + ")"; - } - - string s = func + "(" + property.GetVariable() + "," + DIR + ")"; - - return s; - } - - // TODO: EditorUtility.SetTemporarilyAllowIndieRenderTexture(true); - - - - - - public void RenderToTexture() { - - if( cubemapAsset == null ) { - Debug.Log( "Cubemap asset missing" ); - return; - } - - Texture2D tex = new Texture2D( cubemapAsset.width, cubemapAsset.height, TextureFormat.ARGB32, false ); - try{ - tex.SetPixels( cubemapAsset.GetPixels( previewFace ) ); - } catch( Exception e ) { - Debug.LogWarning("Cubemap texture preview failed: " + e.ToString()); - } - - tex.Apply(); - - - RenderTexture rt = new RenderTexture( cubemapAsset.width, cubemapAsset.height, 24, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Default ); - rt.Create(); - Graphics.Blit( tex/*cubemapAsset/*GetTextureFaceAsset(CubemapFace.PositiveZ)*/, rt ); - RenderTexture.active = rt; - // The data is now in the RT, in an arbitrary res - // TODO: Sample it with normalized coords down into a 128x128 - // Save it temporarily in a texture - Texture2D temp = new Texture2D( cubemapAsset.width, cubemapAsset.height, TextureFormat.ARGB32, false ); - temp.ReadPixels( new Rect( 0, 0, cubemapAsset.width, cubemapAsset.height ), 0, 0 ); - - RenderTexture.active = null; - rt.Release(); // Remove RT - texture.ReadData( temp ); // Read Data from temp texture - UnityEngine.Object.DestroyImmediate( temp ); // Destroy temp texture - - } - - - public Texture GetTextureFaceAsset( CubemapFace face ) { - if( cubemapAsset == null ) - return null; - - // Reflection of this: - // TextureUtil.GetSourceTexture(Cubemap cubemapRef, CubemapFace face); - Debug.Log( "GET FACE ASSET:" ); - Type textureUtil = Type.GetType( "UnityEditor.TextureUtil,UnityEditor" ); - Debug.Log( "textureUtil = " + textureUtil ); - BindingFlags bfs = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static; - MethodInfo getSourceTexture = textureUtil.GetMethod( "GetSourceTexture", bfs, null, new Type[] { typeof( Cubemap ), typeof( CubemapFace ) }, null ); - Debug.Log( "getSourceTexture = " + getSourceTexture ); - Texture2D tex = (Texture2D)getSourceTexture.Invoke( null, new object[] { cubemapAsset, face } ); - Debug.Log( "tex = " + tex ); - - return tex; - } - - public override void OnDelete() { - cubemapAsset = null; - } - - - public override bool Draw() { - ProcessInput(); - DrawHighlight(); - PrepareWindowColor(); - DrawWindow(); - ResetWindowColor(); - return true;//!CheckIfDeleted(); - } - - public override void NeatWindow( ) { - - GUI.skin.box.clipping = TextClipping.Overflow; - - GUI.BeginGroup( rect ); - - EditorGUI.BeginChangeCheck(); - DrawLowerPropertyBox(); - bool changedFace = EditorGUI.EndChangeCheck(); - - //GUI.DragWindow(); - - EditorGUI.BeginChangeCheck(); - - Cubemap newCubemap = (Cubemap)EditorGUI.ObjectField( rectInner, cubemapAsset, typeof( Cubemap ), false ); - if(newCubemap != cubemapAsset){ - if(newCubemap == null){ - UndoRecord("unassign cubemap from " + property.nameDisplay); - } else { - UndoRecord("switch cubemap to " + newCubemap.name + " in " + property.nameDisplay); - } - cubemapAsset = newCubemap; - } - - - - if( changedFace || EditorGUI.EndChangeCheck() ) { - RenderToTexture(); - OnUpdateNode(); - } - GUI.EndGroup(); - - } - - public override void DrawLowerPropertyBox() { - PrepareWindowColor(); - previewFace = (CubemapFace)UndoableEnumPopup(lowerRect, previewFace, "switch displayed cubemap face"); - //previewFace = (CubemapFace)EditorGUI.EnumPopup( lowerRect, previewFace ); - ResetWindowColor(); - } - - public override string SerializeSpecialData() { - string s = property.Serialize() + ","; - if( cubemapAsset != null ) - s += "cube:" + SF_Tools.AssetToGUID( cubemapAsset ) + ","; - s += "pvfc:" + (int)previewFace; - return s; - } - - public override void DeserializeSpecialData( string key, string value ) { - property.Deserialize( key, value ); - switch( key ) { - case "cube": - cubemapAsset = (Cubemap)SF_Tools.GUIDToAsset( value, typeof( Cubemap ) ); - break; - case "pvfc": - previewFace = (CubemapFace)int.Parse( value ); - break; - } - if( cubemapAsset != null ) - RenderToTexture(); - - } - - - } -} +using UnityEngine; +using UnityEditor; +using System.Collections; +using System.Reflection; +using System; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Cubemap : SF_Node { + + + public Cubemap cubemapAsset; + Texture2D textureAsset; + + + public CubemapFace previewFace; + + public SFN_Cubemap() { + + } + + + public override void Initialize() { + base.Initialize( "Cubemap" ); + base.UseLowerPropertyBox( true, true ); + base.texture.CompCount = 4; + property = ScriptableObject.CreateInstance().Initialize( this ); + + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"DIR","DIR",ConType.cInput,ValueType.VTv3), + SF_NodeConnector.Create(this,"MIP","MIP",ConType.cInput,ValueType.VTv1), + SF_NodeConnector.Create(this,"RGB","RGB",ConType.cOutput,ValueType.VTv3) .Outputting(OutChannel.RGB), + SF_NodeConnector.Create(this,"R","R",ConType.cOutput, ValueType.VTv1) .WithColor(Color.red) .Outputting(OutChannel.R), + SF_NodeConnector.Create(this,"G","G",ConType.cOutput,ValueType.VTv1) .WithColor(Color.green) .Outputting(OutChannel.G), + SF_NodeConnector.Create(this,"B","B",ConType.cOutput,ValueType.VTv1) .WithColor(Color.blue) .Outputting(OutChannel.B), + SF_NodeConnector.Create(this,"A","A",ConType.cOutput,ValueType.VTv1) .Outputting(OutChannel.A) + }; + } + + + public override bool IsUniformOutput() { + return false; + } + + // TODO: MIP selection + public override string Evaluate( OutChannel channel = OutChannel.All ) { + + + //float3 reflectDirection = reflect( -viewDirection, normalDirection ); + + string DIR = GetInputIsConnected( "DIR" ) ? GetConnectorByStringID( "DIR" ).TryEvaluate() : "viewReflectDirection"; + string func = GetInputIsConnected( "MIP" ) ? "texCUBElod" : "texCUBE"; + + if( GetInputIsConnected( "MIP" ) ) { + DIR = "float4(" + DIR + "," + GetConnectorByStringID( "MIP" ).TryEvaluate() + ")"; + } + + string s = func + "(" + property.GetVariable() + "," + DIR + ")"; + + return s; + } + + // TODO: EditorUtility.SetTemporarilyAllowIndieRenderTexture(true); + + + + + + public void RenderToTexture() { + + if( cubemapAsset == null ) { + Debug.Log( "Cubemap asset missing" ); + return; + } + + Texture2D tex = new Texture2D( cubemapAsset.width, cubemapAsset.height, TextureFormat.ARGB32, false ); + try{ + tex.SetPixels( cubemapAsset.GetPixels( previewFace ) ); + } catch( Exception e ) { + Debug.LogWarning("Cubemap texture preview failed: " + e.ToString()); + } + + tex.Apply(); + + + RenderTexture rt = new RenderTexture( cubemapAsset.width, cubemapAsset.height, 24, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Default ); + rt.Create(); + Graphics.Blit( tex/*cubemapAsset/*GetTextureFaceAsset(CubemapFace.PositiveZ)*/, rt ); + RenderTexture.active = rt; + // The data is now in the RT, in an arbitrary res + // TODO: Sample it with normalized coords down into a 128x128 + // Save it temporarily in a texture + Texture2D temp = new Texture2D( cubemapAsset.width, cubemapAsset.height, TextureFormat.ARGB32, false ); + temp.ReadPixels( new Rect( 0, 0, cubemapAsset.width, cubemapAsset.height ), 0, 0 ); + + RenderTexture.active = null; + rt.Release(); // Remove RT + texture.ReadData( temp ); // Read Data from temp texture + UnityEngine.Object.DestroyImmediate( temp ); // Destroy temp texture + + } + + + public Texture GetTextureFaceAsset( CubemapFace face ) { + if( cubemapAsset == null ) + return null; + + // Reflection of this: + // TextureUtil.GetSourceTexture(Cubemap cubemapRef, CubemapFace face); + Debug.Log( "GET FACE ASSET:" ); + Type textureUtil = Type.GetType( "UnityEditor.TextureUtil,UnityEditor" ); + Debug.Log( "textureUtil = " + textureUtil ); + BindingFlags bfs = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static; + MethodInfo getSourceTexture = textureUtil.GetMethod( "GetSourceTexture", bfs, null, new Type[] { typeof( Cubemap ), typeof( CubemapFace ) }, null ); + Debug.Log( "getSourceTexture = " + getSourceTexture ); + Texture2D tex = (Texture2D)getSourceTexture.Invoke( null, new object[] { cubemapAsset, face } ); + Debug.Log( "tex = " + tex ); + + return tex; + } + + public override void OnDelete() { + cubemapAsset = null; + } + + + public override bool Draw() { + ProcessInput(); + DrawHighlight(); + PrepareWindowColor(); + DrawWindow(); + ResetWindowColor(); + return true;//!CheckIfDeleted(); + } + + public override void NeatWindow( ) { + + GUI.skin.box.clipping = TextClipping.Overflow; + + GUI.BeginGroup( rect ); + + EditorGUI.BeginChangeCheck(); + DrawLowerPropertyBox(); + bool changedFace = EditorGUI.EndChangeCheck(); + + //GUI.DragWindow(); + + EditorGUI.BeginChangeCheck(); + + Cubemap newCubemap = (Cubemap)EditorGUI.ObjectField( rectInner, cubemapAsset, typeof( Cubemap ), false ); + if(newCubemap != cubemapAsset){ + if(newCubemap == null){ + UndoRecord("unassign cubemap from " + property.nameDisplay); + } else { + UndoRecord("switch cubemap to " + newCubemap.name + " in " + property.nameDisplay); + } + cubemapAsset = newCubemap; + } + + + + if( changedFace || EditorGUI.EndChangeCheck() ) { + RenderToTexture(); + OnUpdateNode(); + } + GUI.EndGroup(); + + } + + public override void DrawLowerPropertyBox() { + PrepareWindowColor(); + previewFace = (CubemapFace)UndoableEnumPopup(lowerRect, previewFace, "switch displayed cubemap face"); + //previewFace = (CubemapFace)EditorGUI.EnumPopup( lowerRect, previewFace ); + ResetWindowColor(); + } + + public override string SerializeSpecialData() { + string s = property.Serialize() + ","; + if( cubemapAsset != null ) + s += "cube:" + SF_Tools.AssetToGUID( cubemapAsset ) + ","; + s += "pvfc:" + (int)previewFace; + return s; + } + + public override void DeserializeSpecialData( string key, string value ) { + property.Deserialize( key, value ); + switch( key ) { + case "cube": + cubemapAsset = (Cubemap)SF_Tools.GUIDToAsset( value, typeof( Cubemap ) ); + break; + case "pvfc": + previewFace = (CubemapFace)int.Parse( value ); + break; + } + if( cubemapAsset != null ) + RenderToTexture(); + + } + + + } +} diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Cubemap.cs.meta b/Editor/Code/_Nodes/SFN_Cubemap.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Cubemap.cs.meta rename to Editor/Code/_Nodes/SFN_Cubemap.cs.meta index 3674ea77..3c06ebde --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Cubemap.cs.meta +++ b/Editor/Code/_Nodes/SFN_Cubemap.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: d192fbfcd1bab084691cf8513ba322fd -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: d192fbfcd1bab084691cf8513ba322fd +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_DDX.cs b/Editor/Code/_Nodes/SFN_DDX.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_DDX.cs rename to Editor/Code/_Nodes/SFN_DDX.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_DDX.cs.meta b/Editor/Code/_Nodes/SFN_DDX.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_DDX.cs.meta rename to Editor/Code/_Nodes/SFN_DDX.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_DDXY.cs b/Editor/Code/_Nodes/SFN_DDXY.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_DDXY.cs rename to Editor/Code/_Nodes/SFN_DDXY.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_DDXY.cs.meta b/Editor/Code/_Nodes/SFN_DDXY.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_DDXY.cs.meta rename to Editor/Code/_Nodes/SFN_DDXY.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_DDY.cs b/Editor/Code/_Nodes/SFN_DDY.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_DDY.cs rename to Editor/Code/_Nodes/SFN_DDY.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_DDY.cs.meta b/Editor/Code/_Nodes/SFN_DDY.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_DDY.cs.meta rename to Editor/Code/_Nodes/SFN_DDY.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Depth.cs b/Editor/Code/_Nodes/SFN_Depth.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Depth.cs rename to Editor/Code/_Nodes/SFN_Depth.cs index d05ca2fe..711f1aa4 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Depth.cs +++ b/Editor/Code/_Nodes/SFN_Depth.cs @@ -1,37 +1,37 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Depth : SF_Node { - - - public SFN_Depth() { - - } - - public override void Initialize() { - base.Initialize( "Depth", InitialPreviewRenderMode.BlitSphere ); - base.showColor = true; - base.UseLowerPropertyBox( false ); - base.texture.CompCount = 1; - base.neverDefineVariable = true; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv1) - }; - } - - public override Vector4 EvalCPU() { - return new Color( 0.3f, 0.6f, 0.3f, 1f ); - } - - // (mul( UNITY_MATRIX_V, float4((_WorldSpaceCameraPos.rgb-i.posWorld.rgb),0) ).b - _ProjectionParams.g) - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "partZ"; - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Depth : SF_Node { + + + public SFN_Depth() { + + } + + public override void Initialize() { + base.Initialize( "Depth", InitialPreviewRenderMode.BlitSphere ); + base.showColor = true; + base.UseLowerPropertyBox( false ); + base.texture.CompCount = 1; + base.neverDefineVariable = true; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv1) + }; + } + + public override Vector4 EvalCPU() { + return new Color( 0.3f, 0.6f, 0.3f, 1f ); + } + + // (mul( UNITY_MATRIX_V, float4((_WorldSpaceCameraPos.rgb-i.posWorld.rgb),0) ).b - _ProjectionParams.g) + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "partZ"; + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Depth.cs.meta b/Editor/Code/_Nodes/SFN_Depth.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Depth.cs.meta rename to Editor/Code/_Nodes/SFN_Depth.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_DepthBlend.cs b/Editor/Code/_Nodes/SFN_DepthBlend.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_DepthBlend.cs rename to Editor/Code/_Nodes/SFN_DepthBlend.cs index 1edc1e2c..0d95b6f0 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_DepthBlend.cs +++ b/Editor/Code/_Nodes/SFN_DepthBlend.cs @@ -1,43 +1,43 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_DepthBlend : SF_Node { - - - public SFN_DepthBlend() { - - } - - public override void Initialize() { - base.Initialize( "Depth Blend" ); - base.showColor = true; - base.UseLowerPropertyBox( false ); - base.texture.CompCount = 1; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv1), - SF_NodeConnector.Create(this,"DIST","Dist",ConType.cInput,ValueType.VTv1), - }; - } - - public override Vector4 EvalCPU() { - return new Color( 0.3f, 0.6f, 0.3f, 1f ); - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - - string dist = ""; - - if( GetConnectorByStringID("DIST").IsConnected()){ - dist = "/" + GetInputCon("DIST").TryEvaluate(); - } - - - return "saturate((sceneZ-partZ)" + dist + ")"; - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_DepthBlend : SF_Node { + + + public SFN_DepthBlend() { + + } + + public override void Initialize() { + base.Initialize( "Depth Blend" ); + base.showColor = true; + base.UseLowerPropertyBox( false ); + base.texture.CompCount = 1; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv1), + SF_NodeConnector.Create(this,"DIST","Dist",ConType.cInput,ValueType.VTv1), + }; + } + + public override Vector4 EvalCPU() { + return new Color( 0.3f, 0.6f, 0.3f, 1f ); + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + + string dist = ""; + + if( GetConnectorByStringID("DIST").IsConnected()){ + dist = "/" + GetInputCon("DIST").TryEvaluate(); + } + + + return "saturate((sceneZ-partZ)" + dist + ")"; + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_DepthBlend.cs.meta b/Editor/Code/_Nodes/SFN_DepthBlend.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_DepthBlend.cs.meta rename to Editor/Code/_Nodes/SFN_DepthBlend.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Desaturate.cs b/Editor/Code/_Nodes/SFN_Desaturate.cs old mode 100755 new mode 100644 similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Desaturate.cs rename to Editor/Code/_Nodes/SFN_Desaturate.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Desaturate.cs.meta b/Editor/Code/_Nodes/SFN_Desaturate.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Desaturate.cs.meta rename to Editor/Code/_Nodes/SFN_Desaturate.cs.meta index bdb4d917..153877db --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Desaturate.cs.meta +++ b/Editor/Code/_Nodes/SFN_Desaturate.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 9ebe66cf4036ce547a0fc395d515f199 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 9ebe66cf4036ce547a0fc395d515f199 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Distance.cs b/Editor/Code/_Nodes/SFN_Distance.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Distance.cs rename to Editor/Code/_Nodes/SFN_Distance.cs index c96a2d28..e3f937af --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Distance.cs +++ b/Editor/Code/_Nodes/SFN_Distance.cs @@ -1,52 +1,52 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Distance : SF_Node_Arithmetic { - - public SFN_Distance() { - - } - - public override void Initialize() { - base.Initialize( "Distance" ); - base.PrepareArithmetic( 2, ValueType.VTvPending, ValueType.VTv1 ); - base.shaderGenMode = ShaderGenerationMode.SimpleFunction; - ( base.conGroup as SFNCG_Arithmetic ).LockOutType(); - - } - - public override int GetEvaluatedComponentCount() { - return 1; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "distance(" + GetConnectorByStringID( "A" ).TryEvaluate() + "," + GetConnectorByStringID( "B" ).TryEvaluate() + ")"; - } - - public override Vector4 EvalCPU() { - - float dist = 0f; - switch( Mathf.Max( GetInputData( "A" ).CompCount, GetInputData( "B" ).CompCount ) ) { - case 1: - dist = Mathf.Abs( GetInputData( "A" ).dataUniform[0] - GetInputData( "B" ).dataUniform[0] ); - break; - case 2: - dist = ( ( (Vector2)GetInputData( "A" ).dataUniform ) - ( (Vector2)GetInputData( "B" ).dataUniform ) ).magnitude; - break; - case 3: - dist = ( ( (Vector3)GetInputData( "A" ).dataUniform ) - ( (Vector3)GetInputData( "B" ).dataUniform ) ).magnitude; - break; - default: - dist = ( GetInputData( "A" ).dataUniform - GetInputData( "B" ).dataUniform ).magnitude; - break; - } - - return dist * Vector4.one; - - } - - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Distance : SF_Node_Arithmetic { + + public SFN_Distance() { + + } + + public override void Initialize() { + base.Initialize( "Distance" ); + base.PrepareArithmetic( 2, ValueType.VTvPending, ValueType.VTv1 ); + base.shaderGenMode = ShaderGenerationMode.SimpleFunction; + ( base.conGroup as SFNCG_Arithmetic ).LockOutType(); + + } + + public override int GetEvaluatedComponentCount() { + return 1; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "distance(" + GetConnectorByStringID( "A" ).TryEvaluate() + "," + GetConnectorByStringID( "B" ).TryEvaluate() + ")"; + } + + public override Vector4 EvalCPU() { + + float dist = 0f; + switch( Mathf.Max( GetInputData( "A" ).CompCount, GetInputData( "B" ).CompCount ) ) { + case 1: + dist = Mathf.Abs( GetInputData( "A" ).dataUniform[0] - GetInputData( "B" ).dataUniform[0] ); + break; + case 2: + dist = ( ( (Vector2)GetInputData( "A" ).dataUniform ) - ( (Vector2)GetInputData( "B" ).dataUniform ) ).magnitude; + break; + case 3: + dist = ( ( (Vector3)GetInputData( "A" ).dataUniform ) - ( (Vector3)GetInputData( "B" ).dataUniform ) ).magnitude; + break; + default: + dist = ( GetInputData( "A" ).dataUniform - GetInputData( "B" ).dataUniform ).magnitude; + break; + } + + return dist * Vector4.one; + + } + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Distance.cs.meta b/Editor/Code/_Nodes/SFN_Distance.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Distance.cs.meta rename to Editor/Code/_Nodes/SFN_Distance.cs.meta index eb1c1364..6a0290cc --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Distance.cs.meta +++ b/Editor/Code/_Nodes/SFN_Distance.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 43af2b1572b552e418281a533a9719eb -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 43af2b1572b552e418281a533a9719eb +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Divide.cs b/Editor/Code/_Nodes/SFN_Divide.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Divide.cs rename to Editor/Code/_Nodes/SFN_Divide.cs index 887fcfdb..79eace3b --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Divide.cs +++ b/Editor/Code/_Nodes/SFN_Divide.cs @@ -1,43 +1,43 @@ using UnityEngine; using UnityEditor; using System.Collections; -using System; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Divide : SF_Node_Arithmetic { - - public SFN_Divide() { - - } - - public override void Initialize() { - base.Initialize( "Divide" ); - base.PrepareArithmetic(); - base.shaderGenMode = ShaderGenerationMode.CustomFunction; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "(" + GetConnectorByStringID( "A" ).TryEvaluate() + "/" + GetConnectorByStringID( "B" ).TryEvaluate() + ")"; - } - - public override string[] GetBlitOutputLines() { - return new string[] { "_a/_b" }; - } - - public override float EvalCPU( int c ) { - float a = GetInputData( "A", c ); - float b = GetInputData( "B", c ); - - if( b == 0f ) { - if( a == 0f ) - return 1f; - return ( a > 0 ? float.MaxValue : float.MinValue ); - } - return a / b; - } - - - } +using System; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Divide : SF_Node_Arithmetic { + + public SFN_Divide() { + + } + + public override void Initialize() { + base.Initialize( "Divide" ); + base.PrepareArithmetic(); + base.shaderGenMode = ShaderGenerationMode.CustomFunction; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "(" + GetConnectorByStringID( "A" ).TryEvaluate() + "/" + GetConnectorByStringID( "B" ).TryEvaluate() + ")"; + } + + public override string[] GetBlitOutputLines() { + return new string[] { "_a/_b" }; + } + + public override float EvalCPU( int c ) { + float a = GetInputData( "A", c ); + float b = GetInputData( "B", c ); + + if( b == 0f ) { + if( a == 0f ) + return 1f; + return ( a > 0 ? float.MaxValue : float.MinValue ); + } + return a / b; + } + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Divide.cs.meta b/Editor/Code/_Nodes/SFN_Divide.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Divide.cs.meta rename to Editor/Code/_Nodes/SFN_Divide.cs.meta index 5a69ffea..57879bd4 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Divide.cs.meta +++ b/Editor/Code/_Nodes/SFN_Divide.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: b453280af8376424fa6c495f5b4d5ab1 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: b453280af8376424fa6c495f5b4d5ab1 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Dot.cs b/Editor/Code/_Nodes/SFN_Dot.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Dot.cs rename to Editor/Code/_Nodes/SFN_Dot.cs index 084674e8..fea8cb65 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Dot.cs +++ b/Editor/Code/_Nodes/SFN_Dot.cs @@ -1,137 +1,137 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -using System; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Dot : SF_Node_Arithmetic { - - - public enum DotType { Standard, Positive, Negative, Abs, Normalized }; - public DotType dotType = DotType.Standard; - - public SFN_Dot() { - - } - - public override void Initialize() { - base.Initialize( "Dot" ); - base.texture.CompCount = 1; - base.UseLowerPropertyBox( true, true ); - base.PrepareArithmetic(2, ValueType.VTvPending, ValueType.VTv1); - base.shaderGenMode = ShaderGenerationMode.Modal; - ( base.conGroup as SFNCG_Arithmetic ).LockOutType(); - } - - public override int GetEvaluatedComponentCount() { - return 1; - } - - public override string[] GetModalModes() { - return new string[]{ - "STD", - "POS", - "NEG", - "ABS", - "NRM" - }; - } - - public override string GetCurrentModalMode() { - if( dotType == DotType.Positive ) - return "POS"; - if( dotType == DotType.Negative ) - return "NEG"; - if( dotType == DotType.Abs ) - return "ABS"; - if( dotType == DotType.Normalized ) - return "NRM"; - //if( dotType == DotType.Standard ) - return "STD"; - } - - public override string[] GetBlitOutputLines( string mode ) { - string dotStr = "dot(_a, _b)"; - switch( mode ) { - case "POS": - dotStr = "max(0," + dotStr + ")"; - break; - case "NEG": - dotStr = "min(0," + dotStr + ")"; - break; - case "ABS": - dotStr = "abs(" + dotStr + ")"; - break; - case "NRM": - dotStr = "0.5*" + dotStr + "+0.5"; - break; - } - return new string[]{dotStr}; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - - string dotStr = "dot(" + GetConnectorByStringID( "A" ).TryEvaluate() + "," + GetConnectorByStringID( "B" ).TryEvaluate() + ")"; - switch( dotType ) { - case DotType.Positive: - return "max(0," + dotStr + ")"; - case DotType.Negative: - return "min(0," + dotStr + ")"; - case DotType.Abs: - return "abs(" + dotStr + ")"; - case DotType.Normalized: - return "0.5*" + dotStr + "+0.5"; - } - return dotStr; - } - - public override Vector4 EvalCPU() { - - - int cc = Mathf.Max(GetInputCon("A").GetCompCount(), GetInputCon("B").GetCompCount()); - - float dot = SF_Tools.Dot( GetInputData( "A" ).dataUniform, GetInputData( "B" ).dataUniform, cc ); - - switch( dotType ) { - case DotType.Positive: - dot = Mathf.Max(0f,dot); - break; - case DotType.Negative: - dot = Mathf.Min(0f,dot); - break; - case DotType.Abs: - dot = Mathf.Abs(dot); - break; - case DotType.Normalized: - dot = 0.5f*dot+0.5f; - break; - } - - return dot * Vector4.one; - } - - public override void DrawLowerPropertyBox() { - EditorGUI.BeginChangeCheck(); - dotType = (DotType)UndoableEnumPopup( lowerRect, dotType, "dot product type" ); - if( EditorGUI.EndChangeCheck() ) - OnUpdateNode(); - } - - public override string SerializeSpecialData() { - return "dt:" + (int)dotType; - } - - public override void DeserializeSpecialData( string key, string value ) { - switch( key ) { - case "dt": - dotType = (DotType)int.Parse( value ); - break; - } - } - - - - } +using UnityEngine; +using UnityEditor; +using System.Collections; +using System; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Dot : SF_Node_Arithmetic { + + + public enum DotType { Standard, Positive, Negative, Abs, Normalized }; + public DotType dotType = DotType.Standard; + + public SFN_Dot() { + + } + + public override void Initialize() { + base.Initialize( "Dot" ); + base.texture.CompCount = 1; + base.UseLowerPropertyBox( true, true ); + base.PrepareArithmetic(2, ValueType.VTvPending, ValueType.VTv1); + base.shaderGenMode = ShaderGenerationMode.Modal; + ( base.conGroup as SFNCG_Arithmetic ).LockOutType(); + } + + public override int GetEvaluatedComponentCount() { + return 1; + } + + public override string[] GetModalModes() { + return new string[]{ + "STD", + "POS", + "NEG", + "ABS", + "NRM" + }; + } + + public override string GetCurrentModalMode() { + if( dotType == DotType.Positive ) + return "POS"; + if( dotType == DotType.Negative ) + return "NEG"; + if( dotType == DotType.Abs ) + return "ABS"; + if( dotType == DotType.Normalized ) + return "NRM"; + //if( dotType == DotType.Standard ) + return "STD"; + } + + public override string[] GetBlitOutputLines( string mode ) { + string dotStr = "dot(_a, _b)"; + switch( mode ) { + case "POS": + dotStr = "max(0," + dotStr + ")"; + break; + case "NEG": + dotStr = "min(0," + dotStr + ")"; + break; + case "ABS": + dotStr = "abs(" + dotStr + ")"; + break; + case "NRM": + dotStr = "0.5*" + dotStr + "+0.5"; + break; + } + return new string[]{dotStr}; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + + string dotStr = "dot(" + GetConnectorByStringID( "A" ).TryEvaluate() + "," + GetConnectorByStringID( "B" ).TryEvaluate() + ")"; + switch( dotType ) { + case DotType.Positive: + return "max(0," + dotStr + ")"; + case DotType.Negative: + return "min(0," + dotStr + ")"; + case DotType.Abs: + return "abs(" + dotStr + ")"; + case DotType.Normalized: + return "0.5*" + dotStr + "+0.5"; + } + return dotStr; + } + + public override Vector4 EvalCPU() { + + + int cc = Mathf.Max(GetInputCon("A").GetCompCount(), GetInputCon("B").GetCompCount()); + + float dot = SF_Tools.Dot( GetInputData( "A" ).dataUniform, GetInputData( "B" ).dataUniform, cc ); + + switch( dotType ) { + case DotType.Positive: + dot = Mathf.Max(0f,dot); + break; + case DotType.Negative: + dot = Mathf.Min(0f,dot); + break; + case DotType.Abs: + dot = Mathf.Abs(dot); + break; + case DotType.Normalized: + dot = 0.5f*dot+0.5f; + break; + } + + return dot * Vector4.one; + } + + public override void DrawLowerPropertyBox() { + EditorGUI.BeginChangeCheck(); + dotType = (DotType)UndoableEnumPopup( lowerRect, dotType, "dot product type" ); + if( EditorGUI.EndChangeCheck() ) + OnUpdateNode(); + } + + public override string SerializeSpecialData() { + return "dt:" + (int)dotType; + } + + public override void DeserializeSpecialData( string key, string value ) { + switch( key ) { + case "dt": + dotType = (DotType)int.Parse( value ); + break; + } + } + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Dot.cs.meta b/Editor/Code/_Nodes/SFN_Dot.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Dot.cs.meta rename to Editor/Code/_Nodes/SFN_Dot.cs.meta index fc43bb34..59ebba5c --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Dot.cs.meta +++ b/Editor/Code/_Nodes/SFN_Dot.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 3d9849bf37434cb4da9729daf6ad3333 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 3d9849bf37434cb4da9729daf6ad3333 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_E.cs b/Editor/Code/_Nodes/SFN_E.cs old mode 100755 new mode 100644 similarity index 94% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_E.cs rename to Editor/Code/_Nodes/SFN_E.cs index 3e29e910..c9c43dc1 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_E.cs +++ b/Editor/Code/_Nodes/SFN_E.cs @@ -1,20 +1,20 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_E : SFN_Node_Constant { - - public SFN_E() { - } - - public override void Initialize() { - base.Initialize( "e" ); - base.SearchName = "EulersConstant"; - base.PrepareConstant( "const_e", "2.718281828459" ); - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_E : SFN_Node_Constant { + + public SFN_E() { + } + + public override void Initialize() { + base.Initialize( "e" ); + base.SearchName = "EulersConstant"; + base.PrepareConstant( "const_e", "2.718281828459" ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_E.cs.meta b/Editor/Code/_Nodes/SFN_E.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_E.cs.meta rename to Editor/Code/_Nodes/SFN_E.cs.meta index 04976c08..92e4ca9c --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_E.cs.meta +++ b/Editor/Code/_Nodes/SFN_E.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 5e6843ca855bad643a35c23873e0a2ab -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 5e6843ca855bad643a35c23873e0a2ab +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Exp.cs b/Editor/Code/_Nodes/SFN_Exp.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Exp.cs rename to Editor/Code/_Nodes/SFN_Exp.cs index 0fb6f2f7..05514b57 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Exp.cs +++ b/Editor/Code/_Nodes/SFN_Exp.cs @@ -1,93 +1,93 @@ using UnityEngine; using UnityEditor; using System.Collections; -using System; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Exp : SF_Node_Arithmetic { - - - public enum ExpType { Exp, Exp2 }; - public ExpType expType = ExpType.Exp; - - public SFN_Exp() { - - } - - public override void Initialize() { - base.Initialize( "Exp" ); - base.UseLowerPropertyBox( true, true ); - base.PrepareArithmetic( 1, ValueType.VTvPending, ValueType.VTvPending ); - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - - string inner = GetConnectorByStringID( "IN" ).TryEvaluate(); - switch( expType ) { - case ExpType.Exp: - return "exp(" + inner + ")"; - case ExpType.Exp2: - return "exp2(" + inner + ")"; - } - - return inner; - } - - public override string[] GetModalModes() { - return new string[]{ - "EXP", - "EXP2" - }; - } - - public override string GetCurrentModalMode() { - if( expType == ExpType.Exp2) - return "EXP2"; - return "EXP"; - } - - public override string[] GetBlitOutputLines( string mode ) { - return new string[]{ mode.ToLower() + "(_in)" }; - } - - public override float EvalCPU( int c ) { - - float inpDt = GetInputData( "IN", c ); - - switch( expType ) { - case ExpType.Exp: - inpDt = Mathf.Pow( 2.718281828459f, inpDt ); - break; - case ExpType.Exp2: - inpDt = Mathf.Pow( 2f, inpDt ); - break; - } - - return inpDt; - } - - public override void DrawLowerPropertyBox() { - EditorGUI.BeginChangeCheck(); - expType = (ExpType)EditorGUI.EnumPopup( lowerRect, expType ); - if( EditorGUI.EndChangeCheck() ) - OnUpdateNode(); - } - - public override string SerializeSpecialData() { - return "et:" + (int)expType; - } - - public override void DeserializeSpecialData( string key, string value ) { - switch( key ) { - case "et": - expType = (ExpType)int.Parse( value ); - break; - } - } - - - - } +using System; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Exp : SF_Node_Arithmetic { + + + public enum ExpType { Exp, Exp2 }; + public ExpType expType = ExpType.Exp; + + public SFN_Exp() { + + } + + public override void Initialize() { + base.Initialize( "Exp" ); + base.UseLowerPropertyBox( true, true ); + base.PrepareArithmetic( 1, ValueType.VTvPending, ValueType.VTvPending ); + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + + string inner = GetConnectorByStringID( "IN" ).TryEvaluate(); + switch( expType ) { + case ExpType.Exp: + return "exp(" + inner + ")"; + case ExpType.Exp2: + return "exp2(" + inner + ")"; + } + + return inner; + } + + public override string[] GetModalModes() { + return new string[]{ + "EXP", + "EXP2" + }; + } + + public override string GetCurrentModalMode() { + if( expType == ExpType.Exp2) + return "EXP2"; + return "EXP"; + } + + public override string[] GetBlitOutputLines( string mode ) { + return new string[]{ mode.ToLower() + "(_in)" }; + } + + public override float EvalCPU( int c ) { + + float inpDt = GetInputData( "IN", c ); + + switch( expType ) { + case ExpType.Exp: + inpDt = Mathf.Pow( 2.718281828459f, inpDt ); + break; + case ExpType.Exp2: + inpDt = Mathf.Pow( 2f, inpDt ); + break; + } + + return inpDt; + } + + public override void DrawLowerPropertyBox() { + EditorGUI.BeginChangeCheck(); + expType = (ExpType)EditorGUI.EnumPopup( lowerRect, expType ); + if( EditorGUI.EndChangeCheck() ) + OnUpdateNode(); + } + + public override string SerializeSpecialData() { + return "et:" + (int)expType; + } + + public override void DeserializeSpecialData( string key, string value ) { + switch( key ) { + case "et": + expType = (ExpType)int.Parse( value ); + break; + } + } + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Exp.cs.meta b/Editor/Code/_Nodes/SFN_Exp.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Exp.cs.meta rename to Editor/Code/_Nodes/SFN_Exp.cs.meta index 139a4f00..7aa04eee --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Exp.cs.meta +++ b/Editor/Code/_Nodes/SFN_Exp.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 41a3320367346d84b9d27af7538971a8 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 41a3320367346d84b9d27af7538971a8 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_FaceSign.cs b/Editor/Code/_Nodes/SFN_FaceSign.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_FaceSign.cs rename to Editor/Code/_Nodes/SFN_FaceSign.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_FaceSign.cs.meta b/Editor/Code/_Nodes/SFN_FaceSign.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_FaceSign.cs.meta rename to Editor/Code/_Nodes/SFN_FaceSign.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Final.cs b/Editor/Code/_Nodes/SFN_Final.cs old mode 100755 new mode 100644 similarity index 98% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Final.cs rename to Editor/Code/_Nodes/SFN_Final.cs index 06f17db4..4fc84f2b --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Final.cs +++ b/Editor/Code/_Nodes/SFN_Final.cs @@ -1,100 +1,100 @@ -using UnityEngine; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Final : SF_Node { - - - - - public SF_NodeConnector - diffuse - , specular - , gloss - , normal - , emissive - , alpha - , alphaClip - , diffusePower - , refraction - , transmission - , lightWrap - , ambientDiffuse - , ambientSpecular - , diffuseOcclusion - , specularOcclusion - , customLighting - , outlineWidth - , outlineColor - //, anisotropicDirection - , vertexOffset - , displacement - , tessellation - ; - - public SFN_Final() { - - } - - public SFN_Final Initialize( SF_Editor editor ) { - base.Initialize( "Main" ); - this.editor = editor; - base.showColor = true; - AssignID(); - base.nodeName = "Main"; - Vector2 pos = new Vector2( 32768, 32768 ); - base.rect = new Rect( pos.x - NODE_WIDTH / 2, pos.y - NODE_HEIGHT / 2, NODE_WIDTH * 1.7f, 400 + 20f * 2 ); - - this.connectors = new SF_NodeConnector[]{ - - // SURFACE - diffuse = SF_NodeConnector.Create(this,"diff", "Diffuse", ConType.cInput, ValueType.VTvPending ,true,"float3(0,0,0)" ).Skip(PassType.ShadCast, PassType.Outline).TypecastTo(3), - diffusePower = SF_NodeConnector.Create(this,"diffpow", "Diffuse Power", ConType.cInput, ValueType.VTvPending ,true,"1" ).Skip(PassType.Meta, PassType.ShadCast, PassType.Outline).DisplayLockIfDeferredPrePassIsOn(), - specular = SF_NodeConnector.Create(this,"spec", "Specular", ConType.cInput, ValueType.VTvPending ,true ).Skip(PassType.ShadCast, PassType.Outline).TypecastTo(3), - gloss = SF_NodeConnector.Create(this,"gloss", "Gloss", ConType.cInput, ValueType.VTv1 ,true,"0.5" ).Skip(PassType.ShadCast, PassType.Outline), - normal = SF_NodeConnector.Create(this,"normal", "Normal", ConType.cInput, ValueType.VTv3 ,true ).Skip(PassType.Meta, PassType.ShadCast, PassType.Outline), - emissive = SF_NodeConnector.Create(this,"emission", "Emission", ConType.cInput, ValueType.VTvPending ,true,"float3(0,0,0)" ).Skip(PassType.ShadCast, PassType.Outline).TypecastTo(3), - transmission = SF_NodeConnector.Create(this,"transm", "Transmission", ConType.cInput, ValueType.VTvPending ,true ).Skip(PassType.Meta, PassType.ShadCast, PassType.Outline).TypecastTo(3).DisplayLockIfDeferredPrePassIsOn(), - lightWrap = SF_NodeConnector.Create(this,"lwrap", "Light Wrapping", ConType.cInput, ValueType.VTvPending ,true ).Skip(PassType.Meta, PassType.ShadCast, PassType.Outline).TypecastTo(3).DisplayLockIfDeferredPrePassIsOn(), - - // LIGHTING - ambientDiffuse = SF_NodeConnector.Create(this,"amdfl", "Diffuse Ambient Light", ConType.cInput, ValueType.VTvPending ,true,"float3(0,0,0)" ).Skip(PassType.Meta, PassType.ShadCast, PassType.FwdAdd, PassType.Outline).TypecastTo(3), - ambientSpecular = SF_NodeConnector.Create(this,"amspl", "Specular Ambient Light", ConType.cInput, ValueType.VTvPending ,true,"float3(0,0,0)" ).Skip(PassType.Meta, PassType.ShadCast, PassType.FwdAdd, PassType.Outline).TypecastTo(3), - diffuseOcclusion = SF_NodeConnector.Create(this,"difocc", "Diffuse Ambient Occlusion", ConType.cInput, ValueType.VTv1 ,true,"1" ).Skip(PassType.Meta, PassType.ShadCast, PassType.FwdAdd, PassType.Outline).TypecastTo(1), - specularOcclusion = SF_NodeConnector.Create(this,"spcocc", "Specular Ambient Occlusion", ConType.cInput, ValueType.VTv1 ,true,"1" ).Skip(PassType.Meta, PassType.ShadCast, PassType.FwdAdd, PassType.Outline).TypecastTo(1), - customLighting = SF_NodeConnector.Create(this,"custl", "Custom Lighting", ConType.cInput, ValueType.VTvPending ,true ).Skip(PassType.Meta, PassType.ShadCast, PassType.Outline).TypecastTo(3).DisplayLockIfDeferredPrePassIsOn(), - - // TRANSPARENCY - alpha = SF_NodeConnector.Create(this,"alpha", "Opacity", ConType.cInput, ValueType.VTv1 ,true,"1" ).Skip(PassType.Meta, PassType.ShadCast, PassType.Outline).DisplayLockIfDeferredPrePassIsOn(), - alphaClip = SF_NodeConnector.Create(this,"clip", "Opacity Clip", ConType.cInput, ValueType.VTv1 ,true ).Skip(PassType.Meta), - refraction = SF_NodeConnector.Create(this,"refract", "Refraction", ConType.cInput, ValueType.VTv2 ,true ).Skip(PassType.Meta, PassType.ShadCast, PassType.Outline).TypecastTo(2).DisplayLockIfDeferredPrePassIsOn(), - - // DEFORMERS - outlineWidth = SF_NodeConnector.Create(this,"olwid", "Outline Width", ConType.cInput, ValueType.VTv1 ,true ).Skip(PassType.Meta, PassType.ShadCast, PassType.FwdAdd, PassType.FwdBase).DisplayLockIfDeferredPrePassIsOn(), - outlineColor = SF_NodeConnector.Create(this,"olcol", "Outline Color", ConType.cInput, ValueType.VTvPending ,true,"float3(0,0,0)" ).Skip(PassType.Meta, PassType.ShadCast, PassType.FwdAdd, PassType.FwdBase).TypecastTo(3).DisplayLockIfDeferredPrePassIsOn(), - vertexOffset = SF_NodeConnector.Create(this,"voffset", "Vertex Offset", ConType.cInput, ValueType.VTvPending ,true ).ForceBlock(ShaderProgram.Vert).TypecastTo(3), - displacement = SF_NodeConnector.Create(this,"disp", "Displacement", ConType.cInput, ValueType.VTv3 ,true ).ForceBlock(ShaderProgram.Vert).TypecastTo(3), - tessellation = SF_NodeConnector.Create(this,"tess", "Tessellation", ConType.cInput, ValueType.VTv1 ,true ).ForceBlock(ShaderProgram.Vert) - }; - - //distortion.enableState = EnableState.Disabled; - //customLighting.enableState = EnableState.Disabled; - //cusomLightingDiffuse.enableState = EnableState.Disabled; - //anisotropicDirection.enableState = EnableState.Disabled; - - - return this; - - } - - public override void OnUpdateNode( NodeUpdateType updType, bool cascade = true ) { - if( cascade ) - editor.OnShaderModified( updType ); - } - - - - } +using UnityEngine; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Final : SF_Node { + + + + + public SF_NodeConnector + diffuse + , specular + , gloss + , normal + , emissive + , alpha + , alphaClip + , diffusePower + , refraction + , transmission + , lightWrap + , ambientDiffuse + , ambientSpecular + , diffuseOcclusion + , specularOcclusion + , customLighting + , outlineWidth + , outlineColor + //, anisotropicDirection + , vertexOffset + , displacement + , tessellation + ; + + public SFN_Final() { + + } + + public SFN_Final Initialize( SF_Editor editor ) { + base.Initialize( "Main" ); + this.editor = editor; + base.showColor = true; + AssignID(); + base.nodeName = "Main"; + Vector2 pos = new Vector2( 32768, 32768 ); + base.rect = new Rect( pos.x - NODE_WIDTH / 2, pos.y - NODE_HEIGHT / 2, NODE_WIDTH * 1.7f, 400 + 20f * 2 ); + + this.connectors = new SF_NodeConnector[]{ + + // SURFACE + diffuse = SF_NodeConnector.Create(this,"diff", "Diffuse", ConType.cInput, ValueType.VTvPending ,true,"float3(0,0,0)" ).Skip(PassType.ShadCast, PassType.Outline).TypecastTo(3), + diffusePower = SF_NodeConnector.Create(this,"diffpow", "Diffuse Power", ConType.cInput, ValueType.VTvPending ,true,"1" ).Skip(PassType.Meta, PassType.ShadCast, PassType.Outline).DisplayLockIfDeferredPrePassIsOn(), + specular = SF_NodeConnector.Create(this,"spec", "Specular", ConType.cInput, ValueType.VTvPending ,true ).Skip(PassType.ShadCast, PassType.Outline).TypecastTo(3), + gloss = SF_NodeConnector.Create(this,"gloss", "Gloss", ConType.cInput, ValueType.VTv1 ,true,"0.5" ).Skip(PassType.ShadCast, PassType.Outline), + normal = SF_NodeConnector.Create(this,"normal", "Normal", ConType.cInput, ValueType.VTv3 ,true ).Skip(PassType.Meta, PassType.ShadCast, PassType.Outline), + emissive = SF_NodeConnector.Create(this,"emission", "Emission", ConType.cInput, ValueType.VTvPending ,true,"float3(0,0,0)" ).Skip(PassType.ShadCast, PassType.Outline).TypecastTo(3), + transmission = SF_NodeConnector.Create(this,"transm", "Transmission", ConType.cInput, ValueType.VTvPending ,true ).Skip(PassType.Meta, PassType.ShadCast, PassType.Outline).TypecastTo(3).DisplayLockIfDeferredPrePassIsOn(), + lightWrap = SF_NodeConnector.Create(this,"lwrap", "Light Wrapping", ConType.cInput, ValueType.VTvPending ,true ).Skip(PassType.Meta, PassType.ShadCast, PassType.Outline).TypecastTo(3).DisplayLockIfDeferredPrePassIsOn(), + + // LIGHTING + ambientDiffuse = SF_NodeConnector.Create(this,"amdfl", "Diffuse Ambient Light", ConType.cInput, ValueType.VTvPending ,true,"float3(0,0,0)" ).Skip(PassType.Meta, PassType.ShadCast, PassType.FwdAdd, PassType.Outline).TypecastTo(3), + ambientSpecular = SF_NodeConnector.Create(this,"amspl", "Specular Ambient Light", ConType.cInput, ValueType.VTvPending ,true,"float3(0,0,0)" ).Skip(PassType.Meta, PassType.ShadCast, PassType.FwdAdd, PassType.Outline).TypecastTo(3), + diffuseOcclusion = SF_NodeConnector.Create(this,"difocc", "Diffuse Ambient Occlusion", ConType.cInput, ValueType.VTv1 ,true,"1" ).Skip(PassType.Meta, PassType.ShadCast, PassType.FwdAdd, PassType.Outline).TypecastTo(1), + specularOcclusion = SF_NodeConnector.Create(this,"spcocc", "Specular Ambient Occlusion", ConType.cInput, ValueType.VTv1 ,true,"1" ).Skip(PassType.Meta, PassType.ShadCast, PassType.FwdAdd, PassType.Outline).TypecastTo(1), + customLighting = SF_NodeConnector.Create(this,"custl", "Custom Lighting", ConType.cInput, ValueType.VTvPending ,true ).Skip(PassType.Meta, PassType.ShadCast, PassType.Outline).TypecastTo(3).DisplayLockIfDeferredPrePassIsOn(), + + // TRANSPARENCY + alpha = SF_NodeConnector.Create(this,"alpha", "Opacity", ConType.cInput, ValueType.VTv1 ,true,"1" ).Skip(PassType.Meta, PassType.ShadCast, PassType.Outline).DisplayLockIfDeferredPrePassIsOn(), + alphaClip = SF_NodeConnector.Create(this,"clip", "Opacity Clip", ConType.cInput, ValueType.VTv1 ,true ).Skip(PassType.Meta), + refraction = SF_NodeConnector.Create(this,"refract", "Refraction", ConType.cInput, ValueType.VTv2 ,true ).Skip(PassType.Meta, PassType.ShadCast, PassType.Outline).TypecastTo(2).DisplayLockIfDeferredPrePassIsOn(), + + // DEFORMERS + outlineWidth = SF_NodeConnector.Create(this,"olwid", "Outline Width", ConType.cInput, ValueType.VTv1 ,true ).Skip(PassType.Meta, PassType.ShadCast, PassType.FwdAdd, PassType.FwdBase).DisplayLockIfDeferredPrePassIsOn(), + outlineColor = SF_NodeConnector.Create(this,"olcol", "Outline Color", ConType.cInput, ValueType.VTvPending ,true,"float3(0,0,0)" ).Skip(PassType.Meta, PassType.ShadCast, PassType.FwdAdd, PassType.FwdBase).TypecastTo(3).DisplayLockIfDeferredPrePassIsOn(), + vertexOffset = SF_NodeConnector.Create(this,"voffset", "Vertex Offset", ConType.cInput, ValueType.VTvPending ,true ).ForceBlock(ShaderProgram.Vert).TypecastTo(3), + displacement = SF_NodeConnector.Create(this,"disp", "Displacement", ConType.cInput, ValueType.VTv3 ,true ).ForceBlock(ShaderProgram.Vert).TypecastTo(3), + tessellation = SF_NodeConnector.Create(this,"tess", "Tessellation", ConType.cInput, ValueType.VTv1 ,true ).ForceBlock(ShaderProgram.Vert) + }; + + //distortion.enableState = EnableState.Disabled; + //customLighting.enableState = EnableState.Disabled; + //cusomLightingDiffuse.enableState = EnableState.Disabled; + //anisotropicDirection.enableState = EnableState.Disabled; + + + return this; + + } + + public override void OnUpdateNode( NodeUpdateType updType, bool cascade = true ) { + if( cascade ) + editor.OnShaderModified( updType ); + } + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Final.cs.meta b/Editor/Code/_Nodes/SFN_Final.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Final.cs.meta rename to Editor/Code/_Nodes/SFN_Final.cs.meta index bcc973cc..0f86f909 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Final.cs.meta +++ b/Editor/Code/_Nodes/SFN_Final.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 7082105362975344ca2b9df696cebfc0 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 7082105362975344ca2b9df696cebfc0 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Floor.cs b/Editor/Code/_Nodes/SFN_Floor.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Floor.cs rename to Editor/Code/_Nodes/SFN_Floor.cs index c177e4fa..a6c97e30 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Floor.cs +++ b/Editor/Code/_Nodes/SFN_Floor.cs @@ -1,26 +1,26 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Floor : SF_Node_Arithmetic { - - public SFN_Floor() { - } - - public override void Initialize() { - base.Initialize( "Floor" ); - base.PrepareArithmetic( 1 ); - base.shaderGenMode = ShaderGenerationMode.SimpleFunction; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "floor(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; - } - - public override float EvalCPU( int c ) { - return Mathf.Floor( GetInputData( "IN", c ) ); - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Floor : SF_Node_Arithmetic { + + public SFN_Floor() { + } + + public override void Initialize() { + base.Initialize( "Floor" ); + base.PrepareArithmetic( 1 ); + base.shaderGenMode = ShaderGenerationMode.SimpleFunction; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "floor(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; + } + + public override float EvalCPU( int c ) { + return Mathf.Floor( GetInputData( "IN", c ) ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Floor.cs.meta b/Editor/Code/_Nodes/SFN_Floor.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Floor.cs.meta rename to Editor/Code/_Nodes/SFN_Floor.cs.meta index d8f77b58..5574ffcc --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Floor.cs.meta +++ b/Editor/Code/_Nodes/SFN_Floor.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 865a1444020b4c04dbe91ab9abe7d68d -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 865a1444020b4c04dbe91ab9abe7d68d +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Fmod.cs b/Editor/Code/_Nodes/SFN_Fmod.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Fmod.cs rename to Editor/Code/_Nodes/SFN_Fmod.cs index 17813c56..d736f90f --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Fmod.cs +++ b/Editor/Code/_Nodes/SFN_Fmod.cs @@ -1,29 +1,29 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Fmod : SF_Node_Arithmetic { - - public SFN_Fmod() { - } - - public override void Initialize() { - base.Initialize( "Fmod" ); - base.PrepareArithmetic( 2 ); - base.shaderGenMode = ShaderGenerationMode.SimpleFunction; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "fmod(" + GetConnectorByStringID( "A" ).TryEvaluate() + "," + GetConnectorByStringID( "B" ).TryEvaluate() + ")"; - } - - public override float EvalCPU( int c ) { - float a = GetInputData( "A", c ); - float b = GetInputData( "B", c ); - float r = SF_Tools.Frac(Mathf.Abs(a/b))*Mathf.Abs(b); - return ( a < 0 ) ? -r : r; - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Fmod : SF_Node_Arithmetic { + + public SFN_Fmod() { + } + + public override void Initialize() { + base.Initialize( "Fmod" ); + base.PrepareArithmetic( 2 ); + base.shaderGenMode = ShaderGenerationMode.SimpleFunction; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "fmod(" + GetConnectorByStringID( "A" ).TryEvaluate() + "," + GetConnectorByStringID( "B" ).TryEvaluate() + ")"; + } + + public override float EvalCPU( int c ) { + float a = GetInputData( "A", c ); + float b = GetInputData( "B", c ); + float r = SF_Tools.Frac(Mathf.Abs(a/b))*Mathf.Abs(b); + return ( a < 0 ) ? -r : r; + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Fmod.cs.meta b/Editor/Code/_Nodes/SFN_Fmod.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Fmod.cs.meta rename to Editor/Code/_Nodes/SFN_Fmod.cs.meta index 58d537c9..62678fd8 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Fmod.cs.meta +++ b/Editor/Code/_Nodes/SFN_Fmod.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: a31abae5d5101c843bb077f6bc0d59b4 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: a31abae5d5101c843bb077f6bc0d59b4 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_FogColor.cs b/Editor/Code/_Nodes/SFN_FogColor.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_FogColor.cs rename to Editor/Code/_Nodes/SFN_FogColor.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_FogColor.cs.meta b/Editor/Code/_Nodes/SFN_FogColor.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_FogColor.cs.meta rename to Editor/Code/_Nodes/SFN_FogColor.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Frac.cs b/Editor/Code/_Nodes/SFN_Frac.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Frac.cs rename to Editor/Code/_Nodes/SFN_Frac.cs index 6e9f2bdb..a270a686 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Frac.cs +++ b/Editor/Code/_Nodes/SFN_Frac.cs @@ -1,26 +1,26 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Frac : SF_Node_Arithmetic { - - public SFN_Frac() { - } - - public override void Initialize() { - base.Initialize( "Frac" ); - base.PrepareArithmetic( 1 ); - base.shaderGenMode = ShaderGenerationMode.SimpleFunction; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "frac(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; - } - - public override float EvalCPU( int c ) { - return SF_Tools.Frac( GetInputData( "IN", c ) ); - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Frac : SF_Node_Arithmetic { + + public SFN_Frac() { + } + + public override void Initialize() { + base.Initialize( "Frac" ); + base.PrepareArithmetic( 1 ); + base.shaderGenMode = ShaderGenerationMode.SimpleFunction; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "frac(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; + } + + public override float EvalCPU( int c ) { + return SF_Tools.Frac( GetInputData( "IN", c ) ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Frac.cs.meta b/Editor/Code/_Nodes/SFN_Frac.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Frac.cs.meta rename to Editor/Code/_Nodes/SFN_Frac.cs.meta index 67af7217..2a980ca8 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Frac.cs.meta +++ b/Editor/Code/_Nodes/SFN_Frac.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: a625d40360731bd4fb8f5a2d020d3d11 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: a625d40360731bd4fb8f5a2d020d3d11 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_FragmentPosition.cs b/Editor/Code/_Nodes/SFN_FragmentPosition.cs old mode 100755 new mode 100644 similarity index 97% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_FragmentPosition.cs rename to Editor/Code/_Nodes/SFN_FragmentPosition.cs index 4ee7aa5e..d4e60c7f --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_FragmentPosition.cs +++ b/Editor/Code/_Nodes/SFN_FragmentPosition.cs @@ -1,49 +1,49 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_FragmentPosition : SF_Node { - - - public SFN_FragmentPosition() { - - } - - public override void Initialize() { - base.Initialize( "World Pos.", InitialPreviewRenderMode.BlitSphere ); - base.showColor = true; - base.UseLowerPropertyBox( false ); - base.texture.CompCount = 4; - base.neverDefineVariable = true; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"XYZ","XYZ",ConType.cOutput,ValueType.VTv3,false).Outputting(OutChannel.RGB), - SF_NodeConnector.Create(this,"X","X",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.R).WithColor(Color.red), - SF_NodeConnector.Create(this,"Y","Y",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.G).WithColor(Color.green), - SF_NodeConnector.Create(this,"Z","Z",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.B).WithColor(Color.blue), - SF_NodeConnector.Create(this,"W","W",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.A) - }; - } - - public override Vector4 EvalCPU() { - return new Color( 0f, 0.7071068f, 0.7071068f, 0f ); - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - if( SF_Evaluator.inFrag ) - return "i.posWorld"; - else if( SF_Evaluator.inVert ) - return "mul(_Object2World, v.vertex)"; - else if( SF_Evaluator.inTess ) - return "mul(_Object2World, v.vertex)"; - else{ - Debug.Log( "Evaluated into unknown shader program" ); - return null; - } - - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_FragmentPosition : SF_Node { + + + public SFN_FragmentPosition() { + + } + + public override void Initialize() { + base.Initialize( "World Pos.", InitialPreviewRenderMode.BlitSphere ); + base.showColor = true; + base.UseLowerPropertyBox( false ); + base.texture.CompCount = 4; + base.neverDefineVariable = true; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"XYZ","XYZ",ConType.cOutput,ValueType.VTv3,false).Outputting(OutChannel.RGB), + SF_NodeConnector.Create(this,"X","X",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.R).WithColor(Color.red), + SF_NodeConnector.Create(this,"Y","Y",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.G).WithColor(Color.green), + SF_NodeConnector.Create(this,"Z","Z",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.B).WithColor(Color.blue), + SF_NodeConnector.Create(this,"W","W",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.A) + }; + } + + public override Vector4 EvalCPU() { + return new Color( 0f, 0.7071068f, 0.7071068f, 0f ); + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + if( SF_Evaluator.inFrag ) + return "i.posWorld"; + else if( SF_Evaluator.inVert ) + return "mul(_Object2World, v.vertex)"; + else if( SF_Evaluator.inTess ) + return "mul(_Object2World, v.vertex)"; + else{ + Debug.Log( "Evaluated into unknown shader program" ); + return null; + } + + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_FragmentPosition.cs.meta b/Editor/Code/_Nodes/SFN_FragmentPosition.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_FragmentPosition.cs.meta rename to Editor/Code/_Nodes/SFN_FragmentPosition.cs.meta index 1471e8f5..663efde8 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_FragmentPosition.cs.meta +++ b/Editor/Code/_Nodes/SFN_FragmentPosition.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 9b70f54e080f02746a1e069a06a69481 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 9b70f54e080f02746a1e069a06a69481 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Fresnel.cs b/Editor/Code/_Nodes/SFN_Fresnel.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Fresnel.cs rename to Editor/Code/_Nodes/SFN_Fresnel.cs index 1cef8f5a..7d75eb99 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Fresnel.cs +++ b/Editor/Code/_Nodes/SFN_Fresnel.cs @@ -1,100 +1,100 @@ using UnityEngine; using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Fresnel : SF_Node { - - - public SFN_Fresnel() { - - } - - public override void Initialize() { - - base.shaderGenMode = ShaderGenerationMode.ManualModal; - base.Initialize( "Fresnel", InitialPreviewRenderMode.BlitSphere ); - base.showColor = true; - base.UseLowerPropertyBox( false ); - base.texture.CompCount = 1; - base.vectorDataNode = true; - - +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Fresnel : SF_Node { + + + public SFN_Fresnel() { + + } + + public override void Initialize() { + + base.shaderGenMode = ShaderGenerationMode.ManualModal; + base.Initialize( "Fresnel", InitialPreviewRenderMode.BlitSphere ); + base.showColor = true; + base.UseLowerPropertyBox( false ); + base.texture.CompCount = 1; + base.vectorDataNode = true; + + connectors = new SF_NodeConnector[]{ SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv1,false), SF_NodeConnector.Create(this,"NRM","Nrm",ConType.cInput,ValueType.VTv3,false), SF_NodeConnector.Create(this,"EXP","Exp",ConType.cInput,ValueType.VTv1,false) - }; - - this["NRM"].unconnectedEvaluationValue = "normalDirection"; - - } - - public override void OnUpdateNode( NodeUpdateType updType, bool cascade = true ) { - if( InputsConnected() ) - RefreshValue(0,0); - base.OnUpdateNode( updType ); - } - - public override bool IsUniformOutput() { - return false; - } - - public override int GetEvaluatedComponentCount() { - return 1; - } - - public override string[] GetModalModes() { - return new string[]{ - "REQONLY", - "NRM", - "EXP", - "NRM_EXP" - }; - } - - public override string GetCurrentModalMode() { - if( connectors == null ) - return "REQONLY"; - - bool expCon = GetInputIsConnected( "EXP" ); - bool nrmCon = GetInputIsConnected( "NRM" ); - - if( !expCon && !nrmCon ) - return "REQONLY"; - if( !expCon && nrmCon ) - return "NRM"; - if( expCon && !nrmCon ) - return "EXP"; - // if( expCon && nrmCon ) - return "NRM_EXP"; - } - - public override string[] GetBlitOutputLines( string mode ) { - - string nrmStr = mode.Contains( "NRM" ) ? "_nrm.xyz" : "normalDirection"; - - string s = string.Format( "1.0-max(0,dot({0}, viewDirection))", nrmStr ); - - if( mode.Contains( "EXP" ) ) { - s = string.Format( "pow( {0}, {1} )", s, "_exp.x" ); - } - - return new string[]{ s }; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - - string dot = "1.0-max(0,dot(" + this["NRM"].TryEvaluate() + ", viewDirection))"; - - if( GetInputIsConnected( "EXP" ) ) { - return "pow(" + dot + "," + this["EXP"].TryEvaluate() + ")"; - } - return "("+dot+")"; - - } - - } + }; + + this["NRM"].unconnectedEvaluationValue = "normalDirection"; + + } + + public override void OnUpdateNode( NodeUpdateType updType, bool cascade = true ) { + if( InputsConnected() ) + RefreshValue(0,0); + base.OnUpdateNode( updType ); + } + + public override bool IsUniformOutput() { + return false; + } + + public override int GetEvaluatedComponentCount() { + return 1; + } + + public override string[] GetModalModes() { + return new string[]{ + "REQONLY", + "NRM", + "EXP", + "NRM_EXP" + }; + } + + public override string GetCurrentModalMode() { + if( connectors == null ) + return "REQONLY"; + + bool expCon = GetInputIsConnected( "EXP" ); + bool nrmCon = GetInputIsConnected( "NRM" ); + + if( !expCon && !nrmCon ) + return "REQONLY"; + if( !expCon && nrmCon ) + return "NRM"; + if( expCon && !nrmCon ) + return "EXP"; + // if( expCon && nrmCon ) + return "NRM_EXP"; + } + + public override string[] GetBlitOutputLines( string mode ) { + + string nrmStr = mode.Contains( "NRM" ) ? "_nrm.xyz" : "normalDirection"; + + string s = string.Format( "1.0-max(0,dot({0}, viewDirection))", nrmStr ); + + if( mode.Contains( "EXP" ) ) { + s = string.Format( "pow( {0}, {1} )", s, "_exp.x" ); + } + + return new string[]{ s }; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + + string dot = "1.0-max(0,dot(" + this["NRM"].TryEvaluate() + ", viewDirection))"; + + if( GetInputIsConnected( "EXP" ) ) { + return "pow(" + dot + "," + this["EXP"].TryEvaluate() + ")"; + } + return "("+dot+")"; + + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Fresnel.cs.meta b/Editor/Code/_Nodes/SFN_Fresnel.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Fresnel.cs.meta rename to Editor/Code/_Nodes/SFN_Fresnel.cs.meta index eaa19ce0..b1a110f4 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Fresnel.cs.meta +++ b/Editor/Code/_Nodes/SFN_Fresnel.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 805e259b709717a45aa900113bca53c1 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 805e259b709717a45aa900113bca53c1 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Get.cs b/Editor/Code/_Nodes/SFN_Get.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Get.cs rename to Editor/Code/_Nodes/SFN_Get.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Get.cs.meta b/Editor/Code/_Nodes/SFN_Get.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Get.cs.meta rename to Editor/Code/_Nodes/SFN_Get.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_HalfVector.cs b/Editor/Code/_Nodes/SFN_HalfVector.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_HalfVector.cs rename to Editor/Code/_Nodes/SFN_HalfVector.cs index 4e424328..8aa8635d --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_HalfVector.cs +++ b/Editor/Code/_Nodes/SFN_HalfVector.cs @@ -1,36 +1,36 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_HalfVector : SF_Node { - - - public SFN_HalfVector() { - - } - - public override void Initialize() { - base.Initialize( "Half Dir.", InitialPreviewRenderMode.BlitSphere ); - base.showColor = true; - base.UseLowerPropertyBox( false ); - base.availableInDeferredPrePass = false; - base.texture.CompCount = 3; - base.neverDefineVariable = true; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv3,false) - }; - } - - public override Vector4 EvalCPU() { - return new Color( 0.7071068f, 0f, 0.7071068f, 0f ); - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "halfDirection"; // normalize(_WorldSpaceLightPos0.xyz); - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_HalfVector : SF_Node { + + + public SFN_HalfVector() { + + } + + public override void Initialize() { + base.Initialize( "Half Dir.", InitialPreviewRenderMode.BlitSphere ); + base.showColor = true; + base.UseLowerPropertyBox( false ); + base.availableInDeferredPrePass = false; + base.texture.CompCount = 3; + base.neverDefineVariable = true; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv3,false) + }; + } + + public override Vector4 EvalCPU() { + return new Color( 0.7071068f, 0f, 0.7071068f, 0f ); + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "halfDirection"; // normalize(_WorldSpaceLightPos0.xyz); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_HalfVector.cs.meta b/Editor/Code/_Nodes/SFN_HalfVector.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_HalfVector.cs.meta rename to Editor/Code/_Nodes/SFN_HalfVector.cs.meta index 3ac8e54b..4e9e3c78 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_HalfVector.cs.meta +++ b/Editor/Code/_Nodes/SFN_HalfVector.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: d27e30128b1a90946a33e1f6e18b2d27 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: d27e30128b1a90946a33e1f6e18b2d27 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_HsvToRgb.cs b/Editor/Code/_Nodes/SFN_HsvToRgb.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_HsvToRgb.cs rename to Editor/Code/_Nodes/SFN_HsvToRgb.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_HsvToRgb.cs.meta b/Editor/Code/_Nodes/SFN_HsvToRgb.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_HsvToRgb.cs.meta rename to Editor/Code/_Nodes/SFN_HsvToRgb.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Hue.cs b/Editor/Code/_Nodes/SFN_Hue.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Hue.cs rename to Editor/Code/_Nodes/SFN_Hue.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Hue.cs.meta b/Editor/Code/_Nodes/SFN_Hue.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Hue.cs.meta rename to Editor/Code/_Nodes/SFN_Hue.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_If.cs b/Editor/Code/_Nodes/SFN_If.cs old mode 100755 new mode 100644 similarity index 97% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_If.cs rename to Editor/Code/_Nodes/SFN_If.cs index 10973699..dc5c1d73 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_If.cs +++ b/Editor/Code/_Nodes/SFN_If.cs @@ -1,95 +1,95 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_If : SF_Node_Arithmetic { - - public SFN_If() { - } - - public override void Initialize() { - base.Initialize( "If" ); - base.PrepareArithmetic(0); - base.showLowerReadonlyValues = false; - base.shaderGenMode = ShaderGenerationMode.CustomFunction; - - - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create( this,"OUT", "", ConType.cOutput, ValueType.VTvPending, false ), - SF_NodeConnector.Create( this,"A", "A", ConType.cInput, ValueType.VTvPending, false ).SetRequired( true ), - SF_NodeConnector.Create( this,"B", "B", ConType.cInput, ValueType.VTvPending, false ).SetRequired( true ), - SF_NodeConnector.Create( this,"GT", "A>B", ConType.cInput, ValueType.VTvPending, false ).SetRequired( true ), - SF_NodeConnector.Create( this,"EQ", "A=B", ConType.cInput, ValueType.VTvPending, false ).SetRequired( true ), - SF_NodeConnector.Create( this,"LT", "A().Initialize( connectors[0], connectors[1], connectors[2], connectors[3], connectors[4], connectors[5] ); - } - - - public string StA() { - return GetVariableName() + "_if_leA"; - } - public string StB() { - return GetVariableName() + "_if_leB"; - } - - - public override string[] GetPreDefineRows() { - return new string[] { - "float " + StA() + " = step(" + this["A"].TryEvaluate() + "," + this["B"].TryEvaluate() + ");", - "float " + StB() + " = step(" + this["B"].TryEvaluate() + "," + this["A"].TryEvaluate() + ");" - }; - } - - public override string[] GetBlitOutputLines() { - - string less = "(sta*_lt)"; - string larger = "(stb*_gt)"; - string lela = less + "+" + larger; - - return new string[]{ - "float sta = step(_a,_b);", - "float stb = step(_b,_a);", - "lerp(" + lela + ",_eq,sta*stb)" - }; - } - - public override bool IsUniformOutput() { - foreach(SF_NodeConnector con in connectors){ - if(con.conType == ConType.cOutput) - continue; - if(con.IsConnectedAndEnabled()) - if(!con.inputCon.node.IsUniformOutput()) - return false; - } - return true; - } - - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - if(!ShouldDefineVariable()) // TODO: Isn't this already handled on the node level? - this.PreDefine(); - - string less = "(" + StA() + "*" + GetInputCon( "LT" ).Evaluate() + ")"; - string larger = "(" + StB() + "*" + GetInputCon( "GT" ).Evaluate() + ")"; - string lela = less + "+" + larger; - - return "lerp(" + lela + "," + GetInputCon( "EQ" ).Evaluate() + "," + StA() + "*" + StB() + ")"; - } - - public override float EvalCPU( int c ) { - float a = GetInputData( "A", c ); - float b = GetInputData( "B", c ); - - float sta = ( ( a <= b ) ? 1.0f : 0.0f ); - float stb = ( ( b <= a ) ? 1.0f : 0.0f ); - - float less = sta * GetInputData( "LT", c ); - float larger = stb * GetInputData( "GT", c ); - float lela = ( less + larger ); - - return Mathf.Lerp( lela, GetInputData( "EQ", c ), sta * stb ); - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_If : SF_Node_Arithmetic { + + public SFN_If() { + } + + public override void Initialize() { + base.Initialize( "If" ); + base.PrepareArithmetic(0); + base.showLowerReadonlyValues = false; + base.shaderGenMode = ShaderGenerationMode.CustomFunction; + + + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create( this,"OUT", "", ConType.cOutput, ValueType.VTvPending, false ), + SF_NodeConnector.Create( this,"A", "A", ConType.cInput, ValueType.VTvPending, false ).SetRequired( true ), + SF_NodeConnector.Create( this,"B", "B", ConType.cInput, ValueType.VTvPending, false ).SetRequired( true ), + SF_NodeConnector.Create( this,"GT", "A>B", ConType.cInput, ValueType.VTvPending, false ).SetRequired( true ), + SF_NodeConnector.Create( this,"EQ", "A=B", ConType.cInput, ValueType.VTvPending, false ).SetRequired( true ), + SF_NodeConnector.Create( this,"LT", "A().Initialize( connectors[0], connectors[1], connectors[2], connectors[3], connectors[4], connectors[5] ); + } + + + public string StA() { + return GetVariableName() + "_if_leA"; + } + public string StB() { + return GetVariableName() + "_if_leB"; + } + + + public override string[] GetPreDefineRows() { + return new string[] { + "float " + StA() + " = step(" + this["A"].TryEvaluate() + "," + this["B"].TryEvaluate() + ");", + "float " + StB() + " = step(" + this["B"].TryEvaluate() + "," + this["A"].TryEvaluate() + ");" + }; + } + + public override string[] GetBlitOutputLines() { + + string less = "(sta*_lt)"; + string larger = "(stb*_gt)"; + string lela = less + "+" + larger; + + return new string[]{ + "float sta = step(_a,_b);", + "float stb = step(_b,_a);", + "lerp(" + lela + ",_eq,sta*stb)" + }; + } + + public override bool IsUniformOutput() { + foreach(SF_NodeConnector con in connectors){ + if(con.conType == ConType.cOutput) + continue; + if(con.IsConnectedAndEnabled()) + if(!con.inputCon.node.IsUniformOutput()) + return false; + } + return true; + } + + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + if(!ShouldDefineVariable()) // TODO: Isn't this already handled on the node level? + this.PreDefine(); + + string less = "(" + StA() + "*" + GetInputCon( "LT" ).Evaluate() + ")"; + string larger = "(" + StB() + "*" + GetInputCon( "GT" ).Evaluate() + ")"; + string lela = less + "+" + larger; + + return "lerp(" + lela + "," + GetInputCon( "EQ" ).Evaluate() + "," + StA() + "*" + StB() + ")"; + } + + public override float EvalCPU( int c ) { + float a = GetInputData( "A", c ); + float b = GetInputData( "B", c ); + + float sta = ( ( a <= b ) ? 1.0f : 0.0f ); + float stb = ( ( b <= a ) ? 1.0f : 0.0f ); + + float less = sta * GetInputData( "LT", c ); + float larger = stb * GetInputData( "GT", c ); + float lela = ( less + larger ); + + return Mathf.Lerp( lela, GetInputData( "EQ", c ), sta * stb ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_If.cs.meta b/Editor/Code/_Nodes/SFN_If.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_If.cs.meta rename to Editor/Code/_Nodes/SFN_If.cs.meta index a9cbc818..78c0a966 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_If.cs.meta +++ b/Editor/Code/_Nodes/SFN_If.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 08bd8679c2a595b4ebd6d65a4a96817e -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 08bd8679c2a595b4ebd6d65a4a96817e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_InverseLerp.cs b/Editor/Code/_Nodes/SFN_InverseLerp.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_InverseLerp.cs rename to Editor/Code/_Nodes/SFN_InverseLerp.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_InverseLerp.cs.meta b/Editor/Code/_Nodes/SFN_InverseLerp.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_InverseLerp.cs.meta rename to Editor/Code/_Nodes/SFN_InverseLerp.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Length.cs b/Editor/Code/_Nodes/SFN_Length.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Length.cs rename to Editor/Code/_Nodes/SFN_Length.cs index 66f193c4..34b02efb --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Length.cs +++ b/Editor/Code/_Nodes/SFN_Length.cs @@ -1,42 +1,42 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Length : SF_Node_Arithmetic { - - public SFN_Length() { - } - - public override void Initialize() { - base.Initialize( "Length" ); - base.PrepareArithmetic( 1, ValueType.VTvPending, ValueType.VTv1 ); - base.shaderGenMode = ShaderGenerationMode.SimpleFunction; - ( base.conGroup as SFNCG_Arithmetic ).LockOutType(); - } - - public override int GetEvaluatedComponentCount() { - return 1; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "length(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; - } - - public override Vector4 EvalCPU() { - - switch( GetInputData( "IN" ).CompCount ) { - case 1: - return Vector4.one * Mathf.Abs( GetInputData( "IN" ).dataUniform[0] ); - case 2: - return Vector4.one * ( (Vector2)GetInputData( "IN" ).dataUniform ).magnitude; - case 3: - return Vector4.one * ( (Vector3)GetInputData( "IN" ).dataUniform ).magnitude; - default: - return Vector4.one * GetInputData( "IN" ).dataUniform.magnitude; - } - - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Length : SF_Node_Arithmetic { + + public SFN_Length() { + } + + public override void Initialize() { + base.Initialize( "Length" ); + base.PrepareArithmetic( 1, ValueType.VTvPending, ValueType.VTv1 ); + base.shaderGenMode = ShaderGenerationMode.SimpleFunction; + ( base.conGroup as SFNCG_Arithmetic ).LockOutType(); + } + + public override int GetEvaluatedComponentCount() { + return 1; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "length(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; + } + + public override Vector4 EvalCPU() { + + switch( GetInputData( "IN" ).CompCount ) { + case 1: + return Vector4.one * Mathf.Abs( GetInputData( "IN" ).dataUniform[0] ); + case 2: + return Vector4.one * ( (Vector2)GetInputData( "IN" ).dataUniform ).magnitude; + case 3: + return Vector4.one * ( (Vector3)GetInputData( "IN" ).dataUniform ).magnitude; + default: + return Vector4.one * GetInputData( "IN" ).dataUniform.magnitude; + } + + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Length.cs.meta b/Editor/Code/_Nodes/SFN_Length.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Length.cs.meta rename to Editor/Code/_Nodes/SFN_Length.cs.meta index f274b079..76a89539 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Length.cs.meta +++ b/Editor/Code/_Nodes/SFN_Length.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 9dffa999f0a9a014692a70f8050a87f4 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 9dffa999f0a9a014692a70f8050a87f4 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Lerp.cs b/Editor/Code/_Nodes/SFN_Lerp.cs old mode 100755 new mode 100644 similarity index 97% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Lerp.cs rename to Editor/Code/_Nodes/SFN_Lerp.cs index b55cf9b3..d1d51417 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Lerp.cs +++ b/Editor/Code/_Nodes/SFN_Lerp.cs @@ -1,58 +1,58 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Lerp : SF_Node { - - public SFN_Lerp() { - - } - - public override void Initialize() { - base.Initialize( "Lerp" ); - base.showColor = true; - UseLowerReadonlyValues( true ); - - //SF_NodeConnection lerpCon; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTvPending,false), - SF_NodeConnector.Create(this,"A","A",ConType.cInput,ValueType.VTvPending,false).SetRequired(true), - SF_NodeConnector.Create(this,"B","B",ConType.cInput,ValueType.VTvPending,false).SetRequired(true), - SF_NodeConnector.Create(this,"T","T",ConType.cInput,ValueType.VTvPending,false).SetRequired(true) - }; - - base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1], connectors[2], connectors[3] ); - } - - public override void OnUpdateNode( NodeUpdateType updType, bool cascade = true ) { - if( InputsConnected() ) - RefreshValue( 1, 2 ); - base.OnUpdateNode( updType ); - } - - public override bool IsUniformOutput() { - return ( GetInputData( "A" ).uniform && GetInputData( "B" ).uniform && GetInputData( "T" ).uniform ); - } - - public override int GetEvaluatedComponentCount() { - return Mathf.Max( this["A"].GetCompCount(), this["B"].GetCompCount(), this["T"].GetCompCount() ); - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "lerp(" + GetConnectorByStringID( "A" ).TryEvaluateAs(GetEvaluatedComponentCount()) + "," + GetConnectorByStringID( "B" ).TryEvaluateAs(GetEvaluatedComponentCount()) + "," + GetInputCon( "T" ).Evaluate() + ")"; - } - - public override float EvalCPU( int c ) { - return Lerp( GetInputData( "B", c ), GetInputData( "B", c ), GetInputData( "T", c ) ); - } - - public float Lerp( float a, float b, float t ) { - return ( ( 1f - t ) * a + t * b ); - } - - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Lerp : SF_Node { + + public SFN_Lerp() { + + } + + public override void Initialize() { + base.Initialize( "Lerp" ); + base.showColor = true; + UseLowerReadonlyValues( true ); + + //SF_NodeConnection lerpCon; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTvPending,false), + SF_NodeConnector.Create(this,"A","A",ConType.cInput,ValueType.VTvPending,false).SetRequired(true), + SF_NodeConnector.Create(this,"B","B",ConType.cInput,ValueType.VTvPending,false).SetRequired(true), + SF_NodeConnector.Create(this,"T","T",ConType.cInput,ValueType.VTvPending,false).SetRequired(true) + }; + + base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1], connectors[2], connectors[3] ); + } + + public override void OnUpdateNode( NodeUpdateType updType, bool cascade = true ) { + if( InputsConnected() ) + RefreshValue( 1, 2 ); + base.OnUpdateNode( updType ); + } + + public override bool IsUniformOutput() { + return ( GetInputData( "A" ).uniform && GetInputData( "B" ).uniform && GetInputData( "T" ).uniform ); + } + + public override int GetEvaluatedComponentCount() { + return Mathf.Max( this["A"].GetCompCount(), this["B"].GetCompCount(), this["T"].GetCompCount() ); + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "lerp(" + GetConnectorByStringID( "A" ).TryEvaluateAs(GetEvaluatedComponentCount()) + "," + GetConnectorByStringID( "B" ).TryEvaluateAs(GetEvaluatedComponentCount()) + "," + GetInputCon( "T" ).Evaluate() + ")"; + } + + public override float EvalCPU( int c ) { + return Lerp( GetInputData( "B", c ), GetInputData( "B", c ), GetInputData( "T", c ) ); + } + + public float Lerp( float a, float b, float t ) { + return ( ( 1f - t ) * a + t * b ); + } + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Lerp.cs.meta b/Editor/Code/_Nodes/SFN_Lerp.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Lerp.cs.meta rename to Editor/Code/_Nodes/SFN_Lerp.cs.meta index 00994367..2df5a0e4 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Lerp.cs.meta +++ b/Editor/Code/_Nodes/SFN_Lerp.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: f4503b6214f161b4a95dfd184348546f -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: f4503b6214f161b4a95dfd184348546f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightAttenuation.cs b/Editor/Code/_Nodes/SFN_LightAttenuation.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightAttenuation.cs rename to Editor/Code/_Nodes/SFN_LightAttenuation.cs index d6326d7b..e8d76bc2 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightAttenuation.cs +++ b/Editor/Code/_Nodes/SFN_LightAttenuation.cs @@ -1,36 +1,36 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_LightAttenuation : SF_Node { - - - public SFN_LightAttenuation() { - - } - - public override void Initialize() { - base.Initialize( "Light Atten.", InitialPreviewRenderMode.BlitSphere ); - base.showColor = true; - base.UseLowerPropertyBox( false ); - base.texture.CompCount = 1; - base.neverDefineVariable = true; - base.availableInDeferredPrePass = false; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv1,false) - }; - } - - public override Vector4 EvalCPU() { - return new Color( 1f, 1f, 1f, 1f ); - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "attenuation"; - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_LightAttenuation : SF_Node { + + + public SFN_LightAttenuation() { + + } + + public override void Initialize() { + base.Initialize( "Light Atten.", InitialPreviewRenderMode.BlitSphere ); + base.showColor = true; + base.UseLowerPropertyBox( false ); + base.texture.CompCount = 1; + base.neverDefineVariable = true; + base.availableInDeferredPrePass = false; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv1,false) + }; + } + + public override Vector4 EvalCPU() { + return new Color( 1f, 1f, 1f, 1f ); + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "attenuation"; + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightAttenuation.cs.meta b/Editor/Code/_Nodes/SFN_LightAttenuation.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightAttenuation.cs.meta rename to Editor/Code/_Nodes/SFN_LightAttenuation.cs.meta index 9b609234..de5496db --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightAttenuation.cs.meta +++ b/Editor/Code/_Nodes/SFN_LightAttenuation.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 686b4d39e6a081d4ab3974d70ea038ea -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 686b4d39e6a081d4ab3974d70ea038ea +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightColor.cs b/Editor/Code/_Nodes/SFN_LightColor.cs old mode 100755 new mode 100644 similarity index 97% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightColor.cs rename to Editor/Code/_Nodes/SFN_LightColor.cs index 98a9f5ca..8800f7c8 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightColor.cs +++ b/Editor/Code/_Nodes/SFN_LightColor.cs @@ -1,40 +1,40 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_LightColor : SF_Node { - - - public SFN_LightColor() { - - } - - public override void Initialize() { - base.Initialize( "Light Color", InitialPreviewRenderMode.BlitSphere ); - base.showColor = true; - base.UseLowerPropertyBox( false ); - base.texture.CompCount = 4; - base.neverDefineVariable = true; - base.availableInDeferredPrePass = false; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"RGB","RGB",ConType.cOutput,ValueType.VTv3,false).Outputting(OutChannel.RGB), - SF_NodeConnector.Create(this,"R","R",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.R).WithColor(Color.red), - SF_NodeConnector.Create(this,"G","G",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.G).WithColor(Color.green), - SF_NodeConnector.Create(this,"B","B",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.B).WithColor(Color.blue), - SF_NodeConnector.Create(this,"A","A",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.A) - }; - } - - public override Vector4 EvalCPU() { - return new Color( 0.5f, 0, 0, 0 ); - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "_LightColor0"; - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_LightColor : SF_Node { + + + public SFN_LightColor() { + + } + + public override void Initialize() { + base.Initialize( "Light Color", InitialPreviewRenderMode.BlitSphere ); + base.showColor = true; + base.UseLowerPropertyBox( false ); + base.texture.CompCount = 4; + base.neverDefineVariable = true; + base.availableInDeferredPrePass = false; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"RGB","RGB",ConType.cOutput,ValueType.VTv3,false).Outputting(OutChannel.RGB), + SF_NodeConnector.Create(this,"R","R",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.R).WithColor(Color.red), + SF_NodeConnector.Create(this,"G","G",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.G).WithColor(Color.green), + SF_NodeConnector.Create(this,"B","B",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.B).WithColor(Color.blue), + SF_NodeConnector.Create(this,"A","A",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.A) + }; + } + + public override Vector4 EvalCPU() { + return new Color( 0.5f, 0, 0, 0 ); + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "_LightColor0"; + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightColor.cs.meta b/Editor/Code/_Nodes/SFN_LightColor.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightColor.cs.meta rename to Editor/Code/_Nodes/SFN_LightColor.cs.meta index e6600c28..54a9fcdc --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightColor.cs.meta +++ b/Editor/Code/_Nodes/SFN_LightColor.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 7f012e392e4a89a4791a4856f4f56b4c -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 7f012e392e4a89a4791a4856f4f56b4c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightPosition.cs b/Editor/Code/_Nodes/SFN_LightPosition.cs old mode 100755 new mode 100644 similarity index 97% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightPosition.cs rename to Editor/Code/_Nodes/SFN_LightPosition.cs index 4a9044e1..68b86399 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightPosition.cs +++ b/Editor/Code/_Nodes/SFN_LightPosition.cs @@ -1,40 +1,40 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_LightPosition : SF_Node { - - - public SFN_LightPosition() { - - } - - public override void Initialize() { - base.Initialize( "Light Pos.", InitialPreviewRenderMode.BlitQuad ); - base.showColor = true; - base.UseLowerPropertyBox( false ); - base.texture.CompCount = 4; - base.neverDefineVariable = true; - base.availableInDeferredPrePass = false; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"XYZ","XYZ",ConType.cOutput,ValueType.VTv3,false).Outputting(OutChannel.RGB), - SF_NodeConnector.Create(this,"X","X",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.R).WithColor(Color.red), - SF_NodeConnector.Create(this,"Y","Y",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.G).WithColor(Color.green), - SF_NodeConnector.Create(this,"Z","Z",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.B).WithColor(Color.blue), - SF_NodeConnector.Create(this,"PNT","Pnt",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.A) - }; - } - - public override Vector4 EvalCPU() { - return new Color( 0f, 0.7071068f, 0.7071068f, 0f ); - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "_WorldSpaceLightPos0"; // normalize(_WorldSpaceLightPos0.xyz); - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_LightPosition : SF_Node { + + + public SFN_LightPosition() { + + } + + public override void Initialize() { + base.Initialize( "Light Pos.", InitialPreviewRenderMode.BlitQuad ); + base.showColor = true; + base.UseLowerPropertyBox( false ); + base.texture.CompCount = 4; + base.neverDefineVariable = true; + base.availableInDeferredPrePass = false; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"XYZ","XYZ",ConType.cOutput,ValueType.VTv3,false).Outputting(OutChannel.RGB), + SF_NodeConnector.Create(this,"X","X",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.R).WithColor(Color.red), + SF_NodeConnector.Create(this,"Y","Y",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.G).WithColor(Color.green), + SF_NodeConnector.Create(this,"Z","Z",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.B).WithColor(Color.blue), + SF_NodeConnector.Create(this,"PNT","Pnt",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.A) + }; + } + + public override Vector4 EvalCPU() { + return new Color( 0f, 0.7071068f, 0.7071068f, 0f ); + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "_WorldSpaceLightPos0"; // normalize(_WorldSpaceLightPos0.xyz); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightPosition.cs.meta b/Editor/Code/_Nodes/SFN_LightPosition.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightPosition.cs.meta rename to Editor/Code/_Nodes/SFN_LightPosition.cs.meta index 14671d07..bc81d829 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightPosition.cs.meta +++ b/Editor/Code/_Nodes/SFN_LightPosition.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 0b9d9898dea86c748886d87751eb5e9b -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 0b9d9898dea86c748886d87751eb5e9b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightVector.cs b/Editor/Code/_Nodes/SFN_LightVector.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightVector.cs rename to Editor/Code/_Nodes/SFN_LightVector.cs index 7e231bad..eebeaa18 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightVector.cs +++ b/Editor/Code/_Nodes/SFN_LightVector.cs @@ -1,36 +1,36 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_LightVector : SF_Node { - - - public SFN_LightVector() { - - } - - public override void Initialize() { - base.Initialize( "Light Dir.", InitialPreviewRenderMode.BlitSphere ); - base.showColor = true; - base.UseLowerPropertyBox( false ); - base.texture.CompCount = 3; - base.neverDefineVariable = true; - base.availableInDeferredPrePass = false; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv3,false) - }; - } - - public override Vector4 EvalCPU() { - return new Color( 0f, 0.7071068f, 0.7071068f, 0f ); - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "lightDirection"; // normalize(_WorldSpaceLightPos0.xyz); - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_LightVector : SF_Node { + + + public SFN_LightVector() { + + } + + public override void Initialize() { + base.Initialize( "Light Dir.", InitialPreviewRenderMode.BlitSphere ); + base.showColor = true; + base.UseLowerPropertyBox( false ); + base.texture.CompCount = 3; + base.neverDefineVariable = true; + base.availableInDeferredPrePass = false; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv3,false) + }; + } + + public override Vector4 EvalCPU() { + return new Color( 0f, 0.7071068f, 0.7071068f, 0f ); + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "lightDirection"; // normalize(_WorldSpaceLightPos0.xyz); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightVector.cs.meta b/Editor/Code/_Nodes/SFN_LightVector.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightVector.cs.meta rename to Editor/Code/_Nodes/SFN_LightVector.cs.meta index df3db58a..603a9a57 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_LightVector.cs.meta +++ b/Editor/Code/_Nodes/SFN_LightVector.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 66c49f9dbeaeb414a8aaff0d8c27d00d -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 66c49f9dbeaeb414a8aaff0d8c27d00d +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Log.cs b/Editor/Code/_Nodes/SFN_Log.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Log.cs rename to Editor/Code/_Nodes/SFN_Log.cs index 15d3af5a..443d463f --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Log.cs +++ b/Editor/Code/_Nodes/SFN_Log.cs @@ -1,111 +1,111 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -using System; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Log : SF_Node_Arithmetic { - - - public enum LogType { Natural, Base2, Base10 }; - public LogType logType = LogType.Natural; - - public SFN_Log() { - - } - - public override void Initialize() { - base.Initialize( "Log" ); - base.UseLowerPropertyBox( true, true ); - base.PrepareArithmetic( 1, ValueType.VTvPending, ValueType.VTvPending ); - base.shaderGenMode = ShaderGenerationMode.Modal; - } - - - public override string[] GetModalModes() { - return new string[] { - "LOG", - "LOG2", - "LOG10" - }; - } - - public override string GetCurrentModalMode() { - switch( logType ) { - case LogType.Base10: - return "LOG10"; - case LogType.Base2: - return "LOG2"; - default: - return "LOG"; - } - } - - public override string[] GetBlitOutputLines( string mode ) { - if( mode == "LOG2" ) - return new string[] { "log(_in);" }; - if( mode == "LOG10" ) - return new string[] { "log10(_in);" }; - return new string[] { "log(_in)" }; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - - string inner = GetConnectorByStringID( "IN" ).TryEvaluate(); - switch( logType ) { - case LogType.Natural: - return "log(" + inner + ")"; - case LogType.Base2: - return "log2(" + inner + ")"; - case LogType.Base10: - return "log10(" + inner + ")"; - } - - return inner; - } - - public override float EvalCPU( int c ) { - - float inpDt = GetInputData( "IN", c ); - - switch( logType ) { - case LogType.Natural: - inpDt = Mathf.Log( inpDt ); - break; - case LogType.Base2: - inpDt = Mathf.Log( inpDt ) / Mathf.Log( 2f ); - break; - case LogType.Base10: - inpDt = Mathf.Log10( inpDt ); - break; - } - - return inpDt; - } - - public override void DrawLowerPropertyBox() { - EditorGUI.BeginChangeCheck(); - logType = (LogType)UndoableEnumPopup( lowerRect, logType, "switch log type"); - //logType = (LogType)EditorGUI.EnumPopup( lowerRect, logType ); - if( EditorGUI.EndChangeCheck() ) - OnUpdateNode(); - } - - public override string SerializeSpecialData() { - return "lt:" + (int)logType; - } - - public override void DeserializeSpecialData( string key, string value ) { - switch( key ) { - case "lt": - logType = (LogType)int.Parse( value ); - break; - } - } - - - - } +using UnityEngine; +using UnityEditor; +using System.Collections; +using System; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Log : SF_Node_Arithmetic { + + + public enum LogType { Natural, Base2, Base10 }; + public LogType logType = LogType.Natural; + + public SFN_Log() { + + } + + public override void Initialize() { + base.Initialize( "Log" ); + base.UseLowerPropertyBox( true, true ); + base.PrepareArithmetic( 1, ValueType.VTvPending, ValueType.VTvPending ); + base.shaderGenMode = ShaderGenerationMode.Modal; + } + + + public override string[] GetModalModes() { + return new string[] { + "LOG", + "LOG2", + "LOG10" + }; + } + + public override string GetCurrentModalMode() { + switch( logType ) { + case LogType.Base10: + return "LOG10"; + case LogType.Base2: + return "LOG2"; + default: + return "LOG"; + } + } + + public override string[] GetBlitOutputLines( string mode ) { + if( mode == "LOG2" ) + return new string[] { "log(_in);" }; + if( mode == "LOG10" ) + return new string[] { "log10(_in);" }; + return new string[] { "log(_in)" }; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + + string inner = GetConnectorByStringID( "IN" ).TryEvaluate(); + switch( logType ) { + case LogType.Natural: + return "log(" + inner + ")"; + case LogType.Base2: + return "log2(" + inner + ")"; + case LogType.Base10: + return "log10(" + inner + ")"; + } + + return inner; + } + + public override float EvalCPU( int c ) { + + float inpDt = GetInputData( "IN", c ); + + switch( logType ) { + case LogType.Natural: + inpDt = Mathf.Log( inpDt ); + break; + case LogType.Base2: + inpDt = Mathf.Log( inpDt ) / Mathf.Log( 2f ); + break; + case LogType.Base10: + inpDt = Mathf.Log10( inpDt ); + break; + } + + return inpDt; + } + + public override void DrawLowerPropertyBox() { + EditorGUI.BeginChangeCheck(); + logType = (LogType)UndoableEnumPopup( lowerRect, logType, "switch log type"); + //logType = (LogType)EditorGUI.EnumPopup( lowerRect, logType ); + if( EditorGUI.EndChangeCheck() ) + OnUpdateNode(); + } + + public override string SerializeSpecialData() { + return "lt:" + (int)logType; + } + + public override void DeserializeSpecialData( string key, string value ) { + switch( key ) { + case "lt": + logType = (LogType)int.Parse( value ); + break; + } + } + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Log.cs.meta b/Editor/Code/_Nodes/SFN_Log.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Log.cs.meta rename to Editor/Code/_Nodes/SFN_Log.cs.meta index bb9bc278..2a172634 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Log.cs.meta +++ b/Editor/Code/_Nodes/SFN_Log.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 61c69de42939c63429fcb6359f2b7953 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 61c69de42939c63429fcb6359f2b7953 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Matrix4x4.cs b/Editor/Code/_Nodes/SFN_Matrix4x4.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Matrix4x4.cs rename to Editor/Code/_Nodes/SFN_Matrix4x4.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Matrix4x4.cs.meta b/Editor/Code/_Nodes/SFN_Matrix4x4.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Matrix4x4.cs.meta rename to Editor/Code/_Nodes/SFN_Matrix4x4.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Matrix4x4Property.cs b/Editor/Code/_Nodes/SFN_Matrix4x4Property.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Matrix4x4Property.cs rename to Editor/Code/_Nodes/SFN_Matrix4x4Property.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Matrix4x4Property.cs.meta b/Editor/Code/_Nodes/SFN_Matrix4x4Property.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Matrix4x4Property.cs.meta rename to Editor/Code/_Nodes/SFN_Matrix4x4Property.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Max.cs b/Editor/Code/_Nodes/SFN_Max.cs old mode 100755 new mode 100644 similarity index 99% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Max.cs rename to Editor/Code/_Nodes/SFN_Max.cs index ecbb2749..6e55781d --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Max.cs +++ b/Editor/Code/_Nodes/SFN_Max.cs @@ -14,7 +14,7 @@ public SFN_Max() { public override void Initialize() { base.Initialize( "Max" ); - base.showColor = true; + base.showColor = true; base.shaderGenMode = ShaderGenerationMode.ModularInput; UseLowerReadonlyValues( true ); @@ -32,12 +32,12 @@ public override void Initialize() { base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1], connectors[2], connectors[3], connectors[4], connectors[5] ); - } - - public override void GetModularShaderFixes( out string prefix, out string infix, out string suffix ) { - prefix = "max("; - infix = ", "; - suffix = ")"; + } + + public override void GetModularShaderFixes( out string prefix, out string infix, out string suffix ) { + prefix = "max("; + infix = ", "; + suffix = ")"; } public override string Evaluate( OutChannel channel = OutChannel.All ) { diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Max.cs.meta b/Editor/Code/_Nodes/SFN_Max.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Max.cs.meta rename to Editor/Code/_Nodes/SFN_Max.cs.meta index f8f9bad5..a28ed222 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Max.cs.meta +++ b/Editor/Code/_Nodes/SFN_Max.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: a4a4eeb60c3655748ab34f85aaa9eca6 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: a4a4eeb60c3655748ab34f85aaa9eca6 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Min.cs b/Editor/Code/_Nodes/SFN_Min.cs old mode 100755 new mode 100644 similarity index 99% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Min.cs rename to Editor/Code/_Nodes/SFN_Min.cs index f01df021..f41f798a --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Min.cs +++ b/Editor/Code/_Nodes/SFN_Min.cs @@ -14,7 +14,7 @@ public SFN_Min() { public override void Initialize() { base.Initialize( "Min" ); - base.showColor = true; + base.showColor = true; base.shaderGenMode = ShaderGenerationMode.ModularInput; UseLowerReadonlyValues( true ); @@ -32,12 +32,12 @@ public override void Initialize() { base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1], connectors[2], connectors[3], connectors[4], connectors[5] ); - } - - public override void GetModularShaderFixes( out string prefix, out string infix, out string suffix ) { - prefix = "min("; - infix = ", "; - suffix = ")"; + } + + public override void GetModularShaderFixes( out string prefix, out string infix, out string suffix ) { + prefix = "min("; + infix = ", "; + suffix = ")"; } public override string Evaluate( OutChannel channel = OutChannel.All ) { diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Min.cs.meta b/Editor/Code/_Nodes/SFN_Min.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Min.cs.meta rename to Editor/Code/_Nodes/SFN_Min.cs.meta index 2b12f397..e1bced11 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Min.cs.meta +++ b/Editor/Code/_Nodes/SFN_Min.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 24a991d2351190f4f88d3c06eabafb58 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 24a991d2351190f4f88d3c06eabafb58 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Multiply.cs b/Editor/Code/_Nodes/SFN_Multiply.cs old mode 100755 new mode 100644 similarity index 99% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Multiply.cs rename to Editor/Code/_Nodes/SFN_Multiply.cs index aaa9c373..b09016e4 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Multiply.cs +++ b/Editor/Code/_Nodes/SFN_Multiply.cs @@ -14,7 +14,7 @@ public SFN_Multiply() { public override void Initialize() { base.Initialize( "Multiply" ); - base.showColor = true; + base.showColor = true; base.shaderGenMode = ShaderGenerationMode.ModularInput; UseLowerReadonlyValues( true ); @@ -32,13 +32,13 @@ public override void Initialize() { base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1], connectors[2], connectors[3], connectors[4], connectors[5] ); - } - - public override void GetModularShaderFixes( out string prefix, out string infix, out string suffix ) { - prefix = ""; - infix = " * "; - suffix = ""; - } + } + + public override void GetModularShaderFixes( out string prefix, out string infix, out string suffix ) { + prefix = ""; + infix = " * "; + suffix = ""; + } public override string Evaluate( OutChannel channel = OutChannel.All ) { diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Multiply.cs.meta b/Editor/Code/_Nodes/SFN_Multiply.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Multiply.cs.meta rename to Editor/Code/_Nodes/SFN_Multiply.cs.meta index 68e66520..65c2daae --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Multiply.cs.meta +++ b/Editor/Code/_Nodes/SFN_Multiply.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: e4fb4b834fbc00e4bac700df8f98ea7c -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: e4fb4b834fbc00e4bac700df8f98ea7c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_MultiplyMatrix.cs b/Editor/Code/_Nodes/SFN_MultiplyMatrix.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_MultiplyMatrix.cs rename to Editor/Code/_Nodes/SFN_MultiplyMatrix.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_MultiplyMatrix.cs.meta b/Editor/Code/_Nodes/SFN_MultiplyMatrix.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_MultiplyMatrix.cs.meta rename to Editor/Code/_Nodes/SFN_MultiplyMatrix.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Negate.cs b/Editor/Code/_Nodes/SFN_Negate.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Negate.cs rename to Editor/Code/_Nodes/SFN_Negate.cs index 8bd3ee74..7dc9b9bc --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Negate.cs +++ b/Editor/Code/_Nodes/SFN_Negate.cs @@ -1,30 +1,30 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Negate : SF_Node_Arithmetic { - - public SFN_Negate() { - } - - public override void Initialize() { - base.Initialize( "Negate" ); - base.PrepareArithmetic( 1 ); - base.shaderGenMode = ShaderGenerationMode.CustomFunction; - } - - public override string[] GetBlitOutputLines() { - return new string[] { "(-1*_in)" }; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "(-1*" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; - } - - public override float EvalCPU( int c ) { - return -GetInputData( "IN", c ); - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Negate : SF_Node_Arithmetic { + + public SFN_Negate() { + } + + public override void Initialize() { + base.Initialize( "Negate" ); + base.PrepareArithmetic( 1 ); + base.shaderGenMode = ShaderGenerationMode.CustomFunction; + } + + public override string[] GetBlitOutputLines() { + return new string[] { "(-1*_in)" }; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "(-1*" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; + } + + public override float EvalCPU( int c ) { + return -GetInputData( "IN", c ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Negate.cs.meta b/Editor/Code/_Nodes/SFN_Negate.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Negate.cs.meta rename to Editor/Code/_Nodes/SFN_Negate.cs.meta index bf594a50..f767f4f8 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Negate.cs.meta +++ b/Editor/Code/_Nodes/SFN_Negate.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: e3df968e03820c742ab7e8c36642dca2 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: e3df968e03820c742ab7e8c36642dca2 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Node_Constant.cs b/Editor/Code/_Nodes/SFN_Node_Constant.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Node_Constant.cs rename to Editor/Code/_Nodes/SFN_Node_Constant.cs index 07957c14..2173e943 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Node_Constant.cs +++ b/Editor/Code/_Nodes/SFN_Node_Constant.cs @@ -1,57 +1,57 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Node_Constant : SF_Node { - - - public float constFloat; - public string constStr; - - - - public SFN_Node_Constant() { - } - - public void PrepareConstant(string icon, string constant){ - base.showColor = true; - base.UseLowerPropertyBox( true, true ); - base.showLowerReadonlyValues = true; - base.texture.uniform = true; - base.shaderGenMode = ShaderGenerationMode.OffUniform; - constStr = constant; - constFloat = float.Parse( constant ); - - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv1,false) - }; - base.texture.CompCount = 1; - base.texture.dataUniform[0] = constFloat; - node_height = Mathf.RoundToInt( node_height * 0.6666666666f ); - node_width = Mathf.RoundToInt( node_width * 0.6666666666f ); - InitializeDefaultRect( rect.center ); - - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return constStr; - } - - public override float EvalCPU( int c ) { - return constFloat; - } - - public override int GetEvaluatedComponentCount() { - return 1; - } - - /* - public override void DrawLowerPropertyBox() { - GUI.Label( lowerRect, texture.dataUniform[0].ToString(), EditorStyles.textField ); - }*/ - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Node_Constant : SF_Node { + + + public float constFloat; + public string constStr; + + + + public SFN_Node_Constant() { + } + + public void PrepareConstant(string icon, string constant){ + base.showColor = true; + base.UseLowerPropertyBox( true, true ); + base.showLowerReadonlyValues = true; + base.texture.uniform = true; + base.shaderGenMode = ShaderGenerationMode.OffUniform; + constStr = constant; + constFloat = float.Parse( constant ); + + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv1,false) + }; + base.texture.CompCount = 1; + base.texture.dataUniform[0] = constFloat; + node_height = Mathf.RoundToInt( node_height * 0.6666666666f ); + node_width = Mathf.RoundToInt( node_width * 0.6666666666f ); + InitializeDefaultRect( rect.center ); + + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return constStr; + } + + public override float EvalCPU( int c ) { + return constFloat; + } + + public override int GetEvaluatedComponentCount() { + return 1; + } + + /* + public override void DrawLowerPropertyBox() { + GUI.Label( lowerRect, texture.dataUniform[0].ToString(), EditorStyles.textField ); + }*/ + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Node_Constant.cs.meta b/Editor/Code/_Nodes/SFN_Node_Constant.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Node_Constant.cs.meta rename to Editor/Code/_Nodes/SFN_Node_Constant.cs.meta index a3ef7002..91aca117 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Node_Constant.cs.meta +++ b/Editor/Code/_Nodes/SFN_Node_Constant.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 7c4dd42ed9362ff43a8f530348653ef1 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 7c4dd42ed9362ff43a8f530348653ef1 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Noise.cs b/Editor/Code/_Nodes/SFN_Noise.cs old mode 100755 new mode 100644 similarity index 99% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Noise.cs rename to Editor/Code/_Nodes/SFN_Noise.cs index 13694ec5..dfdf7665 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Noise.cs +++ b/Editor/Code/_Nodes/SFN_Noise.cs @@ -15,8 +15,8 @@ public SFN_Noise() { public override void Initialize() { base.Initialize( "Noise" ); base.UseLowerPropertyBox(false); - base.showColor = true; - base.alwaysDefineVariable = true; + base.showColor = true; + base.alwaysDefineVariable = true; base.shaderGenMode = ShaderGenerationMode.CustomFunction; connectors = new SF_NodeConnector[]{ SF_NodeConnector.Create(this,"OUT","Rnd",ConType.cOutput,ValueType.VTv1,false), @@ -43,14 +43,14 @@ public string Skew() { public string Rnd() { return GetVariableName() + "_rnd"; - } - - public override string[] GetBlitOutputLines() { - return new string[] { + } + + public override string[] GetBlitOutputLines() { + return new string[] { "float2 s = _xy + 0.2127+_xy.x*0.3713*_xy.y;", - "float2 r = 4.789*sin(489.123*s);", - "frac(r.x*r.y*(1+s.x))" - }; + "float2 r = 4.789*sin(489.123*s);", + "frac(r.x*r.y*(1+s.x))" + }; } public override string[] GetPreDefineRows (){ diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Noise.cs.meta b/Editor/Code/_Nodes/SFN_Noise.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Noise.cs.meta rename to Editor/Code/_Nodes/SFN_Noise.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_NormalBlend.cs b/Editor/Code/_Nodes/SFN_NormalBlend.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_NormalBlend.cs rename to Editor/Code/_Nodes/SFN_NormalBlend.cs index e3dd37c2..87a79ac4 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_NormalBlend.cs +++ b/Editor/Code/_Nodes/SFN_NormalBlend.cs @@ -1,101 +1,101 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -//using System; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_NormalBlend : SF_Node { - - // SF_Node tNode; - - public SFN_NormalBlend() { - - } - - - public override void Initialize() { - base.Initialize( "Normal Blend" ); - base.showColor = true; - UseLowerReadonlyValues( false ); - base.alwaysDefineVariable = true; - base.shaderGenMode = ShaderGenerationMode.CustomFunction; - texture.CompCount = 3; - - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv3,false), - SF_NodeConnector.Create(this,"BSE","Base",ConType.cInput,ValueType.VTv3,false).SetRequired(true), - SF_NodeConnector.Create(this,"DTL","Det.",ConType.cInput,ValueType.VTv3,false).SetRequired(true) - }; - - //extraWidthInput = 5; - - } - - - public override void OnUpdateNode( NodeUpdateType updType, bool cascade = true ) { - if( InputsConnected() ) - RefreshValue( 1, 2 ); - base.OnUpdateNode( updType ); - } - - public override bool IsUniformOutput() { - return ( GetInputData( "BSE" ).uniform && GetInputData( "DTL" ).uniform ); - } - - public override int GetEvaluatedComponentCount() { - return 3; - } - - public string BaseNrm() { - return GetVariableName() + "_nrm_base"; - } - public string DetailNrm() { - return GetVariableName() + "_nrm_detail"; - } - public string CombinedNrm() { - return GetVariableName() + "_nrm_combined"; - } - - /* - float3 t = nrmBase + float3(0, 0, 1); - float3 u = nrmDetail * float3(-1, -1, 1); - float3 rnm = t*dot(t, u)/t.z - u; - */ - - public override string[] GetBlitOutputLines() { - return new string[] { - "float3 bse = _bse.xyz + float3(0,0,1);", - "float3 dtl = _dtl.xyz * float3(-1,-1,1);", - "float4(bse*dot(bse, dtl)/bse.z - dtl,0)" - }; - } - - public override string[] GetPreDefineRows() { - return new string[] { - "float3 " + BaseNrm() + " = " + this["BSE"].TryEvaluate() + " + float3(0,0,1);", - "float3 " + DetailNrm() + " = " + this["DTL"].TryEvaluate() + " * float3(-1,-1,1);", - "float3 " + CombinedNrm() + " = " + BaseNrm() + "*dot(" + BaseNrm() + ", " + DetailNrm() + ")/" + BaseNrm() + ".z - " + DetailNrm() + ";" - }; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return CombinedNrm(); - } - - public override Vector4 EvalCPU() { - - Vector3 bse = (Vector3)GetInputData( "BSE" ).dataUniform + new Vector3(0,0,1); - Vector3 dtl = Vector3.Scale( (Vector3)GetInputData( "DTL" ).dataUniform, new Vector3(-1,-1,1)); - - Vector3 cmb = bse*Vector3.Dot(bse, dtl)/bse.z - dtl; - - return cmb; - } - - - - - } +using UnityEngine; +using UnityEditor; +using System.Collections; +//using System; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_NormalBlend : SF_Node { + + // SF_Node tNode; + + public SFN_NormalBlend() { + + } + + + public override void Initialize() { + base.Initialize( "Normal Blend" ); + base.showColor = true; + UseLowerReadonlyValues( false ); + base.alwaysDefineVariable = true; + base.shaderGenMode = ShaderGenerationMode.CustomFunction; + texture.CompCount = 3; + + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv3,false), + SF_NodeConnector.Create(this,"BSE","Base",ConType.cInput,ValueType.VTv3,false).SetRequired(true), + SF_NodeConnector.Create(this,"DTL","Det.",ConType.cInput,ValueType.VTv3,false).SetRequired(true) + }; + + //extraWidthInput = 5; + + } + + + public override void OnUpdateNode( NodeUpdateType updType, bool cascade = true ) { + if( InputsConnected() ) + RefreshValue( 1, 2 ); + base.OnUpdateNode( updType ); + } + + public override bool IsUniformOutput() { + return ( GetInputData( "BSE" ).uniform && GetInputData( "DTL" ).uniform ); + } + + public override int GetEvaluatedComponentCount() { + return 3; + } + + public string BaseNrm() { + return GetVariableName() + "_nrm_base"; + } + public string DetailNrm() { + return GetVariableName() + "_nrm_detail"; + } + public string CombinedNrm() { + return GetVariableName() + "_nrm_combined"; + } + + /* + float3 t = nrmBase + float3(0, 0, 1); + float3 u = nrmDetail * float3(-1, -1, 1); + float3 rnm = t*dot(t, u)/t.z - u; + */ + + public override string[] GetBlitOutputLines() { + return new string[] { + "float3 bse = _bse.xyz + float3(0,0,1);", + "float3 dtl = _dtl.xyz * float3(-1,-1,1);", + "float4(bse*dot(bse, dtl)/bse.z - dtl,0)" + }; + } + + public override string[] GetPreDefineRows() { + return new string[] { + "float3 " + BaseNrm() + " = " + this["BSE"].TryEvaluate() + " + float3(0,0,1);", + "float3 " + DetailNrm() + " = " + this["DTL"].TryEvaluate() + " * float3(-1,-1,1);", + "float3 " + CombinedNrm() + " = " + BaseNrm() + "*dot(" + BaseNrm() + ", " + DetailNrm() + ")/" + BaseNrm() + ".z - " + DetailNrm() + ";" + }; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return CombinedNrm(); + } + + public override Vector4 EvalCPU() { + + Vector3 bse = (Vector3)GetInputData( "BSE" ).dataUniform + new Vector3(0,0,1); + Vector3 dtl = Vector3.Scale( (Vector3)GetInputData( "DTL" ).dataUniform, new Vector3(-1,-1,1)); + + Vector3 cmb = bse*Vector3.Dot(bse, dtl)/bse.z - dtl; + + return cmb; + } + + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_NormalBlend.cs.meta b/Editor/Code/_Nodes/SFN_NormalBlend.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_NormalBlend.cs.meta rename to Editor/Code/_Nodes/SFN_NormalBlend.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_NormalVector.cs b/Editor/Code/_Nodes/SFN_NormalVector.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_NormalVector.cs rename to Editor/Code/_Nodes/SFN_NormalVector.cs index 2219ea75..91e7e30a --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_NormalVector.cs +++ b/Editor/Code/_Nodes/SFN_NormalVector.cs @@ -1,78 +1,78 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_NormalVector : SF_Node { - - - public bool perturbed; - - public SFN_NormalVector() { - - } - - public override void Initialize() { - perturbed = false; - base.Initialize( "Normal Dir.", InitialPreviewRenderMode.BlitSphere ); - base.showColor = true; - base.UseLowerPropertyBox( true, true ); - //UpdateIcon(); - base.texture.CompCount = 3; - base.neverDefineVariable = true; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv3,false) - }; - base.lockedVariableName = true; - } - - public override Vector4 EvalCPU() { - return new Color( 0, 0, 1, 0 ); - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - if( SF_Evaluator.inVert || SF_Evaluator.inTess ) - return "v.normal"; - return perturbed ? "normalDirection" : "i.normalDir"; - } - /* - public void UpdateIcon() { - if(perturbed){ - texture.LoadDataTexture(this.GetType(), "2"); - } else { - texture.LoadDataTexture(this.GetType()); - } - base.texture.SetIconId( perturbed ? 1 : 0 ); - }*/ - - public override void DrawLowerPropertyBox() { - EditorGUI.BeginChangeCheck(); - Rect r = lowerRect; - r.xMin += 3; - perturbed = EditorGUI.Toggle( r, perturbed ); - r.xMin += 17; - GUI.Label(r,"Perturbed"); - if( EditorGUI.EndChangeCheck() ) { - //UpdateIcon(); - OnUpdateNode(); - } - - } - - public override string SerializeSpecialData() { - return "pt:" + perturbed; - } - - public override void DeserializeSpecialData( string key, string value ) { - switch( key ) { - case "pt": - perturbed = bool.Parse( value ); - //UpdateIcon(); - break; - } - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_NormalVector : SF_Node { + + + public bool perturbed; + + public SFN_NormalVector() { + + } + + public override void Initialize() { + perturbed = false; + base.Initialize( "Normal Dir.", InitialPreviewRenderMode.BlitSphere ); + base.showColor = true; + base.UseLowerPropertyBox( true, true ); + //UpdateIcon(); + base.texture.CompCount = 3; + base.neverDefineVariable = true; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv3,false) + }; + base.lockedVariableName = true; + } + + public override Vector4 EvalCPU() { + return new Color( 0, 0, 1, 0 ); + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + if( SF_Evaluator.inVert || SF_Evaluator.inTess ) + return "v.normal"; + return perturbed ? "normalDirection" : "i.normalDir"; + } + /* + public void UpdateIcon() { + if(perturbed){ + texture.LoadDataTexture(this.GetType(), "2"); + } else { + texture.LoadDataTexture(this.GetType()); + } + base.texture.SetIconId( perturbed ? 1 : 0 ); + }*/ + + public override void DrawLowerPropertyBox() { + EditorGUI.BeginChangeCheck(); + Rect r = lowerRect; + r.xMin += 3; + perturbed = EditorGUI.Toggle( r, perturbed ); + r.xMin += 17; + GUI.Label(r,"Perturbed"); + if( EditorGUI.EndChangeCheck() ) { + //UpdateIcon(); + OnUpdateNode(); + } + + } + + public override string SerializeSpecialData() { + return "pt:" + perturbed; + } + + public override void DeserializeSpecialData( string key, string value ) { + switch( key ) { + case "pt": + perturbed = bool.Parse( value ); + //UpdateIcon(); + break; + } + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_NormalVector.cs.meta b/Editor/Code/_Nodes/SFN_NormalVector.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_NormalVector.cs.meta rename to Editor/Code/_Nodes/SFN_NormalVector.cs.meta index cf258db3..a829cc97 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_NormalVector.cs.meta +++ b/Editor/Code/_Nodes/SFN_NormalVector.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 60dad608f3107a142b0f959e8671cf81 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 60dad608f3107a142b0f959e8671cf81 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Normalize.cs b/Editor/Code/_Nodes/SFN_Normalize.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Normalize.cs rename to Editor/Code/_Nodes/SFN_Normalize.cs index 90a67b0d..2ea9432f --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Normalize.cs +++ b/Editor/Code/_Nodes/SFN_Normalize.cs @@ -1,44 +1,44 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Normalize : SF_Node_Arithmetic { - - public SFN_Normalize() { - } - - public override void Initialize() { - base.Initialize( "Normalize" ); - base.PrepareArithmetic( 1 ); - base.shaderGenMode = ShaderGenerationMode.SimpleFunction; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "normalize(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; - } - - /* - public override float NodeOperator( int c ) { - return Mathf.Abs( GetInputData( 1, x, y, c ) ); - }*/ - - public override Vector4 EvalCPU() { - - Vector4 v = GetInputData( "IN" ).dataUniform; - - switch( GetInputData( "IN" ).CompCount ) { - case 1: - float val = Mathf.Sign( v.x ); - return new Vector4( val, val, val, val ); - case 2: - return (Vector4)((Vector2)v).normalized; - case 3: - return (Vector4)( (Vector3)v ).normalized; - default: - return v.normalized; - } - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Normalize : SF_Node_Arithmetic { + + public SFN_Normalize() { + } + + public override void Initialize() { + base.Initialize( "Normalize" ); + base.PrepareArithmetic( 1 ); + base.shaderGenMode = ShaderGenerationMode.SimpleFunction; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "normalize(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; + } + + /* + public override float NodeOperator( int c ) { + return Mathf.Abs( GetInputData( 1, x, y, c ) ); + }*/ + + public override Vector4 EvalCPU() { + + Vector4 v = GetInputData( "IN" ).dataUniform; + + switch( GetInputData( "IN" ).CompCount ) { + case 1: + float val = Mathf.Sign( v.x ); + return new Vector4( val, val, val, val ); + case 2: + return (Vector4)((Vector2)v).normalized; + case 3: + return (Vector4)( (Vector3)v ).normalized; + default: + return v.normalized; + } + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Normalize.cs.meta b/Editor/Code/_Nodes/SFN_Normalize.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Normalize.cs.meta rename to Editor/Code/_Nodes/SFN_Normalize.cs.meta index 5b6d78c9..36856509 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Normalize.cs.meta +++ b/Editor/Code/_Nodes/SFN_Normalize.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: eaaa4d2409678fa4aa98dd05538841e7 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: eaaa4d2409678fa4aa98dd05538841e7 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ObjectPosition.cs b/Editor/Code/_Nodes/SFN_ObjectPosition.cs old mode 100755 new mode 100644 similarity index 97% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ObjectPosition.cs rename to Editor/Code/_Nodes/SFN_ObjectPosition.cs index d33922bc..4741261d --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ObjectPosition.cs +++ b/Editor/Code/_Nodes/SFN_ObjectPosition.cs @@ -1,39 +1,39 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_ObjectPosition : SF_Node { - - - public SFN_ObjectPosition() { - - } - - public override void Initialize() { - base.Initialize( "Object Pos." ); - base.showColor = true; - base.UseLowerPropertyBox( false ); - base.texture.CompCount = 4; - base.neverDefineVariable = true; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"XYZ","XYZ",ConType.cOutput,ValueType.VTv3,false).Outputting(OutChannel.RGB), - SF_NodeConnector.Create(this,"X","X",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.R).WithColor(Color.red), - SF_NodeConnector.Create(this,"Y","Y",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.G).WithColor(Color.green), - SF_NodeConnector.Create(this,"Z","Z",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.B).WithColor(Color.blue), - SF_NodeConnector.Create(this,"W","W",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.A) - }; - } - - public override Vector4 EvalCPU() { - return new Color( 0f, 0.7071068f, 0.7071068f, 0f ); - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "objPos"; // normalize(_WorldSpaceLightPos0.xyz); - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_ObjectPosition : SF_Node { + + + public SFN_ObjectPosition() { + + } + + public override void Initialize() { + base.Initialize( "Object Pos." ); + base.showColor = true; + base.UseLowerPropertyBox( false ); + base.texture.CompCount = 4; + base.neverDefineVariable = true; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"XYZ","XYZ",ConType.cOutput,ValueType.VTv3,false).Outputting(OutChannel.RGB), + SF_NodeConnector.Create(this,"X","X",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.R).WithColor(Color.red), + SF_NodeConnector.Create(this,"Y","Y",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.G).WithColor(Color.green), + SF_NodeConnector.Create(this,"Z","Z",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.B).WithColor(Color.blue), + SF_NodeConnector.Create(this,"W","W",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.A) + }; + } + + public override Vector4 EvalCPU() { + return new Color( 0f, 0.7071068f, 0.7071068f, 0f ); + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "objPos"; // normalize(_WorldSpaceLightPos0.xyz); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ObjectPosition.cs.meta b/Editor/Code/_Nodes/SFN_ObjectPosition.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ObjectPosition.cs.meta rename to Editor/Code/_Nodes/SFN_ObjectPosition.cs.meta index f87fead4..34c6c1a6 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ObjectPosition.cs.meta +++ b/Editor/Code/_Nodes/SFN_ObjectPosition.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 258f9aa8e54fb9646858e46b7fd133dd -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 258f9aa8e54fb9646858e46b7fd133dd +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ObjectScale.cs b/Editor/Code/_Nodes/SFN_ObjectScale.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ObjectScale.cs rename to Editor/Code/_Nodes/SFN_ObjectScale.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ObjectScale.cs.meta b/Editor/Code/_Nodes/SFN_ObjectScale.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ObjectScale.cs.meta rename to Editor/Code/_Nodes/SFN_ObjectScale.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_OneMinus.cs b/Editor/Code/_Nodes/SFN_OneMinus.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_OneMinus.cs rename to Editor/Code/_Nodes/SFN_OneMinus.cs index e1a3e0de..326afe8f --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_OneMinus.cs +++ b/Editor/Code/_Nodes/SFN_OneMinus.cs @@ -1,57 +1,57 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -using System; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_OneMinus : SF_Node { - - public SFN_OneMinus() { - - } - - public override void Initialize() { - base.Initialize( "One Minus" ); - base.showColor = true; - base.shaderGenMode = ShaderGenerationMode.CustomFunction; - UseLowerReadonlyValues( true ); - - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTvPending,false), - SF_NodeConnector.Create(this,"IN","",ConType.cInput,ValueType.VTvPending,false).SetRequired(true) - }; - - base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1] ); - } - - public override int GetEvaluatedComponentCount() { - return this["IN"].GetCompCount(); - } - - public override bool IsUniformOutput() { - return GetInputData( "IN" ).uniform; - } - - public override string[] GetBlitOutputLines() { - return new string[] { "1.0 - _in" }; - } - - - // New system - public override void RefreshValue() { - RefreshValue( 1, 1 ); - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "(1.0 - " + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; - } - - public override float EvalCPU( int c ) { - return 1f - GetInputData( "IN", c ); - } - - - } +using UnityEngine; +using UnityEditor; +using System.Collections; +using System; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_OneMinus : SF_Node { + + public SFN_OneMinus() { + + } + + public override void Initialize() { + base.Initialize( "One Minus" ); + base.showColor = true; + base.shaderGenMode = ShaderGenerationMode.CustomFunction; + UseLowerReadonlyValues( true ); + + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTvPending,false), + SF_NodeConnector.Create(this,"IN","",ConType.cInput,ValueType.VTvPending,false).SetRequired(true) + }; + + base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1] ); + } + + public override int GetEvaluatedComponentCount() { + return this["IN"].GetCompCount(); + } + + public override bool IsUniformOutput() { + return GetInputData( "IN" ).uniform; + } + + public override string[] GetBlitOutputLines() { + return new string[] { "1.0 - _in" }; + } + + + // New system + public override void RefreshValue() { + RefreshValue( 1, 1 ); + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "(1.0 - " + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; + } + + public override float EvalCPU( int c ) { + return 1f - GetInputData( "IN", c ); + } + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_OneMinus.cs.meta b/Editor/Code/_Nodes/SFN_OneMinus.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_OneMinus.cs.meta rename to Editor/Code/_Nodes/SFN_OneMinus.cs.meta index 5e3ca60d..ae830191 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_OneMinus.cs.meta +++ b/Editor/Code/_Nodes/SFN_OneMinus.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 553497763edc19b4a854a3f6c55a2782 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 553497763edc19b4a854a3f6c55a2782 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Panner.cs b/Editor/Code/_Nodes/SFN_Panner.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Panner.cs rename to Editor/Code/_Nodes/SFN_Panner.cs index e65d66bf..8f832670 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Panner.cs +++ b/Editor/Code/_Nodes/SFN_Panner.cs @@ -1,161 +1,161 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -//using System; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Panner : SF_Node { - - // SF_Node tNode; - - - public Vector2 speed = new Vector2(1,1); - - public SFN_Panner() { - - } - - - public override void Initialize() { - base.Initialize( "Panner" ); - base.showColor = true; - base.UseLowerPropertyBox( true, true ); - base.shaderGenMode = ShaderGenerationMode.Modal; - texture.CompCount = 2; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"UVOUT","UV",ConType.cOutput,ValueType.VTv2,false), - SF_NodeConnector.Create(this,"UVIN","UV",ConType.cInput,ValueType.VTv2,false).SetRequired(true)/*.SetGhostNodeLink(typeof(SFN_TexCoord),"UVOUT")*/, - SF_NodeConnector.Create(this,"DIST","Dist",ConType.cInput,ValueType.VTv1,false).SetRequired(false).SetGhostNodeLink(typeof(SFN_Time),"T") - }; - - } - - - public override void DrawLowerPropertyBox() { - //EditorGUI.BeginChangeCheck(); - Rect r = lowerRect; - r.width /= 8; - GUI.Label(r,"U"); - r.x += r.width; - r.width *= 3; - //SF_GUI.EnterableFloatField( this, r, ref speed.x, EditorStyles.textField ); - UndoableEnterableFloatField( r, ref speed.x, "U speed", EditorStyles.textField ); - //speed.x = EditorGUI.FloatField( r, speed.x ); - r.x += r.width; - r.width /= 3; - GUI.Label( r, "V" ); - r.x += r.width; - r.width *= 3; - //SF_GUI.EnterableFloatField( this, r, ref speed.y, EditorStyles.textField ); - UndoableEnterableFloatField( r, ref speed.y, "V speed", EditorStyles.textField ); - //speed.y = EditorGUI.FloatField( r, speed.y ); - - //if( EditorGUI.EndChangeCheck() ) { - // OnUpdateNode(); - //} - - } - - public override string[] ExtraPassedFloatProperties() { - return new string[]{ - "Uspeed", - "Vspeed" - }; - } - - public override string[] GetModalModes() { - return new string[]{ - "REQONLY", - "DIST" - }; - } - - public override string GetCurrentModalMode() { - if( this["DIST"].IsConnectedAndEnabled() ) - return "DIST"; - return "REQONLY"; - } - - public override void PrepareRendering( Material mat ) { - mat.SetFloat( "_uspeed", speed.x ); - mat.SetFloat( "_vspeed", speed.y ); - } - - public override string[] GetBlitOutputLines( string mode ) { - string distStr = mode == "DIST" ? "_dist.x" : "0"; - return new string[]{ - "float4((_uvin.xy+" + distStr + "*float2(_uspeed,_vspeed)),0,0)" - }; - } - - public override void OnUpdateNode( NodeUpdateType updType = NodeUpdateType.Hard, bool cascade = true ) { - if( InputsConnected() ) - RefreshValue( 1, 2 ); - base.OnUpdateNode( updType ); - } - - public override bool IsUniformOutput() { - if(this["UVIN"].IsConnectedAndEnabled() && this["DIST"].IsConnectedAndEnabled()){ - return ( GetInputData( "UVIN" ).uniform && GetInputData( "DIST" ).uniform ); - } - return false; - } - - public override int GetEvaluatedComponentCount() { - return 2; - } - - public override bool UpdatesOverTime() { - return true; //GetInputIsConnected( "DIST" ); - } - - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - string distEval = this["DIST"].TryEvaluate(); - return "(" + GetInputCon( "UVIN" ).Evaluate() + "+" + distEval + "*float2(" + speed.x + "," + speed.y + "))"; - } - - // TODO Expose more out here! - public override Vector4 EvalCPU() { - - Vector2 inputVec = Vector2.one; - - if(GetInputIsConnected("UVIN")){ - inputVec = new Vector2( GetInputData( "UVIN", 0 ), GetInputData( "UVIN", 1 ) ); - } else { - //inputVec = new Vector2( x/((float)SF_Node.NODE_SIZE), y/SF_NodeData.RESf ); // TODO: should use ghost nodes... - } - - - float distance = GetInputIsConnected( "DIST" ) ? GetInputData( "DIST", 0 ) : 0f; - return (Vector4)( inputVec + speed * distance ); - } - - - public override string SerializeSpecialData() { - string s = "spu:" + speed.x + ","; - s += "spv:" + speed.y; - return s; - } - - public override void DeserializeSpecialData( string key, string value ) { - switch( key ) { - case "spu": - float fVal1 = float.Parse( value ); - speed.x = fVal1; - break; - case "spv": - float fVal2 = float.Parse( value ); - speed.y = fVal2; - break; - } - } - - - - - - } +using UnityEngine; +using UnityEditor; +using System.Collections; +//using System; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Panner : SF_Node { + + // SF_Node tNode; + + + public Vector2 speed = new Vector2(1,1); + + public SFN_Panner() { + + } + + + public override void Initialize() { + base.Initialize( "Panner" ); + base.showColor = true; + base.UseLowerPropertyBox( true, true ); + base.shaderGenMode = ShaderGenerationMode.Modal; + texture.CompCount = 2; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"UVOUT","UV",ConType.cOutput,ValueType.VTv2,false), + SF_NodeConnector.Create(this,"UVIN","UV",ConType.cInput,ValueType.VTv2,false).SetRequired(true)/*.SetGhostNodeLink(typeof(SFN_TexCoord),"UVOUT")*/, + SF_NodeConnector.Create(this,"DIST","Dist",ConType.cInput,ValueType.VTv1,false).SetRequired(false).SetGhostNodeLink(typeof(SFN_Time),"T") + }; + + } + + + public override void DrawLowerPropertyBox() { + //EditorGUI.BeginChangeCheck(); + Rect r = lowerRect; + r.width /= 8; + GUI.Label(r,"U"); + r.x += r.width; + r.width *= 3; + //SF_GUI.EnterableFloatField( this, r, ref speed.x, EditorStyles.textField ); + UndoableEnterableFloatField( r, ref speed.x, "U speed", EditorStyles.textField ); + //speed.x = EditorGUI.FloatField( r, speed.x ); + r.x += r.width; + r.width /= 3; + GUI.Label( r, "V" ); + r.x += r.width; + r.width *= 3; + //SF_GUI.EnterableFloatField( this, r, ref speed.y, EditorStyles.textField ); + UndoableEnterableFloatField( r, ref speed.y, "V speed", EditorStyles.textField ); + //speed.y = EditorGUI.FloatField( r, speed.y ); + + //if( EditorGUI.EndChangeCheck() ) { + // OnUpdateNode(); + //} + + } + + public override string[] ExtraPassedFloatProperties() { + return new string[]{ + "Uspeed", + "Vspeed" + }; + } + + public override string[] GetModalModes() { + return new string[]{ + "REQONLY", + "DIST" + }; + } + + public override string GetCurrentModalMode() { + if( this["DIST"].IsConnectedAndEnabled() ) + return "DIST"; + return "REQONLY"; + } + + public override void PrepareRendering( Material mat ) { + mat.SetFloat( "_uspeed", speed.x ); + mat.SetFloat( "_vspeed", speed.y ); + } + + public override string[] GetBlitOutputLines( string mode ) { + string distStr = mode == "DIST" ? "_dist.x" : "0"; + return new string[]{ + "float4((_uvin.xy+" + distStr + "*float2(_uspeed,_vspeed)),0,0)" + }; + } + + public override void OnUpdateNode( NodeUpdateType updType = NodeUpdateType.Hard, bool cascade = true ) { + if( InputsConnected() ) + RefreshValue( 1, 2 ); + base.OnUpdateNode( updType ); + } + + public override bool IsUniformOutput() { + if(this["UVIN"].IsConnectedAndEnabled() && this["DIST"].IsConnectedAndEnabled()){ + return ( GetInputData( "UVIN" ).uniform && GetInputData( "DIST" ).uniform ); + } + return false; + } + + public override int GetEvaluatedComponentCount() { + return 2; + } + + public override bool UpdatesOverTime() { + return true; //GetInputIsConnected( "DIST" ); + } + + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + string distEval = this["DIST"].TryEvaluate(); + return "(" + GetInputCon( "UVIN" ).Evaluate() + "+" + distEval + "*float2(" + speed.x + "," + speed.y + "))"; + } + + // TODO Expose more out here! + public override Vector4 EvalCPU() { + + Vector2 inputVec = Vector2.one; + + if(GetInputIsConnected("UVIN")){ + inputVec = new Vector2( GetInputData( "UVIN", 0 ), GetInputData( "UVIN", 1 ) ); + } else { + //inputVec = new Vector2( x/((float)SF_Node.NODE_SIZE), y/SF_NodeData.RESf ); // TODO: should use ghost nodes... + } + + + float distance = GetInputIsConnected( "DIST" ) ? GetInputData( "DIST", 0 ) : 0f; + return (Vector4)( inputVec + speed * distance ); + } + + + public override string SerializeSpecialData() { + string s = "spu:" + speed.x + ","; + s += "spv:" + speed.y; + return s; + } + + public override void DeserializeSpecialData( string key, string value ) { + switch( key ) { + case "spu": + float fVal1 = float.Parse( value ); + speed.x = fVal1; + break; + case "spv": + float fVal2 = float.Parse( value ); + speed.y = fVal2; + break; + } + } + + + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Panner.cs.meta b/Editor/Code/_Nodes/SFN_Panner.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Panner.cs.meta rename to Editor/Code/_Nodes/SFN_Panner.cs.meta index 068e4e17..2f12f188 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Panner.cs.meta +++ b/Editor/Code/_Nodes/SFN_Panner.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 42c03a582f7865e4ab828b6649d825a8 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 42c03a582f7865e4ab828b6649d825a8 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Parallax.cs b/Editor/Code/_Nodes/SFN_Parallax.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Parallax.cs rename to Editor/Code/_Nodes/SFN_Parallax.cs index 4b49e76d..9d5a46d2 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Parallax.cs +++ b/Editor/Code/_Nodes/SFN_Parallax.cs @@ -1,142 +1,142 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -//using System; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Parallax : SF_Node { - - // SF_Node tNode; - - public SFN_Parallax() { - - } - - - public override void Initialize() { - base.Initialize( "Parallax" ); - base.showColor = true; - base.shaderGenMode = ShaderGenerationMode.ManualModal; - UseLowerReadonlyValues( false ); - texture.CompCount = 2; - //SF_NodeConnection lerpCon; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"UVOUT","UV",ConType.cOutput,ValueType.VTv2,false).Outputting(OutChannel.RG), - SF_NodeConnector.Create(this,"UVIN","UV",ConType.cInput,ValueType.VTv2,false).SetGhostNodeLink(typeof(SFN_TexCoord),"UVOUT"), - SF_NodeConnector.Create(this,"HEI","Hei",ConType.cInput,ValueType.VTv1,false).SetRequired(true), - SF_NodeConnector.Create(this,"DEP","Dep",ConType.cInput,ValueType.VTv1,false), - SF_NodeConnector.Create(this,"REF","Ref",ConType.cInput,ValueType.VTv1,false) - }; - - //base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1], connectors[2] ); - } - - - public override void OnUpdateNode( NodeUpdateType updType, bool cascade = true ) { - if( InputsConnected() ) - RefreshValue( 1, 2 ); - base.OnUpdateNode( updType ); - } - - - public override bool IsUniformOutput() { - return false; - } - - public override int GetEvaluatedComponentCount() { - return 2; - } - - public override string GetCurrentModalMode() { - - - bool uvCon = GetInputIsConnected( "UVIN" ); - bool refCon = GetInputIsConnected( "REF" ); - bool depCon = GetInputIsConnected( "DEP" ); - - if( !uvCon && !refCon && !depCon ) { - return "REQONLY"; - } - - if( uvCon && !refCon && !depCon ) { - return "UV"; - } - - string s = ""; - if( refCon && depCon ) { - s = "DEP_REF"; - } else { - if( refCon ) - s = "REF"; - else - s = "DEP"; - } - - - if( GetInputIsConnected( "UVIN" ) ) { - s = "UV_" + s; - } - - return s; - - } - - public override string[] GetModalModes() { - return new string[] { - "REQONLY", - "DEP", - "REF", - "DEP_REF", - "UV", - "UV_DEP", - "UV_REF", - "UV_DEP_REF", - }; - } - - public override string[] GetBlitOutputLines( string mode ) { - - string uvStr = mode.Contains( "UV" ) ? "_uv.xy" : "i.uv0.xy"; - string depStr = mode.Contains( "DEP" ) ? "_dep.x" : "0.05"; - string refStr = mode.Contains( "REF" ) ? "_ref.x" : "0.5"; - string vDir = "mul(tangentTransform, viewDirection).xy"; - - string line = string.Format( "({0}*({1} - {2})*{3} + {4})", depStr, "_hei", refStr, vDir, uvStr ); - return new string[] { line }; - - } - - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - - string uv = GetInputIsConnected( "UVIN" ) ? GetInputCon( "UVIN" ).Evaluate() : "i.uv0.xy"; - string hei = GetInputCon( "HEI" ).Evaluate(); - string dep = GetInputIsConnected( "DEP" ) ? GetInputCon( "DEP" ).Evaluate() : "0.05"; - string href = GetInputIsConnected( "REF" ) ? GetInputCon( "REF" ).Evaluate() : "0.5"; - string vDir = "mul(tangentTransform, viewDirection).xy"; - - return "(" + dep + "*(" + hei + " - " + href + ")*" + vDir + " + " + uv + ")"; - } - - // TODO Expose more out here! - public override float EvalCPU( int c ) { - - //return 1f; - - - if( GetInputIsConnected( "UVIN" ) && GetInputIsConnected( "HEI" ) ) { // UV and height connected ? - float hei = GetInputData( "HEI", c ); - float dep = GetInputIsConnected( "DEP" ) ? GetInputData( "DEP", c ) : 0.05f; - float href = GetInputIsConnected( "REF" ) ? GetInputData( "REF", c ) : 0.5f; - return GetInputData( "UVIN", c ) - ( dep * ( hei - href ) ); - } - else - return 0; - //return Lerp( GetInputData( 1, x, y, c ), GetInputData( 2, x, y, c ), GetInputData( 3, x, y, c ) ); - } - - - } +using UnityEngine; +using UnityEditor; +using System.Collections; +//using System; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Parallax : SF_Node { + + // SF_Node tNode; + + public SFN_Parallax() { + + } + + + public override void Initialize() { + base.Initialize( "Parallax" ); + base.showColor = true; + base.shaderGenMode = ShaderGenerationMode.ManualModal; + UseLowerReadonlyValues( false ); + texture.CompCount = 2; + //SF_NodeConnection lerpCon; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"UVOUT","UV",ConType.cOutput,ValueType.VTv2,false).Outputting(OutChannel.RG), + SF_NodeConnector.Create(this,"UVIN","UV",ConType.cInput,ValueType.VTv2,false).SetGhostNodeLink(typeof(SFN_TexCoord),"UVOUT"), + SF_NodeConnector.Create(this,"HEI","Hei",ConType.cInput,ValueType.VTv1,false).SetRequired(true), + SF_NodeConnector.Create(this,"DEP","Dep",ConType.cInput,ValueType.VTv1,false), + SF_NodeConnector.Create(this,"REF","Ref",ConType.cInput,ValueType.VTv1,false) + }; + + //base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1], connectors[2] ); + } + + + public override void OnUpdateNode( NodeUpdateType updType, bool cascade = true ) { + if( InputsConnected() ) + RefreshValue( 1, 2 ); + base.OnUpdateNode( updType ); + } + + + public override bool IsUniformOutput() { + return false; + } + + public override int GetEvaluatedComponentCount() { + return 2; + } + + public override string GetCurrentModalMode() { + + + bool uvCon = GetInputIsConnected( "UVIN" ); + bool refCon = GetInputIsConnected( "REF" ); + bool depCon = GetInputIsConnected( "DEP" ); + + if( !uvCon && !refCon && !depCon ) { + return "REQONLY"; + } + + if( uvCon && !refCon && !depCon ) { + return "UV"; + } + + string s = ""; + if( refCon && depCon ) { + s = "DEP_REF"; + } else { + if( refCon ) + s = "REF"; + else + s = "DEP"; + } + + + if( GetInputIsConnected( "UVIN" ) ) { + s = "UV_" + s; + } + + return s; + + } + + public override string[] GetModalModes() { + return new string[] { + "REQONLY", + "DEP", + "REF", + "DEP_REF", + "UV", + "UV_DEP", + "UV_REF", + "UV_DEP_REF", + }; + } + + public override string[] GetBlitOutputLines( string mode ) { + + string uvStr = mode.Contains( "UV" ) ? "_uv.xy" : "i.uv0.xy"; + string depStr = mode.Contains( "DEP" ) ? "_dep.x" : "0.05"; + string refStr = mode.Contains( "REF" ) ? "_ref.x" : "0.5"; + string vDir = "mul(tangentTransform, viewDirection).xy"; + + string line = string.Format( "({0}*({1} - {2})*{3} + {4})", depStr, "_hei", refStr, vDir, uvStr ); + return new string[] { line }; + + } + + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + + string uv = GetInputIsConnected( "UVIN" ) ? GetInputCon( "UVIN" ).Evaluate() : "i.uv0.xy"; + string hei = GetInputCon( "HEI" ).Evaluate(); + string dep = GetInputIsConnected( "DEP" ) ? GetInputCon( "DEP" ).Evaluate() : "0.05"; + string href = GetInputIsConnected( "REF" ) ? GetInputCon( "REF" ).Evaluate() : "0.5"; + string vDir = "mul(tangentTransform, viewDirection).xy"; + + return "(" + dep + "*(" + hei + " - " + href + ")*" + vDir + " + " + uv + ")"; + } + + // TODO Expose more out here! + public override float EvalCPU( int c ) { + + //return 1f; + + + if( GetInputIsConnected( "UVIN" ) && GetInputIsConnected( "HEI" ) ) { // UV and height connected ? + float hei = GetInputData( "HEI", c ); + float dep = GetInputIsConnected( "DEP" ) ? GetInputData( "DEP", c ) : 0.05f; + float href = GetInputIsConnected( "REF" ) ? GetInputData( "REF", c ) : 0.5f; + return GetInputData( "UVIN", c ) - ( dep * ( hei - href ) ); + } + else + return 0; + //return Lerp( GetInputData( 1, x, y, c ), GetInputData( 2, x, y, c ), GetInputData( 3, x, y, c ) ); + } + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Parallax.cs.meta b/Editor/Code/_Nodes/SFN_Parallax.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Parallax.cs.meta rename to Editor/Code/_Nodes/SFN_Parallax.cs.meta index 72f3a9a4..ac9cd6b8 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Parallax.cs.meta +++ b/Editor/Code/_Nodes/SFN_Parallax.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 45449b9f1a89a1f419300f90e557f9b6 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 45449b9f1a89a1f419300f90e557f9b6 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Phi.cs b/Editor/Code/_Nodes/SFN_Phi.cs old mode 100755 new mode 100644 similarity index 94% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Phi.cs rename to Editor/Code/_Nodes/SFN_Phi.cs index b3d72ce5..2f6d6733 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Phi.cs +++ b/Editor/Code/_Nodes/SFN_Phi.cs @@ -1,19 +1,19 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Phi : SFN_Node_Constant { - - public SFN_Phi() { - } - - public override void Initialize() { - base.Initialize( "Phi" ); - base.PrepareConstant( "const_phi", "1.61803398875" ); - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Phi : SFN_Node_Constant { + + public SFN_Phi() { + } + + public override void Initialize() { + base.Initialize( "Phi" ); + base.PrepareConstant( "const_phi", "1.61803398875" ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Phi.cs.meta b/Editor/Code/_Nodes/SFN_Phi.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Phi.cs.meta rename to Editor/Code/_Nodes/SFN_Phi.cs.meta index ce3b1229..0c3c0988 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Phi.cs.meta +++ b/Editor/Code/_Nodes/SFN_Phi.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: d74bd6a57e872b440a8754bf05a4e9cc -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: d74bd6a57e872b440a8754bf05a4e9cc +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Pi.cs b/Editor/Code/_Nodes/SFN_Pi.cs old mode 100755 new mode 100644 similarity index 94% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Pi.cs rename to Editor/Code/_Nodes/SFN_Pi.cs index 62b2c7d9..a4d2869d --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Pi.cs +++ b/Editor/Code/_Nodes/SFN_Pi.cs @@ -1,19 +1,19 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Pi : SFN_Node_Constant { - - public SFN_Pi() { - } - - public override void Initialize() { - base.Initialize( "Pi" ); - base.PrepareConstant( "const_pi", "3.141592654" ); - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Pi : SFN_Node_Constant { + + public SFN_Pi() { + } + + public override void Initialize() { + base.Initialize( "Pi" ); + base.PrepareConstant( "const_pi", "3.141592654" ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Pi.cs.meta b/Editor/Code/_Nodes/SFN_Pi.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Pi.cs.meta rename to Editor/Code/_Nodes/SFN_Pi.cs.meta index ed1f98fa..f4dd274f --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Pi.cs.meta +++ b/Editor/Code/_Nodes/SFN_Pi.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: f2b0c407da0b7b8439fdd2e019fed284 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: f2b0c407da0b7b8439fdd2e019fed284 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_PixelSize.cs b/Editor/Code/_Nodes/SFN_PixelSize.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_PixelSize.cs rename to Editor/Code/_Nodes/SFN_PixelSize.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_PixelSize.cs.meta b/Editor/Code/_Nodes/SFN_PixelSize.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_PixelSize.cs.meta rename to Editor/Code/_Nodes/SFN_PixelSize.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Posterize.cs b/Editor/Code/_Nodes/SFN_Posterize.cs old mode 100755 new mode 100644 similarity index 97% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Posterize.cs rename to Editor/Code/_Nodes/SFN_Posterize.cs index 6ab846b8..8f6e6436 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Posterize.cs +++ b/Editor/Code/_Nodes/SFN_Posterize.cs @@ -1,48 +1,48 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Posterize : SF_Node_Arithmetic { - - public SFN_Posterize() { - } - - public override void Initialize() { - base.Initialize( "Posterize" ); - base.showColor = true; - base.shaderGenMode = ShaderGenerationMode.CustomFunction; - UseLowerReadonlyValues( true ); - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create( this, "OUT", "", ConType.cOutput, ValueType.VTvPending, false ), - SF_NodeConnector.Create( this, "IN", "", ConType.cInput, ValueType.VTvPending, false ).SetRequired( true ), - SF_NodeConnector.Create( this, "STPS", "Steps", ConType.cInput, ValueType.VTv1, false ).SetRequired( true ).WithUseCount(2) - }; - base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1]); - base.extraWidthInput = 6; - } - - public override bool IsUniformOutput() { - return ( GetInputData( "IN" ).uniform && GetInputData( "STPS" ).uniform ); - } - - public override string[] GetBlitOutputLines() { - return new string[] { "floor(_in * _stps) / (_stps - 1)" }; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - - string mainInput = GetConnectorByStringID( "IN" ).TryEvaluate(); - string steps = GetConnectorByStringID( "STPS" ).TryEvaluate(); - - - return "floor(" + mainInput + " * " + steps + ") / (" + steps + " - 1)"; - } - - public override float EvalCPU( int c ) { - float steps = GetInputData( "STPS", c ); - return Mathf.Floor( GetInputData( "IN", c ) * steps ) / (steps - 1); - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Posterize : SF_Node_Arithmetic { + + public SFN_Posterize() { + } + + public override void Initialize() { + base.Initialize( "Posterize" ); + base.showColor = true; + base.shaderGenMode = ShaderGenerationMode.CustomFunction; + UseLowerReadonlyValues( true ); + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create( this, "OUT", "", ConType.cOutput, ValueType.VTvPending, false ), + SF_NodeConnector.Create( this, "IN", "", ConType.cInput, ValueType.VTvPending, false ).SetRequired( true ), + SF_NodeConnector.Create( this, "STPS", "Steps", ConType.cInput, ValueType.VTv1, false ).SetRequired( true ).WithUseCount(2) + }; + base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1]); + base.extraWidthInput = 6; + } + + public override bool IsUniformOutput() { + return ( GetInputData( "IN" ).uniform && GetInputData( "STPS" ).uniform ); + } + + public override string[] GetBlitOutputLines() { + return new string[] { "floor(_in * _stps) / (_stps - 1)" }; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + + string mainInput = GetConnectorByStringID( "IN" ).TryEvaluate(); + string steps = GetConnectorByStringID( "STPS" ).TryEvaluate(); + + + return "floor(" + mainInput + " * " + steps + ") / (" + steps + " - 1)"; + } + + public override float EvalCPU( int c ) { + float steps = GetInputData( "STPS", c ); + return Mathf.Floor( GetInputData( "IN", c ) * steps ) / (steps - 1); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Posterize.cs.meta b/Editor/Code/_Nodes/SFN_Posterize.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Posterize.cs.meta rename to Editor/Code/_Nodes/SFN_Posterize.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Power.cs b/Editor/Code/_Nodes/SFN_Power.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Power.cs rename to Editor/Code/_Nodes/SFN_Power.cs index 3bd594eb..bf806501 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Power.cs +++ b/Editor/Code/_Nodes/SFN_Power.cs @@ -1,56 +1,56 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -using System; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Power : SF_Node { - - public SFN_Power() { - - } - - public override void Initialize() { - base.Initialize( "Power" ); - base.showColor = true; - base.shaderGenMode = ShaderGenerationMode.CustomFunction; - UseLowerReadonlyValues( true ); - - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTvPending,false), - SF_NodeConnector.Create(this,"VAL","Val",ConType.cInput,ValueType.VTvPending,false).SetRequired(true), - SF_NodeConnector.Create(this,"EXP","Exp",ConType.cInput,ValueType.VTvPending,false).SetRequired(true) - }; - - base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1], connectors[2] ); - } - - - public override int GetEvaluatedComponentCount() { - return Mathf.Max( this["VAL"].GetCompCount(), this["EXP"].GetCompCount() ); - } - - public override bool IsUniformOutput() { - return ( GetInputData( "VAL" ).uniform && GetInputData( "EXP" ).uniform ); - } - - public override string[] GetBlitOutputLines() { - return new string[] { "pow(_val,_exp)" }; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "pow(" + GetInputCon( "VAL" ).Evaluate() + "," + GetInputCon( "EXP" ).Evaluate() + ")"; - } - - // New system - public override void RefreshValue() { - RefreshValue( 1, 2 ); - } - - public override float EvalCPU( int c ) { - return Mathf.Pow( GetInputData( "VAL", c ), GetInputData( "EXP", c ) ); - } - } +using UnityEngine; +using UnityEditor; +using System.Collections; +using System; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Power : SF_Node { + + public SFN_Power() { + + } + + public override void Initialize() { + base.Initialize( "Power" ); + base.showColor = true; + base.shaderGenMode = ShaderGenerationMode.CustomFunction; + UseLowerReadonlyValues( true ); + + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTvPending,false), + SF_NodeConnector.Create(this,"VAL","Val",ConType.cInput,ValueType.VTvPending,false).SetRequired(true), + SF_NodeConnector.Create(this,"EXP","Exp",ConType.cInput,ValueType.VTvPending,false).SetRequired(true) + }; + + base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1], connectors[2] ); + } + + + public override int GetEvaluatedComponentCount() { + return Mathf.Max( this["VAL"].GetCompCount(), this["EXP"].GetCompCount() ); + } + + public override bool IsUniformOutput() { + return ( GetInputData( "VAL" ).uniform && GetInputData( "EXP" ).uniform ); + } + + public override string[] GetBlitOutputLines() { + return new string[] { "pow(_val,_exp)" }; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "pow(" + GetInputCon( "VAL" ).Evaluate() + "," + GetInputCon( "EXP" ).Evaluate() + ")"; + } + + // New system + public override void RefreshValue() { + RefreshValue( 1, 2 ); + } + + public override float EvalCPU( int c ) { + return Mathf.Pow( GetInputData( "VAL", c ), GetInputData( "EXP", c ) ); + } + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Power.cs.meta b/Editor/Code/_Nodes/SFN_Power.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Power.cs.meta rename to Editor/Code/_Nodes/SFN_Power.cs.meta index c34b5696..73d8ad91 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Power.cs.meta +++ b/Editor/Code/_Nodes/SFN_Power.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 186b007e983e194498489dc426592f34 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 186b007e983e194498489dc426592f34 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ProjectionParameters.cs b/Editor/Code/_Nodes/SFN_ProjectionParameters.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ProjectionParameters.cs rename to Editor/Code/_Nodes/SFN_ProjectionParameters.cs index a7e23e59..b34c2170 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ProjectionParameters.cs +++ b/Editor/Code/_Nodes/SFN_ProjectionParameters.cs @@ -1,40 +1,40 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_ProjectionParameters : SF_Node { - - - public SFN_ProjectionParameters() { - - } - - public override void Initialize() { - base.Initialize( "Proj. Params" ); - base.SearchName = "Projection Parameters"; - base.showColor = true; - base.UseLowerPropertyBox( false ); - base.texture.CompCount = 4; - base.neverDefineVariable = true; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"SGN","Sign",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.R), - SF_NodeConnector.Create(this,"NEAR","Near",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.G), - SF_NodeConnector.Create(this,"FAR","Far",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.B), - SF_NodeConnector.Create(this,"RFAR","1/Far",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.A) - }; - base.extraWidthOutput = 7; - } - - public override Vector4 EvalCPU() { - return new Color( 0f, 0.7071068f, 0.7071068f, 0f ); - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "_ProjectionParams"; - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_ProjectionParameters : SF_Node { + + + public SFN_ProjectionParameters() { + + } + + public override void Initialize() { + base.Initialize( "Proj. Params" ); + base.SearchName = "Projection Parameters"; + base.showColor = true; + base.UseLowerPropertyBox( false ); + base.texture.CompCount = 4; + base.neverDefineVariable = true; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"SGN","Sign",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.R), + SF_NodeConnector.Create(this,"NEAR","Near",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.G), + SF_NodeConnector.Create(this,"FAR","Far",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.B), + SF_NodeConnector.Create(this,"RFAR","1/Far",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.A) + }; + base.extraWidthOutput = 7; + } + + public override Vector4 EvalCPU() { + return new Color( 0f, 0.7071068f, 0.7071068f, 0f ); + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "_ProjectionParams"; + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ProjectionParameters.cs.meta b/Editor/Code/_Nodes/SFN_ProjectionParameters.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ProjectionParameters.cs.meta rename to Editor/Code/_Nodes/SFN_ProjectionParameters.cs.meta index bd5cac20..c9cbbf47 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ProjectionParameters.cs.meta +++ b/Editor/Code/_Nodes/SFN_ProjectionParameters.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 6725d93fa4d8e5a4eadd259e63cf8914 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 6725d93fa4d8e5a4eadd259e63cf8914 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Reciprocal.cs b/Editor/Code/_Nodes/SFN_Reciprocal.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Reciprocal.cs rename to Editor/Code/_Nodes/SFN_Reciprocal.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Reciprocal.cs.meta b/Editor/Code/_Nodes/SFN_Reciprocal.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Reciprocal.cs.meta rename to Editor/Code/_Nodes/SFN_Reciprocal.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Reflect.cs b/Editor/Code/_Nodes/SFN_Reflect.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Reflect.cs rename to Editor/Code/_Nodes/SFN_Reflect.cs index 4970a115..53b60e09 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Reflect.cs +++ b/Editor/Code/_Nodes/SFN_Reflect.cs @@ -1,34 +1,34 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Reflect : SF_Node_Arithmetic { - - public SFN_Reflect() { - - } - - public override void Initialize() { - base.Initialize( "Reflect" ); - base.PrepareArithmetic( 2 ); - connectors[1].label = "I"; - connectors[2].label = "N"; - base.shaderGenMode = ShaderGenerationMode.SimpleFunction; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "reflect(" + GetConnectorByStringID( "A" ).TryEvaluate() + "," + GetConnectorByStringID( "B" ).TryEvaluate() + ")"; - } - - public override Vector4 EvalCPU() { - Color i = GetInputData( "A" ).dataUniform; - Color n = GetInputData( "B" ).dataUniform; - int cc = Mathf.Max(GetInputCon( "A" ).GetCompCount(), GetInputCon( "B" ).GetCompCount()); - float dot = SF_Tools.Dot(i, n, cc); - return i - 2 * n * dot; - } - - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Reflect : SF_Node_Arithmetic { + + public SFN_Reflect() { + + } + + public override void Initialize() { + base.Initialize( "Reflect" ); + base.PrepareArithmetic( 2 ); + connectors[1].label = "I"; + connectors[2].label = "N"; + base.shaderGenMode = ShaderGenerationMode.SimpleFunction; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "reflect(" + GetConnectorByStringID( "A" ).TryEvaluate() + "," + GetConnectorByStringID( "B" ).TryEvaluate() + ")"; + } + + public override Vector4 EvalCPU() { + Color i = GetInputData( "A" ).dataUniform; + Color n = GetInputData( "B" ).dataUniform; + int cc = Mathf.Max(GetInputCon( "A" ).GetCompCount(), GetInputCon( "B" ).GetCompCount()); + float dot = SF_Tools.Dot(i, n, cc); + return i - 2 * n * dot; + } + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Reflect.cs.meta b/Editor/Code/_Nodes/SFN_Reflect.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Reflect.cs.meta rename to Editor/Code/_Nodes/SFN_Reflect.cs.meta index 1f1f2eef..fdcd0cec --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Reflect.cs.meta +++ b/Editor/Code/_Nodes/SFN_Reflect.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 133722a37716917478fcc26301e64759 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 133722a37716917478fcc26301e64759 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Relay.cs b/Editor/Code/_Nodes/SFN_Relay.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Relay.cs rename to Editor/Code/_Nodes/SFN_Relay.cs index 179373ad..07c61ea6 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Relay.cs +++ b/Editor/Code/_Nodes/SFN_Relay.cs @@ -1,69 +1,69 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Relay : SF_Node_Arithmetic { - - - public SFN_Relay() { - - } - - public override void Initialize() { - node_height = 24; - node_width = 40; - base.Initialize( "Relay" ); - lowerRect.y -= 8; - lowerRect.height = 28; - base.showColor = false; - base.discreteTitle = true; - base.UseLowerPropertyBox( true, true ); - base.shaderGenMode = ShaderGenerationMode.CustomFunction; - extraWidthInput = -9; - extraWidthOutput = -9; - //base.texture.uniform = true; - //base.texture.CompCount = 1; - - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTvPending,false), - SF_NodeConnector.Create(this,"IN","",ConType.cInput,ValueType.VTvPending,false).SetRequired(true), - }; - - base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1]); - - } - - public override string[] GetBlitOutputLines() { - return new string[] { "_in" }; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return GetConnectorByStringID( "IN" ).TryEvaluate(); - } - - public override float EvalCPU( int c ) { - return GetInputData( "IN", c ); - } - - - public override void DrawLowerPropertyBox() { - Rect r = new Rect( lowerRect ); - r.yMin += 4; - r.yMax -= 2; - r.xMin += 2; - Rect texCoords = new Rect( r ); - texCoords.width /= 7; - texCoords.height /= 3; - texCoords.x = texCoords.y = 0; - GUI.DrawTextureWithTexCoords( r, SF_GUI.Handle_drag, texCoords, alphaBlend:true ); - } - - - - - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Relay : SF_Node_Arithmetic { + + + public SFN_Relay() { + + } + + public override void Initialize() { + node_height = 24; + node_width = 40; + base.Initialize( "Relay" ); + lowerRect.y -= 8; + lowerRect.height = 28; + base.showColor = false; + base.discreteTitle = true; + base.UseLowerPropertyBox( true, true ); + base.shaderGenMode = ShaderGenerationMode.CustomFunction; + extraWidthInput = -9; + extraWidthOutput = -9; + //base.texture.uniform = true; + //base.texture.CompCount = 1; + + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTvPending,false), + SF_NodeConnector.Create(this,"IN","",ConType.cInput,ValueType.VTvPending,false).SetRequired(true), + }; + + base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1]); + + } + + public override string[] GetBlitOutputLines() { + return new string[] { "_in" }; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return GetConnectorByStringID( "IN" ).TryEvaluate(); + } + + public override float EvalCPU( int c ) { + return GetInputData( "IN", c ); + } + + + public override void DrawLowerPropertyBox() { + Rect r = new Rect( lowerRect ); + r.yMin += 4; + r.yMax -= 2; + r.xMin += 2; + Rect texCoords = new Rect( r ); + texCoords.width /= 7; + texCoords.height /= 3; + texCoords.x = texCoords.y = 0; + GUI.DrawTextureWithTexCoords( r, SF_GUI.Handle_drag, texCoords, alphaBlend:true ); + } + + + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Relay.cs.meta b/Editor/Code/_Nodes/SFN_Relay.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Relay.cs.meta rename to Editor/Code/_Nodes/SFN_Relay.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_RemapRange.cs b/Editor/Code/_Nodes/SFN_RemapRange.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_RemapRange.cs rename to Editor/Code/_Nodes/SFN_RemapRange.cs index 818cb0e4..a1c53754 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_RemapRange.cs +++ b/Editor/Code/_Nodes/SFN_RemapRange.cs @@ -1,151 +1,151 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -//using System; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_RemapRange : SF_Node_Arithmetic { - - // SF_Node tNode; - - [SerializeField] - Vector2 from = new Vector2(0,1); - [SerializeField] - Vector2 to = new Vector2(-1,1); - [SerializeField] - float multiplier = 2f; - float offset = -1f; - - - public SFN_RemapRange() { - - } - - - public override void Initialize() { - base.Initialize( "Remap (Simple)" ); - base.SearchName = "Remap Simple"; - base.showColor = true; - base.UseLowerPropertyBox( true, true ); - base.PrepareArithmetic(1); - base.node_height += 15; - base.shaderGenMode = ShaderGenerationMode.ValuePassing; - UpdateMultOffset(); - - } - - - // n-p*m = x - - public override string[] ExtraPassedFloatProperties() { - return new string[]{ - "Multiplier", - "Offset" - }; - } - - public override void PrepareRendering( Material mat ) { - UpdateMultOffset(); - mat.SetFloat( "_multiplier", multiplier ); - mat.SetFloat( "_offset", offset ); - } - - public override string[] GetBlitOutputLines() { - return new string[]{ - "_in*_multiplier+_offset" - }; - } - - - public override void DrawLowerPropertyBox() { - //EditorGUI.BeginChangeCheck(); - Rect r = lowerRect; - r.height = 15; - r.y += 2; - r.width /= 3; - - Vector2 befFrom = from; - Vector2 befTo = to; - DrawRemapLine(ref r, "From", ref from); - DrawRemapLine(ref r, "To", ref to); - - if( (from != befFrom) || (to != befTo) ){ - UpdateMultOffset(); - } - - - } - - // x = n/p - - public void UpdateMultOffset(){ - float oldRange = from.y - from.x; - float newRange = to.y - to.x; - multiplier = newRange/oldRange; // Might need to warn on division by zero - offset = to.x - from.x * multiplier; - } - - public void DrawRemapLine(ref Rect r, string label, ref Vector2 target){ - GUI.Label(r.PadRight(4),label,SF_Styles.MiniLabelRight); - r = r.MovedRight(); - //SF_GUI.EnterableFloatField( this, r, ref target.x, EditorStyles.textField ); - UndoableEnterableFloatField(r, ref target.x, "lower '" + label.ToLower() + "' value", EditorStyles.textField); - r = r.MovedRight(); - //SF_GUI.EnterableFloatField( this, r, ref target.y, EditorStyles.textField ); - UndoableEnterableFloatField(r, ref target.y, "upper '" + label.ToLower() + "' value", EditorStyles.textField); - r = r.MovedDown().MovedLeft(2); - } - - - public override void OnUpdateNode( NodeUpdateType updType = NodeUpdateType.Hard, bool cascade = true ) { - UpdateMultOffset(); - if( InputsConnected() ) - RefreshValue( 1, 2 ); - base.OnUpdateNode( updType ); - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - string inVal = GetInputCon( "IN" ).Evaluate(); - return "(" + inVal + "*" + multiplier.ToString( "0.0###########" ) + "+" + offset.ToString( "0.0###########" ) + ")"; - } - - // TODO Expose more out here! - public override float EvalCPU( int c ) { - return GetInputData( "IN", c ) * multiplier + offset; - } - - - public override string SerializeSpecialData() { - string s = ""; - s += "frmn:" + from.x + ","; - s += "frmx:" + from.y + ","; - s += "tomn:" + to.x + ","; - s += "tomx:" + to.y; - return s; - } - - public override void DeserializeSpecialData( string key, string value ) { - switch( key ) { - case "frmn": - from.x = float.Parse( value ); - break; - case "frmx": - from.y = float.Parse( value ); - break; - case "tomn": - to.x = float.Parse( value ); - break; - case "tomx": - to.y = float.Parse( value ); - break; - } - } - - - - - - } +using UnityEngine; +using UnityEditor; +using System.Collections; +//using System; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_RemapRange : SF_Node_Arithmetic { + + // SF_Node tNode; + + [SerializeField] + Vector2 from = new Vector2(0,1); + [SerializeField] + Vector2 to = new Vector2(-1,1); + [SerializeField] + float multiplier = 2f; + float offset = -1f; + + + public SFN_RemapRange() { + + } + + + public override void Initialize() { + base.Initialize( "Remap (Simple)" ); + base.SearchName = "Remap Simple"; + base.showColor = true; + base.UseLowerPropertyBox( true, true ); + base.PrepareArithmetic(1); + base.node_height += 15; + base.shaderGenMode = ShaderGenerationMode.ValuePassing; + UpdateMultOffset(); + + } + + + // n-p*m = x + + public override string[] ExtraPassedFloatProperties() { + return new string[]{ + "Multiplier", + "Offset" + }; + } + + public override void PrepareRendering( Material mat ) { + UpdateMultOffset(); + mat.SetFloat( "_multiplier", multiplier ); + mat.SetFloat( "_offset", offset ); + } + + public override string[] GetBlitOutputLines() { + return new string[]{ + "_in*_multiplier+_offset" + }; + } + + + public override void DrawLowerPropertyBox() { + //EditorGUI.BeginChangeCheck(); + Rect r = lowerRect; + r.height = 15; + r.y += 2; + r.width /= 3; + + Vector2 befFrom = from; + Vector2 befTo = to; + DrawRemapLine(ref r, "From", ref from); + DrawRemapLine(ref r, "To", ref to); + + if( (from != befFrom) || (to != befTo) ){ + UpdateMultOffset(); + } + + + } + + // x = n/p + + public void UpdateMultOffset(){ + float oldRange = from.y - from.x; + float newRange = to.y - to.x; + multiplier = newRange/oldRange; // Might need to warn on division by zero + offset = to.x - from.x * multiplier; + } + + public void DrawRemapLine(ref Rect r, string label, ref Vector2 target){ + GUI.Label(r.PadRight(4),label,SF_Styles.MiniLabelRight); + r = r.MovedRight(); + //SF_GUI.EnterableFloatField( this, r, ref target.x, EditorStyles.textField ); + UndoableEnterableFloatField(r, ref target.x, "lower '" + label.ToLower() + "' value", EditorStyles.textField); + r = r.MovedRight(); + //SF_GUI.EnterableFloatField( this, r, ref target.y, EditorStyles.textField ); + UndoableEnterableFloatField(r, ref target.y, "upper '" + label.ToLower() + "' value", EditorStyles.textField); + r = r.MovedDown().MovedLeft(2); + } + + + public override void OnUpdateNode( NodeUpdateType updType = NodeUpdateType.Hard, bool cascade = true ) { + UpdateMultOffset(); + if( InputsConnected() ) + RefreshValue( 1, 2 ); + base.OnUpdateNode( updType ); + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + string inVal = GetInputCon( "IN" ).Evaluate(); + return "(" + inVal + "*" + multiplier.ToString( "0.0###########" ) + "+" + offset.ToString( "0.0###########" ) + ")"; + } + + // TODO Expose more out here! + public override float EvalCPU( int c ) { + return GetInputData( "IN", c ) * multiplier + offset; + } + + + public override string SerializeSpecialData() { + string s = ""; + s += "frmn:" + from.x + ","; + s += "frmx:" + from.y + ","; + s += "tomn:" + to.x + ","; + s += "tomx:" + to.y; + return s; + } + + public override void DeserializeSpecialData( string key, string value ) { + switch( key ) { + case "frmn": + from.x = float.Parse( value ); + break; + case "frmx": + from.y = float.Parse( value ); + break; + case "tomn": + to.x = float.Parse( value ); + break; + case "tomx": + to.y = float.Parse( value ); + break; + } + } + + + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_RemapRange.cs.meta b/Editor/Code/_Nodes/SFN_RemapRange.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_RemapRange.cs.meta rename to Editor/Code/_Nodes/SFN_RemapRange.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_RemapRangeAdvanced.cs b/Editor/Code/_Nodes/SFN_RemapRangeAdvanced.cs old mode 100755 new mode 100644 similarity index 99% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_RemapRangeAdvanced.cs rename to Editor/Code/_Nodes/SFN_RemapRangeAdvanced.cs index 4731e17f..4d9e804c --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_RemapRangeAdvanced.cs +++ b/Editor/Code/_Nodes/SFN_RemapRangeAdvanced.cs @@ -16,8 +16,8 @@ public SFN_RemapRangeAdvanced() { public override void Initialize() { base.Initialize( "Remap" ); - base.SearchName = "Remap"; - base.PrepareArithmetic( 5 ); + base.SearchName = "Remap"; + base.PrepareArithmetic( 5 ); base.shaderGenMode = ShaderGenerationMode.CustomFunction; @@ -54,13 +54,13 @@ public override void OnUpdateNode( NodeUpdateType updType = NodeUpdateType.Hard, if( InputsConnected() ) RefreshValue( 1, 2 ); base.OnUpdateNode( updType ); - } - - - public override string[] GetBlitOutputLines() { - return new string[] { - "(_omin + ( (_in - _imin) * (_omax - _omin) ) / (_imax - _imin))" - }; + } + + + public override string[] GetBlitOutputLines() { + return new string[] { + "(_omin + ( (_in - _imin) * (_omax - _omin) ) / (_imax - _imin))" + }; } public override string Evaluate( OutChannel channel = OutChannel.All ) { diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_RemapRangeAdvanced.cs.meta b/Editor/Code/_Nodes/SFN_RemapRangeAdvanced.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_RemapRangeAdvanced.cs.meta rename to Editor/Code/_Nodes/SFN_RemapRangeAdvanced.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_RgbToHsv.cs b/Editor/Code/_Nodes/SFN_RgbToHsv.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_RgbToHsv.cs rename to Editor/Code/_Nodes/SFN_RgbToHsv.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_RgbToHsv.cs.meta b/Editor/Code/_Nodes/SFN_RgbToHsv.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_RgbToHsv.cs.meta rename to Editor/Code/_Nodes/SFN_RgbToHsv.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Root2.cs b/Editor/Code/_Nodes/SFN_Root2.cs old mode 100755 new mode 100644 similarity index 94% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Root2.cs rename to Editor/Code/_Nodes/SFN_Root2.cs index c1d84735..2e51ebd4 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Root2.cs +++ b/Editor/Code/_Nodes/SFN_Root2.cs @@ -1,19 +1,19 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Root2 : SFN_Node_Constant { - - public SFN_Root2() { - } - - public override void Initialize() { - base.Initialize( "Root 2" ); - base.PrepareConstant( "const_root2", "1.41421356237309504" ); - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Root2 : SFN_Node_Constant { + + public SFN_Root2() { + } + + public override void Initialize() { + base.Initialize( "Root 2" ); + base.PrepareConstant( "const_root2", "1.41421356237309504" ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Root2.cs.meta b/Editor/Code/_Nodes/SFN_Root2.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Root2.cs.meta rename to Editor/Code/_Nodes/SFN_Root2.cs.meta index a35bde6a..a84e6ba0 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Root2.cs.meta +++ b/Editor/Code/_Nodes/SFN_Root2.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 478e80eb771ee3e4d8ee8a4fa1bfa141 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 478e80eb771ee3e4d8ee8a4fa1bfa141 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Rotator.cs b/Editor/Code/_Nodes/SFN_Rotator.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Rotator.cs rename to Editor/Code/_Nodes/SFN_Rotator.cs index d23368bb..a911c536 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Rotator.cs +++ b/Editor/Code/_Nodes/SFN_Rotator.cs @@ -1,179 +1,179 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -using System.Collections.Generic; -//using System; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Rotator : SF_Node { - - // SF_Node tNode; - - public SFN_Rotator() { - - } - - - public override void Initialize() { - base.Initialize( "Rotator" ); - base.showColor = true; - UseLowerReadonlyValues( false ); - base.alwaysDefineVariable = true; - base.shaderGenMode = ShaderGenerationMode.ManualModal; - texture.CompCount = 2; - //SF_NodeConnection lerpCon; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"UVOUT","UV",ConType.cOutput,ValueType.VTv2,false), - SF_NodeConnector.Create(this,"UVIN","UV",ConType.cInput,ValueType.VTv2,false).SetRequired(true), - SF_NodeConnector.Create(this,"PIV","Piv",ConType.cInput,ValueType.VTv2,false,"float2(0.5,0.5)").SetRequired(false), - SF_NodeConnector.Create(this,"ANG","Ang",ConType.cInput,ValueType.VTv1,false).SetRequired(false).SetGhostNodeLink(typeof(SFN_Time),"T"), - SF_NodeConnector.Create(this,"SPD","Spd",ConType.cInput,ValueType.VTv1,false,"1.0").SetRequired(false), - }; - - //base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1], connectors[2] ); - } - - - - public override void OnUpdateNode( NodeUpdateType updType, bool cascade = true ) { - if( InputsConnected() ) - RefreshValue( 1, 2 ); - base.OnUpdateNode( updType ); - } - - public override bool IsUniformOutput() { - return false; - } - - public override int GetEvaluatedComponentCount() { - return 2; - } - - public string Sin() { - return GetVariableName() + "_sin"; - } - public string Cos() { - return GetVariableName() + "_cos"; - } - public string Spd() { - return GetVariableName() + "_spd"; - } - public string Ang() { - return GetVariableName() + "_ang"; - } - public string Piv() { - return GetVariableName() + "_piv"; - } - public string RotMatrix() { - return "float2x2( " + Cos() + ", -" + Sin() + ", " + Sin() + ", " + Cos() + ")"; - } - - - public override string[] GetModalModes() { - return new string[]{ - "REQONLY", - "PIV", - "SPD", - "ANG", - "PIV_SPD", - "PIV_ANG", - "SPD_ANG", - "PIV_SPD_ANG" - }; - } - - public override string[] GetBlitOutputLines( string mode ) { - - - string pivStr = mode.Contains( "PIV" ) ? "_piv.xy" : "float2(0.5,0.5)"; - string spdStr = mode.Contains( "SPD" ) ? "_spd.x" : "1.0"; - string angStr = mode.Contains( "ANG" ) ? "_ang.x" : "_Time"; - - return new string[] { - "float ang = "+angStr+";", - "float spd = " + spdStr + ";", - "float cosVal = cos("+ spdStr + "*ang);", - "float sinVal = sin("+ spdStr + "*ang);", - "float2 piv = " + pivStr + ";", - "float4((mul(_uvin.xy-piv,float2x2( cosVal, -sinVal, sinVal, cosVal))+piv),0,0)" - }; - } - - public override string GetCurrentModalMode() { - List all = new List(); - if( GetInputIsConnected( "PIV" ) ) - all.Add("PIV"); - if( GetInputIsConnected( "SPD" ) ) - all.Add( "SPD" ); - if( GetInputIsConnected( "ANG" ) ) - all.Add( "ANG" ); - - if( all.Count == 0 ) { - return "REQONLY"; - } - - return string.Join( "_", all.ToArray() ); - } - - - public override string[] GetPreDefineRows() { - return new string[] { - "float " + Ang() + " = " + this["ANG"].TryEvaluate() + ";", - "float " + Spd() + " = " + this["SPD"].TryEvaluate() + ";", - "float " + Cos() + " = cos("+ Spd() + "*" + Ang() + ");", - "float " + Sin() + " = sin("+ Spd() + "*" + Ang() + ");", - "float2 " + Piv() + " = " + this["PIV"].TryEvaluate() + ";" - }; - } - - public override bool UpdatesOverTime() { - return true; //GetInputIsConnected( "ANG" ); - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "(mul(" + GetInputCon( "UVIN" ).Evaluate() + "-" + Piv() + "," + RotMatrix() + ")+" + Piv() + ")"; - } - - // TODO Expose more out here! - public override Vector4 EvalCPU() { - - //return GetInputData( 1 )[x, y]; - - float angle = connectors[3].IsConnected() ? GetInputData( "ANG", 0 ) : Mathf.PI / 8f; - Vector2 pivot = connectors[2].IsConnected() ? new Vector2( GetInputData( "PIV", 0 ), GetInputData( "PIV", 1 ) ) : new Vector2( 0.5f, 0.5f ); - Vector2 vec = Vector2.one; - - if(GetInputIsConnected("UVIN")){ - vec = new Vector2( GetInputData( "UVIN", 0 ), GetInputData( "UVIN", 1 ) ); - } else { - //vec = new Vector2( x/SF_NodeData.RESf, y/SF_NodeData.RESf ); // TODO: should use ghost nodes... - } - vec -= pivot; - - - float cos = Mathf.Cos( angle ); - float sin = Mathf.Sin( angle ); - - Vector4 mtx = new Vector4( - cos, -sin, - sin, cos - ); - - - Vector2 retVec = new Vector2( - mtx.x * vec.x + mtx.y * vec.y, - mtx.z * vec.x + mtx.w * vec.y - ); - - retVec += pivot; - - return new Color( retVec.x, retVec.y, 0f, 0f );//Lerp( GetInputData( 1, x, y, c ), GetInputData( 2, x, y, c ), GetInputData( 3, x, y, c ) ); - } - - - - - } +using UnityEngine; +using UnityEditor; +using System.Collections; +using System.Collections.Generic; +//using System; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Rotator : SF_Node { + + // SF_Node tNode; + + public SFN_Rotator() { + + } + + + public override void Initialize() { + base.Initialize( "Rotator" ); + base.showColor = true; + UseLowerReadonlyValues( false ); + base.alwaysDefineVariable = true; + base.shaderGenMode = ShaderGenerationMode.ManualModal; + texture.CompCount = 2; + //SF_NodeConnection lerpCon; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"UVOUT","UV",ConType.cOutput,ValueType.VTv2,false), + SF_NodeConnector.Create(this,"UVIN","UV",ConType.cInput,ValueType.VTv2,false).SetRequired(true), + SF_NodeConnector.Create(this,"PIV","Piv",ConType.cInput,ValueType.VTv2,false,"float2(0.5,0.5)").SetRequired(false), + SF_NodeConnector.Create(this,"ANG","Ang",ConType.cInput,ValueType.VTv1,false).SetRequired(false).SetGhostNodeLink(typeof(SFN_Time),"T"), + SF_NodeConnector.Create(this,"SPD","Spd",ConType.cInput,ValueType.VTv1,false,"1.0").SetRequired(false), + }; + + //base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1], connectors[2] ); + } + + + + public override void OnUpdateNode( NodeUpdateType updType, bool cascade = true ) { + if( InputsConnected() ) + RefreshValue( 1, 2 ); + base.OnUpdateNode( updType ); + } + + public override bool IsUniformOutput() { + return false; + } + + public override int GetEvaluatedComponentCount() { + return 2; + } + + public string Sin() { + return GetVariableName() + "_sin"; + } + public string Cos() { + return GetVariableName() + "_cos"; + } + public string Spd() { + return GetVariableName() + "_spd"; + } + public string Ang() { + return GetVariableName() + "_ang"; + } + public string Piv() { + return GetVariableName() + "_piv"; + } + public string RotMatrix() { + return "float2x2( " + Cos() + ", -" + Sin() + ", " + Sin() + ", " + Cos() + ")"; + } + + + public override string[] GetModalModes() { + return new string[]{ + "REQONLY", + "PIV", + "SPD", + "ANG", + "PIV_SPD", + "PIV_ANG", + "SPD_ANG", + "PIV_SPD_ANG" + }; + } + + public override string[] GetBlitOutputLines( string mode ) { + + + string pivStr = mode.Contains( "PIV" ) ? "_piv.xy" : "float2(0.5,0.5)"; + string spdStr = mode.Contains( "SPD" ) ? "_spd.x" : "1.0"; + string angStr = mode.Contains( "ANG" ) ? "_ang.x" : "_Time"; + + return new string[] { + "float ang = "+angStr+";", + "float spd = " + spdStr + ";", + "float cosVal = cos("+ spdStr + "*ang);", + "float sinVal = sin("+ spdStr + "*ang);", + "float2 piv = " + pivStr + ";", + "float4((mul(_uvin.xy-piv,float2x2( cosVal, -sinVal, sinVal, cosVal))+piv),0,0)" + }; + } + + public override string GetCurrentModalMode() { + List all = new List(); + if( GetInputIsConnected( "PIV" ) ) + all.Add("PIV"); + if( GetInputIsConnected( "SPD" ) ) + all.Add( "SPD" ); + if( GetInputIsConnected( "ANG" ) ) + all.Add( "ANG" ); + + if( all.Count == 0 ) { + return "REQONLY"; + } + + return string.Join( "_", all.ToArray() ); + } + + + public override string[] GetPreDefineRows() { + return new string[] { + "float " + Ang() + " = " + this["ANG"].TryEvaluate() + ";", + "float " + Spd() + " = " + this["SPD"].TryEvaluate() + ";", + "float " + Cos() + " = cos("+ Spd() + "*" + Ang() + ");", + "float " + Sin() + " = sin("+ Spd() + "*" + Ang() + ");", + "float2 " + Piv() + " = " + this["PIV"].TryEvaluate() + ";" + }; + } + + public override bool UpdatesOverTime() { + return true; //GetInputIsConnected( "ANG" ); + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "(mul(" + GetInputCon( "UVIN" ).Evaluate() + "-" + Piv() + "," + RotMatrix() + ")+" + Piv() + ")"; + } + + // TODO Expose more out here! + public override Vector4 EvalCPU() { + + //return GetInputData( 1 )[x, y]; + + float angle = connectors[3].IsConnected() ? GetInputData( "ANG", 0 ) : Mathf.PI / 8f; + Vector2 pivot = connectors[2].IsConnected() ? new Vector2( GetInputData( "PIV", 0 ), GetInputData( "PIV", 1 ) ) : new Vector2( 0.5f, 0.5f ); + Vector2 vec = Vector2.one; + + if(GetInputIsConnected("UVIN")){ + vec = new Vector2( GetInputData( "UVIN", 0 ), GetInputData( "UVIN", 1 ) ); + } else { + //vec = new Vector2( x/SF_NodeData.RESf, y/SF_NodeData.RESf ); // TODO: should use ghost nodes... + } + vec -= pivot; + + + float cos = Mathf.Cos( angle ); + float sin = Mathf.Sin( angle ); + + Vector4 mtx = new Vector4( + cos, -sin, + sin, cos + ); + + + Vector2 retVec = new Vector2( + mtx.x * vec.x + mtx.y * vec.y, + mtx.z * vec.x + mtx.w * vec.y + ); + + retVec += pivot; + + return new Color( retVec.x, retVec.y, 0f, 0f );//Lerp( GetInputData( 1, x, y, c ), GetInputData( 2, x, y, c ), GetInputData( 3, x, y, c ) ); + } + + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Rotator.cs.meta b/Editor/Code/_Nodes/SFN_Rotator.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Rotator.cs.meta rename to Editor/Code/_Nodes/SFN_Rotator.cs.meta index 32546de8..9adaa225 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Rotator.cs.meta +++ b/Editor/Code/_Nodes/SFN_Rotator.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: b18d65c11cc5afe449017a80a6ea966e -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: b18d65c11cc5afe449017a80a6ea966e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Round.cs b/Editor/Code/_Nodes/SFN_Round.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Round.cs rename to Editor/Code/_Nodes/SFN_Round.cs index ec39a767..46fd93fb --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Round.cs +++ b/Editor/Code/_Nodes/SFN_Round.cs @@ -1,26 +1,26 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Round : SF_Node_Arithmetic { - - public SFN_Round() { - } - - public override void Initialize() { - base.Initialize( "Round" ); - base.PrepareArithmetic( 1 ); - base.shaderGenMode = ShaderGenerationMode.SimpleFunction; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "round(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; - } - - public override float EvalCPU( int c ) { - return Mathf.Round( GetInputData( "IN", c ) ); - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Round : SF_Node_Arithmetic { + + public SFN_Round() { + } + + public override void Initialize() { + base.Initialize( "Round" ); + base.PrepareArithmetic( 1 ); + base.shaderGenMode = ShaderGenerationMode.SimpleFunction; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "round(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; + } + + public override float EvalCPU( int c ) { + return Mathf.Round( GetInputData( "IN", c ) ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Round.cs.meta b/Editor/Code/_Nodes/SFN_Round.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Round.cs.meta rename to Editor/Code/_Nodes/SFN_Round.cs.meta index afebb05b..e0c0185d --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Round.cs.meta +++ b/Editor/Code/_Nodes/SFN_Round.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 5965b04db15c4d243b3a4d5ea44c2e4c -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 5965b04db15c4d243b3a4d5ea44c2e4c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_SceneColor.cs b/Editor/Code/_Nodes/SFN_SceneColor.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_SceneColor.cs rename to Editor/Code/_Nodes/SFN_SceneColor.cs index 0b6ad777..de58f220 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_SceneColor.cs +++ b/Editor/Code/_Nodes/SFN_SceneColor.cs @@ -1,51 +1,51 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_SceneColor : SF_Node { - - - public SFN_SceneColor() { - - } - - public override void Initialize() { - base.Initialize( "Scene Color" ); - base.showColor = true; - base.UseLowerPropertyBox( false ); - base.texture.CompCount = 4; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"UVIN","UV",ConType.cInput,ValueType.VTv2), - SF_NodeConnector.Create(this,"RGB","RGB",ConType.cOutput,ValueType.VTv3) .Outputting(OutChannel.RGB), - SF_NodeConnector.Create(this,"R","R",ConType.cOutput, ValueType.VTv1) .WithColor(Color.red) .Outputting(OutChannel.R), - SF_NodeConnector.Create(this,"G","G",ConType.cOutput,ValueType.VTv1) .WithColor(Color.green) .Outputting(OutChannel.G), - SF_NodeConnector.Create(this,"B","B",ConType.cOutput,ValueType.VTv1) .WithColor(Color.blue) .Outputting(OutChannel.B), - SF_NodeConnector.Create(this,"A","A",ConType.cOutput,ValueType.VTv1) .Outputting(OutChannel.A) - }; - } - - public override Vector4 EvalCPU() { - return new Color( 0.3f, 0.6f, 0.3f, 1f ); - } - - public bool AutoUV(){ - return !GetInputIsConnected( "UVIN" ); - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - - string UV = ""; - - if(AutoUV()){ - return "sceneColor"; - } else { - UV = GetInputCon( "UVIN" ).Evaluate(); - return "tex2D( "+editor.ps.catBlending.GetGrabTextureName()+", " + UV + ")"; - } - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_SceneColor : SF_Node { + + + public SFN_SceneColor() { + + } + + public override void Initialize() { + base.Initialize( "Scene Color" ); + base.showColor = true; + base.UseLowerPropertyBox( false ); + base.texture.CompCount = 4; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"UVIN","UV",ConType.cInput,ValueType.VTv2), + SF_NodeConnector.Create(this,"RGB","RGB",ConType.cOutput,ValueType.VTv3) .Outputting(OutChannel.RGB), + SF_NodeConnector.Create(this,"R","R",ConType.cOutput, ValueType.VTv1) .WithColor(Color.red) .Outputting(OutChannel.R), + SF_NodeConnector.Create(this,"G","G",ConType.cOutput,ValueType.VTv1) .WithColor(Color.green) .Outputting(OutChannel.G), + SF_NodeConnector.Create(this,"B","B",ConType.cOutput,ValueType.VTv1) .WithColor(Color.blue) .Outputting(OutChannel.B), + SF_NodeConnector.Create(this,"A","A",ConType.cOutput,ValueType.VTv1) .Outputting(OutChannel.A) + }; + } + + public override Vector4 EvalCPU() { + return new Color( 0.3f, 0.6f, 0.3f, 1f ); + } + + public bool AutoUV(){ + return !GetInputIsConnected( "UVIN" ); + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + + string UV = ""; + + if(AutoUV()){ + return "sceneColor"; + } else { + UV = GetInputCon( "UVIN" ).Evaluate(); + return "tex2D( "+editor.ps.catBlending.GetGrabTextureName()+", " + UV + ")"; + } + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_SceneColor.cs.meta b/Editor/Code/_Nodes/SFN_SceneColor.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_SceneColor.cs.meta rename to Editor/Code/_Nodes/SFN_SceneColor.cs.meta index 090a6b35..61cc2c34 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_SceneColor.cs.meta +++ b/Editor/Code/_Nodes/SFN_SceneColor.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: d6a693eff9dba4958966e3afe0905bbb -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: d6a693eff9dba4958966e3afe0905bbb +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_SceneDepth.cs b/Editor/Code/_Nodes/SFN_SceneDepth.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_SceneDepth.cs rename to Editor/Code/_Nodes/SFN_SceneDepth.cs index 1d2815f2..a9aae779 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_SceneDepth.cs +++ b/Editor/Code/_Nodes/SFN_SceneDepth.cs @@ -1,40 +1,40 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_SceneDepth : SF_Node { - - - public SFN_SceneDepth() { - - } - - public override void Initialize() { - base.Initialize( "Scene Depth" ); - base.showColor = true; - base.UseLowerPropertyBox( false ); - base.texture.CompCount = 1; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv1), - SF_NodeConnector.Create(this,"UV","UV",ConType.cInput,ValueType.VTv2) - }; - } - - public override Vector4 EvalCPU() { - return new Color( 0.3f, 0.6f, 0.3f, 1f ); - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - string infix = ""; - if( GetConnectorByStringID( "UV" ).IsConnectedAndEnabled() ) - infix = GetConnectorByStringID( "UV" ).TryEvaluate(); - else - infix = "sceneUVs"; - return "max(0, LinearEyeDepth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, " + infix + ")) - _ProjectionParams.g)"; - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_SceneDepth : SF_Node { + + + public SFN_SceneDepth() { + + } + + public override void Initialize() { + base.Initialize( "Scene Depth" ); + base.showColor = true; + base.UseLowerPropertyBox( false ); + base.texture.CompCount = 1; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv1), + SF_NodeConnector.Create(this,"UV","UV",ConType.cInput,ValueType.VTv2) + }; + } + + public override Vector4 EvalCPU() { + return new Color( 0.3f, 0.6f, 0.3f, 1f ); + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + string infix = ""; + if( GetConnectorByStringID( "UV" ).IsConnectedAndEnabled() ) + infix = GetConnectorByStringID( "UV" ).TryEvaluate(); + else + infix = "sceneUVs"; + return "max(0, LinearEyeDepth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, " + infix + ")) - _ProjectionParams.g)"; + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_SceneDepth.cs.meta b/Editor/Code/_Nodes/SFN_SceneDepth.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_SceneDepth.cs.meta rename to Editor/Code/_Nodes/SFN_SceneDepth.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ScreenParameters.cs b/Editor/Code/_Nodes/SFN_ScreenParameters.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ScreenParameters.cs rename to Editor/Code/_Nodes/SFN_ScreenParameters.cs index 9be57a9c..a993549a --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ScreenParameters.cs +++ b/Editor/Code/_Nodes/SFN_ScreenParameters.cs @@ -1,40 +1,40 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_ScreenParameters : SF_Node { - - - public SFN_ScreenParameters() { - - } - - public override void Initialize() { - base.Initialize( "Scrn. Params" ); - base.SearchName = "Screen Parameters"; - base.showColor = true; - base.UseLowerPropertyBox( false ); - base.texture.CompCount = 4; - base.neverDefineVariable = true; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"PXW","pxW",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.R), - SF_NodeConnector.Create(this,"PXH","pxH",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.G), - SF_NodeConnector.Create(this,"RCW","1+1/W",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.B), - SF_NodeConnector.Create(this,"RCH","1+1/H",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.A) - }; - base.extraWidthOutput = 12; - } - - public override Vector4 EvalCPU() { - return new Color( 0f, 0.7071068f, 0.7071068f, 0f ); - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "_ScreenParams"; - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_ScreenParameters : SF_Node { + + + public SFN_ScreenParameters() { + + } + + public override void Initialize() { + base.Initialize( "Scrn. Params" ); + base.SearchName = "Screen Parameters"; + base.showColor = true; + base.UseLowerPropertyBox( false ); + base.texture.CompCount = 4; + base.neverDefineVariable = true; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"PXW","pxW",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.R), + SF_NodeConnector.Create(this,"PXH","pxH",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.G), + SF_NodeConnector.Create(this,"RCW","1+1/W",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.B), + SF_NodeConnector.Create(this,"RCH","1+1/H",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.A) + }; + base.extraWidthOutput = 12; + } + + public override Vector4 EvalCPU() { + return new Color( 0f, 0.7071068f, 0.7071068f, 0f ); + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "_ScreenParams"; + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ScreenParameters.cs.meta b/Editor/Code/_Nodes/SFN_ScreenParameters.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ScreenParameters.cs.meta rename to Editor/Code/_Nodes/SFN_ScreenParameters.cs.meta index bfd5c66d..5dec4f79 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ScreenParameters.cs.meta +++ b/Editor/Code/_Nodes/SFN_ScreenParameters.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 8ffce1d1cbd31b6438a435cfbc89f838 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 8ffce1d1cbd31b6438a435cfbc89f838 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ScreenPos.cs b/Editor/Code/_Nodes/SFN_ScreenPos.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ScreenPos.cs rename to Editor/Code/_Nodes/SFN_ScreenPos.cs index 9b645c92..33dccd49 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ScreenPos.cs +++ b/Editor/Code/_Nodes/SFN_ScreenPos.cs @@ -1,83 +1,83 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_ScreenPos : SF_Node { - - - public enum ScreenPosType { Normalized = 0, Tiled = 1, SceneUVs = 2 }; - public ScreenPosType currentType = ScreenPosType.Normalized; - - public SFN_ScreenPos() { - - } - - public override void Initialize() { - base.Initialize( "Screen Pos.", InitialPreviewRenderMode.BlitQuad ); - base.showColor = true; - base.UseLowerPropertyBox( true, true ); - UpdateIcon(); - base.texture.CompCount = 2; - base.neverDefineVariable = true; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"UVOUT","UV",ConType.cOutput,ValueType.VTv2,false).Outputting(OutChannel.RG), - SF_NodeConnector.Create(this,"U","U",ConType.cOutput,ValueType.VTv1).WithColor(Color.red).Outputting(OutChannel.R), - SF_NodeConnector.Create(this,"V","V",ConType.cOutput,ValueType.VTv1).WithColor(Color.green).Outputting(OutChannel.G) - }; - } - - public void UpdateIcon() { - base.texture.SetIconId( (int)currentType ); - } - - /* - public override Vector4 NodeOperator() { - return new Color( Screen.width - base.rect.x + x * 0.66666f, Screen.height - base.rect.y + y * 0.66666f, 0, 0 ); - } - */ - - public override void DrawLowerPropertyBox() { - GUI.color = Color.white; - EditorGUI.BeginChangeCheck(); - //currentType = (ScreenPosType)EditorGUI.EnumPopup( lowerRect, currentType ); - currentType = (ScreenPosType)UndoableEnumPopup(lowerRect, currentType, "switch screen position type"); - if( EditorGUI.EndChangeCheck() ) { - UpdateIcon(); - OnUpdateNode(); - } - - } - - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - // NeedSceneUVs() - switch(currentType){ - case ScreenPosType.Normalized: - return "(sceneUVs * 2 - 1)"; - case ScreenPosType.Tiled: - return "float2((sceneUVs.x * 2 - 1)*(_ScreenParams.r/_ScreenParams.g), sceneUVs.y * 2 - 1)"; - case ScreenPosType.SceneUVs: - return "sceneUVs"; - } - Debug.LogError("Invalid screen position category"); - return ""; - } - - public override string SerializeSpecialData() { - return "sctp:" + (int)currentType; - } - - public override void DeserializeSpecialData( string key, string value ) { - switch( key ) { - case "sctp": - currentType = (ScreenPosType)int.Parse( value ); - UpdateIcon(); - break; - } - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_ScreenPos : SF_Node { + + + public enum ScreenPosType { Normalized = 0, Tiled = 1, SceneUVs = 2 }; + public ScreenPosType currentType = ScreenPosType.Normalized; + + public SFN_ScreenPos() { + + } + + public override void Initialize() { + base.Initialize( "Screen Pos.", InitialPreviewRenderMode.BlitQuad ); + base.showColor = true; + base.UseLowerPropertyBox( true, true ); + UpdateIcon(); + base.texture.CompCount = 2; + base.neverDefineVariable = true; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"UVOUT","UV",ConType.cOutput,ValueType.VTv2,false).Outputting(OutChannel.RG), + SF_NodeConnector.Create(this,"U","U",ConType.cOutput,ValueType.VTv1).WithColor(Color.red).Outputting(OutChannel.R), + SF_NodeConnector.Create(this,"V","V",ConType.cOutput,ValueType.VTv1).WithColor(Color.green).Outputting(OutChannel.G) + }; + } + + public void UpdateIcon() { + base.texture.SetIconId( (int)currentType ); + } + + /* + public override Vector4 NodeOperator() { + return new Color( Screen.width - base.rect.x + x * 0.66666f, Screen.height - base.rect.y + y * 0.66666f, 0, 0 ); + } + */ + + public override void DrawLowerPropertyBox() { + GUI.color = Color.white; + EditorGUI.BeginChangeCheck(); + //currentType = (ScreenPosType)EditorGUI.EnumPopup( lowerRect, currentType ); + currentType = (ScreenPosType)UndoableEnumPopup(lowerRect, currentType, "switch screen position type"); + if( EditorGUI.EndChangeCheck() ) { + UpdateIcon(); + OnUpdateNode(); + } + + } + + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + // NeedSceneUVs() + switch(currentType){ + case ScreenPosType.Normalized: + return "(sceneUVs * 2 - 1)"; + case ScreenPosType.Tiled: + return "float2((sceneUVs.x * 2 - 1)*(_ScreenParams.r/_ScreenParams.g), sceneUVs.y * 2 - 1)"; + case ScreenPosType.SceneUVs: + return "sceneUVs"; + } + Debug.LogError("Invalid screen position category"); + return ""; + } + + public override string SerializeSpecialData() { + return "sctp:" + (int)currentType; + } + + public override void DeserializeSpecialData( string key, string value ) { + switch( key ) { + case "sctp": + currentType = (ScreenPosType)int.Parse( value ); + UpdateIcon(); + break; + } + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ScreenPos.cs.meta b/Editor/Code/_Nodes/SFN_ScreenPos.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ScreenPos.cs.meta rename to Editor/Code/_Nodes/SFN_ScreenPos.cs.meta index 12a5db77..f0916d04 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ScreenPos.cs.meta +++ b/Editor/Code/_Nodes/SFN_ScreenPos.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 6c8f79b55a93b5645bea8d939b688ef1 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 6c8f79b55a93b5645bea8d939b688ef1 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Set.cs b/Editor/Code/_Nodes/SFN_Set.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Set.cs rename to Editor/Code/_Nodes/SFN_Set.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Set.cs.meta b/Editor/Code/_Nodes/SFN_Set.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Set.cs.meta rename to Editor/Code/_Nodes/SFN_Set.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Sign.cs b/Editor/Code/_Nodes/SFN_Sign.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Sign.cs rename to Editor/Code/_Nodes/SFN_Sign.cs index 196c0293..40773df9 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Sign.cs +++ b/Editor/Code/_Nodes/SFN_Sign.cs @@ -1,29 +1,29 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Sign : SF_Node_Arithmetic { - - public SFN_Sign() { - } - - public override void Initialize() { - base.Initialize( "Sign" ); - base.PrepareArithmetic( 1 ); - base.shaderGenMode = ShaderGenerationMode.SimpleFunction; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "sign(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; - } - - public override float EvalCPU( int c ) { - float v = GetInputData( "IN", c ); - if( v == 0 ) - return 0f; - return v > 0f ? 1f : -1f; - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Sign : SF_Node_Arithmetic { + + public SFN_Sign() { + } + + public override void Initialize() { + base.Initialize( "Sign" ); + base.PrepareArithmetic( 1 ); + base.shaderGenMode = ShaderGenerationMode.SimpleFunction; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "sign(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; + } + + public override float EvalCPU( int c ) { + float v = GetInputData( "IN", c ); + if( v == 0 ) + return 0f; + return v > 0f ? 1f : -1f; + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Sign.cs.meta b/Editor/Code/_Nodes/SFN_Sign.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Sign.cs.meta rename to Editor/Code/_Nodes/SFN_Sign.cs.meta index f10e81cf..5b80faec --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Sign.cs.meta +++ b/Editor/Code/_Nodes/SFN_Sign.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 23a3e4987bfdf3944b39de15059fd63e -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 23a3e4987bfdf3944b39de15059fd63e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Sin.cs b/Editor/Code/_Nodes/SFN_Sin.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Sin.cs rename to Editor/Code/_Nodes/SFN_Sin.cs index 713b40c3..6f29d481 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Sin.cs +++ b/Editor/Code/_Nodes/SFN_Sin.cs @@ -1,26 +1,26 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Sin : SF_Node_Arithmetic { - - public SFN_Sin() { - } - - public override void Initialize() { - base.Initialize( "Sin" ); - base.PrepareArithmetic( 1 ); - base.shaderGenMode = ShaderGenerationMode.SimpleFunction; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "sin(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; - } - - public override float EvalCPU( int c ) { - return Mathf.Sin( GetInputData( "IN", c ) ); - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Sin : SF_Node_Arithmetic { + + public SFN_Sin() { + } + + public override void Initialize() { + base.Initialize( "Sin" ); + base.PrepareArithmetic( 1 ); + base.shaderGenMode = ShaderGenerationMode.SimpleFunction; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "sin(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; + } + + public override float EvalCPU( int c ) { + return Mathf.Sin( GetInputData( "IN", c ) ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Sin.cs.meta b/Editor/Code/_Nodes/SFN_Sin.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Sin.cs.meta rename to Editor/Code/_Nodes/SFN_Sin.cs.meta index 02e6793c..de8a3d37 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Sin.cs.meta +++ b/Editor/Code/_Nodes/SFN_Sin.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 7fafe81ac61f44348b70f30fd8959cab -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 7fafe81ac61f44348b70f30fd8959cab +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Slider.cs b/Editor/Code/_Nodes/SFN_Slider.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Slider.cs rename to Editor/Code/_Nodes/SFN_Slider.cs index 3fc64f4c..c6e42c19 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Slider.cs +++ b/Editor/Code/_Nodes/SFN_Slider.cs @@ -1,170 +1,170 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Slider : SF_Node { - - - public float min = 0.0f; - public float max = 1.0f; - public float current = 0.0f; - - GUIStyle centerFloatField; - //GUIStyle centerFloatFieldDark; - - public SFN_Slider() { - - } - - public override void Initialize() { - node_width = 256; - node_height = 58; - base.Initialize( "Slider" ); - base.showColor = false; - base.neverDefineVariable = true; - base.UseLowerPropertyBox( false ); - base.texture.uniform = true; - base.texture.CompCount = 1; - base.shaderGenMode = ShaderGenerationMode.OffUniform; - property = ScriptableObject.CreateInstance().Initialize( this ); - - centerFloatField = new GUIStyle( EditorStyles.numberField ); - centerFloatField.alignment = TextAnchor.MiddleCenter; - - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv1,false) - }; - } - - /*public override bool IsUniformOutput() { - return true; - }*/ - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return property.GetVariable(); - } - - public override float EvalCPU( int c ) { - return current; - } - - public override bool IsUniformOutput() { - return true; - } - - - public override void NeatWindow( ) { - PrepareWindowColor(); - int labelWidth = 28; - int sliderWidth = (int)( rectInner.width - 4 * labelWidth ); - GUI.BeginGroup( rect ); - Rect r = new Rect( rectInner ); - r.height = 16; - // r.width = labelWidth*3; - // Upper: - //float normSlider = Mathf.InverseLerp( min, max, current ); - //r.x = normSlider * sliderWidth + 0.5f * labelWidth; - - bool inverse = min > max; - - float prevValue = current; - - Rect valRect = r; - //float t = (current/max); - valRect.xMin += 80;//+134*t; - valRect.xMax -= 80;//+134*(1-t); - if(inverse){ - current = Mathf.Clamp( EditorGUI.FloatField( valRect, current, centerFloatField ), max, min ); - } else { - current = Mathf.Clamp( EditorGUI.FloatField( valRect, current, centerFloatField ), min, max ); - } - - // Lower: - r.y += r.height + 4; - r.x = rectInner.x; - r.width = labelWidth; - - GUI.Label( r, "Min" ); - r.x += r.width; - //min = EditorGUI.FloatField( r, min, centerFloatField ); - min = UndoableFloatField(r, min, "slider min value", centerFloatField); - r.x += r.width; - r.width = sliderWidth; - float beforeSlider = current; - - string sliderName = "slider" + this.id; - GUI.SetNextControlName( sliderName ); - //current = GUI.HorizontalSlider( r, current, min, max ); - - Rect sliderRect = r; - - sliderRect.xMax -= 8; - sliderRect.xMin += 8; - - if(inverse){ - current = (min+max) - UndoableHorizontalSlider(sliderRect, (min+max) - current, max, min, "value" ); - } else { - current = UndoableHorizontalSlider(sliderRect, current, min, max, "value" ); - } - - - if( beforeSlider != current ) - GUI.FocusControl( sliderName ); - r.x += r.width; - r.width = labelWidth; - //max = EditorGUI.FloatField( r, max, centerFloatField ); - max = UndoableFloatField(r, max, "slider max value", centerFloatField); - r.x += r.width; - GUI.Label( r, "Max" ); - - // sliderRect.x += labelWidth; - // sliderRect.width -= labelWidth * 2; - - if( prevValue != current ){ - OnValueChanged(); - } - GUI.EndGroup(); - ResetWindowColor(); - //GUI.DragWindow(); - } - - // TODO: Refresh node thumbs - public void OnValueChanged() { - texture.dataUniform = current * Vector4.one; - editor.shaderEvaluator.ApplyProperty( this ); - OnUpdateNode( NodeUpdateType.Soft ); - } - - - public override string SerializeSpecialData() { - string s = property.Serialize() + ","; - s += "min:" + min + ","; - s += "cur:" + current + ","; - s += "max:" + max; - return s; - } - - public override void DeserializeSpecialData( string key, string value ) { - property.Deserialize( key, value ); - switch( key ) { - case "min": - min = float.Parse( value ); - break; - case "cur": - current = float.Parse( value ); - OnValueChanged(); - break; - case "max": - max = float.Parse( value ); - break; - } - } - - - - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Slider : SF_Node { + + + public float min = 0.0f; + public float max = 1.0f; + public float current = 0.0f; + + GUIStyle centerFloatField; + //GUIStyle centerFloatFieldDark; + + public SFN_Slider() { + + } + + public override void Initialize() { + node_width = 256; + node_height = 58; + base.Initialize( "Slider" ); + base.showColor = false; + base.neverDefineVariable = true; + base.UseLowerPropertyBox( false ); + base.texture.uniform = true; + base.texture.CompCount = 1; + base.shaderGenMode = ShaderGenerationMode.OffUniform; + property = ScriptableObject.CreateInstance().Initialize( this ); + + centerFloatField = new GUIStyle( EditorStyles.numberField ); + centerFloatField.alignment = TextAnchor.MiddleCenter; + + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv1,false) + }; + } + + /*public override bool IsUniformOutput() { + return true; + }*/ + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return property.GetVariable(); + } + + public override float EvalCPU( int c ) { + return current; + } + + public override bool IsUniformOutput() { + return true; + } + + + public override void NeatWindow( ) { + PrepareWindowColor(); + int labelWidth = 28; + int sliderWidth = (int)( rectInner.width - 4 * labelWidth ); + GUI.BeginGroup( rect ); + Rect r = new Rect( rectInner ); + r.height = 16; + // r.width = labelWidth*3; + // Upper: + //float normSlider = Mathf.InverseLerp( min, max, current ); + //r.x = normSlider * sliderWidth + 0.5f * labelWidth; + + bool inverse = min > max; + + float prevValue = current; + + Rect valRect = r; + //float t = (current/max); + valRect.xMin += 80;//+134*t; + valRect.xMax -= 80;//+134*(1-t); + if(inverse){ + current = Mathf.Clamp( EditorGUI.FloatField( valRect, current, centerFloatField ), max, min ); + } else { + current = Mathf.Clamp( EditorGUI.FloatField( valRect, current, centerFloatField ), min, max ); + } + + // Lower: + r.y += r.height + 4; + r.x = rectInner.x; + r.width = labelWidth; + + GUI.Label( r, "Min" ); + r.x += r.width; + //min = EditorGUI.FloatField( r, min, centerFloatField ); + min = UndoableFloatField(r, min, "slider min value", centerFloatField); + r.x += r.width; + r.width = sliderWidth; + float beforeSlider = current; + + string sliderName = "slider" + this.id; + GUI.SetNextControlName( sliderName ); + //current = GUI.HorizontalSlider( r, current, min, max ); + + Rect sliderRect = r; + + sliderRect.xMax -= 8; + sliderRect.xMin += 8; + + if(inverse){ + current = (min+max) - UndoableHorizontalSlider(sliderRect, (min+max) - current, max, min, "value" ); + } else { + current = UndoableHorizontalSlider(sliderRect, current, min, max, "value" ); + } + + + if( beforeSlider != current ) + GUI.FocusControl( sliderName ); + r.x += r.width; + r.width = labelWidth; + //max = EditorGUI.FloatField( r, max, centerFloatField ); + max = UndoableFloatField(r, max, "slider max value", centerFloatField); + r.x += r.width; + GUI.Label( r, "Max" ); + + // sliderRect.x += labelWidth; + // sliderRect.width -= labelWidth * 2; + + if( prevValue != current ){ + OnValueChanged(); + } + GUI.EndGroup(); + ResetWindowColor(); + //GUI.DragWindow(); + } + + // TODO: Refresh node thumbs + public void OnValueChanged() { + texture.dataUniform = current * Vector4.one; + editor.shaderEvaluator.ApplyProperty( this ); + OnUpdateNode( NodeUpdateType.Soft ); + } + + + public override string SerializeSpecialData() { + string s = property.Serialize() + ","; + s += "min:" + min + ","; + s += "cur:" + current + ","; + s += "max:" + max; + return s; + } + + public override void DeserializeSpecialData( string key, string value ) { + property.Deserialize( key, value ); + switch( key ) { + case "min": + min = float.Parse( value ); + break; + case "cur": + current = float.Parse( value ); + OnValueChanged(); + break; + case "max": + max = float.Parse( value ); + break; + } + } + + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Slider.cs.meta b/Editor/Code/_Nodes/SFN_Slider.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Slider.cs.meta rename to Editor/Code/_Nodes/SFN_Slider.cs.meta index c17303fb..4620b2d0 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Slider.cs.meta +++ b/Editor/Code/_Nodes/SFN_Slider.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 9987079b02539a14288441b9a1078362 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 9987079b02539a14288441b9a1078362 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Smoothstep.cs b/Editor/Code/_Nodes/SFN_Smoothstep.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Smoothstep.cs rename to Editor/Code/_Nodes/SFN_Smoothstep.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Smoothstep.cs.meta b/Editor/Code/_Nodes/SFN_Smoothstep.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Smoothstep.cs.meta rename to Editor/Code/_Nodes/SFN_Smoothstep.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Sqrt.cs b/Editor/Code/_Nodes/SFN_Sqrt.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Sqrt.cs rename to Editor/Code/_Nodes/SFN_Sqrt.cs index 501aeaab..1e11ec92 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Sqrt.cs +++ b/Editor/Code/_Nodes/SFN_Sqrt.cs @@ -1,26 +1,26 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Sqrt : SF_Node_Arithmetic { - - public SFN_Sqrt() { - } - - public override void Initialize() { - base.Initialize( "Sqrt" ); - base.PrepareArithmetic( 1 ); - base.shaderGenMode = ShaderGenerationMode.SimpleFunction; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "sqrt(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; - } - - public override float EvalCPU( int c ) { - return Mathf.Sqrt( GetInputData( "IN", c ) ); - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Sqrt : SF_Node_Arithmetic { + + public SFN_Sqrt() { + } + + public override void Initialize() { + base.Initialize( "Sqrt" ); + base.PrepareArithmetic( 1 ); + base.shaderGenMode = ShaderGenerationMode.SimpleFunction; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "sqrt(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; + } + + public override float EvalCPU( int c ) { + return Mathf.Sqrt( GetInputData( "IN", c ) ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Sqrt.cs.meta b/Editor/Code/_Nodes/SFN_Sqrt.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Sqrt.cs.meta rename to Editor/Code/_Nodes/SFN_Sqrt.cs.meta index a1e1f626..997e0fb5 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Sqrt.cs.meta +++ b/Editor/Code/_Nodes/SFN_Sqrt.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: c77bd2f2aab8059488ee83b49ccad0ca -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: c77bd2f2aab8059488ee83b49ccad0ca +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_StaticBranch.cs b/Editor/Code/_Nodes/SFN_StaticBranch.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_StaticBranch.cs rename to Editor/Code/_Nodes/SFN_StaticBranch.cs index 688d14e1..94347b6c --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_StaticBranch.cs +++ b/Editor/Code/_Nodes/SFN_StaticBranch.cs @@ -1,80 +1,80 @@ -using UnityEngine; -using UnityEditor; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_StaticBranch : SF_Node_Arithmetic { - - public bool on = false; - - public SFN_StaticBranch() { - } - - public override void Initialize() { - base.Initialize( "Static Branch" ); - base.PrepareArithmetic(2); - base.showLowerReadonlyValues = false; - base.alwaysDefineVariable = true; - base.onlyPreDefine = true; - base.showLowerPropertyBox = true; - base.showLowerPropertyBoxAlways = true; - base.property = ScriptableObject.CreateInstance().Initialize( this ); - } - - - public override void DrawLowerPropertyBox() { - EditorGUI.BeginChangeCheck(); - Rect r = lowerRect; - r.xMin += 3; - on = EditorGUI.Toggle( r, on ); - r.xMin += 17; - GUI.Label(r,"On"); - if( EditorGUI.EndChangeCheck() ) { - OnUpdateNode(); - editor.shaderEvaluator.ApplyProperty( this ); - } - - } - - public override string[] GetPreDefineRows() { - string indent = " "; - string[] rows = new string[]{ - "#ifdef STATIC_BRANCH", - indent+"float" + GetEvaluatedComponentCount() + " " + GetVariableName() + " = " + this["B"].TryEvaluate() + ";", - "#else", - indent+"float" + GetEvaluatedComponentCount() + " " + GetVariableName() + " = " + this["A"].TryEvaluate() + ";", - "#endif" - }; - varDefined = true; // Hack - return rows; - - } - - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - if(!ShouldDefineVariable()) // TODO: Isn't this already handled on the node level? - this.PreDefine(); - - return GetVariableName(); - } - - public override float EvalCPU( int c ) { - return on ? GetInputData( "B", c ) : GetInputData( "B", c ); - } - - public override string SerializeSpecialData() { - return "on:" + on; - } - - public override void DeserializeSpecialData( string key, string value ) { - switch( key ) { - case "on": - on = bool.Parse( value ); - editor.shaderEvaluator.ApplyProperty( this ); - break; - } - } - - } +using UnityEngine; +using UnityEditor; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_StaticBranch : SF_Node_Arithmetic { + + public bool on = false; + + public SFN_StaticBranch() { + } + + public override void Initialize() { + base.Initialize( "Static Branch" ); + base.PrepareArithmetic(2); + base.showLowerReadonlyValues = false; + base.alwaysDefineVariable = true; + base.onlyPreDefine = true; + base.showLowerPropertyBox = true; + base.showLowerPropertyBoxAlways = true; + base.property = ScriptableObject.CreateInstance().Initialize( this ); + } + + + public override void DrawLowerPropertyBox() { + EditorGUI.BeginChangeCheck(); + Rect r = lowerRect; + r.xMin += 3; + on = EditorGUI.Toggle( r, on ); + r.xMin += 17; + GUI.Label(r,"On"); + if( EditorGUI.EndChangeCheck() ) { + OnUpdateNode(); + editor.shaderEvaluator.ApplyProperty( this ); + } + + } + + public override string[] GetPreDefineRows() { + string indent = " "; + string[] rows = new string[]{ + "#ifdef STATIC_BRANCH", + indent+"float" + GetEvaluatedComponentCount() + " " + GetVariableName() + " = " + this["B"].TryEvaluate() + ";", + "#else", + indent+"float" + GetEvaluatedComponentCount() + " " + GetVariableName() + " = " + this["A"].TryEvaluate() + ";", + "#endif" + }; + varDefined = true; // Hack + return rows; + + } + + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + if(!ShouldDefineVariable()) // TODO: Isn't this already handled on the node level? + this.PreDefine(); + + return GetVariableName(); + } + + public override float EvalCPU( int c ) { + return on ? GetInputData( "B", c ) : GetInputData( "B", c ); + } + + public override string SerializeSpecialData() { + return "on:" + on; + } + + public override void DeserializeSpecialData( string key, string value ) { + switch( key ) { + case "on": + on = bool.Parse( value ); + editor.shaderEvaluator.ApplyProperty( this ); + break; + } + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_StaticBranch.cs.meta b/Editor/Code/_Nodes/SFN_StaticBranch.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_StaticBranch.cs.meta rename to Editor/Code/_Nodes/SFN_StaticBranch.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Step.cs b/Editor/Code/_Nodes/SFN_Step.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Step.cs rename to Editor/Code/_Nodes/SFN_Step.cs index 9a8f8797..1e01f63a --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Step.cs +++ b/Editor/Code/_Nodes/SFN_Step.cs @@ -1,31 +1,31 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Step : SF_Node_Arithmetic { - - public SFN_Step() { - } - - public override void Initialize() { - base.Initialize( "Step (A <= B)" ); - base.SearchName = "Step"; - base.PrepareArithmetic(2); - base.showLowerReadonlyValues = false; - base.connectors[0].label = "<="; - base.shaderGenMode = ShaderGenerationMode.SimpleFunction; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "step(" + GetConnectorByStringID( "A" ).TryEvaluate() + "," + GetConnectorByStringID( "B" ).TryEvaluate() + ")"; - } - - public override float EvalCPU( int c ) { - float a = GetInputData( "B", c ); - float b = GetInputData( "B", c ); - return ((a <= b) ? 1.0f : 0.0f); - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Step : SF_Node_Arithmetic { + + public SFN_Step() { + } + + public override void Initialize() { + base.Initialize( "Step (A <= B)" ); + base.SearchName = "Step"; + base.PrepareArithmetic(2); + base.showLowerReadonlyValues = false; + base.connectors[0].label = "<="; + base.shaderGenMode = ShaderGenerationMode.SimpleFunction; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "step(" + GetConnectorByStringID( "A" ).TryEvaluate() + "," + GetConnectorByStringID( "B" ).TryEvaluate() + ")"; + } + + public override float EvalCPU( int c ) { + float a = GetInputData( "B", c ); + float b = GetInputData( "B", c ); + return ((a <= b) ? 1.0f : 0.0f); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Step.cs.meta b/Editor/Code/_Nodes/SFN_Step.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Step.cs.meta rename to Editor/Code/_Nodes/SFN_Step.cs.meta index 4f7e7d51..e80e6a78 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Step.cs.meta +++ b/Editor/Code/_Nodes/SFN_Step.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 040227aa4fb888540b24aabbda43bf84 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 040227aa4fb888540b24aabbda43bf84 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Subtract.cs b/Editor/Code/_Nodes/SFN_Subtract.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Subtract.cs rename to Editor/Code/_Nodes/SFN_Subtract.cs index 3d782807..a6397b75 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Subtract.cs +++ b/Editor/Code/_Nodes/SFN_Subtract.cs @@ -1,31 +1,31 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Subtract : SF_Node_Arithmetic { - - public SFN_Subtract() { - - } - - public override void Initialize() { - base.Initialize( "Subtract" ); - base.PrepareArithmetic(); - base.shaderGenMode = ShaderGenerationMode.CustomFunction; - } - - public override string[] GetBlitOutputLines() { - return new string[] { "_a - _b" }; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "(" + GetConnectorByStringID( "A" ).TryEvaluate() + "-" + GetConnectorByStringID( "B" ).TryEvaluate() + ")"; - } - - public override float EvalCPU( int c ) { - return GetInputData( "A", c ) - GetInputData( "B", c ); - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Subtract : SF_Node_Arithmetic { + + public SFN_Subtract() { + + } + + public override void Initialize() { + base.Initialize( "Subtract" ); + base.PrepareArithmetic(); + base.shaderGenMode = ShaderGenerationMode.CustomFunction; + } + + public override string[] GetBlitOutputLines() { + return new string[] { "_a - _b" }; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "(" + GetConnectorByStringID( "A" ).TryEvaluate() + "-" + GetConnectorByStringID( "B" ).TryEvaluate() + ")"; + } + + public override float EvalCPU( int c ) { + return GetInputData( "A", c ) - GetInputData( "B", c ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Subtract.cs.meta b/Editor/Code/_Nodes/SFN_Subtract.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Subtract.cs.meta rename to Editor/Code/_Nodes/SFN_Subtract.cs.meta index 1a777d66..e8b87e67 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Subtract.cs.meta +++ b/Editor/Code/_Nodes/SFN_Subtract.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: f800be44f0a6bcb4db234f16ffbb3c4c -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: f800be44f0a6bcb4db234f16ffbb3c4c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_SwitchProperty.cs b/Editor/Code/_Nodes/SFN_SwitchProperty.cs old mode 100755 new mode 100644 similarity index 98% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_SwitchProperty.cs rename to Editor/Code/_Nodes/SFN_SwitchProperty.cs index 3623a7eb..dd7556da --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_SwitchProperty.cs +++ b/Editor/Code/_Nodes/SFN_SwitchProperty.cs @@ -20,7 +20,7 @@ public override void Initialize() { base.Initialize( "Switch" ); base.node_height -= 20; //base.lowerRect.height += 4; - base.showColor = true; + base.showColor = true; base.shaderGenMode = ShaderGenerationMode.ValuePassing; base.UseLowerPropertyBox( true, true ); @@ -44,19 +44,19 @@ public override void Initialize() { Color conLineBg = Color.black; Color conLineFg = Color.white; // Color conLineBgTrns = new Color(0f,0f,0f,0.3f); - // Color conLineFgTrns = new Color(1f,1f,1f,0.3f); - - public override string[] ExtraPassedFloatProperties(){ - return new string[] { "On" }; - } - - public override void PrepareRendering( Material mat ) { - mat.SetFloat( "_on", on ? 1.0f : 0.0f ); - } - - public override string[] GetBlitOutputLines() { - return new string[] { "lerp(_a,_b,_on)" }; - } + // Color conLineFgTrns = new Color(1f,1f,1f,0.3f); + + public override string[] ExtraPassedFloatProperties(){ + return new string[] { "On" }; + } + + public override void PrepareRendering( Material mat ) { + mat.SetFloat( "_on", on ? 1.0f : 0.0f ); + } + + public override string[] GetBlitOutputLines() { + return new string[] { "lerp(_a,_b,_on)" }; + } public override void DrawLowerPropertyBox() { @@ -66,7 +66,7 @@ public override void DrawLowerPropertyBox() { r.width = 26; r.y -= 26; - if(Event.current.type == EventType.repaint){ + if(Event.current.type == EventType.Repaint){ smoothConnectorHeight = Mathf.Lerp(smoothConnectorHeight, targetConnectorHeight, 0.6f); } diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_SwitchProperty.cs.meta b/Editor/Code/_Nodes/SFN_SwitchProperty.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_SwitchProperty.cs.meta rename to Editor/Code/_Nodes/SFN_SwitchProperty.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tan.cs b/Editor/Code/_Nodes/SFN_Tan.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tan.cs rename to Editor/Code/_Nodes/SFN_Tan.cs index 65695d80..618d9e19 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tan.cs +++ b/Editor/Code/_Nodes/SFN_Tan.cs @@ -1,26 +1,26 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Tan : SF_Node_Arithmetic { - - public SFN_Tan() { - } - - public override void Initialize() { - base.Initialize( "Tan" ); - base.PrepareArithmetic( 1 ); - base.shaderGenMode = ShaderGenerationMode.SimpleFunction; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "tan(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; - } - - public override float EvalCPU( int c ) { - return Mathf.Tan( GetInputData( "IN", c ) ); - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Tan : SF_Node_Arithmetic { + + public SFN_Tan() { + } + + public override void Initialize() { + base.Initialize( "Tan" ); + base.PrepareArithmetic( 1 ); + base.shaderGenMode = ShaderGenerationMode.SimpleFunction; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "tan(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; + } + + public override float EvalCPU( int c ) { + return Mathf.Tan( GetInputData( "IN", c ) ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tan.cs.meta b/Editor/Code/_Nodes/SFN_Tan.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tan.cs.meta rename to Editor/Code/_Nodes/SFN_Tan.cs.meta index aa772307..02d93a4b --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tan.cs.meta +++ b/Editor/Code/_Nodes/SFN_Tan.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 194e3cc730febb44196573c2fd1a4ff8 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 194e3cc730febb44196573c2fd1a4ff8 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tangent.cs b/Editor/Code/_Nodes/SFN_Tangent.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tangent.cs rename to Editor/Code/_Nodes/SFN_Tangent.cs index 0694adf2..c2b5c6fa --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tangent.cs +++ b/Editor/Code/_Nodes/SFN_Tangent.cs @@ -1,35 +1,35 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Tangent : SF_Node { - - - public SFN_Tangent() { - - } - - public override void Initialize() { - base.Initialize( "Tangent Dir.", InitialPreviewRenderMode.BlitSphere ); - base.showColor = true; - base.UseLowerPropertyBox( false ); - base.texture.CompCount = 3; - base.neverDefineVariable = true; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv3,false) - }; - } - - public override Vector4 EvalCPU() { - return new Color( 1f, 0f, 0f, 0f ); - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return SF_Evaluator.WithProgramPrefix("tangentDir"); - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Tangent : SF_Node { + + + public SFN_Tangent() { + + } + + public override void Initialize() { + base.Initialize( "Tangent Dir.", InitialPreviewRenderMode.BlitSphere ); + base.showColor = true; + base.UseLowerPropertyBox( false ); + base.texture.CompCount = 3; + base.neverDefineVariable = true; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv3,false) + }; + } + + public override Vector4 EvalCPU() { + return new Color( 1f, 0f, 0f, 0f ); + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return SF_Evaluator.WithProgramPrefix("tangentDir"); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tangent.cs.meta b/Editor/Code/_Nodes/SFN_Tangent.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tangent.cs.meta rename to Editor/Code/_Nodes/SFN_Tangent.cs.meta index a3772158..b7d1e87d --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tangent.cs.meta +++ b/Editor/Code/_Nodes/SFN_Tangent.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 139600edd90131c43842df0965b82082 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 139600edd90131c43842df0965b82082 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tau.cs b/Editor/Code/_Nodes/SFN_Tau.cs old mode 100755 new mode 100644 similarity index 94% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tau.cs rename to Editor/Code/_Nodes/SFN_Tau.cs index 19742d72..4821ea85 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tau.cs +++ b/Editor/Code/_Nodes/SFN_Tau.cs @@ -1,19 +1,19 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Tau : SFN_Node_Constant { - - public SFN_Tau() { - } - - public override void Initialize() { - base.Initialize( "Tau"); - base.PrepareConstant( "const_tau", "6.28318530718" ); - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Tau : SFN_Node_Constant { + + public SFN_Tau() { + } + + public override void Initialize() { + base.Initialize( "Tau"); + base.PrepareConstant( "const_tau", "6.28318530718" ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tau.cs.meta b/Editor/Code/_Nodes/SFN_Tau.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tau.cs.meta rename to Editor/Code/_Nodes/SFN_Tau.cs.meta index 30c4d425..d93b5594 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tau.cs.meta +++ b/Editor/Code/_Nodes/SFN_Tau.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 62750aaecd1cee044b767f00ed0605bf -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 62750aaecd1cee044b767f00ed0605bf +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tex2d.cs b/Editor/Code/_Nodes/SFN_Tex2d.cs old mode 100755 new mode 100644 similarity index 94% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tex2d.cs rename to Editor/Code/_Nodes/SFN_Tex2d.cs index 68b4bd08..1b4ffe63 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tex2d.cs +++ b/Editor/Code/_Nodes/SFN_Tex2d.cs @@ -1,19 +1,19 @@ using UnityEngine; using UnityEditor; -using System.Collections; +using System.Collections; + + - - namespace ShaderForge { public enum NoTexValue{White, Gray, Black, Bump}; - - [System.Serializable] - public class SFN_Tex2d : SF_Node { - - + + [System.Serializable] + public class SFN_Tex2d : SF_Node { + + public Texture textureAsset; public Texture TextureAsset { @@ -32,23 +32,23 @@ public Texture TextureAsset { //public bool unpackNormal = false; public NoTexValue noTexValue = NoTexValue.White; public bool markedAsNormalMap = false; - + public SF_ShaderProperty shelvedProperty; - - - public SFN_Tex2d() { - - } - - public override void Initialize() { - base.Initialize( "Texture 2D" ); + + + public SFN_Tex2d() { + + } + + public override void Initialize() { + base.Initialize( "Texture 2D" ); //node_height = (int)(rect.height - 6f); // Odd, but alright... base.UseLowerPropertyBox( true, true ); - - property = ScriptableObject.CreateInstance().Initialize( this ); - - + + property = ScriptableObject.CreateInstance().Initialize( this ); + + connectors = new SF_NodeConnector[]{ SF_NodeConnector.Create(this,"UVIN","UV",ConType.cInput,ValueType.VTv2).SetGhostNodeLink(typeof(SFN_TexCoord),"UVOUT"), SF_NodeConnector.Create(this,"MIP","MIP",ConType.cInput,ValueType.VTv1), @@ -58,41 +58,41 @@ public override void Initialize() { SF_NodeConnector.Create(this,"G","G",ConType.cOutput,ValueType.VTv1) .WithColor(Color.green) .Outputting(OutChannel.G), SF_NodeConnector.Create(this,"B","B",ConType.cOutput,ValueType.VTv1) .WithColor(Color.blue) .Outputting(OutChannel.B), SF_NodeConnector.Create(this,"A","A",ConType.cOutput,ValueType.VTv1) .Outputting(OutChannel.A) - }; - base.alwaysDefineVariable = true; - base.neverDefineVariable = false; + }; + base.alwaysDefineVariable = true; + base.neverDefineVariable = false; base.texture.CompCount = 4; connectors[0].usageCount = 2; // To define a variable of UVs to use with TRANSFORM_TEX - - } - - public override bool IsUniformOutput() { - return false; - } - - public bool IsNormalMap() { - - /* - if( textureAsset != null ) { - string path = AssetDatabase.GetAssetPath( textureAsset ); - if( string.IsNullOrEmpty( path ) ) - return false; - else - return ( (TextureImporter)UnityEditor.AssetImporter.GetAtPath( path ) ).normalmap; - } - - - if( property == null ) { - if( GetInputIsConnected( "TEX" ) ) - return ( GetInputCon( "TEX" ).node as SFN_Tex2d ).IsNormalMap(); - } else { - return ( property as SFP_Tex2d ).isBumpmap; - }*/ + + } + + public override bool IsUniformOutput() { + return false; + } + + public bool IsNormalMap() { + + /* + if( textureAsset != null ) { + string path = AssetDatabase.GetAssetPath( textureAsset ); + if( string.IsNullOrEmpty( path ) ) + return false; + else + return ( (TextureImporter)UnityEditor.AssetImporter.GetAtPath( path ) ).normalmap; + } + + + if( property == null ) { + if( GetInputIsConnected( "TEX" ) ) + return ( GetInputCon( "TEX" ).node as SFN_Tex2d ).IsNormalMap(); + } else { + return ( property as SFP_Tex2d ).isBumpmap; + }*/ // TODO: Is this right?¨ if(TexAssetConnected()) return ( GetInputCon( "TEX" ).node as SFN_Tex2dAsset ).IsNormalMap(); - return markedAsNormalMap; + return markedAsNormalMap; } @@ -101,31 +101,31 @@ public bool TexAssetConnected(){ if( GetInputIsConnected( "TEX" ) ) return true; return false; - } - - - public override string GetBlitShaderSuffix() { - - bool uv = GetInputIsConnected( "UVIN" ); - bool mip = GetInputIsConnected( "MIP" ); - - if( uv && mip ) { - return "UV_MIP"; - } else if( mip ) { - return "MIP"; - } else if( uv ){ - return "UV"; - } else { - return "NoInputs"; - } - - } - - public override void PrepareRendering( Material mat ) { - if( textureAsset != null ) { - mat.mainTexture = textureAsset; - mat.SetFloat( "_IsNormal", IsNormalMap() ? 1 : 0 ); - } + } + + + public override string GetBlitShaderSuffix() { + + bool uv = GetInputIsConnected( "UVIN" ); + bool mip = GetInputIsConnected( "MIP" ); + + if( uv && mip ) { + return "UV_MIP"; + } else if( mip ) { + return "MIP"; + } else if( uv ){ + return "UV"; + } else { + return "NoInputs"; + } + + } + + public override void PrepareRendering( Material mat ) { + if( textureAsset != null ) { + mat.mainTexture = textureAsset; + mat.SetFloat( "_IsNormal", IsNormalMap() ? 1 : 0 ); + } } @@ -145,7 +145,7 @@ public override void DrawLowerPropertyBox() { if(EditorGUI.EndChangeCheck()){ if(markedAsNormalMap && !preMarked) - noTexValue = NoTexValue.Bump; + noTexValue = NoTexValue.Bump; UpdateCompCount(); UpdateNormalMapAlphaState(); OnUpdateNode(); @@ -159,207 +159,207 @@ public void UpdateNormalMapAlphaState(){ } else { GetConnectorByStringID("A").enableState = EnableState.Enabled; // No alpha channel when unpacking normals } - } - - public override int GetEvaluatedComponentCount() { - if( IsNormalMap() ) - return 3; - return 4; - } - - public bool HasAlpha() { - if( TextureAsset == null ) return false; - string path = AssetDatabase.GetAssetPath( TextureAsset ); - if( string.IsNullOrEmpty( path ) ) return false; - return ( (TextureImporter)UnityEditor.AssetImporter.GetAtPath( path ) ).DoesSourceTextureHaveAlpha(); - } + } + + public override int GetEvaluatedComponentCount() { + if( IsNormalMap() ) + return 3; + return 4; + } + + public bool HasAlpha() { + if( TextureAsset == null ) return false; + string path = AssetDatabase.GetAssetPath( TextureAsset ); + if( string.IsNullOrEmpty( path ) ) return false; + return ( (TextureImporter)UnityEditor.AssetImporter.GetAtPath( path ) ).DoesSourceTextureHaveAlpha(); + } private void UpdateCompCount(){ texture.CompCount = IsNormalMap() ? 3 : 4; // TODO: This doesn't work when opening shaders. Why? - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - - - UpdateCompCount(); - - if( varDefined ) - return GetVariableName(); - - - bool useLOD = GetInputIsConnected( "MIP" ) || ( SF_Evaluator.inVert || SF_Evaluator.inTess ); - string uvStr = GetInputIsConnected( "UVIN" ) ? GetInputCon( "UVIN" ).Evaluate() : SF_Evaluator.WithProgramPrefix( SF_Evaluator.inFrag ? "uv0" : "texcoord0" ); - string func = useLOD ? "tex2Dlod" : "tex2D"; - string mip = GetInputIsConnected( "MIP" ) ? GetInputCon( "MIP" ).Evaluate() : "0"; - - string variableName = this["TEX"].IsConnected() ? GetInputCon( "TEX" ).node.property.GetVariable() : property.GetVariable(); - - bool useTilingLocally = IsProperty() && !property.tagNoScaleOffset; - bool useTilingByAsset = this["TEX"].IsConnected() && !this["TEX"].inputCon.node.property.tagNoScaleOffset; - if( useTilingLocally || useTilingByAsset ) + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + + + UpdateCompCount(); + + if( varDefined ) + return GetVariableName(); + + + bool useLOD = GetInputIsConnected( "MIP" ) || ( SF_Evaluator.inVert || SF_Evaluator.inTess ); + string uvStr = GetInputIsConnected( "UVIN" ) ? GetInputCon( "UVIN" ).Evaluate() : SF_Evaluator.WithProgramPrefix( SF_Evaluator.inFrag ? "uv0" : "texcoord0" ); + string func = useLOD ? "tex2Dlod" : "tex2D"; + string mip = GetInputIsConnected( "MIP" ) ? GetInputCon( "MIP" ).Evaluate() : "0"; + + string variableName = this["TEX"].IsConnected() ? GetInputCon( "TEX" ).node.property.GetVariable() : property.GetVariable(); + + bool useTilingLocally = IsProperty() && !property.tagNoScaleOffset; + bool useTilingByAsset = this["TEX"].IsConnected() && !this["TEX"].inputCon.node.property.tagNoScaleOffset; + if( useTilingLocally || useTilingByAsset ) uvStr = "TRANSFORM_TEX(" + uvStr + ", " + variableName + ")"; if( useLOD ) { uvStr = "float4(" + uvStr + ",0.0," + mip + ")"; - } - - - string s = func + "(" + variableName + "," + uvStr + ")"; - if( IsNormalMap() ) { - s = "UnpackNormal(" + s + ")"; - } - - return s; - } - - public void UnpackNormals( ref Texture2D t ) { - Color[] colors = t.GetPixels(); - for( int i = 0; i < colors.Length; i++ ) { - colors[i] = UnpackNormal( colors[i] ); - } - t.SetPixels( colors ); - t.Apply(); - } - - public Color UnpackNormal( Color c ) { - Vector3 normal = Vector3.zero; - - normal = new Vector2( c.a, c.g ) * 2f - Vector2.one; - normal.z = Mathf.Sqrt( 1f - normal.x * normal.x - normal.y * normal.y ); - - // TODO: Check color clamp method! - return SF_Tools.VectorToColor( normal ); - } - - - - public override bool Draw() { - - CheckPropertyInput(); - - // If Tex is plugged in, make sure this uses the same asset and all - if( property == null ) { - - SFN_Tex2dAsset inTex = ( GetInputCon( "TEX" ).node as SFN_Tex2dAsset ); - - bool refresh = false; - if( this.TextureAsset == null ) - refresh = true; - if(!refresh) - if( inTex.textureAsset != this.TextureAsset ) - refresh = true; - - if( refresh ) { - this.TextureAsset = inTex.textureAsset; - //RenderToTexture(); - } - } - - - ProcessInput(); - DrawHighlight(); + } + + + string s = func + "(" + variableName + "," + uvStr + ")"; + if( IsNormalMap() ) { + s = "UnpackNormal(" + s + ")"; + } + + return s; + } + + public void UnpackNormals( ref Texture2D t ) { + Color[] colors = t.GetPixels(); + for( int i = 0; i < colors.Length; i++ ) { + colors[i] = UnpackNormal( colors[i] ); + } + t.SetPixels( colors ); + t.Apply(); + } + + public Color UnpackNormal( Color c ) { + Vector3 normal = Vector3.zero; + + normal = new Vector2( c.a, c.g ) * 2f - Vector2.one; + normal.z = Mathf.Sqrt( 1f - normal.x * normal.x - normal.y * normal.y ); + + // TODO: Check color clamp method! + return SF_Tools.VectorToColor( normal ); + } + + + + public override bool Draw() { + + CheckPropertyInput(); + + // If Tex is plugged in, make sure this uses the same asset and all + if( property == null ) { + + SFN_Tex2dAsset inTex = ( GetInputCon( "TEX" ).node as SFN_Tex2dAsset ); + + bool refresh = false; + if( this.TextureAsset == null ) + refresh = true; + if(!refresh) + if( inTex.textureAsset != this.TextureAsset ) + refresh = true; + + if( refresh ) { + this.TextureAsset = inTex.textureAsset; + //RenderToTexture(); + } + } + + + ProcessInput(); + DrawHighlight(); PrepareWindowColor(); - - DrawWindow(); - ResetWindowColor(); - return true;//!CheckIfDeleted(); - } - - - public void CheckPropertyInput() { - if( property != null && connectors[2].IsConnected() ) { - shelvedProperty = property; - property = null; - if( editor.nodeView.treeStatus.propertyList.Contains( this ) ) - editor.nodeView.treeStatus.propertyList.Remove( this ); - } else if( property == null && !connectors[2].IsConnected() ) { - property = shelvedProperty; - shelvedProperty = null; - if( !editor.nodeView.treeStatus.propertyList.Contains( this ) ) - editor.nodeView.treeStatus.propertyList.Add( this ); - } - } - - - public override void OnDelete() { - TextureAsset = null; - } - + + DrawWindow(); + ResetWindowColor(); + return true;//!CheckIfDeleted(); + } + + + public void CheckPropertyInput() { + if( property != null && connectors[2].IsConnected() ) { + shelvedProperty = property; + property = null; + if( editor.nodeView.treeStatus.propertyList.Contains( this ) ) + editor.nodeView.treeStatus.propertyList.Remove( this ); + } else if( property == null && !connectors[2].IsConnected() ) { + property = shelvedProperty; + shelvedProperty = null; + if( !editor.nodeView.treeStatus.propertyList.Contains( this ) ) + editor.nodeView.treeStatus.propertyList.Add( this ); + } + } + + + public override void OnDelete() { + TextureAsset = null; + } + public override void NeatWindow( ) { - rect.height = TexAssetConnected() ? NODE_HEIGHT : NODE_HEIGHT + 34; - - GUI.skin.box.clipping = TextClipping.Overflow; - GUI.BeginGroup( rect ); - + rect.height = TexAssetConnected() ? NODE_HEIGHT : NODE_HEIGHT + 34; + + GUI.skin.box.clipping = TextClipping.Overflow; + GUI.BeginGroup( rect ); + if( IsProperty() && Event.current.type == EventType.DragPerform && rectInner.Contains(Event.current.mousePosition) ) { - Object droppedObj = DragAndDrop.objectReferences[0]; - if( droppedObj is Texture2D || droppedObj is ProceduralTexture || droppedObj is RenderTexture) { - Event.current.Use(); - TextureAsset = droppedObj as Texture; - OnAssignedTexture(); - } - } - - if( IsProperty() && Event.current.type == EventType.dragUpdated ) { + Object droppedObj = DragAndDrop.objectReferences[0]; + if( droppedObj is Texture2D || droppedObj is RenderTexture) { + Event.current.Use(); + TextureAsset = droppedObj as Texture; + OnAssignedTexture(); + } + } + + if( IsProperty() && Event.current.type == EventType.DragUpdated ) { if(DragAndDrop.objectReferences.Length > 0){ - Object dragObj = DragAndDrop.objectReferences[0]; - if( dragObj is Texture2D || dragObj is ProceduralTexture || dragObj is RenderTexture) { - DragAndDrop.visualMode = DragAndDropVisualMode.Link; - editor.nodeBrowser.CancelDrag(); - Event.current.Use(); - } else { - DragAndDrop.visualMode = DragAndDropVisualMode.Rejected; - } - } else { - DragAndDrop.visualMode = DragAndDropVisualMode.Rejected; - } - } - - - - Color prev = GUI.color; - if( TextureAsset ) { - GUI.color = Color.white; + Object dragObj = DragAndDrop.objectReferences[0]; + if( dragObj is Texture2D || dragObj is RenderTexture) { + DragAndDrop.visualMode = DragAndDropVisualMode.Link; + editor.nodeBrowser.CancelDrag(); + Event.current.Use(); + } else { + DragAndDrop.visualMode = DragAndDropVisualMode.Rejected; + } + } else { + DragAndDrop.visualMode = DragAndDropVisualMode.Rejected; + } + } + + + + Color prev = GUI.color; + if( TextureAsset ) { + GUI.color = Color.white; GUI.DrawTexture( rectInner, texture.texture, ScaleMode.StretchToFill, false ); // TODO: Doesn't seem to work if(displayVectorDataMask){ GUI.DrawTexture( rectInner, SF_GUI.VectorIconOverlay, ScaleMode.ScaleAndCrop, true); - } + } } if( showLowerPropertyBox && !TexAssetConnected()) { GUI.color = Color.white; DrawLowerPropertyBox(); - } - - //else { - //GUI.color = new Color( GUI.color.r, GUI.color.g, GUI.color.b,0.5f); - //GUI.Label( rectInner, "Empty"); - //} - GUI.color = prev; - - - - if( IsProperty()){ - - bool draw = rectInner.Contains( Event.current.mousePosition ) && !SF_NodeConnector.IsConnecting(); - - Rect selectRect = new Rect( rectInner ); - selectRect.yMin += 80; - selectRect.xMin += 40; - Color c = GUI.color; - GUI.color = new Color( 1, 1, 1, draw ? 1 : 0 ); - if(GUI.Button( selectRect, "Select", EditorStyles.miniButton )){ - EditorGUIUtility.ShowObjectPicker( TextureAsset, false, "", this.id ); - Event.current.Use(); - } - GUI.color = c; - - } - - - if( IsProperty() && Event.current.type == EventType.ExecuteCommand && Event.current.commandName == "ObjectSelectorUpdated" && EditorGUIUtility.GetObjectPickerControlID() == this.id ) { - Event.current.Use(); + } + + //else { + //GUI.color = new Color( GUI.color.r, GUI.color.g, GUI.color.b,0.5f); + //GUI.Label( rectInner, "Empty"); + //} + GUI.color = prev; + + + + if( IsProperty()){ + + bool draw = rectInner.Contains( Event.current.mousePosition ) && !SF_NodeConnector.IsConnecting(); + + Rect selectRect = new Rect( rectInner ); + selectRect.yMin += 80; + selectRect.xMin += 40; + Color c = GUI.color; + GUI.color = new Color( 1, 1, 1, draw ? 1 : 0 ); + if(GUI.Button( selectRect, "Select", EditorStyles.miniButton )){ + EditorGUIUtility.ShowObjectPicker( TextureAsset, false, "", this.id ); + Event.current.Use(); + } + GUI.color = c; + + } + + + if( IsProperty() && Event.current.type == EventType.ExecuteCommand && Event.current.commandName == "ObjectSelectorUpdated" && EditorGUIUtility.GetObjectPickerControlID() == this.id ) { + Event.current.Use(); Texture newTextureAsset = EditorGUIUtility.GetObjectPickerObject() as Texture; if(newTextureAsset != TextureAsset){ if(newTextureAsset == null){ @@ -369,44 +369,44 @@ public override void NeatWindow( ) { } TextureAsset = newTextureAsset; OnAssignedTexture(); - } - } - - GUI.EndGroup(); - - - - // GUI.DragWindow(); - - - - - /* - EditorGUI.BeginChangeCheck(); - textureAsset = (Texture)EditorGUI.ObjectField( rectInner, textureAsset, typeof( Texture ), false ); - if( EditorGUI.EndChangeCheck() ) { - OnAssignedTexture(); - } - * */ - - } - - public override void RefreshValue() { - CheckPropertyInput(); - base.RefreshValue(0,0); - //RenderToTexture(); - } - - public void OnAssignedTexture() { - - /* - if( HasAlpha() ) { - connectors[6].enableState = EnableState.Enabled; - base.texture.CompCount = 4; - } else { - connectors[6].Disconnect(); - connectors[6].enableState = EnableState.Hidden; - base.texture.CompCount = 3; + } + } + + GUI.EndGroup(); + + + + // GUI.DragWindow(); + + + + + /* + EditorGUI.BeginChangeCheck(); + textureAsset = (Texture)EditorGUI.ObjectField( rectInner, textureAsset, typeof( Texture ), false ); + if( EditorGUI.EndChangeCheck() ) { + OnAssignedTexture(); + } + * */ + + } + + public override void RefreshValue() { + CheckPropertyInput(); + base.RefreshValue(0,0); + //RenderToTexture(); + } + + public void OnAssignedTexture() { + + /* + if( HasAlpha() ) { + connectors[6].enableState = EnableState.Enabled; + base.texture.CompCount = 4; + } else { + connectors[6].Disconnect(); + connectors[6].enableState = EnableState.Hidden; + base.texture.CompCount = 3; }*/ @@ -414,10 +414,10 @@ public void OnAssignedTexture() { RefreshNoTexValueAndNormalUnpack(); - UpdateNormalMapAlphaState(); - //RenderToTexture(); - editor.shaderEvaluator.ApplyProperty( this ); - OnUpdateNode(NodeUpdateType.Soft); + UpdateNormalMapAlphaState(); + //RenderToTexture(); + editor.shaderEvaluator.ApplyProperty( this ); + OnUpdateNode(NodeUpdateType.Soft); } public void RefreshNoTexValueAndNormalUnpack(){ @@ -428,10 +428,8 @@ public void RefreshNoTexValueAndNormalUnpack(){ newAssetIsNormalMap = false; else{ AssetImporter importer = UnityEditor.AssetImporter.GetAtPath( path ); - if(importer is TextureImporter) + if(importer is TextureImporter) newAssetIsNormalMap = ((TextureImporter)importer ).textureType == TextureImporterType.NormalMap; - else if(TextureAsset is ProceduralTexture && TextureAsset.name.EndsWith("_Normal")) - newAssetIsNormalMap = true; // When it's a ProceduralTexture having _Normal as a suffix else newAssetIsNormalMap = false; // When it's a RenderTexture or ProceduralTexture } @@ -444,33 +442,33 @@ public void RefreshNoTexValueAndNormalUnpack(){ noTexValue = NoTexValue.Black; markedAsNormalMap = false; UpdateNormalMapAlphaState(); - } - + } + UpdateCompCount(); - } - - - public override string SerializeSpecialData() { - string s = ""; - if( property != null ) + } + + + public override string SerializeSpecialData() { + string s = ""; + if( property != null ) s += property.Serialize() + ","; - - if( TextureAsset != null ) + + if( TextureAsset != null ) s += "tex:" + SF_Tools.AssetToGUID( TextureAsset ) + ","; s += "ntxv:" + ((int)noTexValue).ToString() + ","; s += "isnm:" + markedAsNormalMap.ToString(); return s; - - } - - public override void DeserializeSpecialData( string key, string value ) { - property.Deserialize( key, value ); - switch( key ) { - case "tex": - TextureAsset = (Texture)SF_Tools.GUIDToAsset( value, typeof( Texture ) ); - OnAssignedTexture(); + + } + + public override void DeserializeSpecialData( string key, string value ) { + property.Deserialize( key, value ); + switch( key ) { + case "tex": + TextureAsset = (Texture)SF_Tools.GUIDToAsset( value, typeof( Texture ) ); + OnAssignedTexture(); break; case "ntxv": noTexValue = (NoTexValue)int.Parse(value); @@ -479,10 +477,10 @@ public override void DeserializeSpecialData( string key, string value ) { markedAsNormalMap = bool.Parse(value); UpdateNormalMapAlphaState(); UpdateCompCount(); - break; - } - } - - - } + break; + } + } + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tex2d.cs.meta b/Editor/Code/_Nodes/SFN_Tex2d.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tex2d.cs.meta rename to Editor/Code/_Nodes/SFN_Tex2d.cs.meta index f227c246..5569807d --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tex2d.cs.meta +++ b/Editor/Code/_Nodes/SFN_Tex2d.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: cb7203f0faaf7274fa89fa02822dd483 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: cb7203f0faaf7274fa89fa02822dd483 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tex2dAsset.cs b/Editor/Code/_Nodes/SFN_Tex2dAsset.cs old mode 100755 new mode 100644 similarity index 92% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tex2dAsset.cs rename to Editor/Code/_Nodes/SFN_Tex2dAsset.cs index 33f7cc00..d74becd7 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tex2dAsset.cs +++ b/Editor/Code/_Nodes/SFN_Tex2dAsset.cs @@ -1,123 +1,121 @@ using UnityEngine; using UnityEditor; -using System.Collections; - - -namespace ShaderForge { - [System.Serializable] - public class SFN_Tex2dAsset : SF_Node { - - +using System.Collections; + + +namespace ShaderForge { + [System.Serializable] + public class SFN_Tex2dAsset : SF_Node { + + public Texture textureAsset; // TODO: Use a parent class, this looks ridiculous public NoTexValue noTexValue = NoTexValue.White;// TODO: Use a parent class, this looks ridiculous - public bool markedAsNormalMap = false; // TODO: Use a parent class, this looks ridiculous - - public SFN_Tex2dAsset() { - - } - - public override void Initialize() { + public bool markedAsNormalMap = false; // TODO: Use a parent class, this looks ridiculous + + public SFN_Tex2dAsset() { + + } + + public override void Initialize() { base.Initialize( "Texture Asset", InitialPreviewRenderMode.BlitQuad ); - node_height = (int)(rect.height - 6f); // Odd, but alright... - base.UseLowerPropertyBox( true, true ); - base.texture.CompCount = 4; + node_height = (int)(rect.height - 6f); // Odd, but alright... + base.UseLowerPropertyBox( true, true ); + base.texture.CompCount = 4; base.showColor = true; neverDefineVariable = true; - isFloatPrecisionBasedVariable = false; + isFloatPrecisionBasedVariable = false; base.shaderGenMode = ShaderGenerationMode.Manual; - //alwaysDefineVariable = true; - property = ScriptableObject.CreateInstance().Initialize( this ); - + //alwaysDefineVariable = true; + property = ScriptableObject.CreateInstance().Initialize( this ); + connectors = new SF_NodeConnector[]{ SF_NodeConnector.Create(this,"TEX","Tex",ConType.cOutput,ValueType.TexAsset).WithColor(SF_Node.colorExposed) - }; - } - - public override bool IsUniformOutput() { - return false; + }; + } + + public override bool IsUniformOutput() { + return false; } public bool IsNormalMap() { return markedAsNormalMap; - } + } + - - public bool IsAssetNormalMap() { + public bool IsAssetNormalMap() { - string path = AssetDatabase.GetAssetPath( textureAsset ); + string path = AssetDatabase.GetAssetPath( textureAsset ); if( string.IsNullOrEmpty( path ) ) return false; else{ AssetImporter importer = UnityEditor.AssetImporter.GetAtPath( path ); - if(importer is TextureImporter) + if(importer is TextureImporter) return ((TextureImporter)importer).textureType == TextureImporterType.NormalMap; - else if(textureAsset is ProceduralTexture && textureAsset.name.EndsWith("_Normal")) - return true; // When it's a ProceduralTexture having _Normal as a suffix else return false; // When it's a RenderTexture or ProceduralTexture - } - - } - - public bool HasAlpha() { - if( textureAsset == null ) return false; - string path = AssetDatabase.GetAssetPath( textureAsset ); - if( string.IsNullOrEmpty( path ) ) return false; - return ( (TextureImporter)UnityEditor.AssetImporter.GetAtPath( path ) ).DoesSourceTextureHaveAlpha(); - } - - // TODO: MIP selection - public override string Evaluate( OutChannel channel = OutChannel.All ) { - - //if( varDefined ) + } + + } + + public bool HasAlpha() { + if( textureAsset == null ) return false; + string path = AssetDatabase.GetAssetPath( textureAsset ); + if( string.IsNullOrEmpty( path ) ) return false; + return ( (TextureImporter)UnityEditor.AssetImporter.GetAtPath( path ) ).DoesSourceTextureHaveAlpha(); + } + + // TODO: MIP selection + public override string Evaluate( OutChannel channel = OutChannel.All ) { + + //if( varDefined ) return GetVariableName(); //else - //DefineVariable(); // This lags for some reason - - /* - bool useLOD = GetInputIsConnected( 1 ) || (SF_Evaluator.inVert || SF_Evaluator.inTess); - string uvStr = GetInputIsConnected( 0 ) ? GetInputCon( 0 ).Evaluate() : SF_Evaluator.WithProgramPrefix( "uv0.xy" ); - string func = useLOD ? "tex2Dlod" : "tex2D"; - string mip = GetInputIsConnected( 1 ) ? GetInputCon( 1 ).Evaluate() : "0"; - - if( useLOD ) { - uvStr = "float4(" + uvStr + ",0.0," + mip + ")"; - } - - - string s = func + "(" + property.GetVariable() + "," + uvStr + ")"; - if( IsNormalMap() ) { - s = "UnpackNormal(" + s + ")"; - } - */ - //Debug.LogError( "Invalid evaluation of " + property.name ); -// return ""; - } - - - public void UnpackNormals( ref Texture2D t ) { - Color[] colors = t.GetPixels(); - for( int i = 0; i < colors.Length; i++ ) { - colors[i] = UnpackNormal( colors[i] ); - } - t.SetPixels( colors ); - t.Apply(); - } - - public Color UnpackNormal( Color c ) { - Vector3 normal = Vector3.zero; - - normal = new Vector2( c.a, c.g ) * 2f - Vector2.one; - normal.z = Mathf.Sqrt( 1f - normal.x * normal.x - normal.y * normal.y ); - - // TODO: Check color clamp method! - return SF_Tools.VectorToColor( normal ); - } - - - + //DefineVariable(); // This lags for some reason + + /* + bool useLOD = GetInputIsConnected( 1 ) || (SF_Evaluator.inVert || SF_Evaluator.inTess); + string uvStr = GetInputIsConnected( 0 ) ? GetInputCon( 0 ).Evaluate() : SF_Evaluator.WithProgramPrefix( "uv0.xy" ); + string func = useLOD ? "tex2Dlod" : "tex2D"; + string mip = GetInputIsConnected( 1 ) ? GetInputCon( 1 ).Evaluate() : "0"; + + if( useLOD ) { + uvStr = "float4(" + uvStr + ",0.0," + mip + ")"; + } + + + string s = func + "(" + property.GetVariable() + "," + uvStr + ")"; + if( IsNormalMap() ) { + s = "UnpackNormal(" + s + ")"; + } + */ + //Debug.LogError( "Invalid evaluation of " + property.name ); +// return ""; + } + + + public void UnpackNormals( ref Texture2D t ) { + Color[] colors = t.GetPixels(); + for( int i = 0; i < colors.Length; i++ ) { + colors[i] = UnpackNormal( colors[i] ); + } + t.SetPixels( colors ); + t.Apply(); + } + + public Color UnpackNormal( Color c ) { + Vector3 normal = Vector3.zero; + + normal = new Vector2( c.a, c.g ) * 2f - Vector2.one; + normal.z = Mathf.Sqrt( 1f - normal.x * normal.x - normal.y * normal.y ); + + // TODO: Check color clamp method! + return SF_Tools.VectorToColor( normal ); + } + + + public override bool Draw() { if( IsGlobalProperty()){ rect.height = (int)(NODE_HEIGHT + 16f + 2); @@ -125,40 +123,40 @@ public override bool Draw() { rect.height = (int)(NODE_HEIGHT + 32f + 2); } - ProcessInput(); - DrawHighlight(); - PrepareWindowColor(); - DrawWindow(); - ResetWindowColor(); - return true;//!CheckIfDeleted(); - } - - public override void OnDelete() { - textureAsset = null; - } - - public override void NeatWindow( ) { - - GUI.skin.box.clipping = TextClipping.Overflow; + ProcessInput(); + DrawHighlight(); + PrepareWindowColor(); + DrawWindow(); + ResetWindowColor(); + return true;//!CheckIfDeleted(); + } + + public override void OnDelete() { + textureAsset = null; + } + + public override void NeatWindow( ) { + + GUI.skin.box.clipping = TextClipping.Overflow; GUI.BeginGroup( rect ); if(IsGlobalProperty()){ GUI.enabled = false; - } - + } + if( IsProperty() && Event.current.type == EventType.DragPerform && rectInner.Contains(Event.current.mousePosition) ) { Object droppedObj = DragAndDrop.objectReferences[0]; - if( droppedObj is Texture2D || droppedObj is ProceduralTexture || droppedObj is RenderTexture) { + if( droppedObj is Texture2D || droppedObj is RenderTexture) { Event.current.Use(); textureAsset = droppedObj as Texture; OnAssignedTexture(); } } - if( IsProperty() && Event.current.type == EventType.dragUpdated ) { + if( IsProperty() && Event.current.type == EventType.DragUpdated ) { if(DragAndDrop.objectReferences.Length > 0){ Object dragObj = DragAndDrop.objectReferences[0]; - if( dragObj is Texture2D || dragObj is ProceduralTexture || dragObj is RenderTexture) { + if( dragObj is Texture2D || dragObj is RenderTexture) { DragAndDrop.visualMode = DragAndDropVisualMode.Link; editor.nodeBrowser.CancelDrag(); Event.current.Use(); @@ -172,42 +170,42 @@ public override void NeatWindow( ) { if(IsGlobalProperty()){ GUI.enabled = true; - } - - - - Color prev = GUI.color; - if( textureAsset ) { - GUI.color = Color.white; - GUI.DrawTexture( rectInner, texture.texture, ScaleMode.StretchToFill, false ); - } //else { - //GUI.color = new Color( GUI.color.r, GUI.color.g, GUI.color.b,0.5f); - //GUI.Label( rectInner, "Empty"); + } + + + + Color prev = GUI.color; + if( textureAsset ) { + GUI.color = Color.white; + GUI.DrawTexture( rectInner, texture.texture, ScaleMode.StretchToFill, false ); + } //else { + //GUI.color = new Color( GUI.color.r, GUI.color.g, GUI.color.b,0.5f); + //GUI.Label( rectInner, "Empty"); //} if( showLowerPropertyBox ) { GUI.color = Color.white; DrawLowerPropertyBox(); } - - GUI.color = prev; - - - - if( rectInner.Contains( Event.current.mousePosition ) && !SF_NodeConnector.IsConnecting() && !IsGlobalProperty() ) { - Rect selectRect = new Rect( rectInner ); - selectRect.yMin += 80; - selectRect.xMin += 40; - - if(GUI.Button( selectRect, "Select", EditorStyles.miniButton )){ - EditorGUIUtility.ShowObjectPicker( textureAsset, false, "", this.id ); - Event.current.Use(); - } - - } - - - if( !IsGlobalProperty() && Event.current.type == EventType.ExecuteCommand && Event.current.commandName == "ObjectSelectorUpdated" && EditorGUIUtility.GetObjectPickerControlID() == this.id ) { + + GUI.color = prev; + + + + if( rectInner.Contains( Event.current.mousePosition ) && !SF_NodeConnector.IsConnecting() && !IsGlobalProperty() ) { + Rect selectRect = new Rect( rectInner ); + selectRect.yMin += 80; + selectRect.xMin += 40; + + if(GUI.Button( selectRect, "Select", EditorStyles.miniButton )){ + EditorGUIUtility.ShowObjectPicker( textureAsset, false, "", this.id ); + Event.current.Use(); + } + + } + + + if( !IsGlobalProperty() && Event.current.type == EventType.ExecuteCommand && Event.current.commandName == "ObjectSelectorUpdated" && EditorGUIUtility.GetObjectPickerControlID() == this.id ) { Event.current.Use(); Texture newTextureAsset = EditorGUIUtility.GetObjectPickerObject() as Texture; if(newTextureAsset != textureAsset){ @@ -218,62 +216,62 @@ public override void NeatWindow( ) { } textureAsset = newTextureAsset; OnAssignedTexture(); - } - - } - - GUI.EndGroup(); - - - - // GUI.DragWindow(); - - - - - /* - EditorGUI.BeginChangeCheck(); - textureAsset = (Texture)EditorGUI.ObjectField( rectInner, textureAsset, typeof( Texture ), false ); - if( EditorGUI.EndChangeCheck() ) { - OnAssignedTexture(); - } - * */ - - } - - public override void RefreshValue() { - base.RefreshValue( 0, 0 ); - //RenderToTexture(); - } - - public override int GetEvaluatedComponentCount() { - if( IsNormalMap() ) - return 3; - return 4; - } - - public override void PrepareRendering( Material mat ) { - if( textureAsset != null ) { - mat.mainTexture = textureAsset; - mat.SetFloat( "_IsNormal", IsNormalMap() ? 1 : 0 ); - } - } - - - public void OnAssignedTexture() { - - /* - if( HasAlpha() ) { - connectors[6].enableState = EnableState.Enabled; - base.texture.CompCount = 4; - } else { - connectors[6].Disconnect(); - connectors[6].enableState = EnableState.Hidden; - base.texture.CompCount = 3; - }*/ - RefreshNoTexValueAndNormalUnpack(); - editor.shaderEvaluator.ApplyProperty( this ); - OnUpdateNode(); + } + + } + + GUI.EndGroup(); + + + + // GUI.DragWindow(); + + + + + /* + EditorGUI.BeginChangeCheck(); + textureAsset = (Texture)EditorGUI.ObjectField( rectInner, textureAsset, typeof( Texture ), false ); + if( EditorGUI.EndChangeCheck() ) { + OnAssignedTexture(); + } + * */ + + } + + public override void RefreshValue() { + base.RefreshValue( 0, 0 ); + //RenderToTexture(); + } + + public override int GetEvaluatedComponentCount() { + if( IsNormalMap() ) + return 3; + return 4; + } + + public override void PrepareRendering( Material mat ) { + if( textureAsset != null ) { + mat.mainTexture = textureAsset; + mat.SetFloat( "_IsNormal", IsNormalMap() ? 1 : 0 ); + } + } + + + public void OnAssignedTexture() { + + /* + if( HasAlpha() ) { + connectors[6].enableState = EnableState.Enabled; + base.texture.CompCount = 4; + } else { + connectors[6].Disconnect(); + connectors[6].enableState = EnableState.Hidden; + base.texture.CompCount = 3; + }*/ + RefreshNoTexValueAndNormalUnpack(); + editor.shaderEvaluator.ApplyProperty( this ); + OnUpdateNode(); } @@ -289,10 +287,8 @@ public void RefreshNoTexValueAndNormalUnpack(){ newAssetIsNormalMap = false; else{ AssetImporter importer = UnityEditor.AssetImporter.GetAtPath( path ); - if(importer is TextureImporter) + if(importer is TextureImporter) newAssetIsNormalMap = ((TextureImporter)importer ).textureType == TextureImporterType.NormalMap; - else if(textureAsset is ProceduralTexture && textureAsset.name.EndsWith("_Normal")) - newAssetIsNormalMap = true; // When it's a ProceduralTexture having _Normal as a suffix else newAssetIsNormalMap = false; // When it's a RenderTexture or ProceduralTexture } @@ -329,38 +325,38 @@ public override void DrawLowerPropertyBox() { } - } - - - public override string SerializeSpecialData() { - - string s = property.Serialize() + ","; - - if( textureAsset != null ) - s += "tex:" + SF_Tools.AssetToGUID( textureAsset ) + ","; - s += "ntxv:" + ( (int)noTexValue ).ToString() + ","; - s += "isnm:" + markedAsNormalMap.ToString(); - - return s; - - } - - public override void DeserializeSpecialData( string key, string value ) { - property.Deserialize( key, value ); - switch( key ) { - case "tex": - textureAsset = (Texture)SF_Tools.GUIDToAsset( value, typeof( Texture ) ); - OnAssignedTexture(); - break; - case "ntxv": - noTexValue = (NoTexValue)int.Parse( value ); - break; - case "isnm": - markedAsNormalMap = bool.Parse( value ); - break; - } - } - - - } + } + + + public override string SerializeSpecialData() { + + string s = property.Serialize() + ","; + + if( textureAsset != null ) + s += "tex:" + SF_Tools.AssetToGUID( textureAsset ) + ","; + s += "ntxv:" + ( (int)noTexValue ).ToString() + ","; + s += "isnm:" + markedAsNormalMap.ToString(); + + return s; + + } + + public override void DeserializeSpecialData( string key, string value ) { + property.Deserialize( key, value ); + switch( key ) { + case "tex": + textureAsset = (Texture)SF_Tools.GUIDToAsset( value, typeof( Texture ) ); + OnAssignedTexture(); + break; + case "ntxv": + noTexValue = (NoTexValue)int.Parse( value ); + break; + case "isnm": + markedAsNormalMap = bool.Parse( value ); + break; + } + } + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tex2dAsset.cs.meta b/Editor/Code/_Nodes/SFN_Tex2dAsset.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tex2dAsset.cs.meta rename to Editor/Code/_Nodes/SFN_Tex2dAsset.cs.meta index 139eb125..a5bb751e --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Tex2dAsset.cs.meta +++ b/Editor/Code/_Nodes/SFN_Tex2dAsset.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 9869459e0257d034e93856da292f741e -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 9869459e0257d034e93856da292f741e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_TexCoord.cs b/Editor/Code/_Nodes/SFN_TexCoord.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_TexCoord.cs rename to Editor/Code/_Nodes/SFN_TexCoord.cs index 3c9b29d0..6917a8de --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_TexCoord.cs +++ b/Editor/Code/_Nodes/SFN_TexCoord.cs @@ -1,122 +1,122 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_TexCoord : SF_Node { - - - - public enum UV { uv0 = 0, uv1 = 1, uv2 = 2, uv3 = 3 }; - public UV currentUV = UV.uv0; - public bool useAsFloat4 = false; - - public SFN_TexCoord() { - - } - - public override void Initialize() { - base.Initialize( "UV Coord.", InitialPreviewRenderMode.BlitQuad ); - base.UseLowerPropertyBox( true, true ); - base.showColor = true; - base.texture.uniform = false; - base.texture.CompCount = 4; - base.neverDefineVariable = true; - +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_TexCoord : SF_Node { + + + + public enum UV { uv0 = 0, uv1 = 1, uv2 = 2, uv3 = 3 }; + public UV currentUV = UV.uv0; + public bool useAsFloat4 = false; + + public SFN_TexCoord() { + + } + + public override void Initialize() { + base.Initialize( "UV Coord.", InitialPreviewRenderMode.BlitQuad ); + base.UseLowerPropertyBox( true, true ); + base.showColor = true; + base.texture.uniform = false; + base.texture.CompCount = 4; + base.neverDefineVariable = true; + connectors = new SF_NodeConnector[]{ SF_NodeConnector.Create(this,"UVOUT","UV",ConType.cOutput,ValueType.VTv2), SF_NodeConnector.Create(this,"U","U",ConType.cOutput,ValueType.VTv1).WithColor(Color.red).Outputting(OutChannel.R), SF_NodeConnector.Create(this,"V","V",ConType.cOutput,ValueType.VTv1).WithColor(Color.green).Outputting(OutChannel.G), SF_NodeConnector.Create(this,"Z","Z",ConType.cOutput,ValueType.VTv1).WithColor(Color.blue).Outputting(OutChannel.B), SF_NodeConnector.Create(this,"W","W",ConType.cOutput,ValueType.VTv1).Outputting(OutChannel.A) - }; - - UpdateConnectorVisibility(); - - - } - - public override int GetEvaluatedComponentCount() { - return useAsFloat4 ? 4 : 2; - } - - public override bool IsUniformOutput() { - return false; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - - string s = SF_Evaluator.inTess ? "texcoord" + (int)currentUV : currentUV.ToString(); - - return SF_Evaluator.WithProgramPrefix( s ); - } - - static string[] float4Names = new string[] { "uv", "uvzw" }; - const string undoCompCountSwitch = "uv component count"; - const string undoSwitchUvChannel = "switch UV channel"; - - public override void DrawLowerPropertyBox() { - GUI.color = Color.white; - EditorGUI.BeginChangeCheck(); - - Rect[] rects = lowerRect.SplitHorizontal( 0.5f ); - - currentUV = (UV)UndoableEnumPopup( rects[0], currentUV, undoSwitchUvChannel ); - int curVal = useAsFloat4 ? 1 : 0; - int newVal = UndoableEnumPopupNamed( rects[1], curVal, float4Names, undoCompCountSwitch ); - useAsFloat4 = newVal == 1; - - if( EditorGUI.EndChangeCheck() ) { - UpdateConnectorVisibility(); - OnUpdateNode(); - } - } - - void UpdateConnectorVisibility() { - SF_NodeConnector z = GetConnectorByID( "Z" ); - SF_NodeConnector w = GetConnectorByID( "W" ); - if( !useAsFloat4 ) { - if(z.IsConnected()){ - for( int i = 0; i < z.outputCons.Count; i++ ) { - Undo.RecordObject( z.outputCons[i], "disconnect" ); - } - Undo.RecordObject( z, "disconnect" ); - z.Disconnect(); - } - if( w.IsConnected() ) { - for( int i = 0; i < w.outputCons.Count; i++ ) { - Undo.RecordObject( w.outputCons[i], "disconnect" ); - } - Undo.RecordObject( w, "disconnect" ); - w.Disconnect(); - } - } - EnableState enableState = useAsFloat4 ? EnableState.Enabled : EnableState.Disabled; - z.enableState = enableState; - w.enableState = enableState; - } - - public override string SerializeSpecialData() { - string s = ""; - s += "uv:" + (int)currentUV + ","; - s += "uaff:" + useAsFloat4.ToString(); - return s; - } - - public override void DeserializeSpecialData( string key, string value ) { - switch( key ) { - case "uv": - currentUV = (UV)int.Parse( value ); - break; - case "uaff": - useAsFloat4 = (bool)bool.Parse( value ); - UpdateConnectorVisibility(); - break; - } - } - - - } + }; + + UpdateConnectorVisibility(); + + + } + + public override int GetEvaluatedComponentCount() { + return useAsFloat4 ? 4 : 2; + } + + public override bool IsUniformOutput() { + return false; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + + string s = SF_Evaluator.inTess ? "texcoord" + (int)currentUV : currentUV.ToString(); + + return SF_Evaluator.WithProgramPrefix( s ); + } + + static string[] float4Names = new string[] { "uv", "uvzw" }; + const string undoCompCountSwitch = "uv component count"; + const string undoSwitchUvChannel = "switch UV channel"; + + public override void DrawLowerPropertyBox() { + GUI.color = Color.white; + EditorGUI.BeginChangeCheck(); + + Rect[] rects = lowerRect.SplitHorizontal( 0.5f ); + + currentUV = (UV)UndoableEnumPopup( rects[0], currentUV, undoSwitchUvChannel ); + int curVal = useAsFloat4 ? 1 : 0; + int newVal = UndoableEnumPopupNamed( rects[1], curVal, float4Names, undoCompCountSwitch ); + useAsFloat4 = newVal == 1; + + if( EditorGUI.EndChangeCheck() ) { + UpdateConnectorVisibility(); + OnUpdateNode(); + } + } + + void UpdateConnectorVisibility() { + SF_NodeConnector z = GetConnectorByID( "Z" ); + SF_NodeConnector w = GetConnectorByID( "W" ); + if( !useAsFloat4 ) { + if(z.IsConnected()){ + for( int i = 0; i < z.outputCons.Count; i++ ) { + Undo.RecordObject( z.outputCons[i], "disconnect" ); + } + Undo.RecordObject( z, "disconnect" ); + z.Disconnect(); + } + if( w.IsConnected() ) { + for( int i = 0; i < w.outputCons.Count; i++ ) { + Undo.RecordObject( w.outputCons[i], "disconnect" ); + } + Undo.RecordObject( w, "disconnect" ); + w.Disconnect(); + } + } + EnableState enableState = useAsFloat4 ? EnableState.Enabled : EnableState.Disabled; + z.enableState = enableState; + w.enableState = enableState; + } + + public override string SerializeSpecialData() { + string s = ""; + s += "uv:" + (int)currentUV + ","; + s += "uaff:" + useAsFloat4.ToString(); + return s; + } + + public override void DeserializeSpecialData( string key, string value ) { + switch( key ) { + case "uv": + currentUV = (UV)int.Parse( value ); + break; + case "uaff": + useAsFloat4 = (bool)bool.Parse( value ); + UpdateConnectorVisibility(); + break; + } + } + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_TexCoord.cs.meta b/Editor/Code/_Nodes/SFN_TexCoord.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_TexCoord.cs.meta rename to Editor/Code/_Nodes/SFN_TexCoord.cs.meta index 8386db58..8728b296 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_TexCoord.cs.meta +++ b/Editor/Code/_Nodes/SFN_TexCoord.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 848317c8e7955f44da670e263a6c0603 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 848317c8e7955f44da670e263a6c0603 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Time.cs b/Editor/Code/_Nodes/SFN_Time.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Time.cs rename to Editor/Code/_Nodes/SFN_Time.cs index 79b5239f..aeb77f9f --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Time.cs +++ b/Editor/Code/_Nodes/SFN_Time.cs @@ -1,53 +1,53 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Time : SF_Node { - - - public SFN_Time() { - - } - - public override void Initialize() { - base.Initialize( "Time", InitialPreviewRenderMode.BlitQuad ); - base.showColor = true; - base.UseLowerPropertyBox( false ); - base.texture.uniform = false; - base.texture.CompCount = 4; - - base.alwaysDefineVariable = true; - base.shaderGenMode = ShaderGenerationMode.OffUniform; - - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"TSL","t/20",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.R), - SF_NodeConnector.Create(this,"T","t",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.G), - SF_NodeConnector.Create(this,"TDB","t*2",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.B), - SF_NodeConnector.Create(this,"TTR","t*3",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.A) - }; - - } - - public override bool UpdatesOverTime() { - return true; - } - - public override bool IsUniformOutput() { - return true; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "_Time"; - } - - public override float EvalCPU( int c ) { - return 1f; - } - - - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Time : SF_Node { + + + public SFN_Time() { + + } + + public override void Initialize() { + base.Initialize( "Time", InitialPreviewRenderMode.BlitQuad ); + base.showColor = true; + base.UseLowerPropertyBox( false ); + base.texture.uniform = false; + base.texture.CompCount = 4; + + base.alwaysDefineVariable = true; + base.shaderGenMode = ShaderGenerationMode.OffUniform; + + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"TSL","t/20",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.R), + SF_NodeConnector.Create(this,"T","t",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.G), + SF_NodeConnector.Create(this,"TDB","t*2",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.B), + SF_NodeConnector.Create(this,"TTR","t*3",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.A) + }; + + } + + public override bool UpdatesOverTime() { + return true; + } + + public override bool IsUniformOutput() { + return true; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "_Time"; + } + + public override float EvalCPU( int c ) { + return 1f; + } + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Time.cs.meta b/Editor/Code/_Nodes/SFN_Time.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Time.cs.meta rename to Editor/Code/_Nodes/SFN_Time.cs.meta index 3d85654e..801914cf --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Time.cs.meta +++ b/Editor/Code/_Nodes/SFN_Time.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 28440b6a8c7a9fa4c9d4d8f5dfa12015 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 28440b6a8c7a9fa4c9d4d8f5dfa12015 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ToggleProperty.cs b/Editor/Code/_Nodes/SFN_ToggleProperty.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ToggleProperty.cs rename to Editor/Code/_Nodes/SFN_ToggleProperty.cs index 2bacdddd..4589e385 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ToggleProperty.cs +++ b/Editor/Code/_Nodes/SFN_ToggleProperty.cs @@ -1,146 +1,146 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_ToggleProperty : SF_Node { - - - public SFN_ToggleProperty() { - - } - - [SerializeField] - public bool on = false; - - public override void Initialize() { - node_height = 24; - //node_width = (int)(NODE_WIDTH*1.25f); - base.Initialize( "Toggle" ); - lowerRect.y -= 8; - lowerRect.height = 28; - base.showColor = false; - base.neverDefineVariable = true; - base.UseLowerPropertyBox( true ); - base.texture.uniform = true; - base.texture.CompCount = 1; - base.shaderGenMode = ShaderGenerationMode.OffUniform; - - property = ScriptableObject.CreateInstance().Initialize( this ); - - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv1,false) - }; - } - - public override bool IsUniformOutput() { - return true; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return property.GetVariable(); - } - - - public override void DrawLowerPropertyBox() { - PrepareWindowColor(); - float vecPrev = texture.dataUniform[0]; - //int strWidth = (int)SF_Styles.GetLargeTextField().CalcSize( new GUIContent( texture.dataUniform[0].ToString() ) ).x; - //lowerRect.width = Mathf.Max( 32, strWidth ); - Rect r = new Rect( lowerRect ); - r.width -= 75; - r.width *= 2; - r.yMin += 4; - r.yMax -= 2; - r.xMin += 2; - float fVal = texture.dataUniform[0];; - - //GUI.enabled = false; - //fVal = EditorGUI.FloatField(r, texture.dataUniform[0], SF_Styles.LargeTextField); - //GUI.enabled = true; - - //r.x += r.width + 6; - - - - bool prevVal = on; - - GUI.enabled = false; - r = r.PadTop(2); - GUI.Label(r,prevVal ? "1": "0", SF_Styles.LargeTextFieldNoFrame); - r = r.PadTop(-2); - GUI.enabled = true; - - r.x += 18; - - r.width = r.height + 2; - bool newVal = GUI.Button(r,string.Empty) ? !prevVal : prevVal; - - if(newVal){ - Rect chkRect = r; - chkRect.width = SF_GUI.Toggle_check_icon.width; - chkRect.height = SF_GUI.Toggle_check_icon.height; - chkRect.x += (r.width-chkRect.width)*0.5f; - chkRect.y += 2; - GUI.DrawTexture(chkRect,SF_GUI.Toggle_check_icon); - } - - - - if(prevVal != newVal){ - UndoRecord("set toggle of " + property.nameDisplay + " to " + newVal.ToString()); - fVal = newVal ? 1f : 0f; - connectors[0].label = ""; - //Debug.Log("Setting it to " + newVal.ToString()); - } - - r.x += r.width + 6; - r.width = r.height + 18; - Rect texCoords = new Rect( r ); - texCoords.width /= 7; - texCoords.height /= 3; - texCoords.x = texCoords.y = 0; - GUI.DrawTextureWithTexCoords( r, SF_GUI.Handle_drag, texCoords, alphaBlend:true ); - on = newVal; - texture.dataUniform = new Color( fVal, fVal, fVal, fVal ); - if( texture.dataUniform[0] != vecPrev ) { - OnUpdateNode( NodeUpdateType.Soft ); - editor.shaderEvaluator.ApplyProperty( this ); - } - - ResetWindowColor(); - - } - - public override float EvalCPU( int c ) { - if(on){ - return 1f; - } else { - return 0f; - } - } - - - public override string SerializeSpecialData() { - string s = property.Serialize() + ","; - s += "on:" + on; - return s; - } - - public override void DeserializeSpecialData( string key, string value ) { - property.Deserialize( key, value ); - switch( key ) { - case "on": - on = bool.Parse( value ); - float fVal = on ? 1f : 0f; - texture.dataUniform = new Color( fVal, fVal, fVal, fVal ); - break; - } - } - - - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_ToggleProperty : SF_Node { + + + public SFN_ToggleProperty() { + + } + + [SerializeField] + public bool on = false; + + public override void Initialize() { + node_height = 24; + //node_width = (int)(NODE_WIDTH*1.25f); + base.Initialize( "Toggle" ); + lowerRect.y -= 8; + lowerRect.height = 28; + base.showColor = false; + base.neverDefineVariable = true; + base.UseLowerPropertyBox( true ); + base.texture.uniform = true; + base.texture.CompCount = 1; + base.shaderGenMode = ShaderGenerationMode.OffUniform; + + property = ScriptableObject.CreateInstance().Initialize( this ); + + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv1,false) + }; + } + + public override bool IsUniformOutput() { + return true; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return property.GetVariable(); + } + + + public override void DrawLowerPropertyBox() { + PrepareWindowColor(); + float vecPrev = texture.dataUniform[0]; + //int strWidth = (int)SF_Styles.GetLargeTextField().CalcSize( new GUIContent( texture.dataUniform[0].ToString() ) ).x; + //lowerRect.width = Mathf.Max( 32, strWidth ); + Rect r = new Rect( lowerRect ); + r.width -= 75; + r.width *= 2; + r.yMin += 4; + r.yMax -= 2; + r.xMin += 2; + float fVal = texture.dataUniform[0];; + + //GUI.enabled = false; + //fVal = EditorGUI.FloatField(r, texture.dataUniform[0], SF_Styles.LargeTextField); + //GUI.enabled = true; + + //r.x += r.width + 6; + + + + bool prevVal = on; + + GUI.enabled = false; + r = r.PadTop(2); + GUI.Label(r,prevVal ? "1": "0", SF_Styles.LargeTextFieldNoFrame); + r = r.PadTop(-2); + GUI.enabled = true; + + r.x += 18; + + r.width = r.height + 2; + bool newVal = GUI.Button(r,string.Empty) ? !prevVal : prevVal; + + if(newVal){ + Rect chkRect = r; + chkRect.width = SF_GUI.Toggle_check_icon.width; + chkRect.height = SF_GUI.Toggle_check_icon.height; + chkRect.x += (r.width-chkRect.width)*0.5f; + chkRect.y += 2; + GUI.DrawTexture(chkRect,SF_GUI.Toggle_check_icon); + } + + + + if(prevVal != newVal){ + UndoRecord("set toggle of " + property.nameDisplay + " to " + newVal.ToString()); + fVal = newVal ? 1f : 0f; + connectors[0].label = ""; + //Debug.Log("Setting it to " + newVal.ToString()); + } + + r.x += r.width + 6; + r.width = r.height + 18; + Rect texCoords = new Rect( r ); + texCoords.width /= 7; + texCoords.height /= 3; + texCoords.x = texCoords.y = 0; + GUI.DrawTextureWithTexCoords( r, SF_GUI.Handle_drag, texCoords, alphaBlend:true ); + on = newVal; + texture.dataUniform = new Color( fVal, fVal, fVal, fVal ); + if( texture.dataUniform[0] != vecPrev ) { + OnUpdateNode( NodeUpdateType.Soft ); + editor.shaderEvaluator.ApplyProperty( this ); + } + + ResetWindowColor(); + + } + + public override float EvalCPU( int c ) { + if(on){ + return 1f; + } else { + return 0f; + } + } + + + public override string SerializeSpecialData() { + string s = property.Serialize() + ","; + s += "on:" + on; + return s; + } + + public override void DeserializeSpecialData( string key, string value ) { + property.Deserialize( key, value ); + switch( key ) { + case "on": + on = bool.Parse( value ); + float fVal = on ? 1f : 0f; + texture.dataUniform = new Color( fVal, fVal, fVal, fVal ); + break; + } + } + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ToggleProperty.cs.meta b/Editor/Code/_Nodes/SFN_ToggleProperty.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ToggleProperty.cs.meta rename to Editor/Code/_Nodes/SFN_ToggleProperty.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Transform.cs b/Editor/Code/_Nodes/SFN_Transform.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Transform.cs rename to Editor/Code/_Nodes/SFN_Transform.cs index 96c3ea7c..877d1ed7 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Transform.cs +++ b/Editor/Code/_Nodes/SFN_Transform.cs @@ -1,248 +1,248 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -using System; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Transform : SF_Node { - - - /* - public string[] matrixVars = new string[]{ - "UNITY_MATRIX_MVP", - "UNITY_MATRIX_MV", - "UNITY_MATRIX_V", - "UNITY_MATRIX_P", - "UNITY_MATRIX_VP", - "UNITY_MATRIX_T_MV", - "UNITY_MATRIX_IT_MV", - "unity_Object2World", - "unity_WorldToObject", - "tangentTransform" - }; - - public string[] matrixLabels = new string[]{ - "Model*View*Projection", - "Model*View", - "View", - "Projection", - "View*Projection", - "Transpose Model*View", - "Inverse transpose Model*View", - "Model to World", - "World to Model", - "Tangent" - }; - */ - - - public string[] spaceLabels = new string[]{ - "World", - "Local", - "Tangent", - "View" - }; - - public enum Space{World, Local, Tangent, View}; - - public Space spaceSelFrom = Space.World; - public Space spaceSelTo = Space.Local; - - - //public const int tangentID = 9; - //public int selection = 0; - - public SFN_Transform() { - - } - - public override void Initialize() { - base.Initialize( "Transform" ); - base.showColor = true; - base.vectorDataNode = true; // This should really be renamed to "Always draw as 3D" - UseLowerPropertyBox( true, true ); - base.shaderGenMode = ShaderGenerationMode.Manual; - //UseLowerReadonlyValues(true,true); - - - - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"XYZ","XYZ",ConType.cOutput,ValueType.VTv3,false).Outputting(OutChannel.RGB), - SF_NodeConnector.Create(this,"IN","In",ConType.cInput,ValueType.VTv3,false).SetRequired(true) - }; - base.node_height += 14; - base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1] ); - } - - public override int GetEvaluatedComponentCount() { - return this["IN"].GetCompCount(); - } - - public override bool IsUniformOutput() { - return GetInputData( "IN" ).uniform; - } - - public override void PrepareRendering( Material mat ) { - mat.SetFloat( "_FromSpace", (int)spaceSelFrom ); - mat.SetFloat( "_ToSpace", (int)spaceSelTo ); - } - - - // New system - public override void RefreshValue() { - RefreshValue( 1, 1 ); - } - - public string GetInVector(bool tangent = false){ - if(tangent) - return GetConnectorByStringID( "IN" ).TryEvaluate(); - else - return "float4("+GetConnectorByStringID( "IN" ).TryEvaluate()+",0)"; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - - if(spaceSelFrom == spaceSelTo){ // TODO: Add warning about tunneling variable - return GetConnectorByStringID( "IN" ).TryEvaluate(); - } - - - // From world space - if( FromTo( Space.World, Space.Local) ){ - return "mul( unity_WorldToObject, " + GetInVector() + " ).xyz"; - } - if( FromTo( Space.World, Space.Tangent) ){ - return "mul( tangentTransform, "+ GetInVector(tangent:true)+" ).xyz"; - } - if( FromTo(Space.World, Space.View)){ - return "mul( UNITY_MATRIX_V, " + GetInVector() + " ).xyz"; - } - - - // From local space - if( FromTo( Space.Local, Space.World) ){ - return "mul( unity_ObjectToWorld, " + GetInVector() + " ).xyz"; - } - if(FromTo(Space.Local, Space.Tangent)){ - return "mul( tangentTransform, " + "mul( unity_ObjectToWorld, " + GetInVector() + " ).xyz" + " ).xyz"; - } - if( FromTo(Space.Local, Space.View)){ - return "UnityObjectToViewPos( " + GetInVector() + " ).xyz"; - } - - - - - // From tangent space - if( FromTo( Space.Tangent, Space.World) ){ - return "mul( "+ GetInVector(tangent:true)+", tangentTransform ).xyz"; - } - if( FromTo( Space.Tangent, Space.Local) ){ - return "mul( unity_WorldToObject, " + "float4(mul( "+ GetInVector(tangent:true)+", tangentTransform ),0)" + " ).xyz"; - } - if( FromTo( Space.Tangent, Space.View) ){ - return "mul( UNITY_MATRIX_V, " + "float4(mul( "+ GetInVector(tangent:true)+", tangentTransform ),0)" + " ).xyz"; - } - - - // From view space - if( FromTo(Space.View, Space.World)){ - return "mul( " + GetInVector() + ", UNITY_MATRIX_V ).xyz"; - } - if( FromTo(Space.View, Space.Local)){ - return "mul( " + GetInVector() + ", UNITY_MATRIX_MV ).xyz"; - } - if( FromTo(Space.View, Space.Tangent)){ - return "mul( tangentTransform, "+ "mul( " + GetInVector() + ", UNITY_MATRIX_V ).xyz"+" ).xyz"; - } - - - - // TODO TODO TODO: - return GetConnectorByStringID( "IN" ).TryEvaluate(); - - - - /* - if( selection != tangentID ) - return "mul( " + matrixVars[selection] + ", float4( " + GetConnectorByStringID( "IN" ).TryEvaluate() + ", 0 )).xyz"; - else - return "mul( " + matrixVars[selection] + ", " + GetConnectorByStringID( "IN" ).TryEvaluate() + " )"; - */ - } - - public bool FromTo(Space from, Space to){ - return (spaceSelFrom == from && spaceSelTo == to); - } - - // Pass through - public override Vector4 EvalCPU() { - return GetInputData( "IN" ).node.EvalCPU(); - } - - const float dirLabelWidth = 28; - public override void DrawLowerPropertyBox() { - EditorGUI.BeginChangeCheck(); - - Rect r = new Rect(lowerRect); - r.width = dirLabelWidth; - r.height = 18; - //r.height /= 2; - GUI.Label(r,"From",SF_Styles.MiniLabelOverflow); - r.x += r.width; - r.width = (lowerRect.width-dirLabelWidth); - - spaceSelFrom = (Space)UndoablePopup(r, (int)spaceSelFrom, spaceLabels, "switch transform 'from' setting"); - r.y += r.height; - spaceSelTo = (Space)UndoablePopup(r, (int)spaceSelTo, spaceLabels, "switch transform 'to' setting"); - r.x = 0; - r.width = dirLabelWidth; - GUI.Label(r,"To",SF_Styles.MiniLabelOverflow); - - /* - r.width -= toLabelWidth; - float popupWidth = (r.width /= 2); - spaceSelFrom = EditorGUI.Popup(r, spaceSelFrom, spaceLabels); - r.x += r.width; - r.width = toLabelWidth; - GUI.Label(r,"to",SF_Styles.MiniLabelOverflow); - r.x += r.width; - r.width = popupWidth; - spaceSelTo = EditorGUI.Popup(r, spaceSelTo, spaceLabels); - */ - - //selection = EditorGUI.Popup( lowerRect, selection, matrixLabels ); - if( EditorGUI.EndChangeCheck() ) { - OnUpdateNode(); - } - } - - - public override string SerializeSpecialData() { - string s = "tffrom:" + (int)spaceSelFrom + ","; - s += "tfto:" + (int)spaceSelTo; - return s; - } - - public override void DeserializeSpecialData( string key, string value ) { - switch( key ) { - case "tffrom": - spaceSelFrom = (Space)int.Parse( value ); - break; - case "tfto": - spaceSelTo = (Space)int.Parse( value ); - break; - } - } - - - /* - public override Vector4 NodeOperator( int x, int y ) { - return base.NodeOperator( x, y ); - } - */ - - } +using UnityEngine; +using UnityEditor; +using System.Collections; +using System; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Transform : SF_Node { + + + /* + public string[] matrixVars = new string[]{ + "UNITY_MATRIX_MVP", + "UNITY_MATRIX_MV", + "UNITY_MATRIX_V", + "UNITY_MATRIX_P", + "UNITY_MATRIX_VP", + "UNITY_MATRIX_T_MV", + "UNITY_MATRIX_IT_MV", + "unity_Object2World", + "unity_WorldToObject", + "tangentTransform" + }; + + public string[] matrixLabels = new string[]{ + "Model*View*Projection", + "Model*View", + "View", + "Projection", + "View*Projection", + "Transpose Model*View", + "Inverse transpose Model*View", + "Model to World", + "World to Model", + "Tangent" + }; + */ + + + public string[] spaceLabels = new string[]{ + "World", + "Local", + "Tangent", + "View" + }; + + public enum Space{World, Local, Tangent, View}; + + public Space spaceSelFrom = Space.World; + public Space spaceSelTo = Space.Local; + + + //public const int tangentID = 9; + //public int selection = 0; + + public SFN_Transform() { + + } + + public override void Initialize() { + base.Initialize( "Transform" ); + base.showColor = true; + base.vectorDataNode = true; // This should really be renamed to "Always draw as 3D" + UseLowerPropertyBox( true, true ); + base.shaderGenMode = ShaderGenerationMode.Manual; + //UseLowerReadonlyValues(true,true); + + + + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"XYZ","XYZ",ConType.cOutput,ValueType.VTv3,false).Outputting(OutChannel.RGB), + SF_NodeConnector.Create(this,"IN","In",ConType.cInput,ValueType.VTv3,false).SetRequired(true) + }; + base.node_height += 14; + base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1] ); + } + + public override int GetEvaluatedComponentCount() { + return this["IN"].GetCompCount(); + } + + public override bool IsUniformOutput() { + return GetInputData( "IN" ).uniform; + } + + public override void PrepareRendering( Material mat ) { + mat.SetFloat( "_FromSpace", (int)spaceSelFrom ); + mat.SetFloat( "_ToSpace", (int)spaceSelTo ); + } + + + // New system + public override void RefreshValue() { + RefreshValue( 1, 1 ); + } + + public string GetInVector(bool tangent = false){ + if(tangent) + return GetConnectorByStringID( "IN" ).TryEvaluate(); + else + return "float4("+GetConnectorByStringID( "IN" ).TryEvaluate()+",0)"; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + + if(spaceSelFrom == spaceSelTo){ // TODO: Add warning about tunneling variable + return GetConnectorByStringID( "IN" ).TryEvaluate(); + } + + + // From world space + if( FromTo( Space.World, Space.Local) ){ + return "mul( unity_WorldToObject, " + GetInVector() + " ).xyz"; + } + if( FromTo( Space.World, Space.Tangent) ){ + return "mul( tangentTransform, "+ GetInVector(tangent:true)+" ).xyz"; + } + if( FromTo(Space.World, Space.View)){ + return "mul( UNITY_MATRIX_V, " + GetInVector() + " ).xyz"; + } + + + // From local space + if( FromTo( Space.Local, Space.World) ){ + return "mul( unity_ObjectToWorld, " + GetInVector() + " ).xyz"; + } + if(FromTo(Space.Local, Space.Tangent)){ + return "mul( tangentTransform, " + "mul( unity_ObjectToWorld, " + GetInVector() + " ).xyz" + " ).xyz"; + } + if( FromTo(Space.Local, Space.View)){ + return "UnityObjectToViewPos( " + GetInVector() + " ).xyz"; + } + + + + + // From tangent space + if( FromTo( Space.Tangent, Space.World) ){ + return "mul( "+ GetInVector(tangent:true)+", tangentTransform ).xyz"; + } + if( FromTo( Space.Tangent, Space.Local) ){ + return "mul( unity_WorldToObject, " + "float4(mul( "+ GetInVector(tangent:true)+", tangentTransform ),0)" + " ).xyz"; + } + if( FromTo( Space.Tangent, Space.View) ){ + return "mul( UNITY_MATRIX_V, " + "float4(mul( "+ GetInVector(tangent:true)+", tangentTransform ),0)" + " ).xyz"; + } + + + // From view space + if( FromTo(Space.View, Space.World)){ + return "mul( " + GetInVector() + ", UNITY_MATRIX_V ).xyz"; + } + if( FromTo(Space.View, Space.Local)){ + return "mul( " + GetInVector() + ", UNITY_MATRIX_MV ).xyz"; + } + if( FromTo(Space.View, Space.Tangent)){ + return "mul( tangentTransform, "+ "mul( " + GetInVector() + ", UNITY_MATRIX_V ).xyz"+" ).xyz"; + } + + + + // TODO TODO TODO: + return GetConnectorByStringID( "IN" ).TryEvaluate(); + + + + /* + if( selection != tangentID ) + return "mul( " + matrixVars[selection] + ", float4( " + GetConnectorByStringID( "IN" ).TryEvaluate() + ", 0 )).xyz"; + else + return "mul( " + matrixVars[selection] + ", " + GetConnectorByStringID( "IN" ).TryEvaluate() + " )"; + */ + } + + public bool FromTo(Space from, Space to){ + return (spaceSelFrom == from && spaceSelTo == to); + } + + // Pass through + public override Vector4 EvalCPU() { + return GetInputData( "IN" ).node.EvalCPU(); + } + + const float dirLabelWidth = 28; + public override void DrawLowerPropertyBox() { + EditorGUI.BeginChangeCheck(); + + Rect r = new Rect(lowerRect); + r.width = dirLabelWidth; + r.height = 18; + //r.height /= 2; + GUI.Label(r,"From",SF_Styles.MiniLabelOverflow); + r.x += r.width; + r.width = (lowerRect.width-dirLabelWidth); + + spaceSelFrom = (Space)UndoablePopup(r, (int)spaceSelFrom, spaceLabels, "switch transform 'from' setting"); + r.y += r.height; + spaceSelTo = (Space)UndoablePopup(r, (int)spaceSelTo, spaceLabels, "switch transform 'to' setting"); + r.x = 0; + r.width = dirLabelWidth; + GUI.Label(r,"To",SF_Styles.MiniLabelOverflow); + + /* + r.width -= toLabelWidth; + float popupWidth = (r.width /= 2); + spaceSelFrom = EditorGUI.Popup(r, spaceSelFrom, spaceLabels); + r.x += r.width; + r.width = toLabelWidth; + GUI.Label(r,"to",SF_Styles.MiniLabelOverflow); + r.x += r.width; + r.width = popupWidth; + spaceSelTo = EditorGUI.Popup(r, spaceSelTo, spaceLabels); + */ + + //selection = EditorGUI.Popup( lowerRect, selection, matrixLabels ); + if( EditorGUI.EndChangeCheck() ) { + OnUpdateNode(); + } + } + + + public override string SerializeSpecialData() { + string s = "tffrom:" + (int)spaceSelFrom + ","; + s += "tfto:" + (int)spaceSelTo; + return s; + } + + public override void DeserializeSpecialData( string key, string value ) { + switch( key ) { + case "tffrom": + spaceSelFrom = (Space)int.Parse( value ); + break; + case "tfto": + spaceSelTo = (Space)int.Parse( value ); + break; + } + } + + + /* + public override Vector4 NodeOperator( int x, int y ) { + return base.NodeOperator( x, y ); + } + */ + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Transform.cs.meta b/Editor/Code/_Nodes/SFN_Transform.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Transform.cs.meta rename to Editor/Code/_Nodes/SFN_Transform.cs.meta index 6650d470..42ae709b --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Transform.cs.meta +++ b/Editor/Code/_Nodes/SFN_Transform.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 124d80ea9a58a4246b0a4a6cccdaac62 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 124d80ea9a58a4246b0a4a6cccdaac62 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Transpose.cs b/Editor/Code/_Nodes/SFN_Transpose.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Transpose.cs rename to Editor/Code/_Nodes/SFN_Transpose.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Transpose.cs.meta b/Editor/Code/_Nodes/SFN_Transpose.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Transpose.cs.meta rename to Editor/Code/_Nodes/SFN_Transpose.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Trunc.cs b/Editor/Code/_Nodes/SFN_Trunc.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Trunc.cs rename to Editor/Code/_Nodes/SFN_Trunc.cs index 1eb7526f..47d169b2 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Trunc.cs +++ b/Editor/Code/_Nodes/SFN_Trunc.cs @@ -1,27 +1,27 @@ -using UnityEngine; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Trunc : SF_Node_Arithmetic { - - public SFN_Trunc() { - } - - public override void Initialize() { - base.Initialize( "Trunc" ); - base.PrepareArithmetic(1); - base.shaderGenMode = ShaderGenerationMode.SimpleFunction; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "trunc(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; - } - - public override float EvalCPU( int c ) { - float val = GetInputData( "IN", c ); - return val < 0 ? -Mathf.Floor( -val ) : Mathf.Floor( val ); - } - - } +using UnityEngine; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Trunc : SF_Node_Arithmetic { + + public SFN_Trunc() { + } + + public override void Initialize() { + base.Initialize( "Trunc" ); + base.PrepareArithmetic(1); + base.shaderGenMode = ShaderGenerationMode.SimpleFunction; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "trunc(" + GetConnectorByStringID( "IN" ).TryEvaluate() + ")"; + } + + public override float EvalCPU( int c ) { + float val = GetInputData( "IN", c ); + return val < 0 ? -Mathf.Floor( -val ) : Mathf.Floor( val ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Trunc.cs.meta b/Editor/Code/_Nodes/SFN_Trunc.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Trunc.cs.meta rename to Editor/Code/_Nodes/SFN_Trunc.cs.meta index a361cfa0..8d0542cc --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Trunc.cs.meta +++ b/Editor/Code/_Nodes/SFN_Trunc.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 1d73655491ef04b4ea839fe65ab4831a -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 1d73655491ef04b4ea839fe65ab4831a +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_UVTile.cs b/Editor/Code/_Nodes/SFN_UVTile.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_UVTile.cs rename to Editor/Code/_Nodes/SFN_UVTile.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_UVTile.cs.meta b/Editor/Code/_Nodes/SFN_UVTile.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_UVTile.cs.meta rename to Editor/Code/_Nodes/SFN_UVTile.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ValueProperty.cs b/Editor/Code/_Nodes/SFN_ValueProperty.cs old mode 100755 new mode 100644 similarity index 97% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ValueProperty.cs rename to Editor/Code/_Nodes/SFN_ValueProperty.cs index d9d365ed..687b3397 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ValueProperty.cs +++ b/Editor/Code/_Nodes/SFN_ValueProperty.cs @@ -1,55 +1,55 @@ using UnityEngine; using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_ValueProperty : SF_Node { - - - public SFN_ValueProperty() { - - } - - public override void Initialize() { - node_height = 24; - //node_width = (int)(NODE_WIDTH*1.25f); - base.Initialize( "Value" ); - lowerRect.y -= 8; - lowerRect.height = 28; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_ValueProperty : SF_Node { + + + public SFN_ValueProperty() { + + } + + public override void Initialize() { + node_height = 24; + //node_width = (int)(NODE_WIDTH*1.25f); + base.Initialize( "Value" ); + lowerRect.y -= 8; + lowerRect.height = 28; base.showColor = false; - base.neverDefineVariable = true; - base.UseLowerPropertyBox( true ); - base.texture.uniform = true; - base.texture.CompCount = 1; - base.shaderGenMode = ShaderGenerationMode.OffUniform; - - property = ScriptableObject.CreateInstance().Initialize( this ); - + base.neverDefineVariable = true; + base.UseLowerPropertyBox( true ); + base.texture.uniform = true; + base.texture.CompCount = 1; + base.shaderGenMode = ShaderGenerationMode.OffUniform; + + property = ScriptableObject.CreateInstance().Initialize( this ); + connectors = new SF_NodeConnector[]{ SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv1,false) - }; - } - - public override bool IsUniformOutput() { - return true; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return property.GetVariable(); - } - - - public override void DrawLowerPropertyBox() { - PrepareWindowColor(); - float vecPrev = texture.dataUniform[0]; - //int strWidth = (int)SF_Styles.GetLargeTextField().CalcSize( new GUIContent( texture.dataUniform[0].ToString() ) ).x; - //lowerRect.width = Mathf.Max( 32, strWidth ); - Rect r = new Rect( lowerRect ); - r.width -= 32; - r.yMin += 4; - r.yMax -= 2; + }; + } + + public override bool IsUniformOutput() { + return true; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return property.GetVariable(); + } + + + public override void DrawLowerPropertyBox() { + PrepareWindowColor(); + float vecPrev = texture.dataUniform[0]; + //int strWidth = (int)SF_Styles.GetLargeTextField().CalcSize( new GUIContent( texture.dataUniform[0].ToString() ) ).x; + //lowerRect.width = Mathf.Max( 32, strWidth ); + Rect r = new Rect( lowerRect ); + r.width -= 32; + r.yMin += 4; + r.yMax -= 2; r.xMin += 2; float fVal; if(IsGlobalProperty()){ @@ -61,42 +61,42 @@ public override void DrawLowerPropertyBox() { } else { fVal = UndoableFloatField(r, texture.dataUniform[0], "value" , SF_Styles.LargeTextField); //fVal = EditorGUI.FloatField( r, texture.dataUniform[0], SF_Styles.LargeTextField ); - } - r.x += r.width + 6; - r.width = r.height; - Rect texCoords = new Rect( r ); - texCoords.width /= 7; - texCoords.height /= 3; - texCoords.x = texCoords.y = 0; - GUI.DrawTextureWithTexCoords( r, SF_GUI.Handle_drag, texCoords, alphaBlend:true ); - - texture.dataUniform = new Vector4( fVal, fVal, fVal, fVal ); - if( texture.dataUniform[0] != vecPrev ) { - OnUpdateNode( NodeUpdateType.Soft ); - editor.shaderEvaluator.ApplyProperty( this ); - } - - ResetWindowColor(); - - } - + } + r.x += r.width + 6; + r.width = r.height; + Rect texCoords = new Rect( r ); + texCoords.width /= 7; + texCoords.height /= 3; + texCoords.x = texCoords.y = 0; + GUI.DrawTextureWithTexCoords( r, SF_GUI.Handle_drag, texCoords, alphaBlend:true ); + + texture.dataUniform = new Vector4( fVal, fVal, fVal, fVal ); + if( texture.dataUniform[0] != vecPrev ) { + OnUpdateNode( NodeUpdateType.Soft ); + editor.shaderEvaluator.ApplyProperty( this ); + } + + ResetWindowColor(); + + } + public override string SerializeSpecialData() { string s = property.Serialize() + ","; - s += "v1:" + texture.dataUniform[0]; - return s; - } - + s += "v1:" + texture.dataUniform[0]; + return s; + } + public override void DeserializeSpecialData( string key, string value ) { - property.Deserialize(key,value); - switch( key ) { - case "v1": - float fVal = float.Parse( value ); - texture.dataUniform = new Color( fVal, fVal, fVal, fVal ); - break; - } - } - - - - } + property.Deserialize(key,value); + switch( key ) { + case "v1": + float fVal = float.Parse( value ); + texture.dataUniform = new Color( fVal, fVal, fVal, fVal ); + break; + } + } + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ValueProperty.cs.meta b/Editor/Code/_Nodes/SFN_ValueProperty.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ValueProperty.cs.meta rename to Editor/Code/_Nodes/SFN_ValueProperty.cs.meta index 7a655236..1cc0c92b --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ValueProperty.cs.meta +++ b/Editor/Code/_Nodes/SFN_ValueProperty.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: ad7dec924ed5ebe4f80cca8439af7294 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: ad7dec924ed5ebe4f80cca8439af7294 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector1.cs b/Editor/Code/_Nodes/SFN_Vector1.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector1.cs rename to Editor/Code/_Nodes/SFN_Vector1.cs index fa45022d..60c8d02a --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector1.cs +++ b/Editor/Code/_Nodes/SFN_Vector1.cs @@ -1,91 +1,91 @@ using UnityEngine; using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Vector1 : SF_Node { - - - public SFN_Vector1() { - - } - - public override void Initialize() { - node_height = 24; - //node_width = (int)(NODE_WIDTH*1.25f); - base.Initialize( "Value" ); - lowerRect.y -= 8; - lowerRect.height = 28; - base.showColor = false; - base.UseLowerPropertyBox( true ); - base.texture.uniform = true; - base.texture.CompCount = 1; - base.shaderGenMode = ShaderGenerationMode.OffUniform; - +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Vector1 : SF_Node { + + + public SFN_Vector1() { + + } + + public override void Initialize() { + node_height = 24; + //node_width = (int)(NODE_WIDTH*1.25f); + base.Initialize( "Value" ); + lowerRect.y -= 8; + lowerRect.height = 28; + base.showColor = false; + base.UseLowerPropertyBox( true ); + base.texture.uniform = true; + base.texture.CompCount = 1; + base.shaderGenMode = ShaderGenerationMode.OffUniform; + connectors = new SF_NodeConnector[]{ SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv1,false) - }; - } - - public override bool IsUniformOutput() { - return true; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - - string str = texture.dataUniform[0].ToString( "0.0###########" ); // At least one decimal - - if( texture.dataUniform[0] < 0f) - return "("+str+")"; - return str; - + }; + } + + public override bool IsUniformOutput() { + return true; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + + string str = texture.dataUniform[0].ToString( "0.0###########" ); // At least one decimal + + if( texture.dataUniform[0] < 0f) + return "("+str+")"; + return str; + } public override int GetEvaluatedComponentCount(){ return 1; - } - - - public override void DrawLowerPropertyBox() { - float vecPrev = texture.dataUniform[0]; - //int strWidth = (int)SF_Styles.GetLargeTextField().CalcSize( new GUIContent( texture.dataUniform[0].ToString() ) ).x; - //lowerRect.width = Mathf.Max( 32, strWidth ); - Rect r = new Rect( lowerRect ); - r.width -= 32; - r.yMin += 4; - r.yMax -= 2; - r.xMin += 2; + } + + + public override void DrawLowerPropertyBox() { + float vecPrev = texture.dataUniform[0]; + //int strWidth = (int)SF_Styles.GetLargeTextField().CalcSize( new GUIContent( texture.dataUniform[0].ToString() ) ).x; + //lowerRect.width = Mathf.Max( 32, strWidth ); + Rect r = new Rect( lowerRect ); + r.width -= 32; + r.yMin += 4; + r.yMax -= 2; + r.xMin += 2; //SF_GUI.EnterableFloatField( this, r, ref texture.dataUniform.r, SF_Styles.LargeTextField ); - UndoableEnterableFloatField(r, ref texture.dataUniform.x, "value", SF_Styles.LargeTextField); - r.x += r.width + 6; - r.width = r.height; - Rect texCoords = new Rect( r ); - texCoords.width /= 7; - texCoords.height /= 3; - texCoords.x = texCoords.y = 0; - GUI.DrawTextureWithTexCoords( r, SF_GUI.Handle_drag, texCoords, alphaBlend:true ); - - texture.dataUniform = new Vector4( texture.dataUniform.x, texture.dataUniform.x, texture.dataUniform.x, texture.dataUniform.x ); - if( texture.dataUniform[0] != vecPrev ) - OnUpdateNode(); - } - - public override string SerializeSpecialData() { - return "v1:" + texture.dataUniform[0]; - } - - public override void DeserializeSpecialData( string key, string value ) { - switch( key ) { - case "v1": - float fVal = float.Parse( value ); - texture.dataUniform = new Color( fVal, fVal, fVal, fVal ); - break; - } - } - - - - } + UndoableEnterableFloatField(r, ref texture.dataUniform.x, "value", SF_Styles.LargeTextField); + r.x += r.width + 6; + r.width = r.height; + Rect texCoords = new Rect( r ); + texCoords.width /= 7; + texCoords.height /= 3; + texCoords.x = texCoords.y = 0; + GUI.DrawTextureWithTexCoords( r, SF_GUI.Handle_drag, texCoords, alphaBlend:true ); + + texture.dataUniform = new Vector4( texture.dataUniform.x, texture.dataUniform.x, texture.dataUniform.x, texture.dataUniform.x ); + if( texture.dataUniform[0] != vecPrev ) + OnUpdateNode(); + } + + public override string SerializeSpecialData() { + return "v1:" + texture.dataUniform[0]; + } + + public override void DeserializeSpecialData( string key, string value ) { + switch( key ) { + case "v1": + float fVal = float.Parse( value ); + texture.dataUniform = new Color( fVal, fVal, fVal, fVal ); + break; + } + } + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector1.cs.meta b/Editor/Code/_Nodes/SFN_Vector1.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector1.cs.meta rename to Editor/Code/_Nodes/SFN_Vector1.cs.meta index 265a331a..72ef9a79 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector1.cs.meta +++ b/Editor/Code/_Nodes/SFN_Vector1.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: c5a90f9239f419d4f99c9b73ae51f110 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: c5a90f9239f419d4f99c9b73ae51f110 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector2.cs b/Editor/Code/_Nodes/SFN_Vector2.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector2.cs rename to Editor/Code/_Nodes/SFN_Vector2.cs index b4fe3c80..7c1d97d4 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector2.cs +++ b/Editor/Code/_Nodes/SFN_Vector2.cs @@ -1,79 +1,79 @@ using UnityEngine; using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Vector2 : SF_Node { - - - public SFN_Vector2() { - - } - - public override void Initialize() { - node_height /= 2; - base.Initialize( "Vector 2" ); - base.showColor = true; - base.UseLowerPropertyBox( true ); +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Vector2 : SF_Node { + + + public SFN_Vector2() { + + } + + public override void Initialize() { + node_height /= 2; + base.Initialize( "Vector 2" ); + base.showColor = true; + base.UseLowerPropertyBox( true ); base.texture.uniform = true; - base.canAlwaysSetPrecision = true; - base.texture.CompCount = 2; - base.shaderGenMode = ShaderGenerationMode.OffUniform; - lowerRect.width /= 2; + base.canAlwaysSetPrecision = true; + base.texture.CompCount = 2; + base.shaderGenMode = ShaderGenerationMode.OffUniform; + lowerRect.width /= 2; connectors = new SF_NodeConnector[]{ SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv2,false) - }; - } - - public override bool IsUniformOutput() { - return true; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return precision.ToCode() + "2(" + texture.dataUniform[0] + "," + texture.dataUniform[1] + ")"; - } - - public override void DrawLowerPropertyBox() { - - if( selected && !SF_GUI.MultiSelectModifierHeld() ) - ColorPickerCorner(lowerRect); - - Vector4 cPrev = texture.dataUniform; - Rect tRect = lowerRect; + }; + } + + public override bool IsUniformOutput() { + return true; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return precision.ToCode() + "2(" + texture.dataUniform[0] + "," + texture.dataUniform[1] + ")"; + } + + public override void DrawLowerPropertyBox() { + + if( selected && !SF_GUI.MultiSelectModifierHeld() ) + ColorPickerCorner(lowerRect); + + Vector4 cPrev = texture.dataUniform; + Rect tRect = lowerRect; //SF_GUI.EnterableFloatField( this, tRect, ref texture.dataUniform.r, null ); - UndoableEnterableFloatField(tRect,ref texture.dataUniform.x, "R channel", null); - tRect.x += tRect.width; + UndoableEnterableFloatField(tRect,ref texture.dataUniform.x, "R channel", null); + tRect.x += tRect.width; //SF_GUI.EnterableFloatField( this, tRect, ref texture.dataUniform.g, null ); - UndoableEnterableFloatField(tRect,ref texture.dataUniform.y, "G channel", null); - if( texture.dataUniform != cPrev ) - OnUpdateNode(); - - } - - - public override string SerializeSpecialData() { - string s = "v1:" + texture.dataUniform[0] + ","; - s += "v2:" + texture.dataUniform[1]; - return s; - } - - public override void DeserializeSpecialData( string key, string value ) { - switch( key ) { - case "v1": - float fVal1 = float.Parse( value ); - texture.dataUniform[0] = fVal1; - break; - case "v2": - float fVal2 = float.Parse( value ); - texture.dataUniform[1] = fVal2; - break; - } - } - - - - - } + UndoableEnterableFloatField(tRect,ref texture.dataUniform.y, "G channel", null); + if( texture.dataUniform != cPrev ) + OnUpdateNode(); + + } + + + public override string SerializeSpecialData() { + string s = "v1:" + texture.dataUniform[0] + ","; + s += "v2:" + texture.dataUniform[1]; + return s; + } + + public override void DeserializeSpecialData( string key, string value ) { + switch( key ) { + case "v1": + float fVal1 = float.Parse( value ); + texture.dataUniform[0] = fVal1; + break; + case "v2": + float fVal2 = float.Parse( value ); + texture.dataUniform[1] = fVal2; + break; + } + } + + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector2.cs.meta b/Editor/Code/_Nodes/SFN_Vector2.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector2.cs.meta rename to Editor/Code/_Nodes/SFN_Vector2.cs.meta index 9b05d822..25c0b637 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector2.cs.meta +++ b/Editor/Code/_Nodes/SFN_Vector2.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: a4a9e941838527c4ab45dac110a4c10c -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: a4a9e941838527c4ab45dac110a4c10c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector3.cs b/Editor/Code/_Nodes/SFN_Vector3.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector3.cs rename to Editor/Code/_Nodes/SFN_Vector3.cs index d5e5bb56..6d7792eb --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector3.cs +++ b/Editor/Code/_Nodes/SFN_Vector3.cs @@ -1,89 +1,89 @@ using UnityEngine; using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_Vector3 : SF_Node { - - - public SFN_Vector3() { - - } - - public override void Initialize() { - node_height /= 2; - base.Initialize( "Vector 3" ); - base.showColor = true; - base.UseLowerPropertyBox( true ); +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_Vector3 : SF_Node { + + + public SFN_Vector3() { + + } + + public override void Initialize() { + node_height /= 2; + base.Initialize( "Vector 3" ); + base.showColor = true; + base.UseLowerPropertyBox( true ); base.texture.uniform = true; - base.canAlwaysSetPrecision = true; - base.texture.CompCount = 3; - base.shaderGenMode = ShaderGenerationMode.OffUniform; - lowerRect.width /= 3; + base.canAlwaysSetPrecision = true; + base.texture.CompCount = 3; + base.shaderGenMode = ShaderGenerationMode.OffUniform; + lowerRect.width /= 3; connectors = new SF_NodeConnector[]{ SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv3,false) - }; - } - - public override bool IsUniformOutput() { - return true; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return precision.ToCode() + "3(" + texture.dataUniform[0] + "," + texture.dataUniform[1] + "," + texture.dataUniform[2] + ")"; - } - - public override void DrawLowerPropertyBox() { - - if( selected && !SF_GUI.MultiSelectModifierHeld() ) - ColorPickerCorner( lowerRect ); - - //Color vecPrev = texture.dataUniform; - Rect tRect = lowerRect; - UndoableEnterableFloatField( tRect, ref texture.dataUniform.x, "R channel", null); - tRect.x += tRect.width; - UndoableEnterableFloatField( tRect, ref texture.dataUniform.y, "G channel", null); - tRect.x += tRect.width; - UndoableEnterableFloatField( tRect, ref texture.dataUniform.z, "B channel", null); - } - - public override string SerializeSpecialData() { - string s = "v1:" + texture.dataUniform[0] + ","; - s += "v2:" + texture.dataUniform[1] + ","; - s += "v3:" + texture.dataUniform[2]; - return s; - } - - public override void DeserializeSpecialData( string key, string value ) { - switch( key ) { - case "v1": - float fVal1 = float.Parse( value ); - texture.dataUniform[0] = fVal1; - break; - case "v2": - float fVal2 = float.Parse( value ); - texture.dataUniform[1] = fVal2; - break; - case "v3": - float fVal3 = float.Parse( value ); - texture.dataUniform[2] = fVal3; - break; - } - } - - - // public override float[] GetVectorWithCompCount(int cCount){ - // if(cCount == 3) - // return vec; - // else - // Debug.LogWarning("Vector3 not convertible to vector" + cCount); // Vector3 is not convertible to any other - // } - - - - - - } + }; + } + + public override bool IsUniformOutput() { + return true; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return precision.ToCode() + "3(" + texture.dataUniform[0] + "," + texture.dataUniform[1] + "," + texture.dataUniform[2] + ")"; + } + + public override void DrawLowerPropertyBox() { + + if( selected && !SF_GUI.MultiSelectModifierHeld() ) + ColorPickerCorner( lowerRect ); + + //Color vecPrev = texture.dataUniform; + Rect tRect = lowerRect; + UndoableEnterableFloatField( tRect, ref texture.dataUniform.x, "R channel", null); + tRect.x += tRect.width; + UndoableEnterableFloatField( tRect, ref texture.dataUniform.y, "G channel", null); + tRect.x += tRect.width; + UndoableEnterableFloatField( tRect, ref texture.dataUniform.z, "B channel", null); + } + + public override string SerializeSpecialData() { + string s = "v1:" + texture.dataUniform[0] + ","; + s += "v2:" + texture.dataUniform[1] + ","; + s += "v3:" + texture.dataUniform[2]; + return s; + } + + public override void DeserializeSpecialData( string key, string value ) { + switch( key ) { + case "v1": + float fVal1 = float.Parse( value ); + texture.dataUniform[0] = fVal1; + break; + case "v2": + float fVal2 = float.Parse( value ); + texture.dataUniform[1] = fVal2; + break; + case "v3": + float fVal3 = float.Parse( value ); + texture.dataUniform[2] = fVal3; + break; + } + } + + + // public override float[] GetVectorWithCompCount(int cCount){ + // if(cCount == 3) + // return vec; + // else + // Debug.LogWarning("Vector3 not convertible to vector" + cCount); // Vector3 is not convertible to any other + // } + + + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector3.cs.meta b/Editor/Code/_Nodes/SFN_Vector3.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector3.cs.meta rename to Editor/Code/_Nodes/SFN_Vector3.cs.meta index df78be29..bbaf116c --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector3.cs.meta +++ b/Editor/Code/_Nodes/SFN_Vector3.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 9641f0761fe611c47bbca6329cbedc20 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 9641f0761fe611c47bbca6329cbedc20 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector4.cs b/Editor/Code/_Nodes/SFN_Vector4.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector4.cs rename to Editor/Code/_Nodes/SFN_Vector4.cs index ae76d8fe..7c9f060f --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector4.cs +++ b/Editor/Code/_Nodes/SFN_Vector4.cs @@ -1,89 +1,89 @@ using UnityEngine; using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - public class SFN_Vector4 : SF_Node { - - - public SFN_Vector4() { - - } - - public override void Initialize() { - node_height /= 2; - base.Initialize( "Vector 4" ); - base.showColor = true; - base.UseLowerPropertyBox( true ); - base.texture.uniform = true; +using System.Collections; + +namespace ShaderForge { + + public class SFN_Vector4 : SF_Node { + + + public SFN_Vector4() { + + } + + public override void Initialize() { + node_height /= 2; + base.Initialize( "Vector 4" ); + base.showColor = true; + base.UseLowerPropertyBox( true ); + base.texture.uniform = true; base.texture.CompCount = 4; - base.canAlwaysSetPrecision = true; - base.shaderGenMode = ShaderGenerationMode.OffUniform; - lowerRect.width /= 4; + base.canAlwaysSetPrecision = true; + base.shaderGenMode = ShaderGenerationMode.OffUniform; + lowerRect.width /= 4; connectors = new SF_NodeConnector[]{ SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv4,false) - }; - } - - public override bool IsUniformOutput() { - return true; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return precision.ToCode() + "4(" + texture.dataUniform[0] + "," + texture.dataUniform[1] + "," + texture.dataUniform[2] + "," + texture.dataUniform[3] + ")"; - } - - - public override void DrawLowerPropertyBox() { - - if( selected && !SF_GUI.MultiSelectModifierHeld() ) - ColorPickerCorner( lowerRect ); - - //Color vecPrev = texture.dataUniform; - Rect tRect = lowerRect; + }; + } + + public override bool IsUniformOutput() { + return true; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return precision.ToCode() + "4(" + texture.dataUniform[0] + "," + texture.dataUniform[1] + "," + texture.dataUniform[2] + "," + texture.dataUniform[3] + ")"; + } + + + public override void DrawLowerPropertyBox() { + + if( selected && !SF_GUI.MultiSelectModifierHeld() ) + ColorPickerCorner( lowerRect ); + + //Color vecPrev = texture.dataUniform; + Rect tRect = lowerRect; UndoableEnterableFloatField( tRect, ref texture.dataUniform.x, "R channel", null); tRect.x += tRect.width; UndoableEnterableFloatField( tRect, ref texture.dataUniform.y, "G channel", null); tRect.x += tRect.width; - UndoableEnterableFloatField( tRect, ref texture.dataUniform.z, "B channel", null); - tRect.x += tRect.width; - UndoableEnterableFloatField( tRect, ref texture.dataUniform.w, "A channel", null); - - } - - public override string SerializeSpecialData() { - string s = "v1:" + texture.dataUniform[0] + ","; - s += "v2:" + texture.dataUniform[1] + ","; - s += "v3:" + texture.dataUniform[2] + ","; - s += "v4:" + texture.dataUniform[3]; - return s; - } - - public override void DeserializeSpecialData( string key, string value ) { - switch( key ) { - case "v1": - float fVal1 = float.Parse( value ); - texture.dataUniform[0] = fVal1; - break; - case "v2": - float fVal2 = float.Parse( value ); - texture.dataUniform[1] = fVal2; - break; - case "v3": - float fVal3 = float.Parse( value ); - texture.dataUniform[2] = fVal3; - break; - case "v4": - float fVal4 = float.Parse( value ); - texture.dataUniform[3] = fVal4; - break; - } - } - - - - - - } + UndoableEnterableFloatField( tRect, ref texture.dataUniform.z, "B channel", null); + tRect.x += tRect.width; + UndoableEnterableFloatField( tRect, ref texture.dataUniform.w, "A channel", null); + + } + + public override string SerializeSpecialData() { + string s = "v1:" + texture.dataUniform[0] + ","; + s += "v2:" + texture.dataUniform[1] + ","; + s += "v3:" + texture.dataUniform[2] + ","; + s += "v4:" + texture.dataUniform[3]; + return s; + } + + public override void DeserializeSpecialData( string key, string value ) { + switch( key ) { + case "v1": + float fVal1 = float.Parse( value ); + texture.dataUniform[0] = fVal1; + break; + case "v2": + float fVal2 = float.Parse( value ); + texture.dataUniform[1] = fVal2; + break; + case "v3": + float fVal3 = float.Parse( value ); + texture.dataUniform[2] = fVal3; + break; + case "v4": + float fVal4 = float.Parse( value ); + texture.dataUniform[3] = fVal4; + break; + } + } + + + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector4.cs.meta b/Editor/Code/_Nodes/SFN_Vector4.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector4.cs.meta rename to Editor/Code/_Nodes/SFN_Vector4.cs.meta index a6483068..dc1a5ce7 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector4.cs.meta +++ b/Editor/Code/_Nodes/SFN_Vector4.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 6cd58b55cabc56347876d1fad012dbb4 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 6cd58b55cabc56347876d1fad012dbb4 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector4Property.cs b/Editor/Code/_Nodes/SFN_Vector4Property.cs old mode 100755 new mode 100644 similarity index 97% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector4Property.cs rename to Editor/Code/_Nodes/SFN_Vector4Property.cs index 92da37b3..f23b7520 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector4Property.cs +++ b/Editor/Code/_Nodes/SFN_Vector4Property.cs @@ -1,112 +1,112 @@ using UnityEngine; using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - public class SFN_Vector4Property : SF_Node { - - - public SFN_Vector4Property() { - - } - - public override void Initialize() { - base.Initialize( "Vector 4" ); - base.showColor = true; +using System.Collections; + +namespace ShaderForge { + + public class SFN_Vector4Property : SF_Node { + + + public SFN_Vector4Property() { + + } + + public override void Initialize() { + base.Initialize( "Vector 4" ); + base.showColor = true; base.UseLowerPropertyBox( true ); - base.neverDefineVariable = true; - base.texture.uniform = true; - base.texture.CompCount = 4; - base.shaderGenMode = ShaderGenerationMode.OffUniform; - lowerRect.width /= 4; - - property = ScriptableObject.CreateInstance().Initialize( this ); - + base.neverDefineVariable = true; + base.texture.uniform = true; + base.texture.CompCount = 4; + base.shaderGenMode = ShaderGenerationMode.OffUniform; + lowerRect.width /= 4; + + property = ScriptableObject.CreateInstance().Initialize( this ); + connectors = new SF_NodeConnector[]{ SF_NodeConnector.Create(this,"XYZ","XYZ",ConType.cOutput,ValueType.VTv3) .Outputting(OutChannel.RGB), SF_NodeConnector.Create(this,"X","X",ConType.cOutput,ValueType.VTv1) .WithColor(Color.red) .Outputting(OutChannel.R), SF_NodeConnector.Create(this,"Y","Y",ConType.cOutput,ValueType.VTv1) .WithColor(Color.green) .Outputting(OutChannel.G), SF_NodeConnector.Create(this,"Z","Z",ConType.cOutput,ValueType.VTv1) .WithColor(Color.blue) .Outputting(OutChannel.B), SF_NodeConnector.Create(this,"W","W",ConType.cOutput,ValueType.VTv1) .Outputting(OutChannel.A) - }; - } - - public override bool IsUniformOutput() { - return true; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return property.GetVariable(); - } - - - public override void DrawLowerPropertyBox() { - - Vector4 vecPrev = texture.dataUniform; - - if( !IsGlobalProperty() && selected && !SF_GUI.MultiSelectModifierHeld() ) - ColorPickerCorner( lowerRect ); - + }; + } + + public override bool IsUniformOutput() { + return true; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return property.GetVariable(); + } + + + public override void DrawLowerPropertyBox() { + + Vector4 vecPrev = texture.dataUniform; + + if( !IsGlobalProperty() && selected && !SF_GUI.MultiSelectModifierHeld() ) + ColorPickerCorner( lowerRect ); + PrepareWindowColor(); if(IsGlobalProperty()){ texture.dataUniform[0] = texture.dataUniform[1] = texture.dataUniform[2] = 0.5f; texture.dataUniform[3] = 1f; GUI.enabled = false; - } - Rect tRect = lowerRect; - texture.dataUniform[0] = UndoableFloatField(tRect, texture.dataUniform[0], "R channel"); - tRect.x += tRect.width; - texture.dataUniform[1] = UndoableFloatField(tRect, texture.dataUniform[1], "G channel"); - tRect.x += tRect.width; - texture.dataUniform[2] = UndoableFloatField(tRect, texture.dataUniform[2], "B channel"); - tRect.x += tRect.width; + } + Rect tRect = lowerRect; + texture.dataUniform[0] = UndoableFloatField(tRect, texture.dataUniform[0], "R channel"); + tRect.x += tRect.width; + texture.dataUniform[1] = UndoableFloatField(tRect, texture.dataUniform[1], "G channel"); + tRect.x += tRect.width; + texture.dataUniform[2] = UndoableFloatField(tRect, texture.dataUniform[2], "B channel"); + tRect.x += tRect.width; texture.dataUniform[3] = UndoableFloatField(tRect, texture.dataUniform[3], "A channel"); if(IsGlobalProperty()){ GUI.enabled = true; - } - ResetWindowColor(); - if( texture.dataUniform != vecPrev ) { - OnUpdateNode( NodeUpdateType.Soft ); - editor.shaderEvaluator.ApplyProperty( this ); - } - - } - - public override string SerializeSpecialData() { + } + ResetWindowColor(); + if( texture.dataUniform != vecPrev ) { + OnUpdateNode( NodeUpdateType.Soft ); + editor.shaderEvaluator.ApplyProperty( this ); + } + + } + + public override string SerializeSpecialData() { string s = property.Serialize() + ","; - s += "v1:" + texture.dataUniform[0] + ","; - s += "v2:" + texture.dataUniform[1] + ","; - s += "v3:" + texture.dataUniform[2] + ","; - s += "v4:" + texture.dataUniform[3]; - return s; - } - + s += "v1:" + texture.dataUniform[0] + ","; + s += "v2:" + texture.dataUniform[1] + ","; + s += "v3:" + texture.dataUniform[2] + ","; + s += "v4:" + texture.dataUniform[3]; + return s; + } + public override void DeserializeSpecialData( string key, string value ) { - property.Deserialize(key,value); - switch( key ) { - case "v1": - float fVal1 = float.Parse( value ); - texture.dataUniform[0] = fVal1; - break; - case "v2": - float fVal2 = float.Parse( value ); - texture.dataUniform[1] = fVal2; - break; - case "v3": - float fVal3 = float.Parse( value ); - texture.dataUniform[2] = fVal3; - break; - case "v4": - float fVal4 = float.Parse( value ); - texture.dataUniform[3] = fVal4; - break; - } - } - - - - - - } + property.Deserialize(key,value); + switch( key ) { + case "v1": + float fVal1 = float.Parse( value ); + texture.dataUniform[0] = fVal1; + break; + case "v2": + float fVal2 = float.Parse( value ); + texture.dataUniform[1] = fVal2; + break; + case "v3": + float fVal3 = float.Parse( value ); + texture.dataUniform[2] = fVal3; + break; + case "v4": + float fVal4 = float.Parse( value ); + texture.dataUniform[3] = fVal4; + break; + } + } + + + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector4Property.cs.meta b/Editor/Code/_Nodes/SFN_Vector4Property.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector4Property.cs.meta rename to Editor/Code/_Nodes/SFN_Vector4Property.cs.meta index 4f04747b..322dfb3d --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_Vector4Property.cs.meta +++ b/Editor/Code/_Nodes/SFN_Vector4Property.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 23b7c804c8bc56748a714271c303569f -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 23b7c804c8bc56748a714271c303569f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_VectorProjection.cs b/Editor/Code/_Nodes/SFN_VectorProjection.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_VectorProjection.cs rename to Editor/Code/_Nodes/SFN_VectorProjection.cs index f7028ae2..5e623e7d --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_VectorProjection.cs +++ b/Editor/Code/_Nodes/SFN_VectorProjection.cs @@ -1,59 +1,59 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -using System; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_VectorProjection : SF_Node_Arithmetic { - - public SFN_VectorProjection() { - - } - - public override void Initialize() { - base.Initialize( "Vector Project." ); - base.PrepareArithmetic( 2 ); - base.shaderGenMode = ShaderGenerationMode.CustomFunction; - GetConnectorByStringID("A").usageCount = 1; - GetConnectorByStringID("B").usageCount = 4; - } - - public override string[] GetBlitOutputLines() { - string dotLeft = "_b * dot(_a,_b)"; - string dotRight = "dot(_b,_b)"; - string retStr = "(" + dotLeft + "/" + dotRight + ")"; - return new string[] { retStr }; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - - string a = GetConnectorByStringID( "A" ).TryEvaluate(); - string b = GetConnectorByStringID( "B" ).TryEvaluate(); - - string dotLeft = b + " * dot(" + a + "," + b + ")"; - string dotRight = "dot(" + b + "," + b + ")"; - - string retStr = "(" + dotLeft + "/" + dotRight + ")"; - - return retStr; - } - - public override Vector4 EvalCPU() { - - Vector4 a = GetInputData( "A" ).dataUniform; - Vector4 b = GetInputData( "B" ).dataUniform; - - int cc = Mathf.Max(GetInputCon( "A" ).GetCompCount(), GetInputCon( "B" ).GetCompCount()); - - float dotLeft = SF_Tools.Dot( a, b, cc ); - float dotRight = SF_Tools.Dot( b, b, cc ); - - Vector4 retVec = (dotLeft/dotRight) * b; - - return retVec; - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; +using System; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_VectorProjection : SF_Node_Arithmetic { + + public SFN_VectorProjection() { + + } + + public override void Initialize() { + base.Initialize( "Vector Project." ); + base.PrepareArithmetic( 2 ); + base.shaderGenMode = ShaderGenerationMode.CustomFunction; + GetConnectorByStringID("A").usageCount = 1; + GetConnectorByStringID("B").usageCount = 4; + } + + public override string[] GetBlitOutputLines() { + string dotLeft = "_b * dot(_a,_b)"; + string dotRight = "dot(_b,_b)"; + string retStr = "(" + dotLeft + "/" + dotRight + ")"; + return new string[] { retStr }; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + + string a = GetConnectorByStringID( "A" ).TryEvaluate(); + string b = GetConnectorByStringID( "B" ).TryEvaluate(); + + string dotLeft = b + " * dot(" + a + "," + b + ")"; + string dotRight = "dot(" + b + "," + b + ")"; + + string retStr = "(" + dotLeft + "/" + dotRight + ")"; + + return retStr; + } + + public override Vector4 EvalCPU() { + + Vector4 a = GetInputData( "A" ).dataUniform; + Vector4 b = GetInputData( "B" ).dataUniform; + + int cc = Mathf.Max(GetInputCon( "A" ).GetCompCount(), GetInputCon( "B" ).GetCompCount()); + + float dotLeft = SF_Tools.Dot( a, b, cc ); + float dotRight = SF_Tools.Dot( b, b, cc ); + + Vector4 retVec = (dotLeft/dotRight) * b; + + return retVec; + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_VectorProjection.cs.meta b/Editor/Code/_Nodes/SFN_VectorProjection.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_VectorProjection.cs.meta rename to Editor/Code/_Nodes/SFN_VectorProjection.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_VectorRejection.cs b/Editor/Code/_Nodes/SFN_VectorRejection.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_VectorRejection.cs rename to Editor/Code/_Nodes/SFN_VectorRejection.cs index 95eb7e1d..29b01aab --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_VectorRejection.cs +++ b/Editor/Code/_Nodes/SFN_VectorRejection.cs @@ -1,59 +1,59 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -using System; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_VectorRejection : SF_Node_Arithmetic { - - public SFN_VectorRejection() { - - } - - public override void Initialize() { - base.Initialize( "Vector Reject." ); - base.PrepareArithmetic( 2 ); - base.shaderGenMode = ShaderGenerationMode.CustomFunction; - GetConnectorByStringID("A").usageCount = 2; - GetConnectorByStringID("B").usageCount = 4; - } - - public override string[] GetBlitOutputLines() { - string dotLeft = "_b * dot(_a,_b)"; - string dotRight = "dot(_b,_b)"; - string retStr = "(_a - (" + dotLeft + "/" + dotRight + "))"; - return new string[] { retStr }; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - - string a = GetConnectorByStringID( "A" ).TryEvaluate(); - string b = GetConnectorByStringID( "B" ).TryEvaluate(); - - string dotLeft = b + " * dot(" + a + "," + b + ")"; - string dotRight = "dot(" + b + "," + b + ")"; - - string retStr = "(" + a + " - (" + dotLeft + "/" + dotRight + "))"; - - return retStr; - } - - public override Vector4 EvalCPU() { - - Vector4 a = GetInputData( "A" ).dataUniform; - Vector4 b = GetInputData( "B" ).dataUniform; - - int cc = Mathf.Max(GetInputCon( "A" ).GetCompCount(), GetInputCon( "B" ).GetCompCount()); - - float dotLeft = SF_Tools.Dot( a, b, cc ); - float dotRight = SF_Tools.Dot( b, b, cc ); - - Vector4 retVec = a - (dotLeft/dotRight) * b; - - return retVec; - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; +using System; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_VectorRejection : SF_Node_Arithmetic { + + public SFN_VectorRejection() { + + } + + public override void Initialize() { + base.Initialize( "Vector Reject." ); + base.PrepareArithmetic( 2 ); + base.shaderGenMode = ShaderGenerationMode.CustomFunction; + GetConnectorByStringID("A").usageCount = 2; + GetConnectorByStringID("B").usageCount = 4; + } + + public override string[] GetBlitOutputLines() { + string dotLeft = "_b * dot(_a,_b)"; + string dotRight = "dot(_b,_b)"; + string retStr = "(_a - (" + dotLeft + "/" + dotRight + "))"; + return new string[] { retStr }; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + + string a = GetConnectorByStringID( "A" ).TryEvaluate(); + string b = GetConnectorByStringID( "B" ).TryEvaluate(); + + string dotLeft = b + " * dot(" + a + "," + b + ")"; + string dotRight = "dot(" + b + "," + b + ")"; + + string retStr = "(" + a + " - (" + dotLeft + "/" + dotRight + "))"; + + return retStr; + } + + public override Vector4 EvalCPU() { + + Vector4 a = GetInputData( "A" ).dataUniform; + Vector4 b = GetInputData( "B" ).dataUniform; + + int cc = Mathf.Max(GetInputCon( "A" ).GetCompCount(), GetInputCon( "B" ).GetCompCount()); + + float dotLeft = SF_Tools.Dot( a, b, cc ); + float dotRight = SF_Tools.Dot( b, b, cc ); + + Vector4 retVec = a - (dotLeft/dotRight) * b; + + return retVec; + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_VectorRejection.cs.meta b/Editor/Code/_Nodes/SFN_VectorRejection.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_VectorRejection.cs.meta rename to Editor/Code/_Nodes/SFN_VectorRejection.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_VertexColor.cs b/Editor/Code/_Nodes/SFN_VertexColor.cs old mode 100755 new mode 100644 similarity index 97% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_VertexColor.cs rename to Editor/Code/_Nodes/SFN_VertexColor.cs index c05b0a49..ae5b7ada --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_VertexColor.cs +++ b/Editor/Code/_Nodes/SFN_VertexColor.cs @@ -1,35 +1,35 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_VertexColor : SF_Node { - - - public SFN_VertexColor() { - - } - - public override void Initialize() { - base.Initialize( "Vertex Color", InitialPreviewRenderMode.BlitSphere ); - base.showColor = true; - base.UseLowerPropertyBox( false ); - base.texture.CompCount = 4; - base.neverDefineVariable = true; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"RGB","RGB",ConType.cOutput,ValueType.VTv3,false).Outputting(OutChannel.RGB), - SF_NodeConnector.Create(this,"R","R",ConType.cOutput, ValueType.VTv1) .WithColor(Color.red) .Outputting(OutChannel.R), - SF_NodeConnector.Create(this,"G","G",ConType.cOutput,ValueType.VTv1) .WithColor(Color.green) .Outputting(OutChannel.G), - SF_NodeConnector.Create(this,"B","B",ConType.cOutput,ValueType.VTv1) .WithColor(Color.blue) .Outputting(OutChannel.B), - SF_NodeConnector.Create(this,"A","A",ConType.cOutput,ValueType.VTv1) .Outputting(OutChannel.A) - }; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return SF_Evaluator.WithProgramPrefix( "vertexColor" ); - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_VertexColor : SF_Node { + + + public SFN_VertexColor() { + + } + + public override void Initialize() { + base.Initialize( "Vertex Color", InitialPreviewRenderMode.BlitSphere ); + base.showColor = true; + base.UseLowerPropertyBox( false ); + base.texture.CompCount = 4; + base.neverDefineVariable = true; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"RGB","RGB",ConType.cOutput,ValueType.VTv3,false).Outputting(OutChannel.RGB), + SF_NodeConnector.Create(this,"R","R",ConType.cOutput, ValueType.VTv1) .WithColor(Color.red) .Outputting(OutChannel.R), + SF_NodeConnector.Create(this,"G","G",ConType.cOutput,ValueType.VTv1) .WithColor(Color.green) .Outputting(OutChannel.G), + SF_NodeConnector.Create(this,"B","B",ConType.cOutput,ValueType.VTv1) .WithColor(Color.blue) .Outputting(OutChannel.B), + SF_NodeConnector.Create(this,"A","A",ConType.cOutput,ValueType.VTv1) .Outputting(OutChannel.A) + }; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return SF_Evaluator.WithProgramPrefix( "vertexColor" ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_VertexColor.cs.meta b/Editor/Code/_Nodes/SFN_VertexColor.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_VertexColor.cs.meta rename to Editor/Code/_Nodes/SFN_VertexColor.cs.meta index 88c5b423..d18a436f --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_VertexColor.cs.meta +++ b/Editor/Code/_Nodes/SFN_VertexColor.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 8e5d87afa7814f644a9e0493dd32ca91 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 8e5d87afa7814f644a9e0493dd32ca91 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ViewPosition.cs b/Editor/Code/_Nodes/SFN_ViewPosition.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ViewPosition.cs rename to Editor/Code/_Nodes/SFN_ViewPosition.cs index 8ce23357..9361a500 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ViewPosition.cs +++ b/Editor/Code/_Nodes/SFN_ViewPosition.cs @@ -1,38 +1,38 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_ViewPosition : SF_Node { - - - public SFN_ViewPosition() { - - } - - public override void Initialize() { - base.Initialize( "View Pos.", InitialPreviewRenderMode.BlitQuad ); - base.showColor = true; - base.UseLowerPropertyBox( false ); - base.texture.CompCount = 3; - base.neverDefineVariable = true; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"XYZ","XYZ",ConType.cOutput,ValueType.VTv3,false), - SF_NodeConnector.Create(this,"X","X",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.R).WithColor(Color.red), - SF_NodeConnector.Create(this,"Y","Y",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.G).WithColor(Color.green), - SF_NodeConnector.Create(this,"Z","Z",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.B).WithColor(Color.blue) - }; - } - - public override Vector4 EvalCPU() { - return new Color( 0f, 0.7071068f, 0.7071068f, 0f ); - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "_WorldSpaceCameraPos"; - } - - } +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_ViewPosition : SF_Node { + + + public SFN_ViewPosition() { + + } + + public override void Initialize() { + base.Initialize( "View Pos.", InitialPreviewRenderMode.BlitQuad ); + base.showColor = true; + base.UseLowerPropertyBox( false ); + base.texture.CompCount = 3; + base.neverDefineVariable = true; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"XYZ","XYZ",ConType.cOutput,ValueType.VTv3,false), + SF_NodeConnector.Create(this,"X","X",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.R).WithColor(Color.red), + SF_NodeConnector.Create(this,"Y","Y",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.G).WithColor(Color.green), + SF_NodeConnector.Create(this,"Z","Z",ConType.cOutput,ValueType.VTv1,false).Outputting(OutChannel.B).WithColor(Color.blue) + }; + } + + public override Vector4 EvalCPU() { + return new Color( 0f, 0.7071068f, 0.7071068f, 0f ); + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "_WorldSpaceCameraPos"; + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ViewPosition.cs.meta b/Editor/Code/_Nodes/SFN_ViewPosition.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ViewPosition.cs.meta rename to Editor/Code/_Nodes/SFN_ViewPosition.cs.meta index e068de70..397438ca --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ViewPosition.cs.meta +++ b/Editor/Code/_Nodes/SFN_ViewPosition.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 2aeeefb42d9a9784dabd94b3d82c05bc -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 2aeeefb42d9a9784dabd94b3d82c05bc +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ViewReflectionVector.cs b/Editor/Code/_Nodes/SFN_ViewReflectionVector.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ViewReflectionVector.cs rename to Editor/Code/_Nodes/SFN_ViewReflectionVector.cs index 71455e59..683551f3 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ViewReflectionVector.cs +++ b/Editor/Code/_Nodes/SFN_ViewReflectionVector.cs @@ -1,31 +1,31 @@ using UnityEngine; using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_ViewReflectionVector : SF_Node { - - - public SFN_ViewReflectionVector() { - - } - - public override void Initialize() { - base.Initialize( "View Refl.", InitialPreviewRenderMode.BlitSphere ); - base.showColor = true; - base.UseLowerPropertyBox( false ); - base.texture.CompCount = 3; - base.neverDefineVariable = true; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_ViewReflectionVector : SF_Node { + + + public SFN_ViewReflectionVector() { + + } + + public override void Initialize() { + base.Initialize( "View Refl.", InitialPreviewRenderMode.BlitSphere ); + base.showColor = true; + base.UseLowerPropertyBox( false ); + base.texture.CompCount = 3; + base.neverDefineVariable = true; connectors = new SF_NodeConnector[]{ SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv3,false) - }; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "viewReflectDirection"; - } - - } + }; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "viewReflectDirection"; + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ViewReflectionVector.cs.meta b/Editor/Code/_Nodes/SFN_ViewReflectionVector.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ViewReflectionVector.cs.meta rename to Editor/Code/_Nodes/SFN_ViewReflectionVector.cs.meta index d87b761d..2438c958 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ViewReflectionVector.cs.meta +++ b/Editor/Code/_Nodes/SFN_ViewReflectionVector.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 2f7ebdd9ba1b27c4e8f26cc468d8d810 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 2f7ebdd9ba1b27c4e8f26cc468d8d810 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ViewVector.cs b/Editor/Code/_Nodes/SFN_ViewVector.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ViewVector.cs rename to Editor/Code/_Nodes/SFN_ViewVector.cs index 7c3d6378..35fdc2ef --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ViewVector.cs +++ b/Editor/Code/_Nodes/SFN_ViewVector.cs @@ -1,32 +1,32 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFN_ViewVector : SF_Node { - - - public SFN_ViewVector() { - - } - - public override void Initialize() { - base.Initialize( "View Dir.", InitialPreviewRenderMode.BlitSphere ); - base.showColor = true; - base.UseLowerPropertyBox( false ); - base.texture.CompCount = 3; - base.neverDefineVariable = true; - connectors = new SF_NodeConnector[]{ - SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv3,false) - }; - } - - public override string Evaluate( OutChannel channel = OutChannel.All ) { - return "viewDirection"; - } - - } - +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFN_ViewVector : SF_Node { + + + public SFN_ViewVector() { + + } + + public override void Initialize() { + base.Initialize( "View Dir.", InitialPreviewRenderMode.BlitSphere ); + base.showColor = true; + base.UseLowerPropertyBox( false ); + base.texture.CompCount = 3; + base.neverDefineVariable = true; + connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create(this,"OUT","",ConType.cOutput,ValueType.VTv3,false) + }; + } + + public override string Evaluate( OutChannel channel = OutChannel.All ) { + return "viewDirection"; + } + + } + } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ViewVector.cs.meta b/Editor/Code/_Nodes/SFN_ViewVector.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ViewVector.cs.meta rename to Editor/Code/_Nodes/SFN_ViewVector.cs.meta index f9bcc76f..2a52258c --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SFN_ViewVector.cs.meta +++ b/Editor/Code/_Nodes/SFN_ViewVector.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: e6425e0019e46fd429bb6fb731bfb0be -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: e6425e0019e46fd429bb6fb731bfb0be +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SF_Node.cs b/Editor/Code/_Nodes/SF_Node.cs old mode 100755 new mode 100644 similarity index 99% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SF_Node.cs rename to Editor/Code/_Nodes/SF_Node.cs index acded025..4e597c6d --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SF_Node.cs +++ b/Editor/Code/_Nodes/SF_Node.cs @@ -9,19 +9,19 @@ namespace ShaderForge { - public enum NodeUpdateType { Soft, Hard }; - public enum ShaderGenerationMode { - OffUniform, // No shader written - Modal, // Requires modes or C# intervention, Array of suffixes & Array of custom outputs - Manual, // Fully manually written - ManualModal, // Manually written, with modes - ValuePassing, // Floats are sent from the node to the material before render - SimpleFunction, // Generates a name(inputs) - CustomFunction, // Generates a custom output line - ModularInput // Generates 5 shaders for different input counts - }; - - public enum InitialPreviewRenderMode { Off, BlitQuad, BlitSphere }; + public enum NodeUpdateType { Soft, Hard }; + public enum ShaderGenerationMode { + OffUniform, // No shader written + Modal, // Requires modes or C# intervention, Array of suffixes & Array of custom outputs + Manual, // Fully manually written + ManualModal, // Manually written, with modes + ValuePassing, // Floats are sent from the node to the material before render + SimpleFunction, // Generates a name(inputs) + CustomFunction, // Generates a custom output line + ModularInput // Generates 5 shaders for different input counts + }; + + public enum InitialPreviewRenderMode { Off, BlitQuad, BlitSphere }; [System.Serializable] @@ -32,8 +32,8 @@ public class SF_Node : ScriptableObject, IDependable { public const int NODE_HEIGHT = NODE_SIZE + 16; // This fits a NODE_SIZE texture inside public int node_width = NODE_WIDTH; - public int node_height = NODE_HEIGHT; - + public int node_height = NODE_HEIGHT; + public ShaderGenerationMode shaderGenMode = ShaderGenerationMode.Manual; public int depth = 0; // Used when deserializing and updating @@ -265,10 +265,10 @@ public bool IsProperty() { public bool IsGlobalProperty(){ return IsProperty() ? property.global : false; - } - - public virtual bool UpdatesOverTime() { - return false; // Override on nodes like Time, Panner and Rotator + } + + public virtual bool UpdatesOverTime() { + return false; // Override on nodes like Time, Panner and Rotator } @@ -296,8 +296,8 @@ public string GetVariableType() { else return precision.ToCode() + "4"; } - } - + } + if( this is SFN_Code ) { if( GetConnectorByStringID( "OUT" ).IsConnected() ) { if( GetConnectorByStringID( "OUT" ).valueType == ValueType.VTm4x4) @@ -367,11 +367,11 @@ public bool CheckIfShouldDisplayVectorDataMask(){ } return disp; } - } - - public InitialPreviewRenderMode initialPreviewMode; - - public void Initialize( string name, InitialPreviewRenderMode initialPreviewMode = InitialPreviewRenderMode.Off ) { + } + + public InitialPreviewRenderMode initialPreviewMode; + + public void Initialize( string name, InitialPreviewRenderMode initialPreviewMode = InitialPreviewRenderMode.Off ) { this.initialPreviewMode = initialPreviewMode; editor = SF_Editor.instance; // TODO, pass in a better way status = ScriptableObject.CreateInstance().Initialize(this); @@ -381,50 +381,50 @@ public void Initialize( string name, InitialPreviewRenderMode initialPreviewMode if( SF_Debug.nodes ) this.nodeName = ( "[" + id + "] " + this.nodeName ); texture = ScriptableObject.CreateInstance().Initialize( this ); - texture.Fill( Color.black ); - - - - - GenerateBaseData(); + texture.Fill( Color.black ); + + + + + GenerateBaseData(); + - - texture.LoadAndInitializeIcons(this.GetType()); - - - + texture.LoadAndInitializeIcons(this.GetType()); + + + /* // Try to find icon if(vectorDataTexture){ vectorDataNode = true; displayVectorDataMask = true; texture.LoadDataTexture(this.GetType()); - }*/ - - + }*/ + + pos = editor.nodeView.ScreenSpaceToZoomSpace( pos ); InitializeDefaultRect( pos ); - } - - public void GenerateBaseData() { - if( initialPreviewMode != InitialPreviewRenderMode.Off ) { - bool preferQuad = initialPreviewMode == InitialPreviewRenderMode.BlitQuad; - bool sphereWhen3D = SF_Settings.nodeRenderMode != NodeRenderMode.Viewport; - bool canRenderQuads = SF_Settings.nodeRenderMode == NodeRenderMode.Mixed; - - if( preferQuad && canRenderQuads ) { - vectorDataNode = false; // ? - displayVectorDataMask = false; - texture.GenerateBaseData( render3D: false ); - } else { - vectorDataNode = sphereWhen3D; - displayVectorDataMask = sphereWhen3D; - texture.GenerateBaseData( render3D: true ); - } - - } else if( texture.uniform && IsUniformOutput() ) { - texture.GenerateBaseData( false ); - } + } + + public void GenerateBaseData() { + if( initialPreviewMode != InitialPreviewRenderMode.Off ) { + bool preferQuad = initialPreviewMode == InitialPreviewRenderMode.BlitQuad; + bool sphereWhen3D = SF_Settings.nodeRenderMode != NodeRenderMode.Viewport; + bool canRenderQuads = SF_Settings.nodeRenderMode == NodeRenderMode.Mixed; + + if( preferQuad && canRenderQuads ) { + vectorDataNode = false; // ? + displayVectorDataMask = false; + texture.GenerateBaseData( render3D: false ); + } else { + vectorDataNode = sphereWhen3D; + displayVectorDataMask = sphereWhen3D; + texture.GenerateBaseData( render3D: true ); + } + + } else if( texture.uniform && IsUniformOutput() ) { + texture.GenerateBaseData( false ); + } } public void AssignID() { @@ -440,15 +440,15 @@ public virtual string GetPrepareUniformsAndFunctions(){ } - public virtual void Update() { - - // TODO: REALTIME - // - if( SF_Settings.RenderNodesInRealtime() ) { - if( UpdatesOverTime() || initialPreviewMode != InitialPreviewRenderMode.Off ) { - SetDirty( UpToDateState.OutdatedSoft ); - GenerateBaseData(); - } + public virtual void Update() { + + // TODO: REALTIME + // + if( SF_Settings.RenderNodesInRealtime() ) { + if( UpdatesOverTime() || initialPreviewMode != InitialPreviewRenderMode.Off ) { + SetDirty( UpToDateState.OutdatedSoft ); + GenerateBaseData(); + } } // Override } @@ -522,23 +522,23 @@ public void UndoableToggle(Rect r, ref bool boolVar, string label, string undoAc UndoRecord((newValue ? "enable" : "disable") + " " + undoActionName); boolVar = newValue; } - } - - public Enum UndoableEnumPopup( Rect r, Enum enumValue, string undoPrefix ) { - Enum nextEnum = EditorGUI.EnumPopup( r, enumValue ); - if( nextEnum.ToString() != enumValue.ToString() ) { - string undoName = undoPrefix + " to " + nextEnum; - UndoRecord( undoName ); - enumValue = nextEnum; - } - return enumValue; + } + + public Enum UndoableEnumPopup( Rect r, Enum enumValue, string undoPrefix ) { + Enum nextEnum = EditorGUI.EnumPopup( r, enumValue ); + if( nextEnum.ToString() != enumValue.ToString() ) { + string undoName = undoPrefix + " to " + nextEnum; + UndoRecord( undoName ); + enumValue = nextEnum; + } + return enumValue; } public int UndoableEnumPopupNamed(Rect r, int enumValue, string[] names, string undoPrefix){ int nextEnum = EditorGUI.Popup( r, enumValue, names ); if(nextEnum != enumValue){ string undoName = undoPrefix + " to " + nextEnum; - UndoRecord(undoName); + UndoRecord(undoName); return nextEnum; } return enumValue; @@ -685,20 +685,20 @@ public int UndoableEnterableTextField(Rect r, ref string str, ){ // public virtual void OnConnectedNode(){ // Debug.Log("OnConnectedNode " + name); - // } - - public void MakeChildrenOutdated( UpToDateState state ) { - foreach( SF_NodeConnector mCon in connectors ) { - if( mCon == null ) - continue; - if( mCon.conType == ConType.cOutput ) { - for( int i = 0; i < mCon.outputCons.Count; i++ ) { - SF_NodeConnector mConOut = mCon.outputCons[i]; - mConOut.node.dirtyState = state; - //mConOut.node.MakeChildrenOutdated( state ); // Recursive is super expensive - } - } - } + // } + + public void MakeChildrenOutdated( UpToDateState state ) { + foreach( SF_NodeConnector mCon in connectors ) { + if( mCon == null ) + continue; + if( mCon.conType == ConType.cOutput ) { + for( int i = 0; i < mCon.outputCons.Count; i++ ) { + SF_NodeConnector mConOut = mCon.outputCons[i]; + mConOut.node.dirtyState = state; + //mConOut.node.MakeChildrenOutdated( state ); // Recursive is super expensive + } + } + } } public virtual void OnUpdateNode( NodeUpdateType updType = NodeUpdateType.Hard, bool cascade = true ) { @@ -713,13 +713,13 @@ public virtual void OnUpdateNode( NodeUpdateType updType = NodeUpdateType.Hard, if( !InputsConnected() ) { //Debug.Log("Detected missing input on obj " + name); texture.OnLostConnection(); - } - - // Update texture if it's uniform for things like Color/Value etc. - if( texture.uniform ) { - //Debug.Log("Blitting uniform " + texture.dataUniform); - PrepareRendering( SF_Blit.mat ); - texture.GenerateBaseData(); + } + + // Update texture if it's uniform for things like Color/Value etc. + if( texture.uniform ) { + //Debug.Log("Blitting uniform " + texture.dataUniform); + PrepareRendering( SF_Blit.mat ); + texture.GenerateBaseData(); } RefreshValue(); // Refresh this value @@ -734,9 +734,9 @@ public virtual void OnUpdateNode( NodeUpdateType updType = NodeUpdateType.Hard, continue; if( mCon.conType == ConType.cOutput ) { for (int i = 0; i < mCon.outputCons.Count; i++) { - SF_NodeConnector mConOut = mCon.outputCons [i]; - UpToDateState state = (updType == NodeUpdateType.Soft) ? UpToDateState.OutdatedSoft : UpToDateState.OutdatedHard; - mConOut.node.dirtyState = state; + SF_NodeConnector mConOut = mCon.outputCons [i]; + UpToDateState state = (updType == NodeUpdateType.Soft) ? UpToDateState.OutdatedSoft : UpToDateState.OutdatedHard; + mConOut.node.dirtyState = state; mConOut.node.MakeChildrenOutdated( state ); //mConOut.node.OnUpdateNode (updType); // TODO Null ref @@ -770,116 +770,116 @@ public void SetExtensionConnectorChain(params string[] cNames){ con = conNew; } - } - - string BlitShaderBasePath() { - return GetType().Name; - } - - public bool IsModal() { - return shaderGenMode == ShaderGenerationMode.ManualModal || shaderGenMode == ShaderGenerationMode.Modal; - } - - public string GetBlitShaderPath() { - string suffix = GetBlitShaderSuffix(); - if( !string.IsNullOrEmpty( suffix ) ) { - return BlitShaderBasePath() + "_" + suffix; - } else { - string modalMode = ""; - if( IsModal() ) { - modalMode = GetCurrentModalMode(); - } - if( string.IsNullOrEmpty( modalMode ) ) { - return BlitShaderBasePath(); - } else { - return BlitShaderBasePath() + "_" + modalMode; - } - } - } - - public virtual string GetCurrentModalMode() { - if( IsModal() ) { - Debug.LogError( "Missing GetCurrentModalMode() override on " + nodeName ); - } else { - Debug.LogError( "Calling GetCurrentModalMode() on " + nodeName + " which isn't supposed to call GetCurrentModalMode" ); - } - return ""; - } - - public virtual string[] GetModalModes() { - if( IsModal() ) { - Debug.LogError( "Missing GetModalModes() override on " + nodeName ); - } else { - Debug.LogError( "Calling GetModalModes() on " + nodeName + " which isn't supposed to call GetModalModes" ); - } - return null; - } - - public virtual string[] GetBlitOutputLines( string mode ) { - if( IsModal() ) { - Debug.LogError( "Missing GetBlitOutputLines(mode) override on " + nodeName ); - } else { - Debug.LogError( "Calling GetBlitOutputLines(mode) on " + nodeName + " which isn't supposed to call GetBlitOutputLines" ); - } - return null; - } - - public virtual string[] GetBlitOutputLines() { - if( shaderGenMode == ShaderGenerationMode.CustomFunction || shaderGenMode == ShaderGenerationMode.ValuePassing ) { - Debug.LogError( "Missing GetBlitOutputLines() override on " + nodeName ); - } else { - Debug.LogError( "Calling GetBlitOutputLines() on " + nodeName + " which isn't supposed to read a custom output line" ); - } - return null; - } - - public virtual string[] ExtraPassedFloatProperties() { - return null; - } - - public virtual string GetBlitShaderSuffix() { - if( shaderGenMode == ShaderGenerationMode.ModularInput ) { - return GetComboInputSuffix(); - } - return string.Empty; - } - - public virtual void GetModularShaderFixes( out string prefix, out string infix, out string suffix ) { - if( shaderGenMode == ShaderGenerationMode.ModularInput ) { - Debug.LogError( "Failed to get modular input fixes shader for " + nodeName ); - } else { - Debug.LogError( "Tried to run GetModularShaderFixes() for the non-modular " + nodeName); - } - prefix = infix = suffix = string.Empty; - } - - public string GetComboInputSuffix() { - - int conCount = 0; - - if( GetInputIsConnected( "A" ) ) - conCount++; - else - return string.Empty; - - if( GetInputIsConnected( "B" ) ) - conCount++; - else - return string.Empty; - - if( GetInputIsConnected( "C" ) ) - conCount++; - if( GetInputIsConnected( "D" ) ) - conCount++; - if( GetInputIsConnected( "E" ) ) - conCount++; - - return conCount.ToString(); - } - - - public virtual void PrepareRendering( Material mat ) { - // Override + } + + string BlitShaderBasePath() { + return GetType().Name; + } + + public bool IsModal() { + return shaderGenMode == ShaderGenerationMode.ManualModal || shaderGenMode == ShaderGenerationMode.Modal; + } + + public string GetBlitShaderPath() { + string suffix = GetBlitShaderSuffix(); + if( !string.IsNullOrEmpty( suffix ) ) { + return BlitShaderBasePath() + "_" + suffix; + } else { + string modalMode = ""; + if( IsModal() ) { + modalMode = GetCurrentModalMode(); + } + if( string.IsNullOrEmpty( modalMode ) ) { + return BlitShaderBasePath(); + } else { + return BlitShaderBasePath() + "_" + modalMode; + } + } + } + + public virtual string GetCurrentModalMode() { + if( IsModal() ) { + Debug.LogError( "Missing GetCurrentModalMode() override on " + nodeName ); + } else { + Debug.LogError( "Calling GetCurrentModalMode() on " + nodeName + " which isn't supposed to call GetCurrentModalMode" ); + } + return ""; + } + + public virtual string[] GetModalModes() { + if( IsModal() ) { + Debug.LogError( "Missing GetModalModes() override on " + nodeName ); + } else { + Debug.LogError( "Calling GetModalModes() on " + nodeName + " which isn't supposed to call GetModalModes" ); + } + return null; + } + + public virtual string[] GetBlitOutputLines( string mode ) { + if( IsModal() ) { + Debug.LogError( "Missing GetBlitOutputLines(mode) override on " + nodeName ); + } else { + Debug.LogError( "Calling GetBlitOutputLines(mode) on " + nodeName + " which isn't supposed to call GetBlitOutputLines" ); + } + return null; + } + + public virtual string[] GetBlitOutputLines() { + if( shaderGenMode == ShaderGenerationMode.CustomFunction || shaderGenMode == ShaderGenerationMode.ValuePassing ) { + Debug.LogError( "Missing GetBlitOutputLines() override on " + nodeName ); + } else { + Debug.LogError( "Calling GetBlitOutputLines() on " + nodeName + " which isn't supposed to read a custom output line" ); + } + return null; + } + + public virtual string[] ExtraPassedFloatProperties() { + return null; + } + + public virtual string GetBlitShaderSuffix() { + if( shaderGenMode == ShaderGenerationMode.ModularInput ) { + return GetComboInputSuffix(); + } + return string.Empty; + } + + public virtual void GetModularShaderFixes( out string prefix, out string infix, out string suffix ) { + if( shaderGenMode == ShaderGenerationMode.ModularInput ) { + Debug.LogError( "Failed to get modular input fixes shader for " + nodeName ); + } else { + Debug.LogError( "Tried to run GetModularShaderFixes() for the non-modular " + nodeName); + } + prefix = infix = suffix = string.Empty; + } + + public string GetComboInputSuffix() { + + int conCount = 0; + + if( GetInputIsConnected( "A" ) ) + conCount++; + else + return string.Empty; + + if( GetInputIsConnected( "B" ) ) + conCount++; + else + return string.Empty; + + if( GetInputIsConnected( "C" ) ) + conCount++; + if( GetInputIsConnected( "D" ) ) + conCount++; + if( GetInputIsConnected( "E" ) ) + conCount++; + + return conCount.ToString(); + } + + + public virtual void PrepareRendering( Material mat ) { + // Override } public float[] VectorCopy( float[] original ) { @@ -927,7 +927,7 @@ public virtual bool ExhaustedOptionalInputs() { return false; } - public virtual Vector4 EvalCPU() { + public virtual Vector4 EvalCPU() { return new Vector4( EvalCPU(0), EvalCPU(1), @@ -944,7 +944,7 @@ public virtual void RefreshValue() { // Override this } - public void RefreshValue( int ia, int ib ) { + public void RefreshValue( int ia, int ib ) { // Debug.Log("Refreshing value of " + nodeName); @@ -1073,18 +1073,18 @@ public SF_NodeConnection GetInputCon( int id ) { return null; } return connectors[id].inputCon; - }*/ - - public int ReadComponentCountFromFirstOutput() { - if( connectors == null ) - return 4; - for( int i = 0; i < connectors.Length; i++ ) { - if( connectors[i].conType == ConType.cOutput ) { - return connectors[i].GetCompCount(); - } - } - Debug.LogWarning("No component count could be read from " + nodeName + " (" + variableName + ")"); - return 0; + }*/ + + public int ReadComponentCountFromFirstOutput() { + if( connectors == null ) + return 4; + for( int i = 0; i < connectors.Length; i++ ) { + if( connectors[i].conType == ConType.cOutput ) { + return connectors[i].GetCompCount(); + } + } + Debug.LogWarning("No component count could be read from " + nodeName + " (" + variableName + ")"); + return 0; } public SF_NodeConnector GetInputCon( string id ) { @@ -1309,8 +1309,8 @@ public bool UnavailableInThisRenderPath(){ float commentYposCurrent; - public void DrawWindow() { - + public void DrawWindow() { + @@ -1319,7 +1319,7 @@ public void DrawWindow() { //Vector2 prev = new Vector2( rect.x, rect.y ); //int prevCont = GUIUtility.hotControl; - if(Event.current.type == EventType.repaint){ + if(Event.current.type == EventType.Repaint){ commentYposCurrent = Mathf.Lerp(commentYposCurrent, commentYposTarget, 0.4f); } @@ -1397,7 +1397,7 @@ public void DrawWindow() { string focusName = "namelabel" + this.id; - if( Event.current.type == EventType.keyDown && ( Event.current.keyCode == KeyCode.Return || Event.current.keyCode == KeyCode.KeypadEnter ) && GUI.GetNameOfFocusedControl() == focusName ) { + if( Event.current.type == EventType.KeyDown && ( Event.current.keyCode == KeyCode.Return || Event.current.keyCode == KeyCode.KeypadEnter ) && GUI.GetNameOfFocusedControl() == focusName ) { editor.Defocus(); } @@ -1509,7 +1509,7 @@ public void DrawWindow() { if(isEditingNodeTextField){ - bool clicked = Event.current.rawType == EventType.mouseDown && Event.current.button == 0; + bool clicked = Event.current.rawType == EventType.MouseDown && Event.current.button == 0; bool clickedOutside = clicked && !cr.Contains(Event.current.mousePosition); bool pressedReturn = Event.current.rawType == EventType.KeyDown && Event.current.keyCode == KeyCode.Return; @@ -1914,13 +1914,13 @@ public virtual bool Draw() { DrawHighlight(); - //if(status != null) - - if( SF_Debug.nodePreviews ) { - Rect tmp = rect; - tmp.y -= 20; - tmp.height = 20; - GUI.Label( tmp, "State: " + dirtyState ); + //if(status != null) + + if( SF_Debug.nodePreviews ) { + Rect tmp = rect; + tmp.y -= 20; + tmp.height = 20; + GUI.Label( tmp, "State: " + dirtyState ); } @@ -2041,8 +2041,8 @@ public void ColorPickerCorner( Rect r ) { GUI.DrawTexture( pickBorder, EditorGUIUtility.whiteTexture ); GUI.color = Color.white; - - + + Color pickedColor = EditorGUI.ColorField( pickRect, texture.ConvertToDisplayColor( texture.dataUniform ) ); SetColor( pickedColor, true ); @@ -2126,27 +2126,27 @@ public virtual void OnDelete() { [SerializeField] public UpToDateState dirtyState = UpToDateState.UpToDate; - public bool CheckIfDirty(){ - - if( dirtyState == UpToDateState.UpToDate ) - return false; + public bool CheckIfDirty(){ + + if( dirtyState == UpToDateState.UpToDate ) + return false; - - foreach( SF_NodeConnector con in ConnectedInputs ) { - if( con.inputCon.node.dirtyState != UpToDateState.UpToDate ) { - return false; - } - } - - NodeUpdateType updType = NodeUpdateType.Hard; - if( dirtyState == UpToDateState.OutdatedHard ) - updType = NodeUpdateType.Hard; - if( dirtyState == UpToDateState.OutdatedSoft ) + + foreach( SF_NodeConnector con in ConnectedInputs ) { + if( con.inputCon.node.dirtyState != UpToDateState.UpToDate ) { + return false; + } + } + + NodeUpdateType updType = NodeUpdateType.Hard; + if( dirtyState == UpToDateState.OutdatedHard ) + updType = NodeUpdateType.Hard; + if( dirtyState == UpToDateState.OutdatedSoft ) updType = NodeUpdateType.Soft; OnUpdateNode(updType, true); - dirtyState = UpToDateState.UpToDate; + dirtyState = UpToDateState.UpToDate; return true; } @@ -2444,6 +2444,13 @@ public static SF_Node Deserialize( string row, ref List linkList) { if(SF_Debug.deserialization) Debug.Log("Deserializing node: " + s); string[] split = s.Split( ':' ); + if(split.Length<2) + { + string[] newsplit=new string[2]; + newsplit[0]=split[0]; + newsplit[1]=""; + split=newsplit; + } string dKey = split[0]; string dValue = split[1]; @@ -2498,7 +2505,7 @@ public static SF_Node Deserialize( string row, ref List linkList) { linkList.Add( new SF_Link( node.id, s ) ); } - // Update image if needed + // Update image if needed node.GenerateBaseData(); diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SF_Node.cs.meta b/Editor/Code/_Nodes/SF_Node.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SF_Node.cs.meta rename to Editor/Code/_Nodes/SF_Node.cs.meta index 4948a6c3..50ae0b1a --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SF_Node.cs.meta +++ b/Editor/Code/_Nodes/SF_Node.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 5aedfe1c90dc2284b8220346c3a38f39 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 5aedfe1c90dc2284b8220346c3a38f39 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SF_Node_Arithmetic.cs b/Editor/Code/_Nodes/SF_Node_Arithmetic.cs old mode 100755 new mode 100644 similarity index 97% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SF_Node_Arithmetic.cs rename to Editor/Code/_Nodes/SF_Node_Arithmetic.cs index 48e6faf1..47f95a70 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SF_Node_Arithmetic.cs +++ b/Editor/Code/_Nodes/SF_Node_Arithmetic.cs @@ -1,43 +1,43 @@ using UnityEngine; using UnityEditor; using System.Collections; -using System; - -namespace ShaderForge { - [System.Serializable] - public class SF_Node_Arithmetic : SF_Node { - - public void PrepareArithmetic(int inputCount = 2, ValueType inputType = ValueType.VTvPending, ValueType outputType = ValueType.VTvPending) { - base.showColor = true; - UseLowerReadonlyValues( true ); - - - if( inputCount == 2 ) { +using System; + +namespace ShaderForge { + [System.Serializable] + public class SF_Node_Arithmetic : SF_Node { + + public void PrepareArithmetic(int inputCount = 2, ValueType inputType = ValueType.VTvPending, ValueType outputType = ValueType.VTvPending) { + base.showColor = true; + UseLowerReadonlyValues( true ); + + + if( inputCount == 2 ) { connectors = new SF_NodeConnector[]{ SF_NodeConnector.Create( this, "OUT", "", ConType.cOutput, outputType, false ), SF_NodeConnector.Create( this, "A", "A", ConType.cInput, inputType, false ).SetRequired( true ), - SF_NodeConnector.Create( this, "B", "B", ConType.cInput, inputType, false ).SetRequired( true )}; - base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1], connectors[2] ); - } else if( inputCount == 1 ){ - connectors = new SF_NodeConnector[]{ + SF_NodeConnector.Create( this, "B", "B", ConType.cInput, inputType, false ).SetRequired( true )}; + base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1], connectors[2] ); + } else if( inputCount == 1 ){ + connectors = new SF_NodeConnector[]{ SF_NodeConnector.Create( this, "OUT", "", ConType.cOutput, outputType, false ), - SF_NodeConnector.Create( this, "IN", "", ConType.cInput, inputType, false ).SetRequired( true )}; - base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1]); - } - - } - - public override int GetEvaluatedComponentCount() { - int max = 0; - foreach(SF_NodeConnector con in connectors){ - if( con.conType == ConType.cOutput || !con.IsConnected()) // Only connected ones, for now + SF_NodeConnector.Create( this, "IN", "", ConType.cInput, inputType, false ).SetRequired( true )}; + base.conGroup = ScriptableObject.CreateInstance().Initialize( connectors[0], connectors[1]); + } + + } + + public override int GetEvaluatedComponentCount() { + int max = 0; + foreach(SF_NodeConnector con in connectors){ + if( con.conType == ConType.cOutput || !con.IsConnected()) // Only connected ones, for now continue; - //Debug.Log("GetEvaluatedComponentCount from node " + nodeName + " [" + con.label + "] cc = " + con.GetCompCount()); - max = Mathf.Max( max, con.GetCompCount() ); - } - return max; - } - + //Debug.Log("GetEvaluatedComponentCount from node " + nodeName + " [" + con.label + "] cc = " + con.GetCompCount()); + max = Mathf.Max( max, con.GetCompCount() ); + } + return max; + } + public override bool IsUniformOutput() { if(InputsConnected()){ @@ -45,16 +45,16 @@ public override bool IsUniformOutput() { return ( GetInputData( "A" ).uniform && GetInputData( "B" ).uniform ); return ( GetInputData( "IN" ).uniform ); } - return true; - } - - // New system - public override void RefreshValue() { - if( connectors.Length == 3 ) + return true; + } + + // New system + public override void RefreshValue() { + if( connectors.Length == 3 ) RefreshValue( 1, 2 ); - else - RefreshValue( 1, 1 ); - } - - } + else + RefreshValue( 1, 1 ); + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SF_Node_Arithmetic.cs.meta b/Editor/Code/_Nodes/SF_Node_Arithmetic.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SF_Node_Arithmetic.cs.meta rename to Editor/Code/_Nodes/SF_Node_Arithmetic.cs.meta index 032d8046..4e783c30 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SF_Node_Arithmetic.cs.meta +++ b/Editor/Code/_Nodes/SF_Node_Arithmetic.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 7ff67b8320fb71341a7e68fac5f5560c -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 7ff67b8320fb71341a7e68fac5f5560c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SF_Node_Resizeable.cs b/Editor/Code/_Nodes/SF_Node_Resizeable.cs old mode 100755 new mode 100644 similarity index 97% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SF_Node_Resizeable.cs rename to Editor/Code/_Nodes/SF_Node_Resizeable.cs index 9f977907..143ee1a5 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SF_Node_Resizeable.cs +++ b/Editor/Code/_Nodes/SF_Node_Resizeable.cs @@ -121,7 +121,7 @@ public override void NeatWindow( ) { - bool clicked = Event.current.type == EventType.mouseDown && Event.current.button == 0; + bool clicked = Event.current.type == EventType.MouseDown && Event.current.button == 0; @@ -176,7 +176,7 @@ public override void NeatWindow( ) { - if(resizing && Event.current.type == EventType.mouseDrag){ + if(resizing && Event.current.type == EventType.MouseDrag){ if(Event.current.delta.sqrMagnitude > 0){ UndoRecord("resize node"); diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SF_Node_Resizeable.cs.meta b/Editor/Code/_Nodes/SF_Node_Resizeable.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Nodes/SF_Node_Resizeable.cs.meta rename to Editor/Code/_Nodes/SF_Node_Resizeable.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties.meta b/Editor/Code/_ShaderProperties.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties.meta rename to Editor/Code/_ShaderProperties.meta index 27b2f3f8..6b6604de --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties.meta +++ b/Editor/Code/_ShaderProperties.meta @@ -1,5 +1,5 @@ -fileFormatVersion: 2 -guid: a539d47bbd8db459ca996ac18a58303b -folderAsset: yes -DefaultImporter: - userData: +fileFormatVersion: 2 +guid: a539d47bbd8db459ca996ac18a58303b +folderAsset: yes +DefaultImporter: + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Branch.cs b/Editor/Code/_ShaderProperties/SFP_Branch.cs old mode 100755 new mode 100644 similarity index 97% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Branch.cs rename to Editor/Code/_ShaderProperties/SFP_Branch.cs index 94ff502d..3cef0758 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Branch.cs +++ b/Editor/Code/_ShaderProperties/SFP_Branch.cs @@ -1,17 +1,17 @@ using UnityEngine; using System.Collections; using System.Text.RegularExpressions; - - -namespace ShaderForge { - - [System.Serializable] - public class SFP_Branch : SF_ShaderProperty { - - public new SFP_Branch Initialize( SF_Node node ) { - base.nameType = "Static Branch"; - base.Initialize( node ); - return this; + + +namespace ShaderForge { + + [System.Serializable] + public class SFP_Branch : SF_ShaderProperty { + + public new SFP_Branch Initialize( SF_Node node ) { + base.nameType = "Static Branch"; + base.Initialize( node ); + return this; } public override void UpdateInternalName() { @@ -29,11 +29,11 @@ public override void UpdateInternalName() { // TODO: Make sure it's valid and unique nameInternal = s; - } + } public override string GetMulticompilePragma (){ return "#pragma multi_compile " + nameInternal; - } - - } + } + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Branch.cs.meta b/Editor/Code/_ShaderProperties/SFP_Branch.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Branch.cs.meta rename to Editor/Code/_ShaderProperties/SFP_Branch.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Color.cs b/Editor/Code/_ShaderProperties/SFP_Color.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Color.cs rename to Editor/Code/_ShaderProperties/SFP_Color.cs index 23a76e5c..a02d760b --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Color.cs +++ b/Editor/Code/_ShaderProperties/SFP_Color.cs @@ -1,37 +1,37 @@ using UnityEngine; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFP_Color : SF_ShaderProperty { - - - public bool isBumpmap = false; - - public new SFP_Color Initialize( SF_Node node ) { - base.nameType = "Color"; - base.Initialize( node ); - return this; - } - - public override string GetInitializationLine() { - return GetTagString() + GetVariable() + " (\"" + nameDisplay + "\", Color) = (" + GetValue().r + "," + GetValue().g + "," + GetValue().b + "," + GetValue().a + ")"; - } - - Color GetValue() { - return ( node as SFN_Color ).texture.dataUniform; - } - - public override string GetVariableLine() { - return "uniform " + node.precision.ToCode() + "4 " + GetVariable() + ";"; - } - - // TODO: Unity UV offsets - public override string GetFragmentPrepare() { - return node.precision.ToCode() + "4 " + GetVariable() + " = " + node.Evaluate() + ";"; - } - - - } +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFP_Color : SF_ShaderProperty { + + + public bool isBumpmap = false; + + public new SFP_Color Initialize( SF_Node node ) { + base.nameType = "Color"; + base.Initialize( node ); + return this; + } + + public override string GetInitializationLine() { + return GetTagString() + GetVariable() + " (\"" + nameDisplay + "\", Color) = (" + GetValue().r + "," + GetValue().g + "," + GetValue().b + "," + GetValue().a + ")"; + } + + Color GetValue() { + return ( node as SFN_Color ).texture.dataUniform; + } + + public override string GetVariableLine() { + return "uniform " + node.precision.ToCode() + "4 " + GetVariable() + ";"; + } + + // TODO: Unity UV offsets + public override string GetFragmentPrepare() { + return node.precision.ToCode() + "4 " + GetVariable() + " = " + node.Evaluate() + ";"; + } + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Color.cs.meta b/Editor/Code/_ShaderProperties/SFP_Color.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Color.cs.meta rename to Editor/Code/_ShaderProperties/SFP_Color.cs.meta index 4e551377..58e5026d --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Color.cs.meta +++ b/Editor/Code/_ShaderProperties/SFP_Color.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 7e0f81cb63fbd57449cda3f78bbf4407 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 7e0f81cb63fbd57449cda3f78bbf4407 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Cubemap.cs b/Editor/Code/_ShaderProperties/SFP_Cubemap.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Cubemap.cs rename to Editor/Code/_ShaderProperties/SFP_Cubemap.cs index b107197b..ae89acb0 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Cubemap.cs +++ b/Editor/Code/_ShaderProperties/SFP_Cubemap.cs @@ -1,32 +1,32 @@ using UnityEngine; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFP_Cubemap : SF_ShaderProperty { - - - public new SFP_Cubemap Initialize( SF_Node node ) { - base.nameType = "Cubemap"; - base.Initialize( node ); - return this; - } - - public override string GetInitializationLine() { - string defaultValue = "\"_Skybox\""; - return GetTagString() + GetVariable() + " (\"" + nameDisplay + "\", Cube) = " + defaultValue + " {}"; - } - - public override string GetVariableLine() { - return "uniform samplerCUBE " + GetVariable() + ";"; - } - - // TODO: UVs - public override string GetFragmentPrepare() { - return "fixed4 " + GetVariable() + " = " + node.Evaluate() + ";"; - } - - - } +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFP_Cubemap : SF_ShaderProperty { + + + public new SFP_Cubemap Initialize( SF_Node node ) { + base.nameType = "Cubemap"; + base.Initialize( node ); + return this; + } + + public override string GetInitializationLine() { + string defaultValue = "\"_Skybox\""; + return GetTagString() + GetVariable() + " (\"" + nameDisplay + "\", Cube) = " + defaultValue + " {}"; + } + + public override string GetVariableLine() { + return "uniform samplerCUBE " + GetVariable() + ";"; + } + + // TODO: UVs + public override string GetFragmentPrepare() { + return "fixed4 " + GetVariable() + " = " + node.Evaluate() + ";"; + } + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Cubemap.cs.meta b/Editor/Code/_ShaderProperties/SFP_Cubemap.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Cubemap.cs.meta rename to Editor/Code/_ShaderProperties/SFP_Cubemap.cs.meta index a6cbd8e5..ff31f756 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Cubemap.cs.meta +++ b/Editor/Code/_ShaderProperties/SFP_Cubemap.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 89bae648dacc8ce46bd4441582e727a3 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 89bae648dacc8ce46bd4441582e727a3 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Matrix4x4Property.cs b/Editor/Code/_ShaderProperties/SFP_Matrix4x4Property.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Matrix4x4Property.cs rename to Editor/Code/_ShaderProperties/SFP_Matrix4x4Property.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Matrix4x4Property.cs.meta b/Editor/Code/_ShaderProperties/SFP_Matrix4x4Property.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Matrix4x4Property.cs.meta rename to Editor/Code/_ShaderProperties/SFP_Matrix4x4Property.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Slider.cs b/Editor/Code/_ShaderProperties/SFP_Slider.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Slider.cs rename to Editor/Code/_ShaderProperties/SFP_Slider.cs index 63a6bf54..4a282d50 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Slider.cs +++ b/Editor/Code/_ShaderProperties/SFP_Slider.cs @@ -1,49 +1,49 @@ using UnityEngine; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFP_Slider : SF_ShaderProperty { - - - public bool isBumpmap = false; - - public new SFP_Slider Initialize( SF_Node node ) { - base.nameType = "Slider"; - base.Initialize( node ); - return this; - } - - - - public override string GetInitializationLine() { - string defaultValue = GetCurrent().ToString(); - // name ("display name", Range (min, max)) = number - return GetTagString() + GetVariable() + " (\"" + nameDisplay + "\", Range(" + GetMin() + ", " + GetMax() + ")) = " + defaultValue; - } - - float GetMin() { - return ( node as SFN_Slider ).min; - } - - float GetMax() { - return ( node as SFN_Slider ).max; +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFP_Slider : SF_ShaderProperty { + + + public bool isBumpmap = false; + + public new SFP_Slider Initialize( SF_Node node ) { + base.nameType = "Slider"; + base.Initialize( node ); + return this; + } + + + + public override string GetInitializationLine() { + string defaultValue = GetCurrent().ToString(); + // name ("display name", Range (min, max)) = number + return GetTagString() + GetVariable() + " (\"" + nameDisplay + "\", Range(" + GetMin() + ", " + GetMax() + ")) = " + defaultValue; + } + + float GetMin() { + return ( node as SFN_Slider ).min; + } + + float GetMax() { + return ( node as SFN_Slider ).max; } float GetCurrent() { return ( node as SFN_Slider ).current; - } - - public override string GetVariableLine() { - return "uniform " + node.precision.ToCode() + " " + GetVariable() + ";"; - } - - // TODO: Unity UV offsets - public override string GetFragmentPrepare() { - return node.precision.ToCode()+" " + GetVariable() + " = " + node.Evaluate() + ";"; - } - - - } + } + + public override string GetVariableLine() { + return "uniform " + node.precision.ToCode() + " " + GetVariable() + ";"; + } + + // TODO: Unity UV offsets + public override string GetFragmentPrepare() { + return node.precision.ToCode()+" " + GetVariable() + " = " + node.Evaluate() + ";"; + } + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Slider.cs.meta b/Editor/Code/_ShaderProperties/SFP_Slider.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Slider.cs.meta rename to Editor/Code/_ShaderProperties/SFP_Slider.cs.meta index 850fd5dc..727d5da6 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Slider.cs.meta +++ b/Editor/Code/_ShaderProperties/SFP_Slider.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: d8fff7db79c3ac549a795dc95865193a -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: d8fff7db79c3ac549a795dc95865193a +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_SwitchProperty.cs b/Editor/Code/_ShaderProperties/SFP_SwitchProperty.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_SwitchProperty.cs rename to Editor/Code/_ShaderProperties/SFP_SwitchProperty.cs index 1f6c5d58..192a6135 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_SwitchProperty.cs +++ b/Editor/Code/_ShaderProperties/SFP_SwitchProperty.cs @@ -1,31 +1,31 @@ using UnityEngine; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFP_SwitchProperty : SF_ShaderProperty { - - public new SFP_SwitchProperty Initialize( SF_Node node ) { - base.nameType = "Toggle"; - base.Initialize( node ); - return this; - } - - public override string GetInitializationLine() { - string defaultValue = base.node.texture.dataUniform.x.ToString(); - return GetTagString() + "[MaterialToggle] " + GetVariable() + " (\"" + nameDisplay + "\", Float ) = " + defaultValue; - } - - public override string GetVariableLine() { - return "uniform fixed " + GetVariable() + ";"; - } - - // TODO: Unity UV offsets - //public override string GetFragmentPrepare() { - // return "fixed4 " + GetVariable() + " = " + node.Evaluate() + ";"; - //} - - - } +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFP_SwitchProperty : SF_ShaderProperty { + + public new SFP_SwitchProperty Initialize( SF_Node node ) { + base.nameType = "Toggle"; + base.Initialize( node ); + return this; + } + + public override string GetInitializationLine() { + string defaultValue = base.node.texture.dataUniform.x.ToString(); + return GetTagString() + "[MaterialToggle] " + GetVariable() + " (\"" + nameDisplay + "\", Float ) = " + defaultValue; + } + + public override string GetVariableLine() { + return "uniform fixed " + GetVariable() + ";"; + } + + // TODO: Unity UV offsets + //public override string GetFragmentPrepare() { + // return "fixed4 " + GetVariable() + " = " + node.Evaluate() + ";"; + //} + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_SwitchProperty.cs.meta b/Editor/Code/_ShaderProperties/SFP_SwitchProperty.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_SwitchProperty.cs.meta rename to Editor/Code/_ShaderProperties/SFP_SwitchProperty.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Tex2d.cs b/Editor/Code/_ShaderProperties/SFP_Tex2d.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Tex2d.cs rename to Editor/Code/_ShaderProperties/SFP_Tex2d.cs index 0d1e5bd7..85113e86 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Tex2d.cs +++ b/Editor/Code/_ShaderProperties/SFP_Tex2d.cs @@ -1,22 +1,22 @@ using UnityEngine; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFP_Tex2d : SF_ShaderProperty { - - - //public bool isBumpmap = false; // TODO: Is this even used? - - public new SFP_Tex2d Initialize( SF_Node node ) { - base.nameType = "Texture (2D)"; - base.Initialize( node ); - return this; - } - - - public override string GetInitializationLine() { +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFP_Tex2d : SF_ShaderProperty { + + + //public bool isBumpmap = false; // TODO: Is this even used? + + public new SFP_Tex2d Initialize( SF_Node node ) { + base.nameType = "Texture (2D)"; + base.Initialize( node ); + return this; + } + + + public override string GetInitializationLine() { //string defaultValue = isBumpmap ? "\"bump\"" : "\"white\""; NoTexValue noTexValue = NoTexValue.Black; @@ -24,27 +24,27 @@ public override string GetInitializationLine() { if(base.node is SFN_Tex2d) noTexValue = (base.node as SFN_Tex2d).noTexValue; else if(base.node is SFN_Tex2dAsset) - noTexValue = (base.node as SFN_Tex2dAsset).noTexValue; - - return GetTagString() + GetVariable() + " (\"" + nameDisplay + "\", 2D) = \"" + noTexValue.ToString().ToLower() + "\" {}"; - } - + noTexValue = (base.node as SFN_Tex2dAsset).noTexValue; + + return GetTagString() + GetVariable() + " (\"" + nameDisplay + "\", 2D) = \"" + noTexValue.ToString().ToLower() + "\" {}"; + } + public override string GetVariableLine() { - string varName = GetVariable(); - - string s = "uniform sampler2D " + varName + ";"; - if( !tagNoScaleOffset ) { - s += " uniform float4 " + varName + "_ST;"; - } - - return s; - } - - - public override string GetFragmentPrepare() { - return "fixed4 " + GetVariable() + " = " + node.Evaluate() + ";"; - } - - - } + string varName = GetVariable(); + + string s = "uniform sampler2D " + varName + ";"; + if( !tagNoScaleOffset ) { + s += " uniform float4 " + varName + "_ST;"; + } + + return s; + } + + + public override string GetFragmentPrepare() { + return "fixed4 " + GetVariable() + " = " + node.Evaluate() + ";"; + } + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Tex2d.cs.meta b/Editor/Code/_ShaderProperties/SFP_Tex2d.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Tex2d.cs.meta rename to Editor/Code/_ShaderProperties/SFP_Tex2d.cs.meta index 174c1a30..fbda6187 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Tex2d.cs.meta +++ b/Editor/Code/_ShaderProperties/SFP_Tex2d.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 30072d9ca7304e4419000143e2124c81 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 30072d9ca7304e4419000143e2124c81 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_ToggleProperty.cs b/Editor/Code/_ShaderProperties/SFP_ToggleProperty.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_ToggleProperty.cs rename to Editor/Code/_ShaderProperties/SFP_ToggleProperty.cs index f56da373..f123f31d --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_ToggleProperty.cs +++ b/Editor/Code/_ShaderProperties/SFP_ToggleProperty.cs @@ -1,31 +1,31 @@ using UnityEngine; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFP_ToggleProperty : SF_ShaderProperty { - - public new SFP_ToggleProperty Initialize( SF_Node node ) { - base.nameType = "Toggle"; - base.Initialize( node ); - return this; - } - - public override string GetInitializationLine() { - string defaultValue = base.node.texture.dataUniform.x.ToString(); - return GetTagString() + "[MaterialToggle] " + GetVariable() + " (\"" + nameDisplay + "\", Float ) = " + defaultValue; - } - - public override string GetVariableLine() { - return "uniform fixed " + GetVariable() + ";"; - } - - // TODO: Unity UV offsets - //public override string GetFragmentPrepare() { - // return "fixed4 " + GetVariable() + " = " + node.Evaluate() + ";"; - //} - - - } +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFP_ToggleProperty : SF_ShaderProperty { + + public new SFP_ToggleProperty Initialize( SF_Node node ) { + base.nameType = "Toggle"; + base.Initialize( node ); + return this; + } + + public override string GetInitializationLine() { + string defaultValue = base.node.texture.dataUniform.x.ToString(); + return GetTagString() + "[MaterialToggle] " + GetVariable() + " (\"" + nameDisplay + "\", Float ) = " + defaultValue; + } + + public override string GetVariableLine() { + return "uniform fixed " + GetVariable() + ";"; + } + + // TODO: Unity UV offsets + //public override string GetFragmentPrepare() { + // return "fixed4 " + GetVariable() + " = " + node.Evaluate() + ";"; + //} + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_ToggleProperty.cs.meta b/Editor/Code/_ShaderProperties/SFP_ToggleProperty.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_ToggleProperty.cs.meta rename to Editor/Code/_ShaderProperties/SFP_ToggleProperty.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_ValueProperty.cs b/Editor/Code/_ShaderProperties/SFP_ValueProperty.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_ValueProperty.cs rename to Editor/Code/_ShaderProperties/SFP_ValueProperty.cs index 3078b183..2f166f50 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_ValueProperty.cs +++ b/Editor/Code/_ShaderProperties/SFP_ValueProperty.cs @@ -1,31 +1,31 @@ using UnityEngine; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFP_ValueProperty : SF_ShaderProperty { - - public new SFP_ValueProperty Initialize( SF_Node node ) { - base.nameType = "Value"; - base.Initialize( node ); - return this; - } - - public override string GetInitializationLine() { - string defaultValue = base.node.texture.dataUniform.x.ToString(); - return GetTagString() + GetVariable() + " (\"" + nameDisplay + "\", Float ) = " + defaultValue; - } - - public override string GetVariableLine() { - return "uniform "+node.precision.ToCode()+" " + GetVariable() + ";"; - } - - // TODO: Unity UV offsets - public override string GetFragmentPrepare() { - return node.precision.ToCode() + "4 " + GetVariable() + " = " + node.Evaluate() + ";"; - } - - - } +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFP_ValueProperty : SF_ShaderProperty { + + public new SFP_ValueProperty Initialize( SF_Node node ) { + base.nameType = "Value"; + base.Initialize( node ); + return this; + } + + public override string GetInitializationLine() { + string defaultValue = base.node.texture.dataUniform.x.ToString(); + return GetTagString() + GetVariable() + " (\"" + nameDisplay + "\", Float ) = " + defaultValue; + } + + public override string GetVariableLine() { + return "uniform "+node.precision.ToCode()+" " + GetVariable() + ";"; + } + + // TODO: Unity UV offsets + public override string GetFragmentPrepare() { + return node.precision.ToCode() + "4 " + GetVariable() + " = " + node.Evaluate() + ";"; + } + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_ValueProperty.cs.meta b/Editor/Code/_ShaderProperties/SFP_ValueProperty.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_ValueProperty.cs.meta rename to Editor/Code/_ShaderProperties/SFP_ValueProperty.cs.meta index 989d5319..3a90a022 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_ValueProperty.cs.meta +++ b/Editor/Code/_ShaderProperties/SFP_ValueProperty.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 43479457355519949a7175ee9526d96e -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 43479457355519949a7175ee9526d96e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Vector4Property.cs b/Editor/Code/_ShaderProperties/SFP_Vector4Property.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Vector4Property.cs rename to Editor/Code/_ShaderProperties/SFP_Vector4Property.cs index daf2475f..f2299ccf --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Vector4Property.cs +++ b/Editor/Code/_ShaderProperties/SFP_Vector4Property.cs @@ -1,38 +1,38 @@ using UnityEngine; -using System.Collections; - -namespace ShaderForge { - - [System.Serializable] - public class SFP_Vector4Property : SF_ShaderProperty { - - - public bool isBumpmap = false; - - public new SFP_Vector4Property Initialize( SF_Node node ) { - base.nameType = "Vector 4"; - base.Initialize( node ); - return this; - } - - - public override string GetInitializationLine() { - return GetTagString() + GetVariable() + " (\"" + nameDisplay + "\", Vector) = (" + GetValue().r + "," + GetValue().g + "," + GetValue().b + "," + GetValue().a + ")"; - } - - Color GetValue() { - return ( node as SFN_Vector4Property ).texture.dataUniform; - } - - public override string GetVariableLine() { - return "uniform " + node.precision.ToCode() + "4 " + GetVariable() + ";"; - } - - // TODO: Unity UV offsets - public override string GetFragmentPrepare() { - return node.precision.ToCode() + "4 " + GetVariable() + " = " + node.Evaluate() + ";"; - } - - - } +using System.Collections; + +namespace ShaderForge { + + [System.Serializable] + public class SFP_Vector4Property : SF_ShaderProperty { + + + public bool isBumpmap = false; + + public new SFP_Vector4Property Initialize( SF_Node node ) { + base.nameType = "Vector 4"; + base.Initialize( node ); + return this; + } + + + public override string GetInitializationLine() { + return GetTagString() + GetVariable() + " (\"" + nameDisplay + "\", Vector) = (" + GetValue().r + "," + GetValue().g + "," + GetValue().b + "," + GetValue().a + ")"; + } + + Color GetValue() { + return ( node as SFN_Vector4Property ).texture.dataUniform; + } + + public override string GetVariableLine() { + return "uniform " + node.precision.ToCode() + "4 " + GetVariable() + ";"; + } + + // TODO: Unity UV offsets + public override string GetFragmentPrepare() { + return node.precision.ToCode() + "4 " + GetVariable() + " = " + node.Evaluate() + ";"; + } + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Vector4Property.cs.meta b/Editor/Code/_ShaderProperties/SFP_Vector4Property.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Vector4Property.cs.meta rename to Editor/Code/_ShaderProperties/SFP_Vector4Property.cs.meta index 273d75f2..6dcd36d2 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SFP_Vector4Property.cs.meta +++ b/Editor/Code/_ShaderProperties/SFP_Vector4Property.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 8d2eadd39bae92549a09c1cb3349c112 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 8d2eadd39bae92549a09c1cb3349c112 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SF_ShaderProperty.cs b/Editor/Code/_ShaderProperties/SF_ShaderProperty.cs old mode 100755 new mode 100644 similarity index 97% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SF_ShaderProperty.cs rename to Editor/Code/_ShaderProperties/SF_ShaderProperty.cs index 35df622e..a81104c4 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SF_ShaderProperty.cs +++ b/Editor/Code/_ShaderProperties/SF_ShaderProperty.cs @@ -1,82 +1,82 @@ using UnityEngine; using UnityEditor; using System.Collections; -using System.Collections.Generic; -using System.Text.RegularExpressions; - - -namespace ShaderForge { - [System.Serializable] - public class SF_ShaderProperty : ScriptableObject { - - public bool tagHideInInspector = false; - public bool tagHDR = false; - public bool tagPerRendererData = false; - public bool tagNoScaleOffset = false; - public bool tagNormal = false; - - public string nameDisplay = ""; // The displayed name in the material inspector - public string nameType; // Used for labeling in the editor - public string nameInternal = "_"; // The internal shader code name +using System.Collections.Generic; +using System.Text.RegularExpressions; + + +namespace ShaderForge { + [System.Serializable] + public class SF_ShaderProperty : ScriptableObject { + + public bool tagHideInInspector = false; + public bool tagHDR = false; + public bool tagPerRendererData = false; + public bool tagNoScaleOffset = false; + public bool tagNormal = false; + + public string nameDisplay = ""; // The displayed name in the material inspector + public string nameType; // Used for labeling in the editor + public string nameInternal = "_"; // The internal shader code name public SF_Node node; - public bool global = false; - public bool overrideInternalName = false; - - public void OnEnable() { - base.hideFlags = HideFlags.HideAndDontSave; - } - - public string GetTagString() { - string s = ""; - if( tagHideInInspector ) - s += "[HideInInspector]"; - if( tagNoScaleOffset ) - s += "[NoScaleOffset]"; - if( tagNormal ) - s += "[Normal]"; - if( tagHDR ) - s += "[HDR]"; - if( tagPerRendererData ) - s += "[PerRendererData]"; - return s; - } - - public void Initialize(SF_Node node){ - this.node = node; - SetName( node.GetVariableName() ); + public bool global = false; + public bool overrideInternalName = false; + + public void OnEnable() { + base.hideFlags = HideFlags.HideAndDontSave; + } + + public string GetTagString() { + string s = ""; + if( tagHideInInspector ) + s += "[HideInInspector]"; + if( tagNoScaleOffset ) + s += "[NoScaleOffset]"; + if( tagNormal ) + s += "[Normal]"; + if( tagHDR ) + s += "[HDR]"; + if( tagPerRendererData ) + s += "[PerRendererData]"; + return s; + } + + public void Initialize(SF_Node node){ + this.node = node; + SetName( node.GetVariableName() ); } public static string FormatInternalName(string s){ Regex rgx = new Regex( "[^a-zA-Z0-9_]" ); s = rgx.Replace( s, "" ); return s; - } - + } + public virtual void UpdateInternalName() { if(overrideInternalName){ nameInternal = node.variableName; return; - } - - string s = nameDisplay; - - + } + + string s = nameDisplay; + + s = FormatInternalName(s); - + s = "_" + s; - - - // TODO: Make sure it's valid and unique - - nameInternal = s; - } - - public void SetName( string s) { - nameDisplay = s; - if( !overrideInternalName ) - UpdateInternalName(); + + + // TODO: Make sure it's valid and unique + + nameInternal = s; + } + + public void SetName( string s) { + nameDisplay = s; + if( !overrideInternalName ) + UpdateInternalName(); } public void SetBothNameAndInternal(string s){ @@ -111,7 +111,7 @@ public void ToggleGlobal(){ } } - } + } @@ -201,7 +201,7 @@ public bool TryGetNextNumericalName(ref string sOut){ return true; } - + public bool CanToggleGlobal(){ if(this is SFP_ValueProperty) return true; @@ -210,43 +210,43 @@ public bool CanToggleGlobal(){ if(this is SFP_Tex2d && node is SFN_Tex2dAsset) return true; if(this is SFP_Vector4Property) - return true; - //if( this is SFP_Matrix4x4Property ) + return true; + //if( this is SFP_Matrix4x4Property ) // return true; return false; - } - - - public SF_ShaderProperty() { - // Empty - } - - - public virtual string GetVariable() { - return nameInternal; - //return "_" + node.GetVariableName(); - } - - //public virtual string GetVariable() { - // return nameInternal; // Override for textures - //} - - public string GetFilteredVariableLine() { - //if( this.nameInternal == "_SpecColor" ) { // TODO: Why? - // return null; - //} - - return GetVariableLine(); - - } + } + + + public SF_ShaderProperty() { + // Empty + } + + + public virtual string GetVariable() { + return nameInternal; + //return "_" + node.GetVariableName(); + } + + //public virtual string GetVariable() { + // return nameInternal; // Override for textures + //} + + public string GetFilteredVariableLine() { + //if( this.nameInternal == "_SpecColor" ) { // TODO: Why? + // return null; + //} + + return GetVariableLine(); + + } public string Serialize(){ string s = ""; - s += "glob:" + global.ToString(); - s += ",taghide:" + tagHideInInspector.ToString(); - s += ",taghdr:" + tagHDR.ToString(); - s += ",tagprd:" + tagPerRendererData.ToString(); - s += ",tagnsco:" + tagNoScaleOffset.ToString(); + s += "glob:" + global.ToString(); + s += ",taghide:" + tagHideInInspector.ToString(); + s += ",taghdr:" + tagHDR.ToString(); + s += ",tagprd:" + tagPerRendererData.ToString(); + s += ",tagnsco:" + tagNoScaleOffset.ToString(); s += ",tagnrm:" + tagNormal.ToString(); return s; } @@ -255,21 +255,21 @@ public void Deserialize( string key, string value ){ switch( key ) { case "glob": global = bool.Parse( value ); - break; - case "taghide": - tagHideInInspector = bool.Parse( value ); - break; - case "taghdr": - tagHDR = bool.Parse( value ); - break; - case "tagprd": - tagPerRendererData = bool.Parse( value ); - break; - case "tagnsco": - tagNoScaleOffset = bool.Parse( value ); break; - case "tagnrm": - tagNormal = bool.Parse( value ); + case "taghide": + tagHideInInspector = bool.Parse( value ); + break; + case "taghdr": + tagHDR = bool.Parse( value ); + break; + case "tagprd": + tagPerRendererData = bool.Parse( value ); + break; + case "tagnsco": + tagNoScaleOffset = bool.Parse( value ); + break; + case "tagnrm": + tagNormal = bool.Parse( value ); break; } } @@ -277,21 +277,21 @@ public void Deserialize( string key, string value ){ public virtual string GetMulticompilePragma(){ return ""; // Override for branching - } - - public virtual string GetInitializationLine() { - return ""; // Override, textures need to unpack before usage in the frag shader - } - - public virtual string GetVariableLine() { - return ""; // Override - } - - public virtual string GetFragmentPrepare() { - return ""; // Override - } - - - - } + } + + public virtual string GetInitializationLine() { + return ""; // Override, textures need to unpack before usage in the frag shader + } + + public virtual string GetVariableLine() { + return ""; // Override + } + + public virtual string GetFragmentPrepare() { + return ""; // Override + } + + + + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SF_ShaderProperty.cs.meta b/Editor/Code/_ShaderProperties/SF_ShaderProperty.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SF_ShaderProperty.cs.meta rename to Editor/Code/_ShaderProperties/SF_ShaderProperty.cs.meta index 886f1502..f8c2375a --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_ShaderProperties/SF_ShaderProperty.cs.meta +++ b/Editor/Code/_ShaderProperties/SF_ShaderProperty.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: d8c935ac774257c49ad63340aa7af37a -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: d8c935ac774257c49ad63340aa7af37a +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility.meta b/Editor/Code/_Utility.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility.meta rename to Editor/Code/_Utility.meta index 4550660e..8fc8229f --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility.meta +++ b/Editor/Code/_Utility.meta @@ -1,5 +1,5 @@ -fileFormatVersion: 2 -guid: 8159890c121914a839942f4820d9ce63 -folderAsset: yes -DefaultImporter: - userData: +fileFormatVersion: 2 +guid: 8159890c121914a839942f4820d9ce63 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/GUILines.cs b/Editor/Code/_Utility/GUILines.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/GUILines.cs rename to Editor/Code/_Utility/GUILines.cs index 462cfd41..ff5935ba --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/GUILines.cs +++ b/Editor/Code/_Utility/GUILines.cs @@ -1,478 +1,478 @@ -using System; -using UnityEngine; -using UnityEditor; -using System.Reflection; - -namespace ShaderForge { - - public class GUILines { - - public static Color connectionColor = new Color( 1f, 1f, 1f, 0.3f ); - - public static void Initialize() { - - } - - - - - - public static void DrawLine( Vector2 pointA, Vector2 pointB, Color color, float width, bool antiAlias ) { - Handles.BeginGUI(); - Handles.color = color; - if( antiAlias ) - Handles.DrawAAPolyLine( width, new Vector3[] { pointA, pointB } ); - else - Handles.DrawPolyLine( new Vector3[] { pointA, pointB } ); - Handles.EndGUI(); - } - - public static void DrawDisc( Vector2 center, float radius, Color color) { - Handles.BeginGUI(); - Handles.color = color; - Handles.DrawWireDisc(center,Vector3.forward,radius); - Handles.EndGUI(); - } - - - - - - public static void DrawLines( SF_Editor editor, Vector2[] points, Color color, float width, bool antiAlias, bool railway = false ) { - Handles.BeginGUI(); - Handles.color = color; - - - Vector3[] v3Pts = new Vector3[points.Length]; - for (int i = 0; i < points.Length; i++) { - points[i] = editor.nodeView.ZoomSpaceToScreenSpace( points[i] ); - v3Pts[i] = new Vector3(points[i].x, points[i].y); - } - - if( antiAlias ){ - if( railway ) { - DrawPolyLineWithRail( width, v3Pts ); - } else { - Handles.DrawAAPolyLine( width, v3Pts ); - } - } else { - Handles.DrawPolyLine( v3Pts ); - } - Handles.EndGUI(); - } - - - static void DrawPolyLineWithRail( float width, Vector3[] v3pts ) { - - Vector3[] pair = new Vector3[] { Vector3.zero, Vector3.zero }; - for( int i = 0; i < v3pts.Length - 1; i++ ) { - - Vector3 dir = (v3pts[i] - v3pts[i+1] ).normalized; - dir = new Vector3(-dir.y, dir.x); - Vector3 center = (v3pts[i] + v3pts[i+1] )*0.5f; - pair[0] = center + dir * 3; - pair[1] = center - dir * 3; - Handles.DrawAAPolyLine( pair ); - } - - Handles.DrawAAPolyLine( width, v3pts ); - } - - - - public static void Highlight( Rect r, float offset, int strength = 1 ) { - - //float width = 4; - //offset = 3; - //Color color = Color.yellow; - r.xMax += 1; - r = SF_Tools.GetExpanded( r, offset ); - - /* - Vector2 tl = new Vector2( r.x, r.y); - Vector2 tr = new Vector2( r.xMax, r.y ); - Vector2 bl = new Vector2( r.x, r.yMax ); - Vector2 br = new Vector2( r.xMax, r.yMax ); - Vector2 dn = new Vector2( 0f, width * 3 ); - Vector2 rg = new Vector2( width * 3, 0f ); - */ - - //Color prevCol = GUI.color; - //GUI.color = color; - - for( int i = 0; i < strength; i++ ) { - GUI.Box( r, string.Empty, SF_Styles.HighlightStyle ); - } - //GUI.color = prevCol; - - /* - for( int i = 0; i < strength; i++ ) { - GUI.Box( r, string.Empty, SF_Styles.HighlightStyle ); - }*/ - - - //GUI.Box( r, string.Empty, (GUIStyle)"flow node 0 on" ); - /* - for( int i = 0; i < strength; i++ ) { - DrawLine( tl, tr, color, width, true ); - DrawLine( tr, br, color, width, true ); - DrawLine( br, bl, color, width, true ); - DrawLine( bl, tl, color, width, true ); - - - DrawLine( tl + rg, tl + dn, color, width, true ); - DrawLine( tr - rg, tr + dn, color, width, true ); - DrawLine( bl + rg, bl - dn, color, width, true ); - DrawLine( br - rg, br - dn, color, width, true ); - - }*/ - - } - - - - - public static void DrawCubicBezier( Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3, Color color, float width, bool antiAlias, int segments, bool railway = false ) { - Initialize(); - Vector2 lastV = CubicBezier( p0, p1, p2, p3, 0 ); - for( int i = 1; i <= segments; i++ ) { - Vector2 v = CubicBezier( p0, p1, p2, p3, i / (float)segments ); - - if( railway ) { - Vector2 dir = ( lastV - v ).normalized; - dir = new Vector2(-dir.y, dir.x)*2; - Vector2 center = ( v + lastV ) * 0.5f; - DrawLine( center + dir, center - dir, color, width, antiAlias ); - } else { - DrawLine( lastV, v, color, width, antiAlias ); - } - - lastV = v; - } - } - - public static void DrawCubicBezierOffset( float offset, Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3, Color color, float width, bool antiAlias, int segments ) { - Initialize(); - Vector2 lastV = CubicBezierOffset( offset, p0, p1, p2, p3, 0 ); - for( int i = 1; i <= segments; i++ ) { - Vector2 v = CubicBezierOffset( offset, p0, p1, p2, p3, i / (float)segments ); - DrawLine( lastV, v, color, width, antiAlias ); - lastV = v; - } - } - - - - - public static Vector2[] ConnectionBezierOffsetArray(float offset, SF_NodeConnector startCon, SF_NodeConnector endCon, int segments){ - - - Vector2 start = startCon.GetConnectionPoint(); - Vector2 end = endCon.GetConnectionPoint(); - - bool reversed = (start.x < end.x); - - Vector2[] points; - - int pCount = (segments+1); // Point count per bezier - - if(reversed) - points = new Vector2[pCount*2]; // Two curves - else - points = new Vector2[pCount]; - - - - if(reversed){ - - // Calculate new start/end positions! - // We want an S shape, which essentially is two curves with a connected center - // Let's define the new points! - - - float midVert; - - if(startCon.node.rect.center.y > endCon.node.rect.center.y) - midVert = (startCon.node.BoundsTop() + endCon.node.BoundsBottom())/2; - else - midVert = (startCon.node.BoundsBottom() + endCon.node.BoundsTop())/2; - - - - float deltaX = Mathf.Abs(start.x-end.x); - float mul = Mathf.InverseLerp(0f,100f,deltaX); - mul = SF_Tools.Smoother(mul) * 0.70710678118f; - - - Vector2 bAp0 = start; // Start Point - Vector2 bAp3 = new Vector2(start.x, midVert); // End Point - - - - float tangentMag = Mathf.Abs(bAp0.y-bAp3.y)*mul; // TODO: Scale based on length if smaller than something - Vector2 tangentVec = new Vector2(tangentMag, 0f); - - - Vector2 bAp1 = bAp0 - tangentVec; // Start Tangent - Vector2 bAp2 = bAp3 - tangentVec; // End Tangent - - - for(int i=0;i end.x) ? 1f : 4f; - - float xHalfway = Mathf.Abs(end.x-start.x)*0.5f * mult; - - Vector2 p1 = new Vector2(start.x-xHalfway, start.y); - Vector2 p2 = new Vector2(end.x+xHalfway, end.y); - return CubicBezierOffset(offset, start, p1, p2, end, t); - } - - public static Vector2 CubicBezierOffset( float offset, Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3, float t ) { - Vector2 a = QuadBezier( p0, p1, p2, t ); - Vector2 b = QuadBezier( p1, p2, p3, t ); - Vector2 origin = Lerp( a, b, t ); - Vector2 tangent = ( b - a ).normalized; - Vector2 normal = new Vector2( -tangent.y, tangent.x ); - return origin + normal * offset; - } - - public static Vector2 CubicBezier( Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3, float t ) { - float omt = 1f - t; - float omt2 = omt * omt; - float t2 = t * t; - return p0 * ( omt2 * omt ) + - p1 * ( 3f * omt2 * t ) + - p2 * ( 3f * omt * t2 ) + - p3 * ( t2 * t ); - } - - public static Vector2 QuadBezier( Vector2 p0, Vector2 p1, Vector2 p2, float t ) { - float tsq = t * t; - float t2 = t * 2; - return p0 * ( tsq - t2 + 1 ) + p1 * ( t2 - 2 * tsq ) + p2 * tsq; - - } - - public static Vector2 Lerp( Vector2 v0, Vector2 v1, float t ) { - return ( v0 * ( 1f - t ) + t * v1 ); - } - - - - - public static void QuickBezier(Vector2 p0, Vector2 p1, Color color, int detail = 12, int width = 2){ - - Vector2 prevPoint = p0; - for(float i=1;i endCon.node.rect.center.y) + midVert = (startCon.node.BoundsTop() + endCon.node.BoundsBottom())/2; + else + midVert = (startCon.node.BoundsBottom() + endCon.node.BoundsTop())/2; + + + + float deltaX = Mathf.Abs(start.x-end.x); + float mul = Mathf.InverseLerp(0f,100f,deltaX); + mul = SF_Tools.Smoother(mul) * 0.70710678118f; + + + Vector2 bAp0 = start; // Start Point + Vector2 bAp3 = new Vector2(start.x, midVert); // End Point + + + + float tangentMag = Mathf.Abs(bAp0.y-bAp3.y)*mul; // TODO: Scale based on length if smaller than something + Vector2 tangentVec = new Vector2(tangentMag, 0f); + + + Vector2 bAp1 = bAp0 - tangentVec; // Start Tangent + Vector2 bAp2 = bAp3 - tangentVec; // End Tangent + + + for(int i=0;i end.x) ? 1f : 4f; + + float xHalfway = Mathf.Abs(end.x-start.x)*0.5f * mult; + + Vector2 p1 = new Vector2(start.x-xHalfway, start.y); + Vector2 p2 = new Vector2(end.x+xHalfway, end.y); + return CubicBezierOffset(offset, start, p1, p2, end, t); + } + + public static Vector2 CubicBezierOffset( float offset, Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3, float t ) { + Vector2 a = QuadBezier( p0, p1, p2, t ); + Vector2 b = QuadBezier( p1, p2, p3, t ); + Vector2 origin = Lerp( a, b, t ); + Vector2 tangent = ( b - a ).normalized; + Vector2 normal = new Vector2( -tangent.y, tangent.x ); + return origin + normal * offset; + } + + public static Vector2 CubicBezier( Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3, float t ) { + float omt = 1f - t; + float omt2 = omt * omt; + float t2 = t * t; + return p0 * ( omt2 * omt ) + + p1 * ( 3f * omt2 * t ) + + p2 * ( 3f * omt * t2 ) + + p3 * ( t2 * t ); + } + + public static Vector2 QuadBezier( Vector2 p0, Vector2 p1, Vector2 p2, float t ) { + float tsq = t * t; + float t2 = t * 2; + return p0 * ( tsq - t2 + 1 ) + p1 * ( t2 - 2 * tsq ) + p2 * tsq; + + } + + public static Vector2 Lerp( Vector2 v0, Vector2 v1, float t ) { + return ( v0 * ( 1f - t ) + t * v1 ); + } + + + + + public static void QuickBezier(Vector2 p0, Vector2 p1, Color color, int detail = 12, int width = 2){ + + Vector2 prevPoint = p0; + for(float i=1;i m_ColorLibraryEditor; - private PresetLibraryEditorState m_ColorLibraryEditorState; - private static SF_ColorPicker.Styles styles; - public static string presetsEditorPrefID { - get { - return "Color"; - } - } - private bool colorChanged { - get; - set; - } - public static bool visible { - get { - return SF_ColorPicker.s_SharedColorPicker != null; - } - } - public static Color color { - get { - return SF_ColorPicker.get.m_Color; - } - set { - SF_ColorPicker.get.SetColor( value ); - } - } - public static SF_ColorPicker get { - get { - if( !SF_ColorPicker.s_SharedColorPicker ) { - UnityEngine.Object[] array = Resources.FindObjectsOfTypeAll( typeof( SF_ColorPicker ) ); - if( array != null && array.Length > 0 ) { - SF_ColorPicker.s_SharedColorPicker = (SF_ColorPicker)array[0]; - } - if( !SF_ColorPicker.s_SharedColorPicker ) { - SF_ColorPicker.s_SharedColorPicker = ScriptableObject.CreateInstance(); - SF_ColorPicker.s_SharedColorPicker.wantsMouseMove = true; - } - } - return SF_ColorPicker.s_SharedColorPicker; - } - } - public string currentPresetLibrary { - get { - this.InitIfNeeded(); - return this.m_ColorLibraryEditor.currentLibraryWithoutExtension; - } - set { - this.InitIfNeeded(); - this.m_ColorLibraryEditor.currentLibraryWithoutExtension = value; - } - } - public SF_ColorPicker() { - base.hideFlags = HideFlags.DontSave; - this.m_ShowSliders = ( EditorPrefs.GetInt( "CPSliderShow", 1 ) != 0 ); - this.m_SliderMode = (SF_ColorPicker.SliderMode)EditorPrefs.GetInt( "CPSliderMode", 0 ); - this.m_ShowColors = ( EditorPrefs.GetInt( "CPColorShow", 1 ) != 0 ); - this.m_ColorBoxMode = (SF_ColorPicker.ColorBoxMode)EditorPrefs.GetInt( "CPColorMode", 0 ); - this.m_IsOSColorPicker = EditorPrefs.GetBool( "UseOSColorPicker" ); - this.m_ShowPresets = ( EditorPrefs.GetInt( "CPPresetsShow", 1 ) != 0 ); - EditorApplication.update = (EditorApplication.CallbackFunction)Delegate.Combine( EditorApplication.update, new EditorApplication.CallbackFunction( this.PollOSColorPicker ) ); - } - private void OnSelectionChange() { - this.m_resetKeyboardControl = true; - base.Repaint(); - } - private void RGBToHSV() { - EditorGUIUtility.RGBToHSV( new Color( this.m_R, this.m_G, this.m_B, 1f ), out this.m_H, out this.m_S, out this.m_V ); - } - private void HSVToRGB() { - Color color = EditorGUIUtility.HSVToRGB( this.m_H, this.m_S, this.m_V ); - this.m_R = color.r; - this.m_G = color.g; - this.m_B = color.b; - } - private static void swap( ref float f1, ref float f2 ) { - float num = f1; - f1 = f2; - f2 = num; - } - private Vector2 Slider2D( Rect rect, Vector2 value, Vector2 maxvalue, Vector2 minvalue, GUIStyle backStyle, GUIStyle thumbStyle ) { - if( backStyle == null ) { - return value; - } - if( thumbStyle == null ) { - return value; - } - int controlID = GUIUtility.GetControlID( SF_ColorPicker.s_Slider2Dhash, FocusType.Native ); - if( maxvalue.x < minvalue.x ) { - SF_ColorPicker.swap( ref maxvalue.x, ref minvalue.x ); - } - if( maxvalue.y < minvalue.y ) { - SF_ColorPicker.swap( ref maxvalue.y, ref minvalue.y ); - } - float num = ( thumbStyle.fixedHeight != 0f ) ? thumbStyle.fixedHeight : ( (float)thumbStyle.padding.vertical ); - float num2 = ( thumbStyle.fixedWidth != 0f ) ? thumbStyle.fixedWidth : ( (float)thumbStyle.padding.horizontal ); - Vector2 vector = new Vector2( ( rect.width - (float)( backStyle.padding.right + backStyle.padding.left ) - num2 * 2f ) / ( maxvalue.x - minvalue.x ), ( rect.height - (float)( backStyle.padding.top + backStyle.padding.bottom ) - num * 2f ) / ( maxvalue.y - minvalue.y ) ); - Rect position = new Rect( rect.x + value.x * vector.x + num2 / 2f + (float)backStyle.padding.left - minvalue.x * vector.x, rect.y + value.y * vector.y + num / 2f + (float)backStyle.padding.top - minvalue.y * vector.y, num2, num ); - Event current = Event.current; - switch( current.GetTypeForControl( controlID ) ) { - case EventType.MouseDown: - if( rect.Contains( current.mousePosition ) ) { - GUIUtility.hotControl = controlID; - value.x = ( current.mousePosition.x - rect.x - num2 - (float)backStyle.padding.left ) / vector.x + minvalue.x; - value.y = ( current.mousePosition.y - rect.y - num - (float)backStyle.padding.top ) / vector.y + minvalue.y; - GUI.changed = true; - Event.current.Use(); - } - break; - case EventType.MouseUp: - if( GUIUtility.hotControl == controlID ) { - GUIUtility.hotControl = 0; - current.Use(); - } - break; - case EventType.MouseDrag: - if( GUIUtility.hotControl == controlID ) { - value.x = ( current.mousePosition.x - rect.x - num2 - (float)backStyle.padding.left ) / vector.x + minvalue.x; - value.y = ( current.mousePosition.y - rect.y - num - (float)backStyle.padding.top ) / vector.y + minvalue.y; - value.x = Mathf.Clamp( value.x, minvalue.x, maxvalue.x ); - value.y = Mathf.Clamp( value.y, minvalue.y, maxvalue.y ); - GUI.changed = true; - Event.current.Use(); - } - break; - case EventType.Repaint: - backStyle.Draw( rect, GUIContent.none, controlID ); - thumbStyle.Draw( position, GUIContent.none, controlID ); - break; - } - return value; - } - private void RGBSliders() { - bool changed = GUI.changed; - GUI.changed = false; - this.m_RTexture = SF_ColorPicker.Update1DSlider( this.m_RTexture, 8, this.m_G, this.m_B, ref this.m_RTextureG, ref this.m_RTextureB, 0, false ); - this.m_GTexture = SF_ColorPicker.Update1DSlider( this.m_GTexture, 8, this.m_R, this.m_B, ref this.m_GTextureR, ref this.m_GTextureB, 1, false ); - this.m_BTexture = SF_ColorPicker.Update1DSlider( this.m_BTexture, 8, this.m_R, this.m_G, ref this.m_BTextureR, ref this.m_BTextureG, 2, false ); - float num = (float)( (int)Mathf.Round( this.m_R * 255f ) ); - float num2 = (float)( (int)Mathf.Round( this.m_G * 255f ) ); - float num3 = (float)( (int)Mathf.Round( this.m_B * 255f ) ); - num = this.TexturedSlider( this.m_RTexture, "R", num, 0f, 255f ); - num2 = this.TexturedSlider( this.m_GTexture, "G", num2, 0f, 255f ); - num3 = this.TexturedSlider( this.m_BTexture, "B", num3, 0f, 255f ); - if( GUI.changed ) { - this.m_R = num / 255f; - this.m_G = num2 / 255f; - this.m_B = num3 / 255f; - this.RGBToHSV(); - } - GUI.changed |= changed; - } - private static Texture2D Update1DSlider( Texture2D tex, int xSize, float const1, float const2, ref float oldConst1, ref float oldConst2, int idx, bool hsvSpace ) { - if( !tex || const1 != oldConst1 || const2 != oldConst2 ) { - if( !tex ) { - tex = SF_ColorPicker.MakeTexture( xSize, 2 ); - } - Color[] array = new Color[xSize * 2]; - Color black = Color.black; - Color black2 = Color.black; - switch( idx ) { - case 0: - black = new Color( 0f, const1, const2, 1f ); - black2 = new Color( 1f, 0f, 0f, 0f ); - break; - case 1: - black = new Color( const1, 0f, const2, 1f ); - black2 = new Color( 0f, 1f, 0f, 0f ); - break; - case 2: - black = new Color( const1, const2, 0f, 1f ); - black2 = new Color( 0f, 0f, 1f, 0f ); - break; - case 3: - black = new Color( 0f, 0f, 0f, 1f ); - black2 = new Color( 1f, 1f, 1f, 0f ); - break; - } - SF_ColorPicker.FillArea( xSize, 2, array, black, black2, new Color( 0f, 0f, 0f, 0f ) ); - if( hsvSpace ) { - SF_ColorPicker.HSVToRGBArray( array ); - } - oldConst1 = const1; - oldConst2 = const2; - tex.SetPixels( array ); - tex.Apply(); - } - return tex; - } - private float TexturedSlider( Texture2D background, string text, float val, float min, float max ) { - Rect rect = GUILayoutUtility.GetRect( 16f, 16f, GUI.skin.label ); - GUI.Label( new Rect( rect.x, rect.y - 1f, 20f, 16f ), text ); - rect.x += 14f; - rect.width -= 50f; - if( Event.current.type == EventType.Repaint ) { - Rect screenRect = new Rect( rect.x + 1f, rect.y + 2f, rect.width - 2f, rect.height - 4f ); - Graphics.DrawTexture( screenRect, background, new Rect( 0.5f / (float)background.width, 0.5f / (float)background.height, 1f - 1f / (float)background.width, 1f - 1f / (float)background.height ), 0, 0, 0, 0, Color.grey ); - } - int controlID = EditorGUI.GetControlID( 869045, EditorGUIUtility.native, base.position ); - bool changed = GUI.changed; - GUI.changed = false; - val = GUI.HorizontalSlider( new Rect( rect.x, rect.y + 1f, rect.width, rect.height - 2f ), val, min, max, SF_ColorPicker.styles.pickerBox, SF_ColorPicker.styles.thumbHoriz ); - if( GUI.changed && EditorGUI.s_RecycledEditor.IsEditingControl( controlID ) ) { - EditorGUI.s_RecycledEditor.EndEditing(); - } - Rect position = new Rect( rect.xMax + 6f, rect.y, 30f, 16f ); - val = (float)( (int)EditorGUI.DoFloatField( EditorGUI.s_RecycledEditor, position, new Rect( 0f, 0f, 0f, 0f ), controlID, val, EditorGUI.kIntFieldFormatString, EditorStyles.numberField, false ) ); - val = Mathf.Clamp( val, min, max ); - GUI.changed |= changed; - return val; - } - private void HSVSliders() { - bool changed = GUI.changed; - GUI.changed = false; - this.m_HueTexture = SF_ColorPicker.Update1DSlider( this.m_HueTexture, 64, 1f, 1f, ref this.m_HueTextureS, ref this.m_HueTextureV, 0, true ); - this.m_SatTexture = SF_ColorPicker.Update1DSlider( this.m_SatTexture, 8, this.m_H, Mathf.Max( this.m_V, 0.2f ), ref this.m_SatTextureH, ref this.m_SatTextureV, 1, true ); - this.m_ValTexture = SF_ColorPicker.Update1DSlider( this.m_ValTexture, 8, this.m_H, this.m_S, ref this.m_ValTextureH, ref this.m_ValTextureS, 2, true ); - float num = (float)( (int)Mathf.Round( this.m_H * 359f ) ); - float num2 = (float)( (int)Mathf.Round( this.m_S * 255f ) ); - float num3 = (float)( (int)Mathf.Round( this.m_V * 255f ) ); - num = this.TexturedSlider( this.m_HueTexture, "H", num, 0f, 359f ); - num2 = this.TexturedSlider( this.m_SatTexture, "S", num2, 0f, 255f ); - num3 = this.TexturedSlider( this.m_ValTexture, "V", num3, 0f, 255f ); - if( GUI.changed ) { - this.m_H = num / 359f; - this.m_S = num2 / 255f; - this.m_V = num3 / 255f; - this.HSVToRGB(); - } - GUI.changed |= changed; - } - private static void FillArea( int xSize, int ySize, Color[] retval, Color topLeftColor, Color rightGradient, Color downGradient ) { - Color b = new Color( 0f, 0f, 0f, 0f ); - Color b2 = new Color( 0f, 0f, 0f, 0f ); - if( xSize > 1 ) { - b = rightGradient / (float)( xSize - 1 ); - } - if( ySize > 1 ) { - b2 = downGradient / (float)( ySize - 1 ); - } - Color color = topLeftColor; - int num = 0; - for( int i = 0; i < ySize; i++ ) { - Color color2 = color; - for( int j = 0; j < xSize; j++ ) { - retval[num++] = color2; - color2 += b; - } - color += b2; - } - } - private static void HSVToRGBArray( Color[] colors ) { - int num = colors.Length; - for( int i = 0; i < num; i++ ) { - Color color = colors[i]; - Color color2 = EditorGUIUtility.HSVToRGB( color.r, color.g, color.b ); - color2.a = color.a; - colors[i] = color2; - } - } - private void DrawColorSlider( Rect colorSliderRect, Vector2 constantValues ) { - if( Event.current.type != EventType.Repaint ) { - return; - } - if( this.m_ColorBoxMode != (SF_ColorPicker.ColorBoxMode)this.m_TextureColorSliderMode ) { - int num = (int)this.m_ColorSliderSize; - int num2; - if( this.m_ColorBoxMode == SF_ColorPicker.ColorBoxMode.SV_H ) { - num2 = 64; - } else { - num2 = (int)this.m_ColorSliderSize; - } - if( this.m_ColorSlider == null ) { - this.m_ColorSlider = SF_ColorPicker.MakeTexture( num, num2 ); - } - if( this.m_ColorSlider.width != num || this.m_ColorSlider.height != num2 ) { - this.m_ColorSlider.Resize( num, num2 ); - } - } - if( this.m_ColorBoxMode != (SF_ColorPicker.ColorBoxMode)this.m_TextureColorSliderMode || constantValues != this.m_LastConstantValues ) { - Color[] pixels = this.m_ColorSlider.GetPixels( 0 ); - int width = this.m_ColorSlider.width; - int height = this.m_ColorSlider.height; - switch( this.m_ColorBoxMode ) { - case SF_ColorPicker.ColorBoxMode.SV_H: - SF_ColorPicker.FillArea( width, height, pixels, new Color( 0f, 1f, 1f, 1f ), new Color( 0f, 0f, 0f, 0f ), new Color( 1f, 0f, 0f, 0f ) ); - SF_ColorPicker.HSVToRGBArray( pixels ); - break; - case SF_ColorPicker.ColorBoxMode.HV_S: - SF_ColorPicker.FillArea( width, height, pixels, new Color( this.m_H, 0f, Mathf.Max( this.m_V, 0.3f ), 1f ), new Color( 0f, 0f, 0f, 0f ), new Color( 0f, 1f, 0f, 0f ) ); - SF_ColorPicker.HSVToRGBArray( pixels ); - break; - case SF_ColorPicker.ColorBoxMode.HS_V: - SF_ColorPicker.FillArea( width, height, pixels, new Color( this.m_H, this.m_S, 0f, 1f ), new Color( 0f, 0f, 0f, 0f ), new Color( 0f, 0f, 1f, 0f ) ); - SF_ColorPicker.HSVToRGBArray( pixels ); - break; - case SF_ColorPicker.ColorBoxMode.BG_R: - SF_ColorPicker.FillArea( width, height, pixels, new Color( 0f, this.m_G, this.m_B, 1f ), new Color( 0f, 0f, 0f, 0f ), new Color( 1f, 0f, 0f, 0f ) ); - break; - case SF_ColorPicker.ColorBoxMode.BR_G: - SF_ColorPicker.FillArea( width, height, pixels, new Color( this.m_R, 0f, this.m_B, 1f ), new Color( 0f, 0f, 0f, 0f ), new Color( 0f, 1f, 0f, 0f ) ); - break; - case SF_ColorPicker.ColorBoxMode.RG_B: - SF_ColorPicker.FillArea( width, height, pixels, new Color( this.m_R, this.m_G, 0f, 1f ), new Color( 0f, 0f, 0f, 0f ), new Color( 0f, 0f, 1f, 0f ) ); - break; - } - this.m_ColorSlider.SetPixels( pixels, 0 ); - this.m_ColorSlider.Apply( true ); - } - Graphics.DrawTexture( colorSliderRect, this.m_ColorSlider, new Rect( 0.5f / (float)this.m_ColorSlider.width, 0.5f / (float)this.m_ColorSlider.height, 1f - 1f / (float)this.m_ColorSlider.width, 1f - 1f / (float)this.m_ColorSlider.height ), 0, 0, 0, 0, Color.grey ); - } - public static Texture2D MakeTexture( int width, int height ) { - return new Texture2D( width, height, TextureFormat.ARGB32, false ) { - hideFlags = HideFlags.HideAndDontSave, - wrapMode = TextureWrapMode.Clamp - //hideFlags = HideFlags.DontSave - }; - } - private void DrawColorSpaceBox( Rect colorBoxRect, float constantValue ) { - if( Event.current.type != EventType.Repaint ) { - return; - } - if( this.m_ColorBoxMode != (SF_ColorPicker.ColorBoxMode)this.m_TextureColorBoxMode ) { - int num = 8; - int num2; - if( this.m_ColorBoxMode == SF_ColorPicker.ColorBoxMode.HV_S || this.m_ColorBoxMode == SF_ColorPicker.ColorBoxMode.HS_V ) { - num2 = 64; - } else { - num2 = 8; - } - if( this.m_ColorBox == null ) { - this.m_ColorBox = SF_ColorPicker.MakeTexture( num2, num ); - } - if( this.m_ColorBox.width != num2 || this.m_ColorBox.height != num ) { - this.m_ColorBox.Resize( num2, num ); - } - } - if( this.m_ColorBoxMode != (SF_ColorPicker.ColorBoxMode)this.m_TextureColorBoxMode || this.m_LastConstant != constantValue ) { - this.m_Colors = this.m_ColorBox.GetPixels( 0 ); - int width = this.m_ColorBox.width; - int height = this.m_ColorBox.height; - switch( this.m_ColorBoxMode ) { - case SF_ColorPicker.ColorBoxMode.SV_H: - SF_ColorPicker.FillArea( width, height, this.m_Colors, new Color( this.m_H, 0f, 0f, 1f ), new Color( 0f, 1f, 0f, 0f ), new Color( 0f, 0f, 1f, 0f ) ); - SF_ColorPicker.HSVToRGBArray( this.m_Colors ); - break; - case SF_ColorPicker.ColorBoxMode.HV_S: - SF_ColorPicker.FillArea( width, height, this.m_Colors, new Color( 0f, this.m_S, 0f, 1f ), new Color( 1f, 0f, 0f, 0f ), new Color( 0f, 0f, 1f, 0f ) ); - SF_ColorPicker.HSVToRGBArray( this.m_Colors ); - break; - case SF_ColorPicker.ColorBoxMode.HS_V: - SF_ColorPicker.FillArea( width, height, this.m_Colors, new Color( 0f, 0f, this.m_V, 1f ), new Color( 1f, 0f, 0f, 0f ), new Color( 0f, 1f, 0f, 0f ) ); - SF_ColorPicker.HSVToRGBArray( this.m_Colors ); - break; - case SF_ColorPicker.ColorBoxMode.BG_R: - SF_ColorPicker.FillArea( width, height, this.m_Colors, new Color( this.m_R, 0f, 0f, 1f ), new Color( 0f, 0f, 1f, 0f ), new Color( 0f, 1f, 0f, 0f ) ); - break; - case SF_ColorPicker.ColorBoxMode.BR_G: - SF_ColorPicker.FillArea( width, height, this.m_Colors, new Color( 0f, this.m_G, 0f, 1f ), new Color( 0f, 0f, 1f, 0f ), new Color( 1f, 0f, 0f, 0f ) ); - break; - case SF_ColorPicker.ColorBoxMode.RG_B: - SF_ColorPicker.FillArea( width, height, this.m_Colors, new Color( 0f, 0f, this.m_B, 1f ), new Color( 1f, 0f, 0f, 0f ), new Color( 0f, 1f, 0f, 0f ) ); - break; - } - this.m_ColorBox.SetPixels( this.m_Colors, 0 ); - this.m_ColorBox.Apply( true ); - this.m_LastConstant = constantValue; - this.m_TextureColorBoxMode = (int)this.m_ColorBoxMode; - } - Graphics.DrawTexture( colorBoxRect, this.m_ColorBox, new Rect( 0.5f / (float)this.m_ColorBox.width, 0.5f / (float)this.m_ColorBox.height, 1f - 1f / (float)this.m_ColorBox.width, 1f - 1f / (float)this.m_ColorBox.height ), 0, 0, 0, 0, Color.grey ); - } - private void InitIfNeeded() { - if( SF_ColorPicker.styles == null ) { - SF_ColorPicker.styles = new SF_ColorPicker.Styles(); - } - if( this.m_ColorLibraryEditorState == null ) { - this.m_ColorLibraryEditorState = new PresetLibraryEditorState( SF_ColorPicker.presetsEditorPrefID ); - this.m_ColorLibraryEditorState.TransferEditorPrefsState( true ); - } - if( this.m_ColorLibraryEditor == null ) { - ScriptableObjectSaveLoadHelper helper = new ScriptableObjectSaveLoadHelper( "colors", SaveType.Text ); - this.m_ColorLibraryEditor = new PresetLibraryEditor( helper, this.m_ColorLibraryEditorState, new Action( this.PresetClickedCallback ) ); - this.m_ColorLibraryEditor.previewAspect = 1f; - this.m_ColorLibraryEditor.minMaxPreviewHeight = new Vector2( 14f, 14f ); - this.m_ColorLibraryEditor.settingsMenuRightMargin = 2f; - this.m_ColorLibraryEditor.useOnePixelOverlappedGrid = true; - this.m_ColorLibraryEditor.alwaysShowScrollAreaHorizontalLines = false; - this.m_ColorLibraryEditor.marginsForGrid = new RectOffset( 0, 0, 0, 0 ); - this.m_ColorLibraryEditor.marginsForList = new RectOffset( 0, 5, 2, 2 ); - } - } - private void PresetClickedCallback( int clickCount, object presetObject ) { - Color color = (Color)presetObject; - this.SetColor( color ); - this.colorChanged = true; - } - private void DoColorSwatchAndEyedropper() { - GUILayout.BeginHorizontal( new GUILayoutOption[0] ); - if( GUILayout.Button( SF_ColorPicker.styles.eyeDropper, GUIStyle.none, new GUILayoutOption[] - { - GUILayout.Width(40f), - GUILayout.ExpandWidth(false) - } ) ) { - EyeDropper.Start( this.m_Parent ); - this.m_ColorBoxMode = SF_ColorPicker.ColorBoxMode.EyeDropper; - GUIUtility.ExitGUI(); - } - Color color = new Color( this.m_R, this.m_G, this.m_B, this.m_A ); - Rect rect = GUILayoutUtility.GetRect( 20f, 20f, 20f, 20f, SF_ColorPicker.styles.SF_ColorPickerBox, new GUILayoutOption[] - { - GUILayout.ExpandWidth(true) - } ); - EditorGUIUtility.DrawColorSwatch( rect, color, this.m_ShowAlpha ); - if( Event.current.type == EventType.Repaint ) { - SF_ColorPicker.styles.pickerBox.Draw( rect, GUIContent.none, false, false, false, false ); - } - GUILayout.EndHorizontal(); - } - private void DoColorSpaceGUI() { - GUILayout.BeginHorizontal( new GUILayoutOption[0] ); - this.m_ShowColors = GUILayout.Toggle( this.m_ShowColors, SF_ColorPicker.styles.colorToggle, EditorStyles.foldout, new GUILayoutOption[0] ); - GUI.enabled = this.m_ShowColors; - if( GUILayout.Button( SF_ColorPicker.styles.colorCycle, GUIStyle.none, new GUILayoutOption[] - { - GUILayout.ExpandWidth(false) - } ) ) { - this.m_OldColorBoxMode = ( this.m_ColorBoxMode = ( this.m_ColorBoxMode + 1 ) % SF_ColorPicker.ColorBoxMode.EyeDropper ); - } - GUI.enabled = true; - GUILayout.EndHorizontal(); - if( this.m_ShowColors ) { - bool changed = GUI.changed; - GUILayout.BeginHorizontal( new GUILayoutOption[] - { - GUILayout.ExpandHeight(false) - } ); - Rect aspectRect = GUILayoutUtility.GetAspectRect( 1f, SF_ColorPicker.styles.pickerBox, new GUILayoutOption[] - { - GUILayout.MinWidth(64f), - GUILayout.MinHeight(64f), - GUILayout.MaxWidth(256f), - GUILayout.MaxHeight(256f) - } ); - EditorGUILayout.Space(); - Rect rect = GUILayoutUtility.GetRect( 8f, 32f, 64f, 128f, SF_ColorPicker.styles.pickerBox ); - rect.height = aspectRect.height; - GUILayout.EndHorizontal(); - GUI.changed = false; - switch( this.m_ColorBoxMode ) { - case SF_ColorPicker.ColorBoxMode.SV_H: - this.Slider3D( aspectRect, rect, ref this.m_S, ref this.m_V, ref this.m_H, SF_ColorPicker.styles.pickerBox, SF_ColorPicker.styles.thumb2D, SF_ColorPicker.styles.thumbVert ); - if( GUI.changed ) { - this.HSVToRGB(); - } - break; - case SF_ColorPicker.ColorBoxMode.HV_S: - this.Slider3D( aspectRect, rect, ref this.m_H, ref this.m_V, ref this.m_S, SF_ColorPicker.styles.pickerBox, SF_ColorPicker.styles.thumb2D, SF_ColorPicker.styles.thumbVert ); - if( GUI.changed ) { - this.HSVToRGB(); - } - break; - case SF_ColorPicker.ColorBoxMode.HS_V: - this.Slider3D( aspectRect, rect, ref this.m_H, ref this.m_S, ref this.m_V, SF_ColorPicker.styles.pickerBox, SF_ColorPicker.styles.thumb2D, SF_ColorPicker.styles.thumbVert ); - if( GUI.changed ) { - this.HSVToRGB(); - } - break; - case SF_ColorPicker.ColorBoxMode.BG_R: - this.Slider3D( aspectRect, rect, ref this.m_B, ref this.m_G, ref this.m_R, SF_ColorPicker.styles.pickerBox, SF_ColorPicker.styles.thumb2D, SF_ColorPicker.styles.thumbVert ); - if( GUI.changed ) { - this.RGBToHSV(); - } - break; - case SF_ColorPicker.ColorBoxMode.BR_G: - this.Slider3D( aspectRect, rect, ref this.m_B, ref this.m_R, ref this.m_G, SF_ColorPicker.styles.pickerBox, SF_ColorPicker.styles.thumb2D, SF_ColorPicker.styles.thumbVert ); - if( GUI.changed ) { - this.RGBToHSV(); - } - break; - case SF_ColorPicker.ColorBoxMode.RG_B: - this.Slider3D( aspectRect, rect, ref this.m_R, ref this.m_G, ref this.m_B, SF_ColorPicker.styles.pickerBox, SF_ColorPicker.styles.thumb2D, SF_ColorPicker.styles.thumbVert ); - if( GUI.changed ) { - this.RGBToHSV(); - } - break; - case SF_ColorPicker.ColorBoxMode.EyeDropper: - EyeDropper.DrawPreview( Rect.MinMaxRect( aspectRect.x, aspectRect.y, rect.xMax, aspectRect.yMax ) ); - break; - } - GUI.changed |= changed; - } - } - private void DoColorSliders() { - GUILayout.BeginHorizontal( new GUILayoutOption[0] ); - this.m_ShowSliders = GUILayout.Toggle( this.m_ShowSliders, SF_ColorPicker.styles.sliderToggle, EditorStyles.foldout, new GUILayoutOption[0] ); - GUI.enabled = this.m_ShowSliders; - if( GUILayout.Button( SF_ColorPicker.styles.sliderCycle, GUIStyle.none, new GUILayoutOption[] - { - GUILayout.ExpandWidth(false) - } ) ) { - this.m_SliderMode = ( this.m_SliderMode + 1 ) % (SF_ColorPicker.SliderMode)2; - GUI.changed = true; - } - GUI.enabled = true; - GUILayout.EndHorizontal(); - if( this.m_ShowSliders ) { - SF_ColorPicker.SliderMode sliderMode = this.m_SliderMode; - if( sliderMode != SF_ColorPicker.SliderMode.RGB ) { - if( sliderMode == SF_ColorPicker.SliderMode.HSV ) { - this.HSVSliders(); - } - } else { - this.RGBSliders(); - } - if( this.m_ShowAlpha ) { - this.m_AlphaTexture = SF_ColorPicker.Update1DSlider( this.m_AlphaTexture, 8, 0f, 0f, ref this.m_OldAlpha, ref this.m_OldAlpha, 3, false ); - this.m_A = this.TexturedSlider( this.m_AlphaTexture, "A", Mathf.Round( this.m_A * 255f ), 0f, 255f ) / 255f; - } - } - } - private void DoPresetsGUI() { - GUILayout.BeginHorizontal( new GUILayoutOption[0] ); - EditorGUI.BeginChangeCheck(); - this.m_ShowPresets = GUILayout.Toggle( this.m_ShowPresets, SF_ColorPicker.styles.presetsToggle, EditorStyles.foldout, new GUILayoutOption[0] ); - if( EditorGUI.EndChangeCheck() ) { - EditorPrefs.SetInt( "CPPresetsShow", ( !this.m_ShowPresets ) ? 0 : 1 ); - } - GUILayout.Space( 17f ); - GUILayout.EndHorizontal(); - if( this.m_ShowPresets ) { - GUILayout.Space( -18f ); - Rect rect = GUILayoutUtility.GetRect( 0f, Mathf.Clamp( this.m_ColorLibraryEditor.contentHeight, 40f, 250f ) ); - this.m_ColorLibraryEditor.OnGUI( rect, this.m_Color ); - } - } - private void OnGUI() { - this.InitIfNeeded(); - if( this.m_resetKeyboardControl ) { - GUIUtility.keyboardControl = 0; - this.m_resetKeyboardControl = false; - } - EventType type = Event.current.type; - if( type == EventType.ExecuteCommand ) { - string commandName = Event.current.commandName; - switch( commandName ) { - case "EyeDropperUpdate": - base.Repaint(); - break; - case "EyeDropperClicked": { - Color lastPickedColor = EyeDropper.GetLastPickedColor(); - this.m_R = lastPickedColor.r; - this.m_G = lastPickedColor.g; - this.m_B = lastPickedColor.b; - this.RGBToHSV(); - this.m_ColorBoxMode = this.m_OldColorBoxMode; - this.m_Color = new Color( this.m_R, this.m_G, this.m_B, this.m_A ); - this.SendEvent( true ); - break; - } - case "EyeDropperCancelled": - base.Repaint(); - this.m_ColorBoxMode = this.m_OldColorBoxMode; - break; - } - } - EditorGUIUtility.LookLikeControls( 15f, 30f ); - Rect rect = EditorGUILayout.BeginVertical( SF_ColorPicker.styles.background, new GUILayoutOption[0] ); - EditorGUI.BeginChangeCheck(); - this.DoColorSwatchAndEyedropper(); - GUILayout.Space( 10f ); - this.DoColorSpaceGUI(); - GUILayout.Space( 10f ); - this.DoColorSliders(); - GUILayout.Space( 10f ); - if( EditorGUI.EndChangeCheck() ) { - this.colorChanged = true; - } - this.DoPresetsGUI(); - GUILayout.Space( 10f ); - if( this.colorChanged ) { - EditorPrefs.SetInt( "CPSliderShow", ( !this.m_ShowSliders ) ? 0 : 1 ); - EditorPrefs.SetInt( "CPSliderMode", (int)this.m_SliderMode ); - EditorPrefs.SetInt( "CPColorShow", ( !this.m_ShowColors ) ? 0 : 1 ); - EditorPrefs.SetInt( "CPColorMode", (int)this.m_ColorBoxMode ); - } - if( this.colorChanged ) { - this.colorChanged = false; - this.m_Color = new Color( this.m_R, this.m_G, this.m_B, this.m_A ); - this.SendEvent( true ); - } - EditorGUILayout.EndVertical(); - if( rect.height > 0f ) { - this.SetHeight( rect.height ); - } - if( Event.current.type == EventType.KeyDown ) { - KeyCode keyCode = Event.current.keyCode; - if( keyCode != KeyCode.Return ) { - if( keyCode == KeyCode.Escape ) { - this.m_Color = this.m_OriginalColor; - this.SendEvent( false ); - base.Close(); - GUIUtility.ExitGUI(); - return; - } - if( keyCode != KeyCode.KeypadEnter ) { - return; - } - } - base.Close(); - } - } - private void SetHeight( float newHeight ) { - if( newHeight == base.position.height ) { - return; - } - base.minSize = new Vector2( 193f, newHeight ); - base.maxSize = new Vector2( 193f, newHeight ); - } - private void Slider3D( Rect boxPos, Rect sliderPos, ref float x, ref float y, ref float z, GUIStyle box, GUIStyle thumb2D, GUIStyle thumbHoriz ) { - Rect colorBoxRect = boxPos; - colorBoxRect.x += 1f; - colorBoxRect.y += 1f; - colorBoxRect.width -= 2f; - colorBoxRect.height -= 2f; - this.DrawColorSpaceBox( colorBoxRect, z ); - Vector2 value = new Vector2( x, 1f - y ); - value = this.Slider2D( boxPos, value, new Vector2( 0f, 0f ), new Vector2( 1f, 1f ), box, thumb2D ); - x = value.x; - y = 1f - value.y; - Rect colorSliderRect = new Rect( sliderPos.x + 1f, sliderPos.y + 1f, sliderPos.width - 2f, sliderPos.height - 2f ); - this.DrawColorSlider( colorSliderRect, new Vector2( x, y ) ); - z = GUI.VerticalSlider( sliderPos, z, 1f, 0f, box, thumbHoriz ); - } - private void SendEvent( bool exitGUI ) { - if( this.m_DelegateView ) { - Event e = EditorGUIUtility.CommandEvent( "ColorPickerChanged" ); - if( !this.m_IsOSColorPicker ) { - base.Repaint(); - } - this.m_DelegateView.SendEvent( e ); - if( !this.m_IsOSColorPicker && exitGUI ) { - GUIUtility.ExitGUI(); - } - } - } - public void SetColor( Color c ) { - if( this.m_IsOSColorPicker ) { - OSColorPicker.color = c; - } else { - if( this.m_Color.r == c.r && this.m_Color.g == c.g && this.m_Color.b == c.b && this.m_Color.a == c.a ) { - return; - } - this.m_resetKeyboardControl = true; - this.m_Color = c; - this.m_R = c.r; - this.m_G = c.g; - this.m_B = c.b; - this.RGBToHSV(); - this.m_A = c.a; - base.Repaint(); - } - } - public static void Show( GUIView viewToUpdate, Color col ) { - SF_ColorPicker.Show( viewToUpdate, col, true ); - } - public static void Show( GUIView viewToUpdate, Color col, bool showAlpha ) { - SF_ColorPicker.get.m_DelegateView = viewToUpdate; - SF_ColorPicker.color = col; - SF_ColorPicker.get.m_OriginalColor = col; - SF_ColorPicker.get.m_ShowAlpha = showAlpha; - if( SF_ColorPicker.get.m_IsOSColorPicker ) { - OSColorPicker.Show( showAlpha ); - } else { - SF_ColorPicker get = SF_ColorPicker.get; - get.title = "Color"; - float x = (float)EditorPrefs.GetInt( "CPickerWidth", (int)get.position.width ); - float y = (float)EditorPrefs.GetInt( "CPickerHeight", (int)get.position.height ); - get.minSize = new Vector2( x, y ); - get.maxSize = new Vector2( x, y ); - get.ShowAuxWindow(); - } - } - private void PollOSColorPicker() { - if( this.m_IsOSColorPicker ) { - if( !OSColorPicker.visible || Application.platform != RuntimePlatform.OSXEditor ) { - UnityEngine.Object.DestroyImmediate( this ); - } else { - Color color = OSColorPicker.color; - if( this.m_Color != color ) { - this.m_Color = color; - this.SendEvent( true ); - } - } - } - } - public void OnDestroy() { - if( this.m_ColorSlider ) { - UnityEngine.Object.DestroyImmediate( this.m_ColorSlider ); - } - if( this.m_ColorBox ) { - UnityEngine.Object.DestroyImmediate( this.m_ColorBox ); - } - if( this.m_RTexture ) { - UnityEngine.Object.DestroyImmediate( this.m_RTexture ); - } - if( this.m_GTexture ) { - UnityEngine.Object.DestroyImmediate( this.m_GTexture ); - } - if( this.m_BTexture ) { - UnityEngine.Object.DestroyImmediate( this.m_BTexture ); - } - if( this.m_HueTexture ) { - UnityEngine.Object.DestroyImmediate( this.m_HueTexture ); - } - if( this.m_SatTexture ) { - UnityEngine.Object.DestroyImmediate( this.m_SatTexture ); - } - if( this.m_ValTexture ) { - UnityEngine.Object.DestroyImmediate( this.m_ValTexture ); - } - if( this.m_AlphaTexture ) { - UnityEngine.Object.DestroyImmediate( this.m_AlphaTexture ); - } - ColorPicker.s_SharedColorPicker = null; - if( this.m_IsOSColorPicker ) { - OSColorPicker.Close(); - } - EditorApplication.update = (EditorApplication.CallbackFunction)Delegate.Remove( EditorApplication.update, new EditorApplication.CallbackFunction( this.PollOSColorPicker ) ); - if( this.m_ColorLibraryEditorState != null ) { - this.m_ColorLibraryEditorState.TransferEditorPrefsState( false ); - } - this.m_ColorLibraryEditor.UnloadUsedLibraries(); - EditorPrefs.SetInt( "CPickerWidth", (int)base.position.width ); - EditorPrefs.SetInt( "CPickerHeight", (int)base.position.height ); - } - } -} +/* +using System; +using UnityEngine; +using UnityEngineInternal; +using UnityEditor; +using UnityEditorInternal; + +namespace ShaderForge { + public class SF_ColorPicker : EditorWindow { + private enum ColorBoxMode { + SV_H, + HV_S, + HS_V, + BG_R, + BR_G, + RG_B, + EyeDropper + } + private enum SliderMode { + RGB, + HSV + } + private class Styles { + public GUIStyle pickerBox = "ColorPickerBox"; + public GUIStyle thumb2D = "ColorPicker2DThumb"; + public GUIStyle thumbHoriz = "ColorPickerHorizThumb"; + public GUIStyle thumbVert = "ColorPickerVertThumb"; + public GUIStyle headerLine = "IN Title"; + public GUIStyle colorPickerBox = "ColorPickerBox"; + public GUIStyle background = "ColorPickerBackground"; + public GUIContent eyeDropper = EditorGUIUtility.IconContent( "EyeDropper.Large" ); + public GUIContent colorCycle = EditorGUIUtility.IconContent( "ColorPicker.CycleColor" ); + public GUIContent colorToggle = EditorGUIUtility.TextContent( "ColorPicker.ColorFoldout" ); + public GUIContent sliderToggle = EditorGUIUtility.TextContent( "ColorPicker.SliderFoldout" ); + public GUIContent presetsToggle = new GUIContent( "Presets" ); + public GUIContent sliderCycle = EditorGUIUtility.IconContent( "ColorPicker.CycleSlider" ); + } + private const int kHueRes = 64; + private const int kColorBoxSize = 8; + private const int kEyeDropperHeight = 95; + private const int kSlidersHeight = 82; + private const int kColorBoxHeight = 162; + private const int kPresetsHeight = 300; + private static SF_ColorPicker s_SharedColorPicker; + [SerializeField] + private Color m_Color = Color.black; + [SerializeField] + private Color m_OriginalColor; + [SerializeField] + private float m_R; + [SerializeField] + private float m_G; + [SerializeField] + private float m_B; + [SerializeField] + private float m_H; + [SerializeField] + private float m_S; + [SerializeField] + private float m_V; + [SerializeField] + private float m_A = 1f; + [SerializeField] + private float m_ColorSliderSize = 4f; + [SerializeField] + private Texture2D m_ColorSlider; + [SerializeField] + private float m_SliderValue; + [SerializeField] + private Color[] m_Colors; + [SerializeField] + private Texture2D m_ColorBox; + private static int s_Slider2Dhash = "Slider2D".GetHashCode(); + [SerializeField] + private bool m_ShowColors = true; + [SerializeField] + private bool m_ShowSliders = true; + [SerializeField] + private bool m_ShowPresets = true; + [SerializeField] + private bool m_IsOSColorPicker; + [SerializeField] + private bool m_resetKeyboardControl; + [SerializeField] + private bool m_ShowAlpha = true; + private Texture2D m_RTexture; + private float m_RTextureG = -1f; + private float m_RTextureB = -1f; + private Texture2D m_GTexture; + private float m_GTextureR = -1f; + private float m_GTextureB = -1f; + private Texture2D m_BTexture; + private float m_BTextureR = -1f; + private float m_BTextureG = -1f; + [SerializeField] + private Texture2D m_HueTexture; + private float m_HueTextureS = -1f; + private float m_HueTextureV = -1f; + [SerializeField] + private Texture2D m_SatTexture; + private float m_SatTextureH = -1f; + private float m_SatTextureV = -1f; + [SerializeField] + private Texture2D m_ValTexture; + private float m_ValTextureH = -1f; + private float m_ValTextureS = -1f; + [SerializeField] + private int m_TextureColorSliderMode = -1; + [SerializeField] + private Vector2 m_LastConstantValues = new Vector2( -1f, -1f ); + [NonSerialized] + private int m_TextureColorBoxMode = -1; + [SerializeField] + private float m_LastConstant = -1f; + [SerializeField] + private ContainerWindow m_TrackingWindow; + [SerializeField] + private SF_ColorPicker.ColorBoxMode m_ColorBoxMode = SF_ColorPicker.ColorBoxMode.BG_R; + [SerializeField] + private SF_ColorPicker.ColorBoxMode m_OldColorBoxMode; + [SerializeField] + private SF_ColorPicker.SliderMode m_SliderMode = SF_ColorPicker.SliderMode.HSV; + [SerializeField] + private Texture2D m_AlphaTexture; + private float m_OldAlpha = -1f; + [SerializeField] + private GUIView m_DelegateView; + private PresetLibraryEditor m_ColorLibraryEditor; + private PresetLibraryEditorState m_ColorLibraryEditorState; + private static SF_ColorPicker.Styles styles; + public static string presetsEditorPrefID { + get { + return "Color"; + } + } + private bool colorChanged { + get; + set; + } + public static bool visible { + get { + return SF_ColorPicker.s_SharedColorPicker != null; + } + } + public static Color color { + get { + return SF_ColorPicker.get.m_Color; + } + set { + SF_ColorPicker.get.SetColor( value ); + } + } + public static SF_ColorPicker get { + get { + if( !SF_ColorPicker.s_SharedColorPicker ) { + UnityEngine.Object[] array = Resources.FindObjectsOfTypeAll( typeof( SF_ColorPicker ) ); + if( array != null && array.Length > 0 ) { + SF_ColorPicker.s_SharedColorPicker = (SF_ColorPicker)array[0]; + } + if( !SF_ColorPicker.s_SharedColorPicker ) { + SF_ColorPicker.s_SharedColorPicker = ScriptableObject.CreateInstance(); + SF_ColorPicker.s_SharedColorPicker.wantsMouseMove = true; + } + } + return SF_ColorPicker.s_SharedColorPicker; + } + } + public string currentPresetLibrary { + get { + this.InitIfNeeded(); + return this.m_ColorLibraryEditor.currentLibraryWithoutExtension; + } + set { + this.InitIfNeeded(); + this.m_ColorLibraryEditor.currentLibraryWithoutExtension = value; + } + } + public SF_ColorPicker() { + base.hideFlags = HideFlags.DontSave; + this.m_ShowSliders = ( EditorPrefs.GetInt( "CPSliderShow", 1 ) != 0 ); + this.m_SliderMode = (SF_ColorPicker.SliderMode)EditorPrefs.GetInt( "CPSliderMode", 0 ); + this.m_ShowColors = ( EditorPrefs.GetInt( "CPColorShow", 1 ) != 0 ); + this.m_ColorBoxMode = (SF_ColorPicker.ColorBoxMode)EditorPrefs.GetInt( "CPColorMode", 0 ); + this.m_IsOSColorPicker = EditorPrefs.GetBool( "UseOSColorPicker" ); + this.m_ShowPresets = ( EditorPrefs.GetInt( "CPPresetsShow", 1 ) != 0 ); + EditorApplication.update = (EditorApplication.CallbackFunction)Delegate.Combine( EditorApplication.update, new EditorApplication.CallbackFunction( this.PollOSColorPicker ) ); + } + private void OnSelectionChange() { + this.m_resetKeyboardControl = true; + base.Repaint(); + } + private void RGBToHSV() { + EditorGUIUtility.RGBToHSV( new Color( this.m_R, this.m_G, this.m_B, 1f ), out this.m_H, out this.m_S, out this.m_V ); + } + private void HSVToRGB() { + Color color = EditorGUIUtility.HSVToRGB( this.m_H, this.m_S, this.m_V ); + this.m_R = color.r; + this.m_G = color.g; + this.m_B = color.b; + } + private static void swap( ref float f1, ref float f2 ) { + float num = f1; + f1 = f2; + f2 = num; + } + private Vector2 Slider2D( Rect rect, Vector2 value, Vector2 maxvalue, Vector2 minvalue, GUIStyle backStyle, GUIStyle thumbStyle ) { + if( backStyle == null ) { + return value; + } + if( thumbStyle == null ) { + return value; + } + int controlID = GUIUtility.GetControlID( SF_ColorPicker.s_Slider2Dhash, FocusType.Native ); + if( maxvalue.x < minvalue.x ) { + SF_ColorPicker.swap( ref maxvalue.x, ref minvalue.x ); + } + if( maxvalue.y < minvalue.y ) { + SF_ColorPicker.swap( ref maxvalue.y, ref minvalue.y ); + } + float num = ( thumbStyle.fixedHeight != 0f ) ? thumbStyle.fixedHeight : ( (float)thumbStyle.padding.vertical ); + float num2 = ( thumbStyle.fixedWidth != 0f ) ? thumbStyle.fixedWidth : ( (float)thumbStyle.padding.horizontal ); + Vector2 vector = new Vector2( ( rect.width - (float)( backStyle.padding.right + backStyle.padding.left ) - num2 * 2f ) / ( maxvalue.x - minvalue.x ), ( rect.height - (float)( backStyle.padding.top + backStyle.padding.bottom ) - num * 2f ) / ( maxvalue.y - minvalue.y ) ); + Rect position = new Rect( rect.x + value.x * vector.x + num2 / 2f + (float)backStyle.padding.left - minvalue.x * vector.x, rect.y + value.y * vector.y + num / 2f + (float)backStyle.padding.top - minvalue.y * vector.y, num2, num ); + Event current = Event.current; + switch( current.GetTypeForControl( controlID ) ) { + case EventType.MouseDown: + if( rect.Contains( current.mousePosition ) ) { + GUIUtility.hotControl = controlID; + value.x = ( current.mousePosition.x - rect.x - num2 - (float)backStyle.padding.left ) / vector.x + minvalue.x; + value.y = ( current.mousePosition.y - rect.y - num - (float)backStyle.padding.top ) / vector.y + minvalue.y; + GUI.changed = true; + Event.current.Use(); + } + break; + case EventType.MouseUp: + if( GUIUtility.hotControl == controlID ) { + GUIUtility.hotControl = 0; + current.Use(); + } + break; + case EventType.MouseDrag: + if( GUIUtility.hotControl == controlID ) { + value.x = ( current.mousePosition.x - rect.x - num2 - (float)backStyle.padding.left ) / vector.x + minvalue.x; + value.y = ( current.mousePosition.y - rect.y - num - (float)backStyle.padding.top ) / vector.y + minvalue.y; + value.x = Mathf.Clamp( value.x, minvalue.x, maxvalue.x ); + value.y = Mathf.Clamp( value.y, minvalue.y, maxvalue.y ); + GUI.changed = true; + Event.current.Use(); + } + break; + case EventType.Repaint: + backStyle.Draw( rect, GUIContent.none, controlID ); + thumbStyle.Draw( position, GUIContent.none, controlID ); + break; + } + return value; + } + private void RGBSliders() { + bool changed = GUI.changed; + GUI.changed = false; + this.m_RTexture = SF_ColorPicker.Update1DSlider( this.m_RTexture, 8, this.m_G, this.m_B, ref this.m_RTextureG, ref this.m_RTextureB, 0, false ); + this.m_GTexture = SF_ColorPicker.Update1DSlider( this.m_GTexture, 8, this.m_R, this.m_B, ref this.m_GTextureR, ref this.m_GTextureB, 1, false ); + this.m_BTexture = SF_ColorPicker.Update1DSlider( this.m_BTexture, 8, this.m_R, this.m_G, ref this.m_BTextureR, ref this.m_BTextureG, 2, false ); + float num = (float)( (int)Mathf.Round( this.m_R * 255f ) ); + float num2 = (float)( (int)Mathf.Round( this.m_G * 255f ) ); + float num3 = (float)( (int)Mathf.Round( this.m_B * 255f ) ); + num = this.TexturedSlider( this.m_RTexture, "R", num, 0f, 255f ); + num2 = this.TexturedSlider( this.m_GTexture, "G", num2, 0f, 255f ); + num3 = this.TexturedSlider( this.m_BTexture, "B", num3, 0f, 255f ); + if( GUI.changed ) { + this.m_R = num / 255f; + this.m_G = num2 / 255f; + this.m_B = num3 / 255f; + this.RGBToHSV(); + } + GUI.changed |= changed; + } + private static Texture2D Update1DSlider( Texture2D tex, int xSize, float const1, float const2, ref float oldConst1, ref float oldConst2, int idx, bool hsvSpace ) { + if( !tex || const1 != oldConst1 || const2 != oldConst2 ) { + if( !tex ) { + tex = SF_ColorPicker.MakeTexture( xSize, 2 ); + } + Color[] array = new Color[xSize * 2]; + Color black = Color.black; + Color black2 = Color.black; + switch( idx ) { + case 0: + black = new Color( 0f, const1, const2, 1f ); + black2 = new Color( 1f, 0f, 0f, 0f ); + break; + case 1: + black = new Color( const1, 0f, const2, 1f ); + black2 = new Color( 0f, 1f, 0f, 0f ); + break; + case 2: + black = new Color( const1, const2, 0f, 1f ); + black2 = new Color( 0f, 0f, 1f, 0f ); + break; + case 3: + black = new Color( 0f, 0f, 0f, 1f ); + black2 = new Color( 1f, 1f, 1f, 0f ); + break; + } + SF_ColorPicker.FillArea( xSize, 2, array, black, black2, new Color( 0f, 0f, 0f, 0f ) ); + if( hsvSpace ) { + SF_ColorPicker.HSVToRGBArray( array ); + } + oldConst1 = const1; + oldConst2 = const2; + tex.SetPixels( array ); + tex.Apply(); + } + return tex; + } + private float TexturedSlider( Texture2D background, string text, float val, float min, float max ) { + Rect rect = GUILayoutUtility.GetRect( 16f, 16f, GUI.skin.label ); + GUI.Label( new Rect( rect.x, rect.y - 1f, 20f, 16f ), text ); + rect.x += 14f; + rect.width -= 50f; + if( Event.current.type == EventType.Repaint ) { + Rect screenRect = new Rect( rect.x + 1f, rect.y + 2f, rect.width - 2f, rect.height - 4f ); + Graphics.DrawTexture( screenRect, background, new Rect( 0.5f / (float)background.width, 0.5f / (float)background.height, 1f - 1f / (float)background.width, 1f - 1f / (float)background.height ), 0, 0, 0, 0, Color.grey ); + } + int controlID = EditorGUI.GetControlID( 869045, EditorGUIUtility.native, base.position ); + bool changed = GUI.changed; + GUI.changed = false; + val = GUI.HorizontalSlider( new Rect( rect.x, rect.y + 1f, rect.width, rect.height - 2f ), val, min, max, SF_ColorPicker.styles.pickerBox, SF_ColorPicker.styles.thumbHoriz ); + if( GUI.changed && EditorGUI.s_RecycledEditor.IsEditingControl( controlID ) ) { + EditorGUI.s_RecycledEditor.EndEditing(); + } + Rect position = new Rect( rect.xMax + 6f, rect.y, 30f, 16f ); + val = (float)( (int)EditorGUI.DoFloatField( EditorGUI.s_RecycledEditor, position, new Rect( 0f, 0f, 0f, 0f ), controlID, val, EditorGUI.kIntFieldFormatString, EditorStyles.numberField, false ) ); + val = Mathf.Clamp( val, min, max ); + GUI.changed |= changed; + return val; + } + private void HSVSliders() { + bool changed = GUI.changed; + GUI.changed = false; + this.m_HueTexture = SF_ColorPicker.Update1DSlider( this.m_HueTexture, 64, 1f, 1f, ref this.m_HueTextureS, ref this.m_HueTextureV, 0, true ); + this.m_SatTexture = SF_ColorPicker.Update1DSlider( this.m_SatTexture, 8, this.m_H, Mathf.Max( this.m_V, 0.2f ), ref this.m_SatTextureH, ref this.m_SatTextureV, 1, true ); + this.m_ValTexture = SF_ColorPicker.Update1DSlider( this.m_ValTexture, 8, this.m_H, this.m_S, ref this.m_ValTextureH, ref this.m_ValTextureS, 2, true ); + float num = (float)( (int)Mathf.Round( this.m_H * 359f ) ); + float num2 = (float)( (int)Mathf.Round( this.m_S * 255f ) ); + float num3 = (float)( (int)Mathf.Round( this.m_V * 255f ) ); + num = this.TexturedSlider( this.m_HueTexture, "H", num, 0f, 359f ); + num2 = this.TexturedSlider( this.m_SatTexture, "S", num2, 0f, 255f ); + num3 = this.TexturedSlider( this.m_ValTexture, "V", num3, 0f, 255f ); + if( GUI.changed ) { + this.m_H = num / 359f; + this.m_S = num2 / 255f; + this.m_V = num3 / 255f; + this.HSVToRGB(); + } + GUI.changed |= changed; + } + private static void FillArea( int xSize, int ySize, Color[] retval, Color topLeftColor, Color rightGradient, Color downGradient ) { + Color b = new Color( 0f, 0f, 0f, 0f ); + Color b2 = new Color( 0f, 0f, 0f, 0f ); + if( xSize > 1 ) { + b = rightGradient / (float)( xSize - 1 ); + } + if( ySize > 1 ) { + b2 = downGradient / (float)( ySize - 1 ); + } + Color color = topLeftColor; + int num = 0; + for( int i = 0; i < ySize; i++ ) { + Color color2 = color; + for( int j = 0; j < xSize; j++ ) { + retval[num++] = color2; + color2 += b; + } + color += b2; + } + } + private static void HSVToRGBArray( Color[] colors ) { + int num = colors.Length; + for( int i = 0; i < num; i++ ) { + Color color = colors[i]; + Color color2 = EditorGUIUtility.HSVToRGB( color.r, color.g, color.b ); + color2.a = color.a; + colors[i] = color2; + } + } + private void DrawColorSlider( Rect colorSliderRect, Vector2 constantValues ) { + if( Event.current.type != EventType.Repaint ) { + return; + } + if( this.m_ColorBoxMode != (SF_ColorPicker.ColorBoxMode)this.m_TextureColorSliderMode ) { + int num = (int)this.m_ColorSliderSize; + int num2; + if( this.m_ColorBoxMode == SF_ColorPicker.ColorBoxMode.SV_H ) { + num2 = 64; + } else { + num2 = (int)this.m_ColorSliderSize; + } + if( this.m_ColorSlider == null ) { + this.m_ColorSlider = SF_ColorPicker.MakeTexture( num, num2 ); + } + if( this.m_ColorSlider.width != num || this.m_ColorSlider.height != num2 ) { + this.m_ColorSlider.Resize( num, num2 ); + } + } + if( this.m_ColorBoxMode != (SF_ColorPicker.ColorBoxMode)this.m_TextureColorSliderMode || constantValues != this.m_LastConstantValues ) { + Color[] pixels = this.m_ColorSlider.GetPixels( 0 ); + int width = this.m_ColorSlider.width; + int height = this.m_ColorSlider.height; + switch( this.m_ColorBoxMode ) { + case SF_ColorPicker.ColorBoxMode.SV_H: + SF_ColorPicker.FillArea( width, height, pixels, new Color( 0f, 1f, 1f, 1f ), new Color( 0f, 0f, 0f, 0f ), new Color( 1f, 0f, 0f, 0f ) ); + SF_ColorPicker.HSVToRGBArray( pixels ); + break; + case SF_ColorPicker.ColorBoxMode.HV_S: + SF_ColorPicker.FillArea( width, height, pixels, new Color( this.m_H, 0f, Mathf.Max( this.m_V, 0.3f ), 1f ), new Color( 0f, 0f, 0f, 0f ), new Color( 0f, 1f, 0f, 0f ) ); + SF_ColorPicker.HSVToRGBArray( pixels ); + break; + case SF_ColorPicker.ColorBoxMode.HS_V: + SF_ColorPicker.FillArea( width, height, pixels, new Color( this.m_H, this.m_S, 0f, 1f ), new Color( 0f, 0f, 0f, 0f ), new Color( 0f, 0f, 1f, 0f ) ); + SF_ColorPicker.HSVToRGBArray( pixels ); + break; + case SF_ColorPicker.ColorBoxMode.BG_R: + SF_ColorPicker.FillArea( width, height, pixels, new Color( 0f, this.m_G, this.m_B, 1f ), new Color( 0f, 0f, 0f, 0f ), new Color( 1f, 0f, 0f, 0f ) ); + break; + case SF_ColorPicker.ColorBoxMode.BR_G: + SF_ColorPicker.FillArea( width, height, pixels, new Color( this.m_R, 0f, this.m_B, 1f ), new Color( 0f, 0f, 0f, 0f ), new Color( 0f, 1f, 0f, 0f ) ); + break; + case SF_ColorPicker.ColorBoxMode.RG_B: + SF_ColorPicker.FillArea( width, height, pixels, new Color( this.m_R, this.m_G, 0f, 1f ), new Color( 0f, 0f, 0f, 0f ), new Color( 0f, 0f, 1f, 0f ) ); + break; + } + this.m_ColorSlider.SetPixels( pixels, 0 ); + this.m_ColorSlider.Apply( true ); + } + Graphics.DrawTexture( colorSliderRect, this.m_ColorSlider, new Rect( 0.5f / (float)this.m_ColorSlider.width, 0.5f / (float)this.m_ColorSlider.height, 1f - 1f / (float)this.m_ColorSlider.width, 1f - 1f / (float)this.m_ColorSlider.height ), 0, 0, 0, 0, Color.grey ); + } + public static Texture2D MakeTexture( int width, int height ) { + return new Texture2D( width, height, TextureFormat.ARGB32, false ) { + hideFlags = HideFlags.HideAndDontSave, + wrapMode = TextureWrapMode.Clamp + //hideFlags = HideFlags.DontSave + }; + } + private void DrawColorSpaceBox( Rect colorBoxRect, float constantValue ) { + if( Event.current.type != EventType.Repaint ) { + return; + } + if( this.m_ColorBoxMode != (SF_ColorPicker.ColorBoxMode)this.m_TextureColorBoxMode ) { + int num = 8; + int num2; + if( this.m_ColorBoxMode == SF_ColorPicker.ColorBoxMode.HV_S || this.m_ColorBoxMode == SF_ColorPicker.ColorBoxMode.HS_V ) { + num2 = 64; + } else { + num2 = 8; + } + if( this.m_ColorBox == null ) { + this.m_ColorBox = SF_ColorPicker.MakeTexture( num2, num ); + } + if( this.m_ColorBox.width != num2 || this.m_ColorBox.height != num ) { + this.m_ColorBox.Resize( num2, num ); + } + } + if( this.m_ColorBoxMode != (SF_ColorPicker.ColorBoxMode)this.m_TextureColorBoxMode || this.m_LastConstant != constantValue ) { + this.m_Colors = this.m_ColorBox.GetPixels( 0 ); + int width = this.m_ColorBox.width; + int height = this.m_ColorBox.height; + switch( this.m_ColorBoxMode ) { + case SF_ColorPicker.ColorBoxMode.SV_H: + SF_ColorPicker.FillArea( width, height, this.m_Colors, new Color( this.m_H, 0f, 0f, 1f ), new Color( 0f, 1f, 0f, 0f ), new Color( 0f, 0f, 1f, 0f ) ); + SF_ColorPicker.HSVToRGBArray( this.m_Colors ); + break; + case SF_ColorPicker.ColorBoxMode.HV_S: + SF_ColorPicker.FillArea( width, height, this.m_Colors, new Color( 0f, this.m_S, 0f, 1f ), new Color( 1f, 0f, 0f, 0f ), new Color( 0f, 0f, 1f, 0f ) ); + SF_ColorPicker.HSVToRGBArray( this.m_Colors ); + break; + case SF_ColorPicker.ColorBoxMode.HS_V: + SF_ColorPicker.FillArea( width, height, this.m_Colors, new Color( 0f, 0f, this.m_V, 1f ), new Color( 1f, 0f, 0f, 0f ), new Color( 0f, 1f, 0f, 0f ) ); + SF_ColorPicker.HSVToRGBArray( this.m_Colors ); + break; + case SF_ColorPicker.ColorBoxMode.BG_R: + SF_ColorPicker.FillArea( width, height, this.m_Colors, new Color( this.m_R, 0f, 0f, 1f ), new Color( 0f, 0f, 1f, 0f ), new Color( 0f, 1f, 0f, 0f ) ); + break; + case SF_ColorPicker.ColorBoxMode.BR_G: + SF_ColorPicker.FillArea( width, height, this.m_Colors, new Color( 0f, this.m_G, 0f, 1f ), new Color( 0f, 0f, 1f, 0f ), new Color( 1f, 0f, 0f, 0f ) ); + break; + case SF_ColorPicker.ColorBoxMode.RG_B: + SF_ColorPicker.FillArea( width, height, this.m_Colors, new Color( 0f, 0f, this.m_B, 1f ), new Color( 1f, 0f, 0f, 0f ), new Color( 0f, 1f, 0f, 0f ) ); + break; + } + this.m_ColorBox.SetPixels( this.m_Colors, 0 ); + this.m_ColorBox.Apply( true ); + this.m_LastConstant = constantValue; + this.m_TextureColorBoxMode = (int)this.m_ColorBoxMode; + } + Graphics.DrawTexture( colorBoxRect, this.m_ColorBox, new Rect( 0.5f / (float)this.m_ColorBox.width, 0.5f / (float)this.m_ColorBox.height, 1f - 1f / (float)this.m_ColorBox.width, 1f - 1f / (float)this.m_ColorBox.height ), 0, 0, 0, 0, Color.grey ); + } + private void InitIfNeeded() { + if( SF_ColorPicker.styles == null ) { + SF_ColorPicker.styles = new SF_ColorPicker.Styles(); + } + if( this.m_ColorLibraryEditorState == null ) { + this.m_ColorLibraryEditorState = new PresetLibraryEditorState( SF_ColorPicker.presetsEditorPrefID ); + this.m_ColorLibraryEditorState.TransferEditorPrefsState( true ); + } + if( this.m_ColorLibraryEditor == null ) { + ScriptableObjectSaveLoadHelper helper = new ScriptableObjectSaveLoadHelper( "colors", SaveType.Text ); + this.m_ColorLibraryEditor = new PresetLibraryEditor( helper, this.m_ColorLibraryEditorState, new Action( this.PresetClickedCallback ) ); + this.m_ColorLibraryEditor.previewAspect = 1f; + this.m_ColorLibraryEditor.minMaxPreviewHeight = new Vector2( 14f, 14f ); + this.m_ColorLibraryEditor.settingsMenuRightMargin = 2f; + this.m_ColorLibraryEditor.useOnePixelOverlappedGrid = true; + this.m_ColorLibraryEditor.alwaysShowScrollAreaHorizontalLines = false; + this.m_ColorLibraryEditor.marginsForGrid = new RectOffset( 0, 0, 0, 0 ); + this.m_ColorLibraryEditor.marginsForList = new RectOffset( 0, 5, 2, 2 ); + } + } + private void PresetClickedCallback( int clickCount, object presetObject ) { + Color color = (Color)presetObject; + this.SetColor( color ); + this.colorChanged = true; + } + private void DoColorSwatchAndEyedropper() { + GUILayout.BeginHorizontal( new GUILayoutOption[0] ); + if( GUILayout.Button( SF_ColorPicker.styles.eyeDropper, GUIStyle.none, new GUILayoutOption[] + { + GUILayout.Width(40f), + GUILayout.ExpandWidth(false) + } ) ) { + EyeDropper.Start( this.m_Parent ); + this.m_ColorBoxMode = SF_ColorPicker.ColorBoxMode.EyeDropper; + GUIUtility.ExitGUI(); + } + Color color = new Color( this.m_R, this.m_G, this.m_B, this.m_A ); + Rect rect = GUILayoutUtility.GetRect( 20f, 20f, 20f, 20f, SF_ColorPicker.styles.SF_ColorPickerBox, new GUILayoutOption[] + { + GUILayout.ExpandWidth(true) + } ); + EditorGUIUtility.DrawColorSwatch( rect, color, this.m_ShowAlpha ); + if( Event.current.type == EventType.Repaint ) { + SF_ColorPicker.styles.pickerBox.Draw( rect, GUIContent.none, false, false, false, false ); + } + GUILayout.EndHorizontal(); + } + private void DoColorSpaceGUI() { + GUILayout.BeginHorizontal( new GUILayoutOption[0] ); + this.m_ShowColors = GUILayout.Toggle( this.m_ShowColors, SF_ColorPicker.styles.colorToggle, EditorStyles.foldout, new GUILayoutOption[0] ); + GUI.enabled = this.m_ShowColors; + if( GUILayout.Button( SF_ColorPicker.styles.colorCycle, GUIStyle.none, new GUILayoutOption[] + { + GUILayout.ExpandWidth(false) + } ) ) { + this.m_OldColorBoxMode = ( this.m_ColorBoxMode = ( this.m_ColorBoxMode + 1 ) % SF_ColorPicker.ColorBoxMode.EyeDropper ); + } + GUI.enabled = true; + GUILayout.EndHorizontal(); + if( this.m_ShowColors ) { + bool changed = GUI.changed; + GUILayout.BeginHorizontal( new GUILayoutOption[] + { + GUILayout.ExpandHeight(false) + } ); + Rect aspectRect = GUILayoutUtility.GetAspectRect( 1f, SF_ColorPicker.styles.pickerBox, new GUILayoutOption[] + { + GUILayout.MinWidth(64f), + GUILayout.MinHeight(64f), + GUILayout.MaxWidth(256f), + GUILayout.MaxHeight(256f) + } ); + EditorGUILayout.Space(); + Rect rect = GUILayoutUtility.GetRect( 8f, 32f, 64f, 128f, SF_ColorPicker.styles.pickerBox ); + rect.height = aspectRect.height; + GUILayout.EndHorizontal(); + GUI.changed = false; + switch( this.m_ColorBoxMode ) { + case SF_ColorPicker.ColorBoxMode.SV_H: + this.Slider3D( aspectRect, rect, ref this.m_S, ref this.m_V, ref this.m_H, SF_ColorPicker.styles.pickerBox, SF_ColorPicker.styles.thumb2D, SF_ColorPicker.styles.thumbVert ); + if( GUI.changed ) { + this.HSVToRGB(); + } + break; + case SF_ColorPicker.ColorBoxMode.HV_S: + this.Slider3D( aspectRect, rect, ref this.m_H, ref this.m_V, ref this.m_S, SF_ColorPicker.styles.pickerBox, SF_ColorPicker.styles.thumb2D, SF_ColorPicker.styles.thumbVert ); + if( GUI.changed ) { + this.HSVToRGB(); + } + break; + case SF_ColorPicker.ColorBoxMode.HS_V: + this.Slider3D( aspectRect, rect, ref this.m_H, ref this.m_S, ref this.m_V, SF_ColorPicker.styles.pickerBox, SF_ColorPicker.styles.thumb2D, SF_ColorPicker.styles.thumbVert ); + if( GUI.changed ) { + this.HSVToRGB(); + } + break; + case SF_ColorPicker.ColorBoxMode.BG_R: + this.Slider3D( aspectRect, rect, ref this.m_B, ref this.m_G, ref this.m_R, SF_ColorPicker.styles.pickerBox, SF_ColorPicker.styles.thumb2D, SF_ColorPicker.styles.thumbVert ); + if( GUI.changed ) { + this.RGBToHSV(); + } + break; + case SF_ColorPicker.ColorBoxMode.BR_G: + this.Slider3D( aspectRect, rect, ref this.m_B, ref this.m_R, ref this.m_G, SF_ColorPicker.styles.pickerBox, SF_ColorPicker.styles.thumb2D, SF_ColorPicker.styles.thumbVert ); + if( GUI.changed ) { + this.RGBToHSV(); + } + break; + case SF_ColorPicker.ColorBoxMode.RG_B: + this.Slider3D( aspectRect, rect, ref this.m_R, ref this.m_G, ref this.m_B, SF_ColorPicker.styles.pickerBox, SF_ColorPicker.styles.thumb2D, SF_ColorPicker.styles.thumbVert ); + if( GUI.changed ) { + this.RGBToHSV(); + } + break; + case SF_ColorPicker.ColorBoxMode.EyeDropper: + EyeDropper.DrawPreview( Rect.MinMaxRect( aspectRect.x, aspectRect.y, rect.xMax, aspectRect.yMax ) ); + break; + } + GUI.changed |= changed; + } + } + private void DoColorSliders() { + GUILayout.BeginHorizontal( new GUILayoutOption[0] ); + this.m_ShowSliders = GUILayout.Toggle( this.m_ShowSliders, SF_ColorPicker.styles.sliderToggle, EditorStyles.foldout, new GUILayoutOption[0] ); + GUI.enabled = this.m_ShowSliders; + if( GUILayout.Button( SF_ColorPicker.styles.sliderCycle, GUIStyle.none, new GUILayoutOption[] + { + GUILayout.ExpandWidth(false) + } ) ) { + this.m_SliderMode = ( this.m_SliderMode + 1 ) % (SF_ColorPicker.SliderMode)2; + GUI.changed = true; + } + GUI.enabled = true; + GUILayout.EndHorizontal(); + if( this.m_ShowSliders ) { + SF_ColorPicker.SliderMode sliderMode = this.m_SliderMode; + if( sliderMode != SF_ColorPicker.SliderMode.RGB ) { + if( sliderMode == SF_ColorPicker.SliderMode.HSV ) { + this.HSVSliders(); + } + } else { + this.RGBSliders(); + } + if( this.m_ShowAlpha ) { + this.m_AlphaTexture = SF_ColorPicker.Update1DSlider( this.m_AlphaTexture, 8, 0f, 0f, ref this.m_OldAlpha, ref this.m_OldAlpha, 3, false ); + this.m_A = this.TexturedSlider( this.m_AlphaTexture, "A", Mathf.Round( this.m_A * 255f ), 0f, 255f ) / 255f; + } + } + } + private void DoPresetsGUI() { + GUILayout.BeginHorizontal( new GUILayoutOption[0] ); + EditorGUI.BeginChangeCheck(); + this.m_ShowPresets = GUILayout.Toggle( this.m_ShowPresets, SF_ColorPicker.styles.presetsToggle, EditorStyles.foldout, new GUILayoutOption[0] ); + if( EditorGUI.EndChangeCheck() ) { + EditorPrefs.SetInt( "CPPresetsShow", ( !this.m_ShowPresets ) ? 0 : 1 ); + } + GUILayout.Space( 17f ); + GUILayout.EndHorizontal(); + if( this.m_ShowPresets ) { + GUILayout.Space( -18f ); + Rect rect = GUILayoutUtility.GetRect( 0f, Mathf.Clamp( this.m_ColorLibraryEditor.contentHeight, 40f, 250f ) ); + this.m_ColorLibraryEditor.OnGUI( rect, this.m_Color ); + } + } + private void OnGUI() { + this.InitIfNeeded(); + if( this.m_resetKeyboardControl ) { + GUIUtility.keyboardControl = 0; + this.m_resetKeyboardControl = false; + } + EventType type = Event.current.type; + if( type == EventType.ExecuteCommand ) { + string commandName = Event.current.commandName; + switch( commandName ) { + case "EyeDropperUpdate": + base.Repaint(); + break; + case "EyeDropperClicked": { + Color lastPickedColor = EyeDropper.GetLastPickedColor(); + this.m_R = lastPickedColor.r; + this.m_G = lastPickedColor.g; + this.m_B = lastPickedColor.b; + this.RGBToHSV(); + this.m_ColorBoxMode = this.m_OldColorBoxMode; + this.m_Color = new Color( this.m_R, this.m_G, this.m_B, this.m_A ); + this.SendEvent( true ); + break; + } + case "EyeDropperCancelled": + base.Repaint(); + this.m_ColorBoxMode = this.m_OldColorBoxMode; + break; + } + } + EditorGUIUtility.LookLikeControls( 15f, 30f ); + Rect rect = EditorGUILayout.BeginVertical( SF_ColorPicker.styles.background, new GUILayoutOption[0] ); + EditorGUI.BeginChangeCheck(); + this.DoColorSwatchAndEyedropper(); + GUILayout.Space( 10f ); + this.DoColorSpaceGUI(); + GUILayout.Space( 10f ); + this.DoColorSliders(); + GUILayout.Space( 10f ); + if( EditorGUI.EndChangeCheck() ) { + this.colorChanged = true; + } + this.DoPresetsGUI(); + GUILayout.Space( 10f ); + if( this.colorChanged ) { + EditorPrefs.SetInt( "CPSliderShow", ( !this.m_ShowSliders ) ? 0 : 1 ); + EditorPrefs.SetInt( "CPSliderMode", (int)this.m_SliderMode ); + EditorPrefs.SetInt( "CPColorShow", ( !this.m_ShowColors ) ? 0 : 1 ); + EditorPrefs.SetInt( "CPColorMode", (int)this.m_ColorBoxMode ); + } + if( this.colorChanged ) { + this.colorChanged = false; + this.m_Color = new Color( this.m_R, this.m_G, this.m_B, this.m_A ); + this.SendEvent( true ); + } + EditorGUILayout.EndVertical(); + if( rect.height > 0f ) { + this.SetHeight( rect.height ); + } + if( Event.current.type == EventType.KeyDown ) { + KeyCode keyCode = Event.current.keyCode; + if( keyCode != KeyCode.Return ) { + if( keyCode == KeyCode.Escape ) { + this.m_Color = this.m_OriginalColor; + this.SendEvent( false ); + base.Close(); + GUIUtility.ExitGUI(); + return; + } + if( keyCode != KeyCode.KeypadEnter ) { + return; + } + } + base.Close(); + } + } + private void SetHeight( float newHeight ) { + if( newHeight == base.position.height ) { + return; + } + base.minSize = new Vector2( 193f, newHeight ); + base.maxSize = new Vector2( 193f, newHeight ); + } + private void Slider3D( Rect boxPos, Rect sliderPos, ref float x, ref float y, ref float z, GUIStyle box, GUIStyle thumb2D, GUIStyle thumbHoriz ) { + Rect colorBoxRect = boxPos; + colorBoxRect.x += 1f; + colorBoxRect.y += 1f; + colorBoxRect.width -= 2f; + colorBoxRect.height -= 2f; + this.DrawColorSpaceBox( colorBoxRect, z ); + Vector2 value = new Vector2( x, 1f - y ); + value = this.Slider2D( boxPos, value, new Vector2( 0f, 0f ), new Vector2( 1f, 1f ), box, thumb2D ); + x = value.x; + y = 1f - value.y; + Rect colorSliderRect = new Rect( sliderPos.x + 1f, sliderPos.y + 1f, sliderPos.width - 2f, sliderPos.height - 2f ); + this.DrawColorSlider( colorSliderRect, new Vector2( x, y ) ); + z = GUI.VerticalSlider( sliderPos, z, 1f, 0f, box, thumbHoriz ); + } + private void SendEvent( bool exitGUI ) { + if( this.m_DelegateView ) { + Event e = EditorGUIUtility.CommandEvent( "ColorPickerChanged" ); + if( !this.m_IsOSColorPicker ) { + base.Repaint(); + } + this.m_DelegateView.SendEvent( e ); + if( !this.m_IsOSColorPicker && exitGUI ) { + GUIUtility.ExitGUI(); + } + } + } + public void SetColor( Color c ) { + if( this.m_IsOSColorPicker ) { + OSColorPicker.color = c; + } else { + if( this.m_Color.r == c.r && this.m_Color.g == c.g && this.m_Color.b == c.b && this.m_Color.a == c.a ) { + return; + } + this.m_resetKeyboardControl = true; + this.m_Color = c; + this.m_R = c.r; + this.m_G = c.g; + this.m_B = c.b; + this.RGBToHSV(); + this.m_A = c.a; + base.Repaint(); + } + } + public static void Show( GUIView viewToUpdate, Color col ) { + SF_ColorPicker.Show( viewToUpdate, col, true ); + } + public static void Show( GUIView viewToUpdate, Color col, bool showAlpha ) { + SF_ColorPicker.get.m_DelegateView = viewToUpdate; + SF_ColorPicker.color = col; + SF_ColorPicker.get.m_OriginalColor = col; + SF_ColorPicker.get.m_ShowAlpha = showAlpha; + if( SF_ColorPicker.get.m_IsOSColorPicker ) { + OSColorPicker.Show( showAlpha ); + } else { + SF_ColorPicker get = SF_ColorPicker.get; + get.title = "Color"; + float x = (float)EditorPrefs.GetInt( "CPickerWidth", (int)get.position.width ); + float y = (float)EditorPrefs.GetInt( "CPickerHeight", (int)get.position.height ); + get.minSize = new Vector2( x, y ); + get.maxSize = new Vector2( x, y ); + get.ShowAuxWindow(); + } + } + private void PollOSColorPicker() { + if( this.m_IsOSColorPicker ) { + if( !OSColorPicker.visible || Application.platform != RuntimePlatform.OSXEditor ) { + UnityEngine.Object.DestroyImmediate( this ); + } else { + Color color = OSColorPicker.color; + if( this.m_Color != color ) { + this.m_Color = color; + this.SendEvent( true ); + } + } + } + } + public void OnDestroy() { + if( this.m_ColorSlider ) { + UnityEngine.Object.DestroyImmediate( this.m_ColorSlider ); + } + if( this.m_ColorBox ) { + UnityEngine.Object.DestroyImmediate( this.m_ColorBox ); + } + if( this.m_RTexture ) { + UnityEngine.Object.DestroyImmediate( this.m_RTexture ); + } + if( this.m_GTexture ) { + UnityEngine.Object.DestroyImmediate( this.m_GTexture ); + } + if( this.m_BTexture ) { + UnityEngine.Object.DestroyImmediate( this.m_BTexture ); + } + if( this.m_HueTexture ) { + UnityEngine.Object.DestroyImmediate( this.m_HueTexture ); + } + if( this.m_SatTexture ) { + UnityEngine.Object.DestroyImmediate( this.m_SatTexture ); + } + if( this.m_ValTexture ) { + UnityEngine.Object.DestroyImmediate( this.m_ValTexture ); + } + if( this.m_AlphaTexture ) { + UnityEngine.Object.DestroyImmediate( this.m_AlphaTexture ); + } + ColorPicker.s_SharedColorPicker = null; + if( this.m_IsOSColorPicker ) { + OSColorPicker.Close(); + } + EditorApplication.update = (EditorApplication.CallbackFunction)Delegate.Remove( EditorApplication.update, new EditorApplication.CallbackFunction( this.PollOSColorPicker ) ); + if( this.m_ColorLibraryEditorState != null ) { + this.m_ColorLibraryEditorState.TransferEditorPrefsState( false ); + } + this.m_ColorLibraryEditor.UnloadUsedLibraries(); + EditorPrefs.SetInt( "CPickerWidth", (int)base.position.width ); + EditorPrefs.SetInt( "CPickerHeight", (int)base.position.height ); + } + } +} */ \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_ColorPicker.cs.meta b/Editor/Code/_Utility/SF_ColorPicker.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_ColorPicker.cs.meta rename to Editor/Code/_Utility/SF_ColorPicker.cs.meta index 19902f24..24d752e2 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_ColorPicker.cs.meta +++ b/Editor/Code/_Utility/SF_ColorPicker.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 58e7b6eb98a25e6459f959ec5d0ed3bd -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 58e7b6eb98a25e6459f959ec5d0ed3bd +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Debug.cs b/Editor/Code/_Utility/SF_Debug.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Debug.cs rename to Editor/Code/_Utility/SF_Debug.cs index 7d841bed..5b925de6 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Debug.cs +++ b/Editor/Code/_Utility/SF_Debug.cs @@ -1,23 +1,23 @@ -using UnityEngine; -using System.Collections; -using System.Collections.Generic; - -namespace ShaderForge{ - - public static class SF_Debug { - - public static bool nodes = false; - public static bool window = false; - public static bool evalFlow = false; - public static bool screenshot = false; - public static bool ghostNodes = false; - public static bool nodeActions = false; - public static bool performance = false; - public static bool nodePreviews = false; - public static bool dynamicNodeLoad = false; - public static bool deserialization = false; - public static bool renderDataNodes = false; - - } - +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + +namespace ShaderForge{ + + public static class SF_Debug { + + public static bool nodes = false; + public static bool window = false; + public static bool evalFlow = false; + public static bool screenshot = false; + public static bool ghostNodes = false; + public static bool nodeActions = false; + public static bool performance = false; + public static bool nodePreviews = false; + public static bool dynamicNodeLoad = false; + public static bool deserialization = false; + public static bool renderDataNodes = false; + + } + } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Debug.cs.meta b/Editor/Code/_Utility/SF_Debug.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Debug.cs.meta rename to Editor/Code/_Utility/SF_Debug.cs.meta index 2e6b5468..46444f6d --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Debug.cs.meta +++ b/Editor/Code/_Utility/SF_Debug.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 193f27cce31804ce9bc01ff6947651da -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 193f27cce31804ce9bc01ff6947651da +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_DraggableSeparator.cs b/Editor/Code/_Utility/SF_DraggableSeparator.cs old mode 100755 new mode 100644 similarity index 94% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_DraggableSeparator.cs rename to Editor/Code/_Utility/SF_DraggableSeparator.cs index 12147039..5ea4ba70 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_DraggableSeparator.cs +++ b/Editor/Code/_Utility/SF_DraggableSeparator.cs @@ -1,102 +1,102 @@ -using UnityEngine; +using UnityEngine; using UnityEditor; -using System.Collections; - -namespace ShaderForge { - [System.Serializable] - public class SF_DraggableSeparator : ScriptableObject { - - - [SerializeField] - public bool dragging = false; - - [SerializeField] - public Rect rect; - - [SerializeField] - public bool initialized = false; - - public void OnEnable() { - base.hideFlags = HideFlags.HideAndDontSave; - } - - [SerializeField] - int minX; - public int MinX { - get { - return minX; - } - set { - minX = value; - ClampX(); - } - } - - [SerializeField] - int maxX; - public int MaxX { - get { - return maxX; - } - set { - maxX = value; - ClampX(); - } - } - - public void Draw( int yPos, int height ) { - - rect.y = yPos; - rect.height = height; - rect.width = 7; - - GUI.Box( rect, "", EditorStyles.textField ); - Rect rHandle = new Rect( rect ); - rHandle.xMin += 0; - rHandle.xMax -= 0; - Rect uv = new Rect( rect ); - uv.x = 0; - uv.y = 0; - uv.width = 1; - uv.height /= SF_GUI.Handle_drag.height; - GUI.DrawTextureWithTexCoords( rHandle, SF_GUI.Handle_drag, uv ); - - if( rect.Contains( Event.current.mousePosition ) || dragging ) { - SF_GUI.AssignCursor( rect, MouseCursor.ResizeHorizontal ); - } - - if(Event.current.isMouse){ - - if( SF_GUI.ReleasedRawLMB() ) { - StopDrag(); - } - if( dragging ) { - UpdateDrag(); - } - if( SF_GUI.PressedLMB( rect ) ) { - StartDrag(); - } - } - } - - - void ClampX(){ - rect.x = Mathf.Clamp( rect.x, minX, maxX ); - } - int startDragOffset = 0; - void StartDrag() { - dragging = true; - startDragOffset = (int)(Event.current.mousePosition.x - rect.x); - } - void UpdateDrag() { - rect.x = Event.current.mousePosition.x - startDragOffset; - ClampX(); - } - void StopDrag() { - dragging = false; - } - - - } +using System.Collections; + +namespace ShaderForge { + [System.Serializable] + public class SF_DraggableSeparator : ScriptableObject { + + + [SerializeField] + public bool dragging = false; + + [SerializeField] + public Rect rect; + + [SerializeField] + public bool initialized = false; + + public void OnEnable() { + base.hideFlags = HideFlags.HideAndDontSave; + } + + [SerializeField] + int minX; + public int MinX { + get { + return minX; + } + set { + minX = value; + ClampX(); + } + } + + [SerializeField] + int maxX; + public int MaxX { + get { + return maxX; + } + set { + maxX = value; + ClampX(); + } + } + + public void Draw( int yPos, int height ) { + + rect.y = yPos; + rect.height = height; + rect.width = 7; + + GUI.Box( rect, "", EditorStyles.textField ); + Rect rHandle = new Rect( rect ); + rHandle.xMin += 0; + rHandle.xMax -= 0; + Rect uv = new Rect( rect ); + uv.x = 0; + uv.y = 0; + uv.width = 1; + uv.height /= SF_GUI.Handle_drag.height; + GUI.DrawTextureWithTexCoords( rHandle, SF_GUI.Handle_drag, uv ); + + if( rect.Contains( Event.current.mousePosition ) || dragging ) { + SF_GUI.AssignCursor( rect, MouseCursor.ResizeHorizontal ); + } + + if(Event.current.isMouse){ + + if( SF_GUI.ReleasedRawLMB() ) { + StopDrag(); + } + if( dragging ) { + UpdateDrag(); + } + if( SF_GUI.PressedLMB( rect ) ) { + StartDrag(); + } + } + } + + + void ClampX(){ + rect.x = Mathf.Clamp( rect.x, minX, maxX ); + } + int startDragOffset = 0; + void StartDrag() { + dragging = true; + startDragOffset = (int)(Event.current.mousePosition.x - rect.x); + } + void UpdateDrag() { + rect.x = Event.current.mousePosition.x - startDragOffset; + ClampX(); + } + void StopDrag() { + dragging = false; + } + + + } } diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_DraggableSeparator.cs.meta b/Editor/Code/_Utility/SF_DraggableSeparator.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_DraggableSeparator.cs.meta rename to Editor/Code/_Utility/SF_DraggableSeparator.cs.meta index c0eefbb1..d800eeff --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_DraggableSeparator.cs.meta +++ b/Editor/Code/_Utility/SF_DraggableSeparator.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: dd68a761edae39b44918ba61f5f84440 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: dd68a761edae39b44918ba61f5f84440 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Extensions.cs b/Editor/Code/_Utility/SF_Extensions.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Extensions.cs rename to Editor/Code/_Utility/SF_Extensions.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Extensions.cs.meta b/Editor/Code/_Utility/SF_Extensions.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Extensions.cs.meta rename to Editor/Code/_Utility/SF_Extensions.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_GUI.cs b/Editor/Code/_Utility/SF_GUI.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_GUI.cs rename to Editor/Code/_Utility/SF_GUI.cs index 093c2f7f..daedc907 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_GUI.cs +++ b/Editor/Code/_Utility/SF_GUI.cs @@ -23,7 +23,7 @@ public static class SF_GUI { public static void DrawLock(Rect r, string tooltip = null, TextAlignment align = TextAlignment.Right){ - if(Event.current.type != EventType.repaint) + if(Event.current.type != EventType.Repaint) return; Color pCol = GUI.color; @@ -119,112 +119,112 @@ public static Texture2D Screenshot_icon { screenshot_icon = SF_Resources.LoadInterfaceIcon( SkinSuffix( "screenshot_icon" ) ); return screenshot_icon; } - } - - - - - - - private static Texture2D shader_preset_icon_custom; - public static Texture2D Shader_preset_icon_custom { - get { - if( shader_preset_icon_custom == null ) - shader_preset_icon_custom = SF_Resources.LoadInterfaceIcon( "preset_custom" ); - return shader_preset_icon_custom; - } - } - - private static Texture2D shader_preset_icon_litbasic; - public static Texture2D Shader_preset_icon_litbasic { - get { - if( shader_preset_icon_litbasic == null ) - shader_preset_icon_litbasic = SF_Resources.LoadInterfaceIcon( "preset_litbasic" ); - return shader_preset_icon_litbasic; - } - } - - private static Texture2D shader_preset_icon_litpbr; - public static Texture2D Shader_preset_icon_litpbr { - get { - if( shader_preset_icon_litpbr == null ) - shader_preset_icon_litpbr = SF_Resources.LoadInterfaceIcon( "preset_litpbr" ); - return shader_preset_icon_litpbr; - } - } - - private static Texture2D shader_preset_icon_particleadditive; - public static Texture2D Shader_preset_icon_particleadditive { - get { - if( shader_preset_icon_particleadditive == null ) - shader_preset_icon_particleadditive = SF_Resources.LoadInterfaceIcon( SkinSuffix("preset_particleadditive") ); - return shader_preset_icon_particleadditive; - } - } - - private static Texture2D shader_preset_icon_particlealphablended; - public static Texture2D Shader_preset_icon_particlealphablended { - get { - if( shader_preset_icon_particlealphablended == null ) - shader_preset_icon_particlealphablended = SF_Resources.LoadInterfaceIcon( SkinSuffix("preset_particlealphablended") ); - return shader_preset_icon_particlealphablended; - } - } - - private static Texture2D shader_preset_icon_particlemultiplicative; - public static Texture2D Shader_preset_icon_particlemultiplicative { - get { - if( shader_preset_icon_particlemultiplicative == null ) - shader_preset_icon_particlemultiplicative = SF_Resources.LoadInterfaceIcon( SkinSuffix("preset_particlemultiplicative") ); - return shader_preset_icon_particlemultiplicative; - } - } - - private static Texture2D shader_preset_icon_sky; - public static Texture2D Shader_preset_icon_sky { - get { - if( shader_preset_icon_sky == null ) - shader_preset_icon_sky = SF_Resources.LoadInterfaceIcon( "preset_sky" ); - return shader_preset_icon_sky; - } - } - - private static Texture2D shader_preset_icon_sprite; - public static Texture2D Shader_preset_icon_sprite { - get { - if( shader_preset_icon_sprite == null ) - shader_preset_icon_sprite = SF_Resources.LoadInterfaceIcon( "preset_sprite" ); - return shader_preset_icon_sprite; - } - } - - private static Texture2D shader_preset_icon_unlit; - public static Texture2D Shader_preset_icon_unlit { - get { - if( shader_preset_icon_unlit == null ) - shader_preset_icon_unlit = SF_Resources.LoadInterfaceIcon( "preset_unlit" ); - return shader_preset_icon_unlit; - } - } - - private static Texture2D shader_preset_icon_highlight; - public static Texture2D Shader_preset_icon_highlight { - get { - if( shader_preset_icon_highlight == null ) - shader_preset_icon_highlight = SF_Resources.LoadInterfaceIcon( "preset_highlight" ); - return shader_preset_icon_highlight; - } - } - - private static Texture2D shader_preset_icon_posteffect; - public static Texture2D Shader_preset_icon_posteffect { - get { - if( shader_preset_icon_posteffect == null ) - shader_preset_icon_posteffect = SF_Resources.LoadInterfaceIcon( "preset_posteffect" ); - return shader_preset_icon_posteffect; - } - } - + } + + + + + + + private static Texture2D shader_preset_icon_custom; + public static Texture2D Shader_preset_icon_custom { + get { + if( shader_preset_icon_custom == null ) + shader_preset_icon_custom = SF_Resources.LoadInterfaceIcon( "preset_custom" ); + return shader_preset_icon_custom; + } + } + + private static Texture2D shader_preset_icon_litbasic; + public static Texture2D Shader_preset_icon_litbasic { + get { + if( shader_preset_icon_litbasic == null ) + shader_preset_icon_litbasic = SF_Resources.LoadInterfaceIcon( "preset_litbasic" ); + return shader_preset_icon_litbasic; + } + } + + private static Texture2D shader_preset_icon_litpbr; + public static Texture2D Shader_preset_icon_litpbr { + get { + if( shader_preset_icon_litpbr == null ) + shader_preset_icon_litpbr = SF_Resources.LoadInterfaceIcon( "preset_litpbr" ); + return shader_preset_icon_litpbr; + } + } + + private static Texture2D shader_preset_icon_particleadditive; + public static Texture2D Shader_preset_icon_particleadditive { + get { + if( shader_preset_icon_particleadditive == null ) + shader_preset_icon_particleadditive = SF_Resources.LoadInterfaceIcon( SkinSuffix("preset_particleadditive") ); + return shader_preset_icon_particleadditive; + } + } + + private static Texture2D shader_preset_icon_particlealphablended; + public static Texture2D Shader_preset_icon_particlealphablended { + get { + if( shader_preset_icon_particlealphablended == null ) + shader_preset_icon_particlealphablended = SF_Resources.LoadInterfaceIcon( SkinSuffix("preset_particlealphablended") ); + return shader_preset_icon_particlealphablended; + } + } + + private static Texture2D shader_preset_icon_particlemultiplicative; + public static Texture2D Shader_preset_icon_particlemultiplicative { + get { + if( shader_preset_icon_particlemultiplicative == null ) + shader_preset_icon_particlemultiplicative = SF_Resources.LoadInterfaceIcon( SkinSuffix("preset_particlemultiplicative") ); + return shader_preset_icon_particlemultiplicative; + } + } + + private static Texture2D shader_preset_icon_sky; + public static Texture2D Shader_preset_icon_sky { + get { + if( shader_preset_icon_sky == null ) + shader_preset_icon_sky = SF_Resources.LoadInterfaceIcon( "preset_sky" ); + return shader_preset_icon_sky; + } + } + + private static Texture2D shader_preset_icon_sprite; + public static Texture2D Shader_preset_icon_sprite { + get { + if( shader_preset_icon_sprite == null ) + shader_preset_icon_sprite = SF_Resources.LoadInterfaceIcon( "preset_sprite" ); + return shader_preset_icon_sprite; + } + } + + private static Texture2D shader_preset_icon_unlit; + public static Texture2D Shader_preset_icon_unlit { + get { + if( shader_preset_icon_unlit == null ) + shader_preset_icon_unlit = SF_Resources.LoadInterfaceIcon( "preset_unlit" ); + return shader_preset_icon_unlit; + } + } + + private static Texture2D shader_preset_icon_highlight; + public static Texture2D Shader_preset_icon_highlight { + get { + if( shader_preset_icon_highlight == null ) + shader_preset_icon_highlight = SF_Resources.LoadInterfaceIcon( "preset_highlight" ); + return shader_preset_icon_highlight; + } + } + + private static Texture2D shader_preset_icon_posteffect; + public static Texture2D Shader_preset_icon_posteffect { + get { + if( shader_preset_icon_posteffect == null ) + shader_preset_icon_posteffect = SF_Resources.LoadInterfaceIcon( "preset_posteffect" ); + return shader_preset_icon_posteffect; + } + } + @@ -333,35 +333,35 @@ public static bool PressedLMB( Rect r ) { } public static bool PressedLMB() { - return ( Event.current.type == EventType.mouseDown ) && ( Event.current.button == 0 ); + return ( Event.current.type == EventType.MouseDown ) && ( Event.current.button == 0 ); } public static bool ReleasedLMB() { - return ( Event.current.type == EventType.mouseUp ) && ( Event.current.button == 0 ); + return ( Event.current.type == EventType.MouseUp ) && ( Event.current.button == 0 ); } public static bool PressedMMB() { - return ( Event.current.type == EventType.mouseDown ) && ( Event.current.button == 2 ); + return ( Event.current.type == EventType.MouseDown ) && ( Event.current.button == 2 ); } public static bool ReleasedRawMMB() { - return ( Event.current.rawType == EventType.mouseUp ) && ( Event.current.button == 2 ); + return ( Event.current.rawType == EventType.MouseUp ) && ( Event.current.button == 2 ); } public static bool ReleasedRawLMB() { - return ( Event.current.rawType == EventType.mouseUp ) && ( Event.current.button == 0 ); + return ( Event.current.rawType == EventType.MouseUp ) && ( Event.current.button == 0 ); } public static bool ReleasedRawRMB() { - return ( Event.current.rawType == EventType.mouseUp ) && ( Event.current.button == 1 ); + return ( Event.current.rawType == EventType.MouseUp ) && ( Event.current.button == 1 ); } public static bool PressedRMB() { - return ( Event.current.type == EventType.mouseDown ) && ( Event.current.button == 1 ); + return ( Event.current.type == EventType.MouseDown ) && ( Event.current.button == 1 ); } public static bool ReleasedRMB() { - return ( Event.current.type == EventType.mouseUp ) && ( Event.current.button == 1 ); + return ( Event.current.type == EventType.MouseUp ) && ( Event.current.button == 1 ); } public static bool HoldingAlt() { @@ -376,17 +376,17 @@ public static bool HoldingShift() { return ( Event.current.modifiers & EventModifiers.Shift ) != 0; // Shift is held } - public static bool HoldingControl() { - if( Application.platform == RuntimePlatform.OSXEditor ) - return ( Event.current.modifiers & EventModifiers.Command ) != 0; // Command is held - else { + public static bool HoldingControl() { + if( Application.platform == RuntimePlatform.OSXEditor ) + return ( Event.current.modifiers & EventModifiers.Command ) != 0; // Command is held + else { return ( Event.current.control ); // Control is held } - + } public static bool PressedDelete(){ - if(Event.current.type != EventType.keyDown) + if(Event.current.type != EventType.KeyDown) return false; if(Event.current.keyCode == KeyCode.Delete) // Windows / Mac extended keyboard delete @@ -690,12 +690,12 @@ public static int ContentScaledToolbar(Rect r, string label, int selected, strin style = EditorStyles.miniButtonRight; } else if( i > 0 ) { style = EditorStyles.miniButtonMid; - } - - bool prev = selected == i; - bool newVal = GUI.Toggle( rTemp, prev, labels[i], style ); - if( newVal != prev ) { - retval = i; + } + + bool prev = selected == i; + bool newVal = GUI.Toggle( rTemp, prev, labels[i], style ); + if( newVal != prev ) { + retval = i; } rTemp.x += rTemp.width; diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_GUI.cs.meta b/Editor/Code/_Utility/SF_GUI.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_GUI.cs.meta rename to Editor/Code/_Utility/SF_GUI.cs.meta index 608f5409..d9933b0c --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_GUI.cs.meta +++ b/Editor/Code/_Utility/SF_GUI.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 729a144b29ff13241b778e1946cde443 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 729a144b29ff13241b778e1946cde443 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Link.cs b/Editor/Code/_Utility/SF_Link.cs similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Link.cs rename to Editor/Code/_Utility/SF_Link.cs index 14910d30..39ab3521 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Link.cs +++ b/Editor/Code/_Utility/SF_Link.cs @@ -26,7 +26,10 @@ public void Establish( SF_Editor editor, LinkingMethod linkMethod = LinkingMetho SF_Node source = editor.GetNodeByID( sNode ); SF_Node target = editor.GetNodeByID( tNode ); // Debug.Log( "Linking " + target.nodeName + " <- " + source.nodeName ); - + if(target==null) + { + return; + } target.GetConnectorByID(tCon).LinkTo( source.GetConnectorByID(sCon), linkMethod ); } diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Link.cs.meta b/Editor/Code/_Utility/SF_Link.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Link.cs.meta rename to Editor/Code/_Utility/SF_Link.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_MinMax.cs b/Editor/Code/_Utility/SF_MinMax.cs old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_MinMax.cs rename to Editor/Code/_Utility/SF_MinMax.cs index 91fd098e..cf7415e7 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_MinMax.cs +++ b/Editor/Code/_Utility/SF_MinMax.cs @@ -2,33 +2,33 @@ using System.Collections; [System.Serializable] -public class SF_MinMax { - - public int min = 0; - public int max = 0; - - public SF_MinMax() { - } - public SF_MinMax(int min, int max) { - this.min = min; - this.max = max; - } - public override string ToString() { - if( min == max ) - return min.ToString(); - return min + "-" + max; - } - public void Reset() { - min = 0; - max = 0; - } - - public bool Empty() { - return ( min == 0 && max == 0 ); - } - - public static SF_MinMax operator +( SF_MinMax a, SF_MinMax b ) { - return new SF_MinMax(a.min+b.min, a.max+b.max); +public class SF_MinMax { + + public int min = 0; + public int max = 0; + + public SF_MinMax() { + } + public SF_MinMax(int min, int max) { + this.min = min; + this.max = max; + } + public override string ToString() { + if( min == max ) + return min.ToString(); + return min + "-" + max; + } + public void Reset() { + min = 0; + max = 0; + } + + public bool Empty() { + return ( min == 0 && max == 0 ); + } + + public static SF_MinMax operator +( SF_MinMax a, SF_MinMax b ) { + return new SF_MinMax(a.min+b.min, a.max+b.max); } } diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_MinMax.cs.meta b/Editor/Code/_Utility/SF_MinMax.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_MinMax.cs.meta rename to Editor/Code/_Utility/SF_MinMax.cs.meta index b9b726d5..67fd3f74 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_MinMax.cs.meta +++ b/Editor/Code/_Utility/SF_MinMax.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 21da7fbe534af9c4598685a217f46190 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 21da7fbe534af9c4598685a217f46190 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Resources.cs b/Editor/Code/_Utility/SF_Resources.cs similarity index 94% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Resources.cs rename to Editor/Code/_Utility/SF_Resources.cs index 82460805..93d8cfe9 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Resources.cs +++ b/Editor/Code/_Utility/SF_Resources.cs @@ -1,77 +1,77 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace ShaderForge{ - - public static class SF_Resources { - - public const string pInterface = "Interface/"; - public const string pFonts = pInterface + "Fonts/"; - public const string pMeshes = "Meshes/"; - public const string pGpuRendering = "GPU Rendering/"; - - - public static T Load(string name) where T : UnityEngine.Object { - return (T)AssetDatabase.LoadAssetAtPath(InternalResourcesPath + name, typeof(T) ); - } - - public static UnityEngine.Object[] LoadAll(string name) { - return AssetDatabase.LoadAllAssetsAtPath(InternalResourcesPath + name ); - } - - public static Texture2D LoadInterfaceIcon(string name){ - string path = InternalResourcesPath + "Interface/" + name; - Texture2D retTex = (Texture2D)AssetDatabase.LoadAssetAtPath(path + ".png", typeof(Texture2D) ); - if(retTex == null){ - retTex = (Texture2D)AssetDatabase.LoadAssetAtPath(path + ".tga", typeof(Texture2D) ); - } - return retTex; - } - - public static Texture2D LoadNodeIcon(string name){ - return (Texture2D)AssetDatabase.LoadAssetAtPath(InternalResourcesPath + "Interface/Nodes/" + name + ".png", typeof(Texture2D) ); - } - - - private static string internalResourcesPath = ""; - public static string InternalResourcesPath{ - get{ - if(string.IsNullOrEmpty(internalResourcesPath)){ - string path; - if(SearchForInternalResourcesPath(out path)){ - internalResourcesPath = path; - } else { - Debug.LogError("Unable to locate the internal resources folder. Make sure your Shader Forge installation is intact"); - SF_Editor.instance.Close(); - } - } - return internalResourcesPath; - } - } - - - - private static bool SearchForInternalResourcesPath( out string path ){ - path = ""; - string partialPath = "/ShaderForge/Editor/InternalResources/"; - string foundPath = null; - foreach(string s in AssetDatabase.GetAllAssetPaths()){ - if(s.Contains(partialPath)){ - foundPath = s; - break; - } - } - if(foundPath == null){ - return false; - } - string[] split = foundPath.Replace(partialPath,"#").Split('#'); - path = split[0] + partialPath; - return true; - } - - - - - } -} +using UnityEngine; +using UnityEditor; +using System.Collections; + +namespace ShaderForge{ + + public static class SF_Resources { + + public const string pInterface = "Interface/"; + public const string pFonts = pInterface + "Fonts/"; + public const string pMeshes = "Meshes/"; + public const string pGpuRendering = "GPURendering/"; + + + public static T Load(string name) where T : UnityEngine.Object { + return (T)AssetDatabase.LoadAssetAtPath(InternalResourcesPath + name, typeof(T) ); + } + + public static UnityEngine.Object[] LoadAll(string name) { + return AssetDatabase.LoadAllAssetsAtPath(InternalResourcesPath + name ); + } + + public static Texture2D LoadInterfaceIcon(string name){ + string path = InternalResourcesPath + "Interface/" + name; + Texture2D retTex = (Texture2D)AssetDatabase.LoadAssetAtPath(path + ".png", typeof(Texture2D) ); + if(retTex == null){ + retTex = (Texture2D)AssetDatabase.LoadAssetAtPath(path + ".tga", typeof(Texture2D) ); + } + return retTex; + } + + public static Texture2D LoadNodeIcon(string name){ + return (Texture2D)AssetDatabase.LoadAssetAtPath(InternalResourcesPath + "Interface/Nodes/" + name + ".png", typeof(Texture2D) ); + } + + + private static string internalResourcesPath = ""; + public static string InternalResourcesPath{ + get{ + if(string.IsNullOrEmpty(internalResourcesPath)){ + string path; + if(SearchForInternalResourcesPath(out path)){ + internalResourcesPath = path; + } else { + Debug.LogError("Unable to locate the internal resources folder. Make sure your Shader Forge installation is intact"); + SF_Editor.instance.Close(); + } + } + return internalResourcesPath; + } + } + + + + private static bool SearchForInternalResourcesPath( out string path ){ + path = ""; + string partialPath = "/ShaderForge/Editor/InternalResources/"; + string foundPath = null; + foreach(string s in AssetDatabase.GetAllAssetPaths()){ + if(s.Contains(partialPath)){ + foundPath = s; + break; + } + } + if(foundPath == null){ + return false; + } + string[] split = foundPath.Replace(partialPath,"#").Split('#'); + path = split[0] + partialPath; + return true; + } + + + + + } +} diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Resources.cs.meta b/Editor/Code/_Utility/SF_Resources.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Resources.cs.meta rename to Editor/Code/_Utility/SF_Resources.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Styles.cs b/Editor/Code/_Utility/SF_Styles.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Styles.cs rename to Editor/Code/_Utility/SF_Styles.cs index 4d478994..654313fc --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Styles.cs +++ b/Editor/Code/_Utility/SF_Styles.cs @@ -1,337 +1,337 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -using System.Reflection; -using System; - -namespace ShaderForge { - public static class SF_Styles { - - private static Texture2D _iconErrorSmall; - public static Texture2D IconErrorSmall { - get { - return ( _iconErrorSmall = _iconErrorSmall ?? EditorGUIUtility.FindTexture( "console.erroricon.sml" ) ); - } - } - private static Texture2D _iconWarningSmall; - public static Texture2D IconWarningSmall { - get { - return ( _iconWarningSmall = _iconWarningSmall ?? EditorGUIUtility.FindTexture( "console.warnicon.sml" ) ); - } - } - private static GUIStyle _iconLock; - public static GUIStyle IconLock{ - get{ - return ( _iconLock = _iconLock ?? new GUIStyle("IN LockButton") ); - } - } - - private static GUIStyle miniLabelRight; - public static GUIStyle MiniLabelRight { - get { - if( miniLabelRight == null ) { - miniLabelRight = new GUIStyle( EditorStyles.miniLabel ); - miniLabelRight.alignment = TextAnchor.MiddleRight; - } - return miniLabelRight; - } - } - - - - private static GUIStyle largeTextField; - public static GUIStyle LargeTextField { - get { - if( largeTextField == null ) { - largeTextField = new GUIStyle( EditorStyles.textField ); - largeTextField.fontSize = 20; - largeTextField.alignment = TextAnchor.MiddleLeft; - } - return largeTextField; - } - } - - private static GUIStyle smallTextArea; - public static GUIStyle SmallTextArea { - get { - if( smallTextArea == null ) { - smallTextArea = new GUIStyle( EditorStyles.miniLabel ); - smallTextArea.wordWrap = true; - smallTextArea.padding = new RectOffset( 5, 5, 3, 3 ); - smallTextArea.fontSize = EditorStyles.miniLabel.fontSize; - } - return smallTextArea; - } - } - - - private static GUIStyle largeTextFieldNoFrame; - public static GUIStyle LargeTextFieldNoFrame { - get { - if( largeTextFieldNoFrame == null ) { - largeTextFieldNoFrame = new GUIStyle( EditorStyles.label ); - largeTextFieldNoFrame.fontSize = LargeTextField.fontSize; - largeTextFieldNoFrame.alignment = LargeTextField.alignment; - - } - return largeTextFieldNoFrame; - } - } - - private static GUIStyle richTextField; - public static GUIStyle RichTextField { - get { - if( richTextField == null ) { - richTextField = new GUIStyle( EditorStyles.textField ); - richTextField.richText = true; - } - return richTextField; - } - } - - private static GUIStyle richLabel; - public static GUIStyle RichLabel { - get { - if( richLabel == null ) { - richLabel = new GUIStyle( EditorStyles.label ); - richLabel.richText = true; - } - return richLabel; - } - } - - - private static GUIStyle instructionCountRenderer; - public static GUIStyle InstructionCountRenderer { - get { - if( instructionCountRenderer == null ) { - instructionCountRenderer = new GUIStyle( EditorStyles.miniLabel ); - InstructionCountRenderer.alignment = TextAnchor.MiddleRight; - } - return instructionCountRenderer; - } - } - - - private static GUIStyle codeTextArea; - public static GUIStyle CodeTextArea { - get { - if( codeTextArea == null ) { - codeTextArea = new GUIStyle( GUI.skin.textArea ); - codeTextArea.font = SF_Resources.Load( SF_Resources.pFonts + "VeraMono.ttf" ); - codeTextArea.padding = new RectOffset(3,3,3,0); - codeTextArea.wordWrap = false; - } - return codeTextArea; - } - } - - // Bitstream Vera Sans Mono - - - private static GUIStyle miniLabelOverflow; - public static GUIStyle MiniLabelOverflow { - get { - if( miniLabelOverflow == null ) { - miniLabelOverflow = new GUIStyle( EditorStyles.miniLabel ); - miniLabelOverflow.clipping = TextClipping.Overflow; - } - return miniLabelOverflow; - } - } - - private static GUIStyle creditsLabelText; - public static GUIStyle CreditsLabelText { - get { - if( creditsLabelText == null ) { - creditsLabelText = new GUIStyle( EditorStyles.label ); - creditsLabelText.alignment = TextAnchor.MiddleLeft; - creditsLabelText.fixedHeight = 16; - creditsLabelText.padding = new RectOffset(0,0,6,0); - creditsLabelText.clipping = TextClipping.Overflow; - } - return creditsLabelText; - } - } - - private static GUIStyle boldEnumField; - public static GUIStyle BoldEnumField{ - get{ - if(boldEnumField == null){ - boldEnumField = new GUIStyle((GUIStyle)"MiniPopup"); - boldEnumField.fontStyle = FontStyle.Bold; - Color c = SF_GUI.ProSkin ? (Color)new Color32( 161, 225, 87, 255 ) : ((Color)new Color32( 161, 225, 87, 255 ))*0.5f; // Used for variable precision - c.a = 1; - boldEnumField.normal.textColor = c; - boldEnumField.active.textColor = c; - boldEnumField.focused.textColor = c; - - } - return boldEnumField; - } - } - - - private static GUIStyle nodeNameLabelText; - public static GUIStyle GetNodeNameLabelText() { - if( nodeNameLabelText == null ) { - nodeNameLabelText = new GUIStyle( EditorStyles.largeLabel ); - nodeNameLabelText.fontStyle = FontStyle.Bold; - nodeNameLabelText.fontSize = 11; - nodeNameLabelText.alignment = TextAnchor.MiddleCenter; - nodeNameLabelText.normal.textColor = new Color( 0.8f, 0.8f, 0.8f, 1f ); - } - return nodeNameLabelText; - } - - - private static GUIStyle nodeCommentLabelText; - public static GUIStyle GetNodeCommentLabelText() { - if( nodeCommentLabelText == null ) { - nodeCommentLabelText = new GUIStyle( EditorStyles.largeLabel ); - nodeCommentLabelText.fontStyle = FontStyle.Italic; - nodeCommentLabelText.fontSize = 16; - nodeCommentLabelText.alignment = TextAnchor.LowerLeft; - float col = SF_GUI.ProSkin ? 1f : 0f; - nodeCommentLabelText.normal.textColor = new Color( col, col, col, 0.3f ); - } - return nodeCommentLabelText; - } - - private static GUIStyle nodeScreenshotTitleText; - public static GUIStyle GetNodeScreenshotTitleText() { - if( nodeScreenshotTitleText == null ) { - //nodeScreenshotTitleText = new GUIStyle( NodeStyle ); - nodeScreenshotTitleText = new GUIStyle(EditorStyles.boldLabel); - nodeScreenshotTitleText.fontSize = 14; - nodeScreenshotTitleText.alignment = TextAnchor.LowerCenter; - nodeScreenshotTitleText.clipping = TextClipping.Overflow; - float col = SF_GUI.ProSkin ? 1f : 0f; - nodeScreenshotTitleText.normal.textColor = new Color( col, col, col, 0.5f ); - } - return nodeScreenshotTitleText; - } - - - - private static GUIStyle nodeCommentLabelTextField; - public static GUIStyle GetNodeCommentLabelTextField() { - if( nodeCommentLabelTextField == null ) { - nodeCommentLabelTextField = new GUIStyle( EditorStyles.textField ); - nodeCommentLabelTextField.fontStyle = FontStyle.Italic; - nodeCommentLabelTextField.fontSize = 16; - nodeCommentLabelTextField.alignment = TextAnchor.LowerLeft; - nodeCommentLabelTextField.normal.textColor = new Color( 1f, 1f, 1f, 0.3f ); - } - return nodeCommentLabelTextField; - } - - - private static GUIStyle nodeNameLabelBackground; - public static Color nodeNameLabelBackgroundColor = new Color( 0.7f, 0.7f, 0.7f ); - public static GUIStyle GetNodeNameLabelBackground() { - if( nodeNameLabelBackground == null ) { - nodeNameLabelBackground = new GUIStyle( EditorStyles.textField ); - } - return nodeNameLabelBackground; - } - - private static GUIStyle highlightStyle; - public static GUIStyle HighlightStyle { - get { - if( highlightStyle == null ) { - //if( Application.unityVersion.StartsWith("4") ) - highlightStyle = new GUIStyle( (GUIStyle)"flow node 0 on" ); - } - return highlightStyle; - } - } - - - private static GUIStyle selectionStyle; - public static GUIStyle SelectionStyle { - get { - if( selectionStyle == null ) { - //if( Application.unityVersion.StartsWith("4") ) - selectionStyle = new GUIStyle( (GUIStyle)"SelectionRect" ); - } - return selectionStyle; - } - } - - private static GUIStyle nodeStyle; - public static GUIStyle NodeStyle { - get { - if( nodeStyle == null ) { - //if( Application.unityVersion.StartsWith( "4" ) ) - nodeStyle = new GUIStyle( (GUIStyle)"flow node 0" ); - nodeStyle.alignment = TextAnchor.UpperCenter; - if(Application.platform == RuntimePlatform.WindowsEditor) - nodeStyle.fontSize = 9; - else - nodeStyle.fontSize = 11; - nodeStyle.font = EditorStyles.standardFont; - nodeStyle.fontStyle = FontStyle.Bold; - nodeStyle.padding.top = 23; - nodeStyle.padding.left = 1; - //nodeStyle.margin.right = 8; - //nodeStyle.border.right = 25; - nodeStyle.border.left = 25; - if(SF_GUI.ProSkin) - nodeStyle.normal.textColor = new Color( 1f, 1f, 1f, 0.75f ); - else - nodeStyle.normal.textColor = new Color( 0f, 0f, 0f, 0.7f ); - - } - - return nodeStyle; - } - } - - - private static GUIStyle nodeStyleDiscrete; - public static GUIStyle NodeStyleDiscrete{ - get { - if( nodeStyleDiscrete == null ) { - nodeStyleDiscrete = new GUIStyle(NodeStyle); - nodeStyleDiscrete.normal.textColor = SF_GUI.ProSkin ? new Color( 1f, 1f, 1f, 0.75f/5f ) : new Color( 0f, 0f, 0f, 0.7f/5f ); - } - return nodeStyleDiscrete; - } - } - //NodeStyleDiscrete - - - private static GUIStyle toggleDiscrete; - public static GUIStyle ToggleDiscrete { - get { - if( toggleDiscrete == null ) { - toggleDiscrete = new GUIStyle( GUI.skin.toggle ); - toggleDiscrete.fontSize = 10; - } - - return toggleDiscrete; - } - } - - - - // Thanks to Tenebrous! - public static void ListStyles() { - foreach( GUIStyle ss in GUI.skin.customStyles ) { - GUILayout.Label( ss.name ); - EditorGUILayout.LabelField( ss.name, ss ); - } - - FieldInfo f = typeof( EditorGUIUtility ).GetField( "s_IconGUIContents", BindingFlags.NonPublic | BindingFlags.Static ); - Hashtable ff = (Hashtable)f.GetValue( null ); - foreach( DictionaryEntry fff in ff ) { - GUILayout.Label( fff.Key.ToString() ); - GUILayout.Label( (GUIContent)fff.Value ); - } - } - - - - } -} +using UnityEngine; +using UnityEditor; +using System.Collections; +using System.Reflection; +using System; + +namespace ShaderForge { + public static class SF_Styles { + + private static Texture2D _iconErrorSmall; + public static Texture2D IconErrorSmall { + get { + return ( _iconErrorSmall = _iconErrorSmall ?? EditorGUIUtility.FindTexture( "console.erroricon.sml" ) ); + } + } + private static Texture2D _iconWarningSmall; + public static Texture2D IconWarningSmall { + get { + return ( _iconWarningSmall = _iconWarningSmall ?? EditorGUIUtility.FindTexture( "console.warnicon.sml" ) ); + } + } + private static GUIStyle _iconLock; + public static GUIStyle IconLock{ + get{ + return ( _iconLock = _iconLock ?? new GUIStyle("IN LockButton") ); + } + } + + private static GUIStyle miniLabelRight; + public static GUIStyle MiniLabelRight { + get { + if( miniLabelRight == null ) { + miniLabelRight = new GUIStyle( EditorStyles.miniLabel ); + miniLabelRight.alignment = TextAnchor.MiddleRight; + } + return miniLabelRight; + } + } + + + + private static GUIStyle largeTextField; + public static GUIStyle LargeTextField { + get { + if( largeTextField == null ) { + largeTextField = new GUIStyle( EditorStyles.textField ); + largeTextField.fontSize = 20; + largeTextField.alignment = TextAnchor.MiddleLeft; + } + return largeTextField; + } + } + + private static GUIStyle smallTextArea; + public static GUIStyle SmallTextArea { + get { + if( smallTextArea == null ) { + smallTextArea = new GUIStyle( EditorStyles.miniLabel ); + smallTextArea.wordWrap = true; + smallTextArea.padding = new RectOffset( 5, 5, 3, 3 ); + smallTextArea.fontSize = EditorStyles.miniLabel.fontSize; + } + return smallTextArea; + } + } + + + private static GUIStyle largeTextFieldNoFrame; + public static GUIStyle LargeTextFieldNoFrame { + get { + if( largeTextFieldNoFrame == null ) { + largeTextFieldNoFrame = new GUIStyle( EditorStyles.label ); + largeTextFieldNoFrame.fontSize = LargeTextField.fontSize; + largeTextFieldNoFrame.alignment = LargeTextField.alignment; + + } + return largeTextFieldNoFrame; + } + } + + private static GUIStyle richTextField; + public static GUIStyle RichTextField { + get { + if( richTextField == null ) { + richTextField = new GUIStyle( EditorStyles.textField ); + richTextField.richText = true; + } + return richTextField; + } + } + + private static GUIStyle richLabel; + public static GUIStyle RichLabel { + get { + if( richLabel == null ) { + richLabel = new GUIStyle( EditorStyles.label ); + richLabel.richText = true; + } + return richLabel; + } + } + + + private static GUIStyle instructionCountRenderer; + public static GUIStyle InstructionCountRenderer { + get { + if( instructionCountRenderer == null ) { + instructionCountRenderer = new GUIStyle( EditorStyles.miniLabel ); + InstructionCountRenderer.alignment = TextAnchor.MiddleRight; + } + return instructionCountRenderer; + } + } + + + private static GUIStyle codeTextArea; + public static GUIStyle CodeTextArea { + get { + if( codeTextArea == null ) { + codeTextArea = new GUIStyle( GUI.skin.textArea ); + codeTextArea.font = SF_Resources.Load( SF_Resources.pFonts + "VeraMono.ttf" ); + codeTextArea.padding = new RectOffset(3,3,3,0); + codeTextArea.wordWrap = false; + } + return codeTextArea; + } + } + + // Bitstream Vera Sans Mono + + + private static GUIStyle miniLabelOverflow; + public static GUIStyle MiniLabelOverflow { + get { + if( miniLabelOverflow == null ) { + miniLabelOverflow = new GUIStyle( EditorStyles.miniLabel ); + miniLabelOverflow.clipping = TextClipping.Overflow; + } + return miniLabelOverflow; + } + } + + private static GUIStyle creditsLabelText; + public static GUIStyle CreditsLabelText { + get { + if( creditsLabelText == null ) { + creditsLabelText = new GUIStyle( EditorStyles.label ); + creditsLabelText.alignment = TextAnchor.MiddleLeft; + creditsLabelText.fixedHeight = 16; + creditsLabelText.padding = new RectOffset(0,0,6,0); + creditsLabelText.clipping = TextClipping.Overflow; + } + return creditsLabelText; + } + } + + private static GUIStyle boldEnumField; + public static GUIStyle BoldEnumField{ + get{ + if(boldEnumField == null){ + boldEnumField = new GUIStyle((GUIStyle)"MiniPopup"); + boldEnumField.fontStyle = FontStyle.Bold; + Color c = SF_GUI.ProSkin ? (Color)new Color32( 161, 225, 87, 255 ) : ((Color)new Color32( 161, 225, 87, 255 ))*0.5f; // Used for variable precision + c.a = 1; + boldEnumField.normal.textColor = c; + boldEnumField.active.textColor = c; + boldEnumField.focused.textColor = c; + + } + return boldEnumField; + } + } + + + private static GUIStyle nodeNameLabelText; + public static GUIStyle GetNodeNameLabelText() { + if( nodeNameLabelText == null ) { + nodeNameLabelText = new GUIStyle( EditorStyles.largeLabel ); + nodeNameLabelText.fontStyle = FontStyle.Bold; + nodeNameLabelText.fontSize = 11; + nodeNameLabelText.alignment = TextAnchor.MiddleCenter; + nodeNameLabelText.normal.textColor = new Color( 0.8f, 0.8f, 0.8f, 1f ); + } + return nodeNameLabelText; + } + + + private static GUIStyle nodeCommentLabelText; + public static GUIStyle GetNodeCommentLabelText() { + if( nodeCommentLabelText == null ) { + nodeCommentLabelText = new GUIStyle( EditorStyles.largeLabel ); + nodeCommentLabelText.fontStyle = FontStyle.Italic; + nodeCommentLabelText.fontSize = 16; + nodeCommentLabelText.alignment = TextAnchor.LowerLeft; + float col = SF_GUI.ProSkin ? 1f : 0f; + nodeCommentLabelText.normal.textColor = new Color( col, col, col, 0.3f ); + } + return nodeCommentLabelText; + } + + private static GUIStyle nodeScreenshotTitleText; + public static GUIStyle GetNodeScreenshotTitleText() { + if( nodeScreenshotTitleText == null ) { + //nodeScreenshotTitleText = new GUIStyle( NodeStyle ); + nodeScreenshotTitleText = new GUIStyle(EditorStyles.boldLabel); + nodeScreenshotTitleText.fontSize = 14; + nodeScreenshotTitleText.alignment = TextAnchor.LowerCenter; + nodeScreenshotTitleText.clipping = TextClipping.Overflow; + float col = SF_GUI.ProSkin ? 1f : 0f; + nodeScreenshotTitleText.normal.textColor = new Color( col, col, col, 0.5f ); + } + return nodeScreenshotTitleText; + } + + + + private static GUIStyle nodeCommentLabelTextField; + public static GUIStyle GetNodeCommentLabelTextField() { + if( nodeCommentLabelTextField == null ) { + nodeCommentLabelTextField = new GUIStyle( EditorStyles.textField ); + nodeCommentLabelTextField.fontStyle = FontStyle.Italic; + nodeCommentLabelTextField.fontSize = 16; + nodeCommentLabelTextField.alignment = TextAnchor.LowerLeft; + nodeCommentLabelTextField.normal.textColor = new Color( 1f, 1f, 1f, 0.3f ); + } + return nodeCommentLabelTextField; + } + + + private static GUIStyle nodeNameLabelBackground; + public static Color nodeNameLabelBackgroundColor = new Color( 0.7f, 0.7f, 0.7f ); + public static GUIStyle GetNodeNameLabelBackground() { + if( nodeNameLabelBackground == null ) { + nodeNameLabelBackground = new GUIStyle( EditorStyles.textField ); + } + return nodeNameLabelBackground; + } + + private static GUIStyle highlightStyle; + public static GUIStyle HighlightStyle { + get { + if( highlightStyle == null ) { + //if( Application.unityVersion.StartsWith("4") ) + highlightStyle = new GUIStyle( (GUIStyle)"flow node 0 on" ); + } + return highlightStyle; + } + } + + + private static GUIStyle selectionStyle; + public static GUIStyle SelectionStyle { + get { + if( selectionStyle == null ) { + //if( Application.unityVersion.StartsWith("4") ) + selectionStyle = new GUIStyle( (GUIStyle)"SelectionRect" ); + } + return selectionStyle; + } + } + + private static GUIStyle nodeStyle; + public static GUIStyle NodeStyle { + get { + if( nodeStyle == null ) { + //if( Application.unityVersion.StartsWith( "4" ) ) + nodeStyle = new GUIStyle( (GUIStyle)"flow node 0" ); + nodeStyle.alignment = TextAnchor.UpperCenter; + if(Application.platform == RuntimePlatform.WindowsEditor) + nodeStyle.fontSize = 9; + else + nodeStyle.fontSize = 11; + nodeStyle.font = EditorStyles.standardFont; + nodeStyle.fontStyle = FontStyle.Bold; + nodeStyle.padding.top = 23; + nodeStyle.padding.left = 1; + //nodeStyle.margin.right = 8; + //nodeStyle.border.right = 25; + nodeStyle.border.left = 25; + if(SF_GUI.ProSkin) + nodeStyle.normal.textColor = new Color( 1f, 1f, 1f, 0.75f ); + else + nodeStyle.normal.textColor = new Color( 0f, 0f, 0f, 0.7f ); + + } + + return nodeStyle; + } + } + + + private static GUIStyle nodeStyleDiscrete; + public static GUIStyle NodeStyleDiscrete{ + get { + if( nodeStyleDiscrete == null ) { + nodeStyleDiscrete = new GUIStyle(NodeStyle); + nodeStyleDiscrete.normal.textColor = SF_GUI.ProSkin ? new Color( 1f, 1f, 1f, 0.75f/5f ) : new Color( 0f, 0f, 0f, 0.7f/5f ); + } + return nodeStyleDiscrete; + } + } + //NodeStyleDiscrete + + + private static GUIStyle toggleDiscrete; + public static GUIStyle ToggleDiscrete { + get { + if( toggleDiscrete == null ) { + toggleDiscrete = new GUIStyle( GUI.skin.toggle ); + toggleDiscrete.fontSize = 10; + } + + return toggleDiscrete; + } + } + + + + // Thanks to Tenebrous! + public static void ListStyles() { + foreach( GUIStyle ss in GUI.skin.customStyles ) { + GUILayout.Label( ss.name ); + EditorGUILayout.LabelField( ss.name, ss ); + } + + FieldInfo f = typeof( EditorGUIUtility ).GetField( "s_IconGUIContents", BindingFlags.NonPublic | BindingFlags.Static ); + Hashtable ff = (Hashtable)f.GetValue( null ); + foreach( DictionaryEntry fff in ff ) { + GUILayout.Label( fff.Key.ToString() ); + GUILayout.Label( (GUIContent)fff.Value ); + } + } + + + + } +} diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Styles.cs.meta b/Editor/Code/_Utility/SF_Styles.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Styles.cs.meta rename to Editor/Code/_Utility/SF_Styles.cs.meta index 35b377c7..ba5bfa19 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Styles.cs.meta +++ b/Editor/Code/_Utility/SF_Styles.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: efe449f52e390bf4f846e213fd973d30 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: efe449f52e390bf4f846e213fd973d30 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Tools.cs b/Editor/Code/_Utility/SF_Tools.cs old mode 100755 new mode 100644 similarity index 94% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Tools.cs rename to Editor/Code/_Utility/SF_Tools.cs index dbf37e21..14fcfa83 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Tools.cs +++ b/Editor/Code/_Utility/SF_Tools.cs @@ -1,486 +1,490 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -using System; -using System.Reflection; -using System.Text.RegularExpressions; - -namespace ShaderForge { - - [System.Serializable] - public enum RenderPlatform { - d3d9 = 0, // - Direct3D 9 - d3d11 = 1, // - Direct3D 11 / 12 - glcore = 2, // - OpenGL Core - gles = 3, // - OpenGL ES 2.0 - gles3 = 4, // - OpenGL ES 3.0 - metal = 5, // - iOS Metal - d3d11_9x = 6, // - Direct3D 11 windows RT - xboxone = 7, // - Xbox One - ps4 = 8, // - PlayStation 4 - psp2 = 9, // - PlayStation Vita - n3ds = 10, // - Nintendo 3DS - wiiu = 11 // - Nintendo Wii U - }; - - - - public static class SF_Tools { - - // Versioning - public static int versionNumPrimary = 1; - public static int versionNumSecondary = 38; - public static string versionStage = ""; - public static string version = versionNumPrimary + "." + versionNumSecondary.ToString( "D2" ); - public static string versionString = "Shader Forge v" + version; - - // Misc strings - public const string bugReportLabel = "Post bugs & ideas"; - public const string bugReportURL = "https://shaderforge.userecho.com/"; - public const string documentationLabel = "Node Documentation"; - public const string documentationURL = "http://www.acegikmo.com/shaderforge/nodes/"; - public static string[] rendererLabels = new string[]{ - "Direct3D 9", - "Direct3D 11 & 12", - "OpenGL Core", - "OpenGL ES 2.0", - "OpenGL ES 3.0", - "iOS Metal", - "Direct3D 11 for Windows RT/Phone", - "Xbox One", - "PlayStation 4", - "PlayStation Vita", - "Nintendo 3DS", - "Nintendo Wii U" - }; - - public const string alphabetLower = "abcdefghijklmnopqrstuvwxyz"; - public const string alphabetUpper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - - - // Constants - public const int connectorMargin = 4; - - // User prefs - public static bool absColor = false; - public static bool advancedInspector = true; - public static int stationaryCursorRadius = 7; - - - public const float minimumUnityVersion = 5.3f; - - private static float currentUnityVersion = 0f; - public static float CurrentUnityVersion{ - get{ - if(currentUnityVersion == 0f){ - currentUnityVersion = float.Parse(Application.unityVersion.Substring(0,3)); - } - return currentUnityVersion; - } - } - - public static bool CanRunShaderForge(){ - return (CurrentUnityVersion >= minimumUnityVersion); - } - - - public static bool HasUnityPro(){ - return UnityEditorInternal.InternalEditorUtility.HasPro(); - } - - - - - public static void UnityOutOfDateGUI(){ - GUIStyle st = new GUIStyle(EditorStyles.boldLabel); - - st.alignment = TextAnchor.MiddleCenter; - - GUILayout.Label(string.Empty); - GUILayout.Label("You need to install Unity " + SF_Tools.minimumUnityVersion + " or later in order to use Shader Forge", st); - GUILayout.Label("You are currently running Unity version " + Application.unityVersion, st); - if(GUILayout.Button("Update Unity")){ - Application.OpenURL("http://unity3d.com/unity/download"); - } - GUILayout.Label(string.Empty); - } - - public static int ComponentCountOf(CustomValueType cvt){ - - switch(cvt){ - case CustomValueType.Float: - return 1; - case CustomValueType.Half: - return 1; - case CustomValueType.Fixed: - return 1; - case CustomValueType.Float2: - return 2; - case CustomValueType.Half2: - return 2; - case CustomValueType.Fixed2: - return 2; - case CustomValueType.Float3: - return 3; - case CustomValueType.Half3: - return 3; - case CustomValueType.Fixed3: - return 3; - case CustomValueType.Float4: - return 4; - case CustomValueType.Half4: - return 4; - case CustomValueType.Fixed4: - return 4; - case CustomValueType.Sampler2D: - return 4; - default: - // Debug.Log("Invalid component count check of custom value type: " + cvt); - return 16; - } - - - } - - - public static Color VectorToColor( float v ) { - if( absColor ) - v = Mathf.Abs(v); - return new Color( v,v,v ); - } - - public static Color VectorToColor( Vector2 v ) { - if( absColor ) - return new Color( Mathf.Clamp01( Mathf.Abs( v.x ) ), Mathf.Clamp01( Mathf.Abs( v.y ) ), 0f ); - else - return new Color( Mathf.Clamp01( v.x ), Mathf.Clamp01( v.y ), 0f ); - } - - public static Color VectorToColor( Vector3 v ) { - if( absColor ) - return new Color( Mathf.Clamp01( Mathf.Abs( v.x ) ), Mathf.Clamp01( Mathf.Abs( v.y ) ), Mathf.Clamp01( Mathf.Abs( v.z ) ) ); - else - return new Color( Mathf.Clamp01( v.x ), Mathf.Clamp01( v.y ), Mathf.Clamp01( v.z ) ); - } - - public static string AssetToGUID( UnityEngine.Object asset ) { - return AssetDatabase.AssetPathToGUID( AssetDatabase.GetAssetPath( asset ) ); - } - - public static UnityEngine.Object GUIDToAsset( string GUID, Type type ) { - return AssetDatabase.LoadAssetAtPath( AssetDatabase.GUIDToAssetPath( GUID ), type ); - } - - public static float Smooth( float x ) { - return x * x * ( 3f - 2f * x ); - } - - public static float Smoother( float x ) { - return x * x * x * ( x * ( x * 6f - 15f ) + 10f ); - } - - - - public static string PathFromAbsoluteToProject(string s){ - return s.Substring(Application.dataPath.Length-6); - } - - public static void LinkButton(Rect r, string label, string URL, GUIStyle style){ - if( GUI.Button( r, label, style ) ) - Application.OpenURL(URL); - } - - - public static void AssignShaderToMaterialAsset( ref Material m, Shader s ) { - m.shader = s; - } - - public static float[] VectorToArray(Vector4 vec) { - return new float[4] { vec.x, vec.y, vec.z, vec.w }; - } - - public static float[] VectorToArray( float vec ) { - return new float[4] { vec, vec, vec, vec }; - } - - public static Vector3 ToVector3(Color c) { - return new Vector3( c.r, c.g, c.b ); - } - - public static Color ToColor( Vector3 vec ) { - return new Color( vec.x, vec.y, vec.z); - } - - public static float DistChebyshev(Vector2 a, Vector2 b) { - return Mathf.Max( Mathf.Abs(a.x - b.x), Mathf.Abs(a.y - b.y) ); - } - - - private static MethodInfo _doColorPickerMethod; - private static MethodInfo DoColorPickerMethod { - get{ - if(_doColorPickerMethod == null){ - Type t = Type.GetType( "UnityEditor.EditorGUI,UnityEditor" ); - Debug.Log("Type = " + t); - BindingFlags bfs = BindingFlags.Static | BindingFlags.NonPublic; - _doColorPickerMethod = t.GetMethod( "DoColorField", bfs, null, new Type[] { typeof( Rect ), typeof( int ), typeof( Color ), typeof( bool ), typeof( bool ) }, null ); - } - return _doColorPickerMethod; - } - } - - - // private static Color DoColorField(Rect position, int id, Color value, bool showEyedropper, bool showAlpha) - public static Color DoColorPicker( Rect position, Color color, bool showEyedropper, bool showAlpha ) { - //int id = GUIUtility.GetControlID(); - //return (Color)DoColorPickerMethod.Invoke( null, new object[] { position, id, color, showEyedropper, showAlpha } ); - return Color.red; - } - - public static Color FloatToColor( float f ) { - return new Color( f, f, f, f ); - } - - public static float Distance( Color a, Color b, int cc ) { - Color v = a - b; - return Mathf.Sqrt( Dot( v, v, cc ) ); - } - - public static float Dot(Color a, Color b, int compCount) { - - float retVal = 0f; - - for(int i=0;i s.xMax ) - s.xMax = i.xMax; - if( i.xMin < s.xMin ) - s.xMin = i.xMin; - if( i.yMax > s.yMax ) - s.yMax = i.yMax; - if( i.yMin < s.yMin ) - s.yMin = i.yMin; - return s; - } - - - public static void FormatShaderPath(ref string s){ - Regex rgx = new Regex( "[^a-zA-Z0-9/s -_]" ); // Only allow Alphanumeric, forward slash, space, dash and underscore - s = rgx.Replace( s, "" ); - } - - public static void FormatAlphanumeric( ref string s ) { - Regex rgx = new Regex( "[^a-zA-Z0-9-_]" ); // Only allow Alphanumeric, forward slash, space, dash and underscore - s = rgx.Replace( s, "" ); - } - - public static void FormatSerializableComment(ref string s){ - Regex rgx = new Regex( "[^\\w\\s_\\?\\.-]" ); // Only allow Alphanumeric, dot, dash, underscore and questionmark - s = rgx.Replace( s, "" ); - } - - public static void FormatSerializable( ref string s ) { - s = s.Replace( ":", "" ) - .Replace( ";", "" ) - .Replace( ",", "" ) - .Replace( "/*", "" ) - .Replace( "*/", "" ) - .Replace("\"", ""); - } - - public static void FormatSerializableVarName( ref string s ){ - FormatShaderPath(ref s); - - s = s.Replace(" ", string.Empty); - - if(s.Length > 0){ - - int tmp; - while(s.Length > 0 && int.TryParse(s[0].ToString(), out tmp)){ - s = s.Substring(1, s.Length-1); // Remove first character if first is a parsable integer - } - -// if(s.Length == 1){ -// s = s.ToLower(); // Lowercase the one character -// } else { -// char first = s[0]; // Lowercase the first character -// string rest = s.Substring( -// } - } - - } - - - public static Rect GetExpanded( Rect r, float px ) { - r.y -= px; - r.x -= px; - r.width += 2 * px; - r.height += 2 * px; - return r; - } - - - public static bool Intersects( Rect a, Rect b ) { - FlipNegative( ref a ); - FlipNegative( ref b ); - bool c1 = a.xMin < b.xMax; - bool c2 = a.xMax > b.xMin; - bool c3 = a.yMin < b.yMax; - bool c4 = a.yMax > b.yMin; - return c1 && c2 && c3 && c4; - } - - public static void FlipNegative(ref Rect r) { - if( r.width < 0 ) - r.x -= ( r.width *= -1 ); - if( r.height < 0 ) - r.y -= ( r.height *= -1 ); - } - - - public static float DistanceToLines(Vector2 point, Vector2[] line){ - float shortest = float.MaxValue; - - for (int i = 0; i < line.Length-1; i++) { - shortest = Mathf.Min(shortest, DistanceToLine(line[i], line[i+1], point)); - } - - return shortest; - - } - - public static float DistanceToLine(Vector2 a, Vector2 b, Vector2 point){ - // Return minimum distance between line segment vw and point p - float l2 = Vector2.SqrMagnitude(a - b); // i.e. |w-v|^2 - avoid a sqrt - if (l2 == 0.0) - return Vector2.Distance(point, a); // v == w case - // Consider the line extending the segment, parameterized as v + t (w - v). - // We find projection of point p onto the line. - // It falls where t = [(p-v) . (w-v)] / |w-v|^2 - float t = Vector2.Dot(point - a, b - a) / l2; - if (t < 0.0) - return Vector2.Distance(point, a); // Beyond the 'v' end of the segment - else if (t > 1.0) - return Vector2.Distance(point, b); // Beyond the 'w' end of the segment - Vector2 projection = a + t * (b - a); // Projection falls on the segment - return Vector2.Distance(point, projection); - } - - - - public static bool LineIntersection(Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3, out Vector2 intersection){ - - intersection = Vector2.zero; - - Vector2 s1, s2; - s1.x = p1.x - p0.x; - s1.y = p1.y - p0.y; - s2.x = p3.x - p2.x; - s2.y = p3.y - p2.y; - - float s, t, d; - d = -s2.x * s1.y + s1.x * s2.y; - - if(d == 0){ - return false; // Parallel lines, no intersection - } - - Vector2 pDiff = p0 - p2; - s = (-s1.y * pDiff.x + s1.x * pDiff.y) / d; - t = ( s2.x * pDiff.y - s2.y * pDiff.x) / d; - - if (s >= 0 && s <= 1 && t >= 0 && t <= 1) - { - intersection = p0 + (t * s1); - return true; // Intersection! - } - - return false; // No intersection - } - - - - // Returns the first intersection it can find - public static bool LineIntersection(Vector2 p0, Vector2 p1, Vector2[] points, out Vector2 intersection){ - intersection = Vector2.zero; - for(int i=0;i 0; - - } - - - public static string StringToBase64String(string str) { - return System.Convert.ToBase64String( GetBytes( str ) ); - } - - public static string Base64StringToString( string encoded ) { - return GetString( System.Convert.FromBase64String( encoded ) ); - } - - static byte[] GetBytes( string str ) { - byte[] bytes = new byte[str.Length * sizeof( char )]; - System.Buffer.BlockCopy( str.ToCharArray(), 0, bytes, 0, bytes.Length ); - return bytes; - } - - static string GetString( byte[] bytes ) { - char[] chars = new char[bytes.Length / sizeof( char )]; - System.Buffer.BlockCopy( bytes, 0, chars, 0, bytes.Length ); - return new string( chars ); - } - - - } -} +using UnityEngine; +using UnityEditor; +using System.Collections; +using System; +using System.Reflection; +using System.Text.RegularExpressions; + +namespace ShaderForge { + + [System.Serializable] + public enum RenderPlatform { + d3d9 = 0, // - Direct3D 9 + d3d11 = 1, // - Direct3D 11 / 12 + glcore = 2, // - OpenGL Core + gles = 3, // - OpenGL ES 2.0 + gles3 = 4, // - OpenGL ES 3.0 + metal = 5, // - iOS Metal + d3d11_9x = 6, // - Direct3D 11 windows RT + xboxone = 7, // - Xbox One + ps4 = 8, // - PlayStation 4 + psp2 = 9, // - PlayStation Vita + n3ds = 10, // - Nintendo 3DS + wiiu = 11, // - Nintendo Wii U + nswitch = 12, // - Nintendo Switch + vulkan = 13, // - Vulkan + }; + + + + public static class SF_Tools { + + // Versioning + public static int versionNumPrimary = 1; + public static int versionNumSecondary = 42; + public static string versionStage = ""; + public static string version = versionNumPrimary + "." + versionNumSecondary.ToString( "D2" ); + public static string versionString = "Shader Forge v" + version; + + // Misc strings + public const string bugReportLabel = "Post bugs & ideas"; + public const string bugReportURL = "https://shaderforge.userecho.com/"; + public const string documentationLabel = "Node Documentation"; + public const string documentationURL = "http://www.acegikmo.com/shaderforge/nodes/"; + public static string[] rendererLabels = new string[]{ + "Direct3D 9", + "Direct3D 11 & 12", + "OpenGL Core", + "OpenGL ES 2.0", + "OpenGL ES 3.0", + "iOS Metal", + "Direct3D 11 for Windows RT/Phone", + "Xbox One", + "PlayStation 4", + "PlayStation Vita", + "Nintendo 3DS", + "Nintendo Wii U", + "Nintendo Switch", + "Vulkan" + }; + + public const string alphabetLower = "abcdefghijklmnopqrstuvwxyz"; + public const string alphabetUpper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + + + // Constants + public const int connectorMargin = 4; + + // User prefs + public static bool absColor = false; + public static bool advancedInspector = true; + public static int stationaryCursorRadius = 7; + + + public const float minimumUnityVersion = 5.3f; + + private static float currentUnityVersion = 0f; + public static float CurrentUnityVersion{ + get{ + if(currentUnityVersion == 0f){ + currentUnityVersion = float.Parse(Application.unityVersion.Substring(0,3)); + } + return currentUnityVersion; + } + } + + public static bool CanRunShaderForge(){ + return (CurrentUnityVersion >= minimumUnityVersion); + } + + + public static bool HasUnityPro(){ + return UnityEditorInternal.InternalEditorUtility.HasPro(); + } + + + + + public static void UnityOutOfDateGUI(){ + GUIStyle st = new GUIStyle(EditorStyles.boldLabel); + + st.alignment = TextAnchor.MiddleCenter; + + GUILayout.Label(string.Empty); + GUILayout.Label("You need to install Unity " + SF_Tools.minimumUnityVersion + " or later in order to use Shader Forge", st); + GUILayout.Label("You are currently running Unity version " + Application.unityVersion, st); + if(GUILayout.Button("Update Unity")){ + Application.OpenURL("http://unity3d.com/unity/download"); + } + GUILayout.Label(string.Empty); + } + + public static int ComponentCountOf(CustomValueType cvt){ + + switch(cvt){ + case CustomValueType.Float: + return 1; + case CustomValueType.Half: + return 1; + case CustomValueType.Fixed: + return 1; + case CustomValueType.Float2: + return 2; + case CustomValueType.Half2: + return 2; + case CustomValueType.Fixed2: + return 2; + case CustomValueType.Float3: + return 3; + case CustomValueType.Half3: + return 3; + case CustomValueType.Fixed3: + return 3; + case CustomValueType.Float4: + return 4; + case CustomValueType.Half4: + return 4; + case CustomValueType.Fixed4: + return 4; + case CustomValueType.Sampler2D: + return 4; + default: + // Debug.Log("Invalid component count check of custom value type: " + cvt); + return 16; + } + + + } + + + public static Color VectorToColor( float v ) { + if( absColor ) + v = Mathf.Abs(v); + return new Color( v,v,v ); + } + + public static Color VectorToColor( Vector2 v ) { + if( absColor ) + return new Color( Mathf.Clamp01( Mathf.Abs( v.x ) ), Mathf.Clamp01( Mathf.Abs( v.y ) ), 0f ); + else + return new Color( Mathf.Clamp01( v.x ), Mathf.Clamp01( v.y ), 0f ); + } + + public static Color VectorToColor( Vector3 v ) { + if( absColor ) + return new Color( Mathf.Clamp01( Mathf.Abs( v.x ) ), Mathf.Clamp01( Mathf.Abs( v.y ) ), Mathf.Clamp01( Mathf.Abs( v.z ) ) ); + else + return new Color( Mathf.Clamp01( v.x ), Mathf.Clamp01( v.y ), Mathf.Clamp01( v.z ) ); + } + + public static string AssetToGUID( UnityEngine.Object asset ) { + return AssetDatabase.AssetPathToGUID( AssetDatabase.GetAssetPath( asset ) ); + } + + public static UnityEngine.Object GUIDToAsset( string GUID, Type type ) { + return AssetDatabase.LoadAssetAtPath( AssetDatabase.GUIDToAssetPath( GUID ), type ); + } + + public static float Smooth( float x ) { + return x * x * ( 3f - 2f * x ); + } + + public static float Smoother( float x ) { + return x * x * x * ( x * ( x * 6f - 15f ) + 10f ); + } + + + + public static string PathFromAbsoluteToProject(string s){ + return s.Substring(Application.dataPath.Length-6); + } + + public static void LinkButton(Rect r, string label, string URL, GUIStyle style){ + if( GUI.Button( r, label, style ) ) + Application.OpenURL(URL); + } + + + public static void AssignShaderToMaterialAsset( ref Material m, Shader s ) { + m.shader = s; + } + + public static float[] VectorToArray(Vector4 vec) { + return new float[4] { vec.x, vec.y, vec.z, vec.w }; + } + + public static float[] VectorToArray( float vec ) { + return new float[4] { vec, vec, vec, vec }; + } + + public static Vector3 ToVector3(Color c) { + return new Vector3( c.r, c.g, c.b ); + } + + public static Color ToColor( Vector3 vec ) { + return new Color( vec.x, vec.y, vec.z); + } + + public static float DistChebyshev(Vector2 a, Vector2 b) { + return Mathf.Max( Mathf.Abs(a.x - b.x), Mathf.Abs(a.y - b.y) ); + } + + + private static MethodInfo _doColorPickerMethod; + private static MethodInfo DoColorPickerMethod { + get{ + if(_doColorPickerMethod == null){ + Type t = Type.GetType( "UnityEditor.EditorGUI,UnityEditor" ); + Debug.Log("Type = " + t); + BindingFlags bfs = BindingFlags.Static | BindingFlags.NonPublic; + _doColorPickerMethod = t.GetMethod( "DoColorField", bfs, null, new Type[] { typeof( Rect ), typeof( int ), typeof( Color ), typeof( bool ), typeof( bool ) }, null ); + } + return _doColorPickerMethod; + } + } + + + // private static Color DoColorField(Rect position, int id, Color value, bool showEyedropper, bool showAlpha) + public static Color DoColorPicker( Rect position, Color color, bool showEyedropper, bool showAlpha ) { + //int id = GUIUtility.GetControlID(); + //return (Color)DoColorPickerMethod.Invoke( null, new object[] { position, id, color, showEyedropper, showAlpha } ); + return Color.red; + } + + public static Color FloatToColor( float f ) { + return new Color( f, f, f, f ); + } + + public static float Distance( Color a, Color b, int cc ) { + Color v = a - b; + return Mathf.Sqrt( Dot( v, v, cc ) ); + } + + public static float Dot(Color a, Color b, int compCount) { + + float retVal = 0f; + + for(int i=0;i s.xMax ) + s.xMax = i.xMax; + if( i.xMin < s.xMin ) + s.xMin = i.xMin; + if( i.yMax > s.yMax ) + s.yMax = i.yMax; + if( i.yMin < s.yMin ) + s.yMin = i.yMin; + return s; + } + + + public static void FormatShaderPath(ref string s){ + Regex rgx = new Regex( "[^a-zA-Z0-9/s -_]" ); // Only allow Alphanumeric, forward slash, space, dash and underscore + s = rgx.Replace( s, "" ); + } + + public static void FormatAlphanumeric( ref string s ) { + Regex rgx = new Regex( "[^a-zA-Z0-9-_]" ); // Only allow Alphanumeric, forward slash, space, dash and underscore + s = rgx.Replace( s, "" ); + } + + public static void FormatSerializableComment(ref string s){ + Regex rgx = new Regex( "[^\\w\\s_\\?\\.-]" ); // Only allow Alphanumeric, dot, dash, underscore and questionmark + s = rgx.Replace( s, "" ); + } + + public static void FormatSerializable( ref string s ) { + s = s.Replace( ":", "" ) + .Replace( ";", "" ) + .Replace( ",", "" ) + .Replace( "/*", "" ) + .Replace( "*/", "" ) + .Replace("\"", ""); + } + + public static void FormatSerializableVarName( ref string s ){ + FormatShaderPath(ref s); + + s = s.Replace(" ", string.Empty); + + if(s.Length > 0){ + + int tmp; + while(s.Length > 0 && int.TryParse(s[0].ToString(), out tmp)){ + s = s.Substring(1, s.Length-1); // Remove first character if first is a parsable integer + } + +// if(s.Length == 1){ +// s = s.ToLower(); // Lowercase the one character +// } else { +// char first = s[0]; // Lowercase the first character +// string rest = s.Substring( +// } + } + + } + + + public static Rect GetExpanded( Rect r, float px ) { + r.y -= px; + r.x -= px; + r.width += 2 * px; + r.height += 2 * px; + return r; + } + + + public static bool Intersects( Rect a, Rect b ) { + FlipNegative( ref a ); + FlipNegative( ref b ); + bool c1 = a.xMin < b.xMax; + bool c2 = a.xMax > b.xMin; + bool c3 = a.yMin < b.yMax; + bool c4 = a.yMax > b.yMin; + return c1 && c2 && c3 && c4; + } + + public static void FlipNegative(ref Rect r) { + if( r.width < 0 ) + r.x -= ( r.width *= -1 ); + if( r.height < 0 ) + r.y -= ( r.height *= -1 ); + } + + + public static float DistanceToLines(Vector2 point, Vector2[] line){ + float shortest = float.MaxValue; + + for (int i = 0; i < line.Length-1; i++) { + shortest = Mathf.Min(shortest, DistanceToLine(line[i], line[i+1], point)); + } + + return shortest; + + } + + public static float DistanceToLine(Vector2 a, Vector2 b, Vector2 point){ + // Return minimum distance between line segment vw and point p + float l2 = Vector2.SqrMagnitude(a - b); // i.e. |w-v|^2 - avoid a sqrt + if (l2 == 0.0) + return Vector2.Distance(point, a); // v == w case + // Consider the line extending the segment, parameterized as v + t (w - v). + // We find projection of point p onto the line. + // It falls where t = [(p-v) . (w-v)] / |w-v|^2 + float t = Vector2.Dot(point - a, b - a) / l2; + if (t < 0.0) + return Vector2.Distance(point, a); // Beyond the 'v' end of the segment + else if (t > 1.0) + return Vector2.Distance(point, b); // Beyond the 'w' end of the segment + Vector2 projection = a + t * (b - a); // Projection falls on the segment + return Vector2.Distance(point, projection); + } + + + + public static bool LineIntersection(Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3, out Vector2 intersection){ + + intersection = Vector2.zero; + + Vector2 s1, s2; + s1.x = p1.x - p0.x; + s1.y = p1.y - p0.y; + s2.x = p3.x - p2.x; + s2.y = p3.y - p2.y; + + float s, t, d; + d = -s2.x * s1.y + s1.x * s2.y; + + if(d == 0){ + return false; // Parallel lines, no intersection + } + + Vector2 pDiff = p0 - p2; + s = (-s1.y * pDiff.x + s1.x * pDiff.y) / d; + t = ( s2.x * pDiff.y - s2.y * pDiff.x) / d; + + if (s >= 0 && s <= 1 && t >= 0 && t <= 1) + { + intersection = p0 + (t * s1); + return true; // Intersection! + } + + return false; // No intersection + } + + + + // Returns the first intersection it can find + public static bool LineIntersection(Vector2 p0, Vector2 p1, Vector2[] points, out Vector2 intersection){ + intersection = Vector2.zero; + for(int i=0;i 0; + + } + + + public static string StringToBase64String(string str) { + return System.Convert.ToBase64String( GetBytes( str ) ); + } + + public static string Base64StringToString( string encoded ) { + return GetString( System.Convert.FromBase64String( encoded ) ); + } + + static byte[] GetBytes( string str ) { + byte[] bytes = new byte[str.Length * sizeof( char )]; + System.Buffer.BlockCopy( str.ToCharArray(), 0, bytes, 0, bytes.Length ); + return bytes; + } + + static string GetString( byte[] bytes ) { + char[] chars = new char[bytes.Length / sizeof( char )]; + System.Buffer.BlockCopy( bytes, 0, chars, 0, bytes.Length ); + return new string( chars ); + } + + + } +} diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Tools.cs.meta b/Editor/Code/_Utility/SF_Tools.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Tools.cs.meta rename to Editor/Code/_Utility/SF_Tools.cs.meta index beee6963..de8c40ea --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Tools.cs.meta +++ b/Editor/Code/_Utility/SF_Tools.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 57c34190e3ef7294a906d4f71d8764ac -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 57c34190e3ef7294a906d4f71d8764ac +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Web.cs b/Editor/Code/_Utility/SF_Web.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Web.cs rename to Editor/Code/_Utility/SF_Web.cs index 9da797d4..ffef9532 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Web.cs +++ b/Editor/Code/_Utility/SF_Web.cs @@ -1,32 +1,32 @@ -using UnityEngine; -using System.Collections; - -// Web data and access with Shader Forge -// Used for documentation, and perhaps later for update checking as well - -namespace ShaderForge{ - public static class SF_Web { - - - const string urlRoot = "http://acegikmo.com/shaderforge/"; // ?search=add"; - const string urlNodes = urlRoot + "nodes/"; - - - public static void OpenDocumentationForNode(SF_Node node){ - OpenDocumentationForString(node.SearchName); - } - public static void OpenDocumentationForNode(SF_EditorNodeData nodeData){ - OpenDocumentationForString(nodeData.SearchName); - } - - static void OpenDocumentationForString(string s){ - Application.OpenURL( urlNodes + "?search=" + StripExtraChars(s) ); - } - - - static string StripExtraChars(string s){ - return s.Replace(" ","").Replace(".",""); - } - - } -} +using UnityEngine; +using System.Collections; + +// Web data and access with Shader Forge +// Used for documentation, and perhaps later for update checking as well + +namespace ShaderForge{ + public static class SF_Web { + + + const string urlRoot = "http://acegikmo.com/shaderforge/"; // ?search=add"; + const string urlNodes = urlRoot + "nodes/"; + + + public static void OpenDocumentationForNode(SF_Node node){ + OpenDocumentationForString(node.SearchName); + } + public static void OpenDocumentationForNode(SF_EditorNodeData nodeData){ + OpenDocumentationForString(nodeData.SearchName); + } + + static void OpenDocumentationForString(string s){ + Application.OpenURL( urlNodes + "?search=" + StripExtraChars(s) ); + } + + + static string StripExtraChars(string s){ + return s.Replace(" ","").Replace(".",""); + } + + } +} diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Web.cs.meta b/Editor/Code/_Utility/SF_Web.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Web.cs.meta rename to Editor/Code/_Utility/SF_Web.cs.meta index a46be09d..ec43d3bb --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_Web.cs.meta +++ b/Editor/Code/_Utility/SF_Web.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 149fd1a15c5e14ecab3711504e2fad2b -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 149fd1a15c5e14ecab3711504e2fad2b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_ZoomArea.cs b/Editor/Code/_Utility/SF_ZoomArea.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_ZoomArea.cs rename to Editor/Code/_Utility/SF_ZoomArea.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_ZoomArea.cs.meta b/Editor/Code/_Utility/SF_ZoomArea.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SF_ZoomArea.cs.meta rename to Editor/Code/_Utility/SF_ZoomArea.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SerializableDictionary.cs b/Editor/Code/_Utility/SerializableDictionary.cs old mode 100755 new mode 100644 similarity index 96% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SerializableDictionary.cs rename to Editor/Code/_Utility/SerializableDictionary.cs index 068ad2aa..6f7c3db7 --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SerializableDictionary.cs +++ b/Editor/Code/_Utility/SerializableDictionary.cs @@ -1,64 +1,64 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Xml.Serialization; - -namespace ShaderForge { - [XmlRoot( "dictionary" )] - public class SerializableDictionary : Dictionary, IXmlSerializable { - #region IXmlSerializable Members - public System.Xml.Schema.XmlSchema GetSchema() { - return null; - } - - public void ReadXml( System.Xml.XmlReader reader ) { - XmlSerializer keySerializer = new XmlSerializer( typeof( TKey ) ); - XmlSerializer valueSerializer = new XmlSerializer( typeof( TValue ) ); - - bool wasEmpty = reader.IsEmptyElement; - reader.Read(); - - if( wasEmpty ) - return; - - while( reader.NodeType != System.Xml.XmlNodeType.EndElement ) { - reader.ReadStartElement( "item" ); - - reader.ReadStartElement( "key" ); - TKey key = (TKey)keySerializer.Deserialize( reader ); - reader.ReadEndElement(); - - reader.ReadStartElement( "value" ); - TValue value = (TValue)valueSerializer.Deserialize( reader ); - reader.ReadEndElement(); - - this.Add( key, value ); - - reader.ReadEndElement(); - reader.MoveToContent(); - } - reader.ReadEndElement(); - } - - public void WriteXml( System.Xml.XmlWriter writer ) { - XmlSerializer keySerializer = new XmlSerializer( typeof( TKey ) ); - XmlSerializer valueSerializer = new XmlSerializer( typeof( TValue ) ); - - foreach( TKey key in this.Keys ) { - writer.WriteStartElement( "item" ); - - writer.WriteStartElement( "key" ); - keySerializer.Serialize( writer, key ); - writer.WriteEndElement(); - - writer.WriteStartElement( "value" ); - TValue value = this[key]; - valueSerializer.Serialize( writer, value ); - writer.WriteEndElement(); - - writer.WriteEndElement(); - } - } - #endregion - } +using System; +using System.Collections.Generic; +using System.Text; +using System.Xml.Serialization; + +namespace ShaderForge { + [XmlRoot( "dictionary" )] + public class SerializableDictionary : Dictionary, IXmlSerializable { + #region IXmlSerializable Members + public System.Xml.Schema.XmlSchema GetSchema() { + return null; + } + + public void ReadXml( System.Xml.XmlReader reader ) { + XmlSerializer keySerializer = new XmlSerializer( typeof( TKey ) ); + XmlSerializer valueSerializer = new XmlSerializer( typeof( TValue ) ); + + bool wasEmpty = reader.IsEmptyElement; + reader.Read(); + + if( wasEmpty ) + return; + + while( reader.NodeType != System.Xml.XmlNodeType.EndElement ) { + reader.ReadStartElement( "item" ); + + reader.ReadStartElement( "key" ); + TKey key = (TKey)keySerializer.Deserialize( reader ); + reader.ReadEndElement(); + + reader.ReadStartElement( "value" ); + TValue value = (TValue)valueSerializer.Deserialize( reader ); + reader.ReadEndElement(); + + this.Add( key, value ); + + reader.ReadEndElement(); + reader.MoveToContent(); + } + reader.ReadEndElement(); + } + + public void WriteXml( System.Xml.XmlWriter writer ) { + XmlSerializer keySerializer = new XmlSerializer( typeof( TKey ) ); + XmlSerializer valueSerializer = new XmlSerializer( typeof( TValue ) ); + + foreach( TKey key in this.Keys ) { + writer.WriteStartElement( "item" ); + + writer.WriteStartElement( "key" ); + keySerializer.Serialize( writer, key ); + writer.WriteEndElement(); + + writer.WriteStartElement( "value" ); + TValue value = this[key]; + valueSerializer.Serialize( writer, value ); + writer.WriteEndElement(); + + writer.WriteEndElement(); + } + } + #endregion + } } \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SerializableDictionary.cs.meta b/Editor/Code/_Utility/SerializableDictionary.cs.meta old mode 100755 new mode 100644 similarity index 95% rename from Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SerializableDictionary.cs.meta rename to Editor/Code/_Utility/SerializableDictionary.cs.meta index d4a5bc6f..440dcbbc --- a/Shader Forge/Assets/ShaderForge/Editor/Code/_Utility/SerializableDictionary.cs.meta +++ b/Editor/Code/_Utility/SerializableDictionary.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: 7a1a116097ee8bf4f89ff5b55aced743 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: +fileFormatVersion: 2 +guid: 7a1a116097ee8bf4f89ff5b55aced743 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources.meta b/Editor/InternalResources.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources.meta rename to Editor/InternalResources.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering.meta b/Editor/InternalResources/GPURendering.meta similarity index 58% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering.meta rename to Editor/InternalResources/GPURendering.meta index cd6c8a72..bd333aab 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering.meta +++ b/Editor/InternalResources/GPURendering.meta @@ -1,9 +1,8 @@ fileFormatVersion: 2 -guid: 8f57ebe8627ffb7449b9789c60a3122e +guid: d6eb556106d5bbb40a97fad0fce190ef folderAsset: yes -timeCreated: 1444468700 -licenseType: Pro DefaultImporter: + externalObjects: {} userData: assetBundleName: assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/Common.meta b/Editor/InternalResources/GPURendering/Common.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/Common.meta rename to Editor/InternalResources/GPURendering/Common.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/Common/ExtractChannel.shader b/Editor/InternalResources/GPURendering/Common/ExtractChannel.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/Common/ExtractChannel.shader rename to Editor/InternalResources/GPURendering/Common/ExtractChannel.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/Common/ExtractChannel.shader.meta b/Editor/InternalResources/GPURendering/Common/ExtractChannel.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/Common/ExtractChannel.shader.meta rename to Editor/InternalResources/GPURendering/Common/ExtractChannel.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/Common/FillColor.shader b/Editor/InternalResources/GPURendering/Common/FillColor.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/Common/FillColor.shader rename to Editor/InternalResources/GPURendering/Common/FillColor.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/Common/FillColor.shader.meta b/Editor/InternalResources/GPURendering/Common/FillColor.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/Common/FillColor.shader.meta rename to Editor/InternalResources/GPURendering/Common/FillColor.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/Common/ReadPackedData.shader b/Editor/InternalResources/GPURendering/Common/ReadPackedData.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/Common/ReadPackedData.shader rename to Editor/InternalResources/GPURendering/Common/ReadPackedData.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/Common/ReadPackedData.shader.meta b/Editor/InternalResources/GPURendering/Common/ReadPackedData.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/Common/ReadPackedData.shader.meta rename to Editor/InternalResources/GPURendering/Common/ReadPackedData.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Abs.meta b/Editor/InternalResources/GPURendering/SFN_Abs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Abs.meta rename to Editor/InternalResources/GPURendering/SFN_Abs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Abs/SFN_Abs.shader b/Editor/InternalResources/GPURendering/SFN_Abs/SFN_Abs.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Abs/SFN_Abs.shader rename to Editor/InternalResources/GPURendering/SFN_Abs/SFN_Abs.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Abs/SFN_Abs.shader.meta b/Editor/InternalResources/GPURendering/SFN_Abs/SFN_Abs.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Abs/SFN_Abs.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Abs/SFN_Abs.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Add.meta b/Editor/InternalResources/GPURendering/SFN_Add.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Add.meta rename to Editor/InternalResources/GPURendering/SFN_Add.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Add/SFN_Add_2.shader b/Editor/InternalResources/GPURendering/SFN_Add/SFN_Add_2.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Add/SFN_Add_2.shader rename to Editor/InternalResources/GPURendering/SFN_Add/SFN_Add_2.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Add/SFN_Add_2.shader.meta b/Editor/InternalResources/GPURendering/SFN_Add/SFN_Add_2.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Add/SFN_Add_2.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Add/SFN_Add_2.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Add/SFN_Add_3.shader b/Editor/InternalResources/GPURendering/SFN_Add/SFN_Add_3.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Add/SFN_Add_3.shader rename to Editor/InternalResources/GPURendering/SFN_Add/SFN_Add_3.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Add/SFN_Add_3.shader.meta b/Editor/InternalResources/GPURendering/SFN_Add/SFN_Add_3.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Add/SFN_Add_3.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Add/SFN_Add_3.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Add/SFN_Add_4.shader b/Editor/InternalResources/GPURendering/SFN_Add/SFN_Add_4.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Add/SFN_Add_4.shader rename to Editor/InternalResources/GPURendering/SFN_Add/SFN_Add_4.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Add/SFN_Add_4.shader.meta b/Editor/InternalResources/GPURendering/SFN_Add/SFN_Add_4.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Add/SFN_Add_4.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Add/SFN_Add_4.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Add/SFN_Add_5.shader b/Editor/InternalResources/GPURendering/SFN_Add/SFN_Add_5.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Add/SFN_Add_5.shader rename to Editor/InternalResources/GPURendering/SFN_Add/SFN_Add_5.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Add/SFN_Add_5.shader.meta b/Editor/InternalResources/GPURendering/SFN_Add/SFN_Add_5.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Add/SFN_Add_5.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Add/SFN_Add_5.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_AmbientLight.meta b/Editor/InternalResources/GPURendering/SFN_AmbientLight.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_AmbientLight.meta rename to Editor/InternalResources/GPURendering/SFN_AmbientLight.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_AmbientLight/SFN_AmbientLight.shader b/Editor/InternalResources/GPURendering/SFN_AmbientLight/SFN_AmbientLight.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_AmbientLight/SFN_AmbientLight.shader rename to Editor/InternalResources/GPURendering/SFN_AmbientLight/SFN_AmbientLight.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_AmbientLight/SFN_AmbientLight.shader.meta b/Editor/InternalResources/GPURendering/SFN_AmbientLight/SFN_AmbientLight.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_AmbientLight/SFN_AmbientLight.shader.meta rename to Editor/InternalResources/GPURendering/SFN_AmbientLight/SFN_AmbientLight.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Append.meta b/Editor/InternalResources/GPURendering/SFN_Append.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Append.meta rename to Editor/InternalResources/GPURendering/SFN_Append.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Append/SFN_Append.shader b/Editor/InternalResources/GPURendering/SFN_Append/SFN_Append.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Append/SFN_Append.shader rename to Editor/InternalResources/GPURendering/SFN_Append/SFN_Append.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Append/SFN_Append.shader.meta b/Editor/InternalResources/GPURendering/SFN_Append/SFN_Append.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Append/SFN_Append.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Append/SFN_Append.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcCos.meta b/Editor/InternalResources/GPURendering/SFN_ArcCos.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcCos.meta rename to Editor/InternalResources/GPURendering/SFN_ArcCos.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcCos/SFN_ArcCos.shader b/Editor/InternalResources/GPURendering/SFN_ArcCos/SFN_ArcCos.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcCos/SFN_ArcCos.shader rename to Editor/InternalResources/GPURendering/SFN_ArcCos/SFN_ArcCos.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcCos/SFN_ArcCos.shader.meta b/Editor/InternalResources/GPURendering/SFN_ArcCos/SFN_ArcCos.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcCos/SFN_ArcCos.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ArcCos/SFN_ArcCos.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcSin.meta b/Editor/InternalResources/GPURendering/SFN_ArcSin.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcSin.meta rename to Editor/InternalResources/GPURendering/SFN_ArcSin.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcSin/SFN_ArcSin.shader b/Editor/InternalResources/GPURendering/SFN_ArcSin/SFN_ArcSin.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcSin/SFN_ArcSin.shader rename to Editor/InternalResources/GPURendering/SFN_ArcSin/SFN_ArcSin.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcSin/SFN_ArcSin.shader.meta b/Editor/InternalResources/GPURendering/SFN_ArcSin/SFN_ArcSin.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcSin/SFN_ArcSin.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ArcSin/SFN_ArcSin.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan.meta b/Editor/InternalResources/GPURendering/SFN_ArcTan.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan.meta rename to Editor/InternalResources/GPURendering/SFN_ArcTan.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan/SFN_ArcTan.shader b/Editor/InternalResources/GPURendering/SFN_ArcTan/SFN_ArcTan.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan/SFN_ArcTan.shader rename to Editor/InternalResources/GPURendering/SFN_ArcTan/SFN_ArcTan.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan/SFN_ArcTan.shader.meta b/Editor/InternalResources/GPURendering/SFN_ArcTan/SFN_ArcTan.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan/SFN_ArcTan.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ArcTan/SFN_ArcTan.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan2.meta b/Editor/InternalResources/GPURendering/SFN_ArcTan2.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan2.meta rename to Editor/InternalResources/GPURendering/SFN_ArcTan2.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan2/SFN_ArcTan2_NOTO.shader b/Editor/InternalResources/GPURendering/SFN_ArcTan2/SFN_ArcTan2_NOTO.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan2/SFN_ArcTan2_NOTO.shader rename to Editor/InternalResources/GPURendering/SFN_ArcTan2/SFN_ArcTan2_NOTO.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan2/SFN_ArcTan2_NOTO.shader.meta b/Editor/InternalResources/GPURendering/SFN_ArcTan2/SFN_ArcTan2_NOTO.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan2/SFN_ArcTan2_NOTO.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ArcTan2/SFN_ArcTan2_NOTO.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan2/SFN_ArcTan2_NPTP.shader b/Editor/InternalResources/GPURendering/SFN_ArcTan2/SFN_ArcTan2_NPTP.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan2/SFN_ArcTan2_NPTP.shader rename to Editor/InternalResources/GPURendering/SFN_ArcTan2/SFN_ArcTan2_NPTP.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan2/SFN_ArcTan2_NPTP.shader.meta b/Editor/InternalResources/GPURendering/SFN_ArcTan2/SFN_ArcTan2_NPTP.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan2/SFN_ArcTan2_NPTP.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ArcTan2/SFN_ArcTan2_NPTP.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan2/SFN_ArcTan2_ZTO.shader b/Editor/InternalResources/GPURendering/SFN_ArcTan2/SFN_ArcTan2_ZTO.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan2/SFN_ArcTan2_ZTO.shader rename to Editor/InternalResources/GPURendering/SFN_ArcTan2/SFN_ArcTan2_ZTO.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan2/SFN_ArcTan2_ZTO.shader.meta b/Editor/InternalResources/GPURendering/SFN_ArcTan2/SFN_ArcTan2_ZTO.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan2/SFN_ArcTan2_ZTO.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ArcTan2/SFN_ArcTan2_ZTO.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan2/SFN_ArcTan2_ZTOW.shader b/Editor/InternalResources/GPURendering/SFN_ArcTan2/SFN_ArcTan2_ZTOW.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan2/SFN_ArcTan2_ZTOW.shader rename to Editor/InternalResources/GPURendering/SFN_ArcTan2/SFN_ArcTan2_ZTOW.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan2/SFN_ArcTan2_ZTOW.shader.meta b/Editor/InternalResources/GPURendering/SFN_ArcTan2/SFN_ArcTan2_ZTOW.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ArcTan2/SFN_ArcTan2_ZTOW.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ArcTan2/SFN_ArcTan2_ZTOW.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Bitangent.meta b/Editor/InternalResources/GPURendering/SFN_Bitangent.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Bitangent.meta rename to Editor/InternalResources/GPURendering/SFN_Bitangent.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Bitangent/SFN_Bitangent.shader b/Editor/InternalResources/GPURendering/SFN_Bitangent/SFN_Bitangent.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Bitangent/SFN_Bitangent.shader rename to Editor/InternalResources/GPURendering/SFN_Bitangent/SFN_Bitangent.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Bitangent/SFN_Bitangent.shader.meta b/Editor/InternalResources/GPURendering/SFN_Bitangent/SFN_Bitangent.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Bitangent/SFN_Bitangent.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Bitangent/SFN_Bitangent.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend.meta b/Editor/InternalResources/GPURendering/SFN_Blend.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend.meta rename to Editor/InternalResources/GPURendering/SFN_Blend.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_ColorBurn.shader b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_ColorBurn.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_ColorBurn.shader rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_ColorBurn.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_ColorBurn.shader.meta b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_ColorBurn.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_ColorBurn.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_ColorBurn.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_ColorDodge.shader b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_ColorDodge.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_ColorDodge.shader rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_ColorDodge.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_ColorDodge.shader.meta b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_ColorDodge.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_ColorDodge.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_ColorDodge.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Darken.shader b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Darken.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Darken.shader rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Darken.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Darken.shader.meta b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Darken.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Darken.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Darken.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Difference.shader b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Difference.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Difference.shader rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Difference.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Difference.shader.meta b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Difference.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Difference.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Difference.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Divide.shader b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Divide.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Divide.shader rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Divide.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Divide.shader.meta b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Divide.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Divide.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Divide.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Exclusion.shader b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Exclusion.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Exclusion.shader rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Exclusion.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Exclusion.shader.meta b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Exclusion.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Exclusion.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Exclusion.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_HardLight.shader b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_HardLight.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_HardLight.shader rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_HardLight.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_HardLight.shader.meta b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_HardLight.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_HardLight.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_HardLight.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_HardMix.shader b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_HardMix.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_HardMix.shader rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_HardMix.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_HardMix.shader.meta b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_HardMix.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_HardMix.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_HardMix.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Lighten.shader b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Lighten.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Lighten.shader rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Lighten.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Lighten.shader.meta b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Lighten.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Lighten.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Lighten.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_LinearBurn.shader b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_LinearBurn.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_LinearBurn.shader rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_LinearBurn.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_LinearBurn.shader.meta b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_LinearBurn.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_LinearBurn.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_LinearBurn.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_LinearDodge.shader b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_LinearDodge.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_LinearDodge.shader rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_LinearDodge.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_LinearDodge.shader.meta b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_LinearDodge.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_LinearDodge.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_LinearDodge.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_LinearLight.shader b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_LinearLight.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_LinearLight.shader rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_LinearLight.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_LinearLight.shader.meta b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_LinearLight.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_LinearLight.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_LinearLight.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Multiply.shader b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Multiply.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Multiply.shader rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Multiply.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Multiply.shader.meta b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Multiply.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Multiply.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Multiply.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Overlay.shader b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Overlay.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Overlay.shader rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Overlay.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Overlay.shader.meta b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Overlay.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Overlay.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Overlay.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_PinLight.shader b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_PinLight.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_PinLight.shader rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_PinLight.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_PinLight.shader.meta b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_PinLight.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_PinLight.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_PinLight.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Screen.shader b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Screen.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Screen.shader rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Screen.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Screen.shader.meta b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Screen.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Screen.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Screen.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Subtract.shader b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Subtract.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Subtract.shader rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Subtract.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Subtract.shader.meta b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Subtract.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_Subtract.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_Subtract.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_VividLight.shader b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_VividLight.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_VividLight.shader rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_VividLight.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_VividLight.shader.meta b/Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_VividLight.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Blend/SFN_Blend_VividLight.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Blend/SFN_Blend_VividLight.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Ceil.meta b/Editor/InternalResources/GPURendering/SFN_Ceil.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Ceil.meta rename to Editor/InternalResources/GPURendering/SFN_Ceil.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Ceil/SFN_Ceil.shader b/Editor/InternalResources/GPURendering/SFN_Ceil/SFN_Ceil.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Ceil/SFN_Ceil.shader rename to Editor/InternalResources/GPURendering/SFN_Ceil/SFN_Ceil.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Ceil/SFN_Ceil.shader.meta b/Editor/InternalResources/GPURendering/SFN_Ceil/SFN_Ceil.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Ceil/SFN_Ceil.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Ceil/SFN_Ceil.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ChannelBlend.meta b/Editor/InternalResources/GPURendering/SFN_ChannelBlend.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ChannelBlend.meta rename to Editor/InternalResources/GPURendering/SFN_ChannelBlend.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ChannelBlend/SFN_ChannelBlend.shader b/Editor/InternalResources/GPURendering/SFN_ChannelBlend/SFN_ChannelBlend.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ChannelBlend/SFN_ChannelBlend.shader rename to Editor/InternalResources/GPURendering/SFN_ChannelBlend/SFN_ChannelBlend.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ChannelBlend/SFN_ChannelBlend.shader.meta b/Editor/InternalResources/GPURendering/SFN_ChannelBlend/SFN_ChannelBlend.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ChannelBlend/SFN_ChannelBlend.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ChannelBlend/SFN_ChannelBlend.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Clamp.meta b/Editor/InternalResources/GPURendering/SFN_Clamp.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Clamp.meta rename to Editor/InternalResources/GPURendering/SFN_Clamp.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Clamp/SFN_Clamp.shader b/Editor/InternalResources/GPURendering/SFN_Clamp/SFN_Clamp.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Clamp/SFN_Clamp.shader rename to Editor/InternalResources/GPURendering/SFN_Clamp/SFN_Clamp.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Clamp/SFN_Clamp.shader.meta b/Editor/InternalResources/GPURendering/SFN_Clamp/SFN_Clamp.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Clamp/SFN_Clamp.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Clamp/SFN_Clamp.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Clamp01.meta b/Editor/InternalResources/GPURendering/SFN_Clamp01.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Clamp01.meta rename to Editor/InternalResources/GPURendering/SFN_Clamp01.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Clamp01/SFN_Clamp01.shader b/Editor/InternalResources/GPURendering/SFN_Clamp01/SFN_Clamp01.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Clamp01/SFN_Clamp01.shader rename to Editor/InternalResources/GPURendering/SFN_Clamp01/SFN_Clamp01.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Clamp01/SFN_Clamp01.shader.meta b/Editor/InternalResources/GPURendering/SFN_Clamp01/SFN_Clamp01.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Clamp01/SFN_Clamp01.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Clamp01/SFN_Clamp01.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Code.meta b/Editor/InternalResources/GPURendering/SFN_Code.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Code.meta rename to Editor/InternalResources/GPURendering/SFN_Code.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Code/SFN_Code.shader b/Editor/InternalResources/GPURendering/SFN_Code/SFN_Code.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Code/SFN_Code.shader rename to Editor/InternalResources/GPURendering/SFN_Code/SFN_Code.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Code/SFN_Code.shader.meta b/Editor/InternalResources/GPURendering/SFN_Code/SFN_Code.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Code/SFN_Code.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Code/SFN_Code.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ComponentMask.meta b/Editor/InternalResources/GPURendering/SFN_ComponentMask.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ComponentMask.meta rename to Editor/InternalResources/GPURendering/SFN_ComponentMask.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ComponentMask/SFN_ComponentMask_CC1.shader b/Editor/InternalResources/GPURendering/SFN_ComponentMask/SFN_ComponentMask_CC1.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ComponentMask/SFN_ComponentMask_CC1.shader rename to Editor/InternalResources/GPURendering/SFN_ComponentMask/SFN_ComponentMask_CC1.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ComponentMask/SFN_ComponentMask_CC1.shader.meta b/Editor/InternalResources/GPURendering/SFN_ComponentMask/SFN_ComponentMask_CC1.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ComponentMask/SFN_ComponentMask_CC1.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ComponentMask/SFN_ComponentMask_CC1.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ComponentMask/SFN_ComponentMask_CC2.shader b/Editor/InternalResources/GPURendering/SFN_ComponentMask/SFN_ComponentMask_CC2.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ComponentMask/SFN_ComponentMask_CC2.shader rename to Editor/InternalResources/GPURendering/SFN_ComponentMask/SFN_ComponentMask_CC2.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ComponentMask/SFN_ComponentMask_CC2.shader.meta b/Editor/InternalResources/GPURendering/SFN_ComponentMask/SFN_ComponentMask_CC2.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ComponentMask/SFN_ComponentMask_CC2.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ComponentMask/SFN_ComponentMask_CC2.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ComponentMask/SFN_ComponentMask_CC3.shader b/Editor/InternalResources/GPURendering/SFN_ComponentMask/SFN_ComponentMask_CC3.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ComponentMask/SFN_ComponentMask_CC3.shader rename to Editor/InternalResources/GPURendering/SFN_ComponentMask/SFN_ComponentMask_CC3.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ComponentMask/SFN_ComponentMask_CC3.shader.meta b/Editor/InternalResources/GPURendering/SFN_ComponentMask/SFN_ComponentMask_CC3.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ComponentMask/SFN_ComponentMask_CC3.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ComponentMask/SFN_ComponentMask_CC3.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ComponentMask/SFN_ComponentMask_CC4.shader b/Editor/InternalResources/GPURendering/SFN_ComponentMask/SFN_ComponentMask_CC4.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ComponentMask/SFN_ComponentMask_CC4.shader rename to Editor/InternalResources/GPURendering/SFN_ComponentMask/SFN_ComponentMask_CC4.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ComponentMask/SFN_ComponentMask_CC4.shader.meta b/Editor/InternalResources/GPURendering/SFN_ComponentMask/SFN_ComponentMask_CC4.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ComponentMask/SFN_ComponentMask_CC4.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ComponentMask/SFN_ComponentMask_CC4.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ConstantClamp.meta b/Editor/InternalResources/GPURendering/SFN_ConstantClamp.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ConstantClamp.meta rename to Editor/InternalResources/GPURendering/SFN_ConstantClamp.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ConstantClamp/SFN_ConstantClamp.shader b/Editor/InternalResources/GPURendering/SFN_ConstantClamp/SFN_ConstantClamp.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ConstantClamp/SFN_ConstantClamp.shader rename to Editor/InternalResources/GPURendering/SFN_ConstantClamp/SFN_ConstantClamp.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ConstantClamp/SFN_ConstantClamp.shader.meta b/Editor/InternalResources/GPURendering/SFN_ConstantClamp/SFN_ConstantClamp.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ConstantClamp/SFN_ConstantClamp.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ConstantClamp/SFN_ConstantClamp.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ConstantLerp.meta b/Editor/InternalResources/GPURendering/SFN_ConstantLerp.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ConstantLerp.meta rename to Editor/InternalResources/GPURendering/SFN_ConstantLerp.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ConstantLerp/SFN_ConstantLerp.shader b/Editor/InternalResources/GPURendering/SFN_ConstantLerp/SFN_ConstantLerp.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ConstantLerp/SFN_ConstantLerp.shader rename to Editor/InternalResources/GPURendering/SFN_ConstantLerp/SFN_ConstantLerp.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ConstantLerp/SFN_ConstantLerp.shader.meta b/Editor/InternalResources/GPURendering/SFN_ConstantLerp/SFN_ConstantLerp.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ConstantLerp/SFN_ConstantLerp.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ConstantLerp/SFN_ConstantLerp.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Cos.meta b/Editor/InternalResources/GPURendering/SFN_Cos.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Cos.meta rename to Editor/InternalResources/GPURendering/SFN_Cos.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Cos/SFN_Cos.shader b/Editor/InternalResources/GPURendering/SFN_Cos/SFN_Cos.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Cos/SFN_Cos.shader rename to Editor/InternalResources/GPURendering/SFN_Cos/SFN_Cos.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Cos/SFN_Cos.shader.meta b/Editor/InternalResources/GPURendering/SFN_Cos/SFN_Cos.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Cos/SFN_Cos.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Cos/SFN_Cos.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Cross.meta b/Editor/InternalResources/GPURendering/SFN_Cross.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Cross.meta rename to Editor/InternalResources/GPURendering/SFN_Cross.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Cross/SFN_Cross.shader b/Editor/InternalResources/GPURendering/SFN_Cross/SFN_Cross.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Cross/SFN_Cross.shader rename to Editor/InternalResources/GPURendering/SFN_Cross/SFN_Cross.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Cross/SFN_Cross.shader.meta b/Editor/InternalResources/GPURendering/SFN_Cross/SFN_Cross.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Cross/SFN_Cross.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Cross/SFN_Cross.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Cubemap.meta b/Editor/InternalResources/GPURendering/SFN_Cubemap.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Cubemap.meta rename to Editor/InternalResources/GPURendering/SFN_Cubemap.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Cubemap/SFN_Cubemap.shader b/Editor/InternalResources/GPURendering/SFN_Cubemap/SFN_Cubemap.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Cubemap/SFN_Cubemap.shader rename to Editor/InternalResources/GPURendering/SFN_Cubemap/SFN_Cubemap.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Cubemap/SFN_Cubemap.shader.meta b/Editor/InternalResources/GPURendering/SFN_Cubemap/SFN_Cubemap.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Cubemap/SFN_Cubemap.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Cubemap/SFN_Cubemap.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DDX.meta b/Editor/InternalResources/GPURendering/SFN_DDX.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DDX.meta rename to Editor/InternalResources/GPURendering/SFN_DDX.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DDX/SFN_DDX.shader b/Editor/InternalResources/GPURendering/SFN_DDX/SFN_DDX.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DDX/SFN_DDX.shader rename to Editor/InternalResources/GPURendering/SFN_DDX/SFN_DDX.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DDX/SFN_DDX.shader.meta b/Editor/InternalResources/GPURendering/SFN_DDX/SFN_DDX.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DDX/SFN_DDX.shader.meta rename to Editor/InternalResources/GPURendering/SFN_DDX/SFN_DDX.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DDXY.meta b/Editor/InternalResources/GPURendering/SFN_DDXY.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DDXY.meta rename to Editor/InternalResources/GPURendering/SFN_DDXY.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DDXY/SFN_DDXY.shader b/Editor/InternalResources/GPURendering/SFN_DDXY/SFN_DDXY.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DDXY/SFN_DDXY.shader rename to Editor/InternalResources/GPURendering/SFN_DDXY/SFN_DDXY.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DDXY/SFN_DDXY.shader.meta b/Editor/InternalResources/GPURendering/SFN_DDXY/SFN_DDXY.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DDXY/SFN_DDXY.shader.meta rename to Editor/InternalResources/GPURendering/SFN_DDXY/SFN_DDXY.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DDY.meta b/Editor/InternalResources/GPURendering/SFN_DDY.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DDY.meta rename to Editor/InternalResources/GPURendering/SFN_DDY.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DDY/SFN_DDY.shader b/Editor/InternalResources/GPURendering/SFN_DDY/SFN_DDY.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DDY/SFN_DDY.shader rename to Editor/InternalResources/GPURendering/SFN_DDY/SFN_DDY.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DDY/SFN_DDY.shader.meta b/Editor/InternalResources/GPURendering/SFN_DDY/SFN_DDY.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DDY/SFN_DDY.shader.meta rename to Editor/InternalResources/GPURendering/SFN_DDY/SFN_DDY.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Depth.meta b/Editor/InternalResources/GPURendering/SFN_Depth.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Depth.meta rename to Editor/InternalResources/GPURendering/SFN_Depth.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Depth/SFN_Depth.shader b/Editor/InternalResources/GPURendering/SFN_Depth/SFN_Depth.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Depth/SFN_Depth.shader rename to Editor/InternalResources/GPURendering/SFN_Depth/SFN_Depth.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Depth/SFN_Depth.shader.meta b/Editor/InternalResources/GPURendering/SFN_Depth/SFN_Depth.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Depth/SFN_Depth.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Depth/SFN_Depth.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DepthBlend.meta b/Editor/InternalResources/GPURendering/SFN_DepthBlend.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DepthBlend.meta rename to Editor/InternalResources/GPURendering/SFN_DepthBlend.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DepthBlend/SFN_DepthBlend.shader b/Editor/InternalResources/GPURendering/SFN_DepthBlend/SFN_DepthBlend.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DepthBlend/SFN_DepthBlend.shader rename to Editor/InternalResources/GPURendering/SFN_DepthBlend/SFN_DepthBlend.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DepthBlend/SFN_DepthBlend.shader.meta b/Editor/InternalResources/GPURendering/SFN_DepthBlend/SFN_DepthBlend.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_DepthBlend/SFN_DepthBlend.shader.meta rename to Editor/InternalResources/GPURendering/SFN_DepthBlend/SFN_DepthBlend.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Desaturate.meta b/Editor/InternalResources/GPURendering/SFN_Desaturate.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Desaturate.meta rename to Editor/InternalResources/GPURendering/SFN_Desaturate.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Desaturate/SFN_Desaturate_DES.shader b/Editor/InternalResources/GPURendering/SFN_Desaturate/SFN_Desaturate_DES.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Desaturate/SFN_Desaturate_DES.shader rename to Editor/InternalResources/GPURendering/SFN_Desaturate/SFN_Desaturate_DES.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Desaturate/SFN_Desaturate_DES.shader.meta b/Editor/InternalResources/GPURendering/SFN_Desaturate/SFN_Desaturate_DES.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Desaturate/SFN_Desaturate_DES.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Desaturate/SFN_Desaturate_DES.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Desaturate/SFN_Desaturate_REQONLY.shader b/Editor/InternalResources/GPURendering/SFN_Desaturate/SFN_Desaturate_REQONLY.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Desaturate/SFN_Desaturate_REQONLY.shader rename to Editor/InternalResources/GPURendering/SFN_Desaturate/SFN_Desaturate_REQONLY.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Desaturate/SFN_Desaturate_REQONLY.shader.meta b/Editor/InternalResources/GPURendering/SFN_Desaturate/SFN_Desaturate_REQONLY.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Desaturate/SFN_Desaturate_REQONLY.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Desaturate/SFN_Desaturate_REQONLY.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Distance.meta b/Editor/InternalResources/GPURendering/SFN_Distance.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Distance.meta rename to Editor/InternalResources/GPURendering/SFN_Distance.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Distance/SFN_Distance.shader b/Editor/InternalResources/GPURendering/SFN_Distance/SFN_Distance.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Distance/SFN_Distance.shader rename to Editor/InternalResources/GPURendering/SFN_Distance/SFN_Distance.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Distance/SFN_Distance.shader.meta b/Editor/InternalResources/GPURendering/SFN_Distance/SFN_Distance.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Distance/SFN_Distance.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Distance/SFN_Distance.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Divide.meta b/Editor/InternalResources/GPURendering/SFN_Divide.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Divide.meta rename to Editor/InternalResources/GPURendering/SFN_Divide.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Divide/SFN_Divide.shader b/Editor/InternalResources/GPURendering/SFN_Divide/SFN_Divide.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Divide/SFN_Divide.shader rename to Editor/InternalResources/GPURendering/SFN_Divide/SFN_Divide.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Divide/SFN_Divide.shader.meta b/Editor/InternalResources/GPURendering/SFN_Divide/SFN_Divide.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Divide/SFN_Divide.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Divide/SFN_Divide.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Dot.meta b/Editor/InternalResources/GPURendering/SFN_Dot.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Dot.meta rename to Editor/InternalResources/GPURendering/SFN_Dot.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Dot/SFN_Dot_ABS.shader b/Editor/InternalResources/GPURendering/SFN_Dot/SFN_Dot_ABS.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Dot/SFN_Dot_ABS.shader rename to Editor/InternalResources/GPURendering/SFN_Dot/SFN_Dot_ABS.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Dot/SFN_Dot_ABS.shader.meta b/Editor/InternalResources/GPURendering/SFN_Dot/SFN_Dot_ABS.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Dot/SFN_Dot_ABS.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Dot/SFN_Dot_ABS.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Dot/SFN_Dot_NEG.shader b/Editor/InternalResources/GPURendering/SFN_Dot/SFN_Dot_NEG.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Dot/SFN_Dot_NEG.shader rename to Editor/InternalResources/GPURendering/SFN_Dot/SFN_Dot_NEG.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Dot/SFN_Dot_NEG.shader.meta b/Editor/InternalResources/GPURendering/SFN_Dot/SFN_Dot_NEG.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Dot/SFN_Dot_NEG.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Dot/SFN_Dot_NEG.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Dot/SFN_Dot_NRM.shader b/Editor/InternalResources/GPURendering/SFN_Dot/SFN_Dot_NRM.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Dot/SFN_Dot_NRM.shader rename to Editor/InternalResources/GPURendering/SFN_Dot/SFN_Dot_NRM.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Dot/SFN_Dot_NRM.shader.meta b/Editor/InternalResources/GPURendering/SFN_Dot/SFN_Dot_NRM.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Dot/SFN_Dot_NRM.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Dot/SFN_Dot_NRM.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Dot/SFN_Dot_POS.shader b/Editor/InternalResources/GPURendering/SFN_Dot/SFN_Dot_POS.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Dot/SFN_Dot_POS.shader rename to Editor/InternalResources/GPURendering/SFN_Dot/SFN_Dot_POS.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Dot/SFN_Dot_POS.shader.meta b/Editor/InternalResources/GPURendering/SFN_Dot/SFN_Dot_POS.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Dot/SFN_Dot_POS.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Dot/SFN_Dot_POS.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Dot/SFN_Dot_STD.shader b/Editor/InternalResources/GPURendering/SFN_Dot/SFN_Dot_STD.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Dot/SFN_Dot_STD.shader rename to Editor/InternalResources/GPURendering/SFN_Dot/SFN_Dot_STD.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Dot/SFN_Dot_STD.shader.meta b/Editor/InternalResources/GPURendering/SFN_Dot/SFN_Dot_STD.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Dot/SFN_Dot_STD.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Dot/SFN_Dot_STD.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Exp.meta b/Editor/InternalResources/GPURendering/SFN_Exp.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Exp.meta rename to Editor/InternalResources/GPURendering/SFN_Exp.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Exp/SFN_Exp.shader b/Editor/InternalResources/GPURendering/SFN_Exp/SFN_Exp.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Exp/SFN_Exp.shader rename to Editor/InternalResources/GPURendering/SFN_Exp/SFN_Exp.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Exp/SFN_Exp.shader.meta b/Editor/InternalResources/GPURendering/SFN_Exp/SFN_Exp.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Exp/SFN_Exp.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Exp/SFN_Exp.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_FaceSign.meta b/Editor/InternalResources/GPURendering/SFN_FaceSign.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_FaceSign.meta rename to Editor/InternalResources/GPURendering/SFN_FaceSign.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_FaceSign/SFN_FaceSign.shader b/Editor/InternalResources/GPURendering/SFN_FaceSign/SFN_FaceSign.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_FaceSign/SFN_FaceSign.shader rename to Editor/InternalResources/GPURendering/SFN_FaceSign/SFN_FaceSign.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_FaceSign/SFN_FaceSign.shader.meta b/Editor/InternalResources/GPURendering/SFN_FaceSign/SFN_FaceSign.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_FaceSign/SFN_FaceSign.shader.meta rename to Editor/InternalResources/GPURendering/SFN_FaceSign/SFN_FaceSign.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Floor.meta b/Editor/InternalResources/GPURendering/SFN_Floor.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Floor.meta rename to Editor/InternalResources/GPURendering/SFN_Floor.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Floor/SFN_Floor.shader b/Editor/InternalResources/GPURendering/SFN_Floor/SFN_Floor.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Floor/SFN_Floor.shader rename to Editor/InternalResources/GPURendering/SFN_Floor/SFN_Floor.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Floor/SFN_Floor.shader.meta b/Editor/InternalResources/GPURendering/SFN_Floor/SFN_Floor.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Floor/SFN_Floor.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Floor/SFN_Floor.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fmod.meta b/Editor/InternalResources/GPURendering/SFN_Fmod.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fmod.meta rename to Editor/InternalResources/GPURendering/SFN_Fmod.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fmod/SFN_Fmod.shader b/Editor/InternalResources/GPURendering/SFN_Fmod/SFN_Fmod.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fmod/SFN_Fmod.shader rename to Editor/InternalResources/GPURendering/SFN_Fmod/SFN_Fmod.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fmod/SFN_Fmod.shader.meta b/Editor/InternalResources/GPURendering/SFN_Fmod/SFN_Fmod.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fmod/SFN_Fmod.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Fmod/SFN_Fmod.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_FogColor.meta b/Editor/InternalResources/GPURendering/SFN_FogColor.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_FogColor.meta rename to Editor/InternalResources/GPURendering/SFN_FogColor.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_FogColor/SFN_FogColor.shader b/Editor/InternalResources/GPURendering/SFN_FogColor/SFN_FogColor.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_FogColor/SFN_FogColor.shader rename to Editor/InternalResources/GPURendering/SFN_FogColor/SFN_FogColor.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_FogColor/SFN_FogColor.shader.meta b/Editor/InternalResources/GPURendering/SFN_FogColor/SFN_FogColor.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_FogColor/SFN_FogColor.shader.meta rename to Editor/InternalResources/GPURendering/SFN_FogColor/SFN_FogColor.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Frac.meta b/Editor/InternalResources/GPURendering/SFN_Frac.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Frac.meta rename to Editor/InternalResources/GPURendering/SFN_Frac.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Frac/SFN_Frac.shader b/Editor/InternalResources/GPURendering/SFN_Frac/SFN_Frac.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Frac/SFN_Frac.shader rename to Editor/InternalResources/GPURendering/SFN_Frac/SFN_Frac.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Frac/SFN_Frac.shader.meta b/Editor/InternalResources/GPURendering/SFN_Frac/SFN_Frac.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Frac/SFN_Frac.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Frac/SFN_Frac.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_FragmentPosition.meta b/Editor/InternalResources/GPURendering/SFN_FragmentPosition.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_FragmentPosition.meta rename to Editor/InternalResources/GPURendering/SFN_FragmentPosition.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_FragmentPosition/SFN_FragmentPosition.shader b/Editor/InternalResources/GPURendering/SFN_FragmentPosition/SFN_FragmentPosition.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_FragmentPosition/SFN_FragmentPosition.shader rename to Editor/InternalResources/GPURendering/SFN_FragmentPosition/SFN_FragmentPosition.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_FragmentPosition/SFN_FragmentPosition.shader.meta b/Editor/InternalResources/GPURendering/SFN_FragmentPosition/SFN_FragmentPosition.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_FragmentPosition/SFN_FragmentPosition.shader.meta rename to Editor/InternalResources/GPURendering/SFN_FragmentPosition/SFN_FragmentPosition.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fresnel.meta b/Editor/InternalResources/GPURendering/SFN_Fresnel.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fresnel.meta rename to Editor/InternalResources/GPURendering/SFN_Fresnel.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fresnel/SFN_Fresnel_EXP.shader b/Editor/InternalResources/GPURendering/SFN_Fresnel/SFN_Fresnel_EXP.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fresnel/SFN_Fresnel_EXP.shader rename to Editor/InternalResources/GPURendering/SFN_Fresnel/SFN_Fresnel_EXP.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fresnel/SFN_Fresnel_EXP.shader.meta b/Editor/InternalResources/GPURendering/SFN_Fresnel/SFN_Fresnel_EXP.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fresnel/SFN_Fresnel_EXP.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Fresnel/SFN_Fresnel_EXP.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fresnel/SFN_Fresnel_NRM.shader b/Editor/InternalResources/GPURendering/SFN_Fresnel/SFN_Fresnel_NRM.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fresnel/SFN_Fresnel_NRM.shader rename to Editor/InternalResources/GPURendering/SFN_Fresnel/SFN_Fresnel_NRM.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fresnel/SFN_Fresnel_NRM.shader.meta b/Editor/InternalResources/GPURendering/SFN_Fresnel/SFN_Fresnel_NRM.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fresnel/SFN_Fresnel_NRM.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Fresnel/SFN_Fresnel_NRM.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fresnel/SFN_Fresnel_NRM_EXP.shader b/Editor/InternalResources/GPURendering/SFN_Fresnel/SFN_Fresnel_NRM_EXP.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fresnel/SFN_Fresnel_NRM_EXP.shader rename to Editor/InternalResources/GPURendering/SFN_Fresnel/SFN_Fresnel_NRM_EXP.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fresnel/SFN_Fresnel_NRM_EXP.shader.meta b/Editor/InternalResources/GPURendering/SFN_Fresnel/SFN_Fresnel_NRM_EXP.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fresnel/SFN_Fresnel_NRM_EXP.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Fresnel/SFN_Fresnel_NRM_EXP.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fresnel/SFN_Fresnel_REQONLY.shader b/Editor/InternalResources/GPURendering/SFN_Fresnel/SFN_Fresnel_REQONLY.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fresnel/SFN_Fresnel_REQONLY.shader rename to Editor/InternalResources/GPURendering/SFN_Fresnel/SFN_Fresnel_REQONLY.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fresnel/SFN_Fresnel_REQONLY.shader.meta b/Editor/InternalResources/GPURendering/SFN_Fresnel/SFN_Fresnel_REQONLY.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Fresnel/SFN_Fresnel_REQONLY.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Fresnel/SFN_Fresnel_REQONLY.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Get.meta b/Editor/InternalResources/GPURendering/SFN_Get.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Get.meta rename to Editor/InternalResources/GPURendering/SFN_Get.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Get/SFN_Get.shader b/Editor/InternalResources/GPURendering/SFN_Get/SFN_Get.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Get/SFN_Get.shader rename to Editor/InternalResources/GPURendering/SFN_Get/SFN_Get.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Get/SFN_Get.shader.meta b/Editor/InternalResources/GPURendering/SFN_Get/SFN_Get.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Get/SFN_Get.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Get/SFN_Get.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_HalfVector.meta b/Editor/InternalResources/GPURendering/SFN_HalfVector.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_HalfVector.meta rename to Editor/InternalResources/GPURendering/SFN_HalfVector.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_HalfVector/SFN_HalfVector.shader b/Editor/InternalResources/GPURendering/SFN_HalfVector/SFN_HalfVector.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_HalfVector/SFN_HalfVector.shader rename to Editor/InternalResources/GPURendering/SFN_HalfVector/SFN_HalfVector.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_HalfVector/SFN_HalfVector.shader.meta b/Editor/InternalResources/GPURendering/SFN_HalfVector/SFN_HalfVector.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_HalfVector/SFN_HalfVector.shader.meta rename to Editor/InternalResources/GPURendering/SFN_HalfVector/SFN_HalfVector.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_HsvToRgb.meta b/Editor/InternalResources/GPURendering/SFN_HsvToRgb.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_HsvToRgb.meta rename to Editor/InternalResources/GPURendering/SFN_HsvToRgb.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_HsvToRgb/SFN_HsvToRgb.shader b/Editor/InternalResources/GPURendering/SFN_HsvToRgb/SFN_HsvToRgb.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_HsvToRgb/SFN_HsvToRgb.shader rename to Editor/InternalResources/GPURendering/SFN_HsvToRgb/SFN_HsvToRgb.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_HsvToRgb/SFN_HsvToRgb.shader.meta b/Editor/InternalResources/GPURendering/SFN_HsvToRgb/SFN_HsvToRgb.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_HsvToRgb/SFN_HsvToRgb.shader.meta rename to Editor/InternalResources/GPURendering/SFN_HsvToRgb/SFN_HsvToRgb.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Hue.meta b/Editor/InternalResources/GPURendering/SFN_Hue.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Hue.meta rename to Editor/InternalResources/GPURendering/SFN_Hue.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Hue/SFN_Hue.shader b/Editor/InternalResources/GPURendering/SFN_Hue/SFN_Hue.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Hue/SFN_Hue.shader rename to Editor/InternalResources/GPURendering/SFN_Hue/SFN_Hue.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Hue/SFN_Hue.shader.meta b/Editor/InternalResources/GPURendering/SFN_Hue/SFN_Hue.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Hue/SFN_Hue.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Hue/SFN_Hue.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_If.meta b/Editor/InternalResources/GPURendering/SFN_If.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_If.meta rename to Editor/InternalResources/GPURendering/SFN_If.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_If/SFN_If.shader b/Editor/InternalResources/GPURendering/SFN_If/SFN_If.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_If/SFN_If.shader rename to Editor/InternalResources/GPURendering/SFN_If/SFN_If.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_If/SFN_If.shader.meta b/Editor/InternalResources/GPURendering/SFN_If/SFN_If.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_If/SFN_If.shader.meta rename to Editor/InternalResources/GPURendering/SFN_If/SFN_If.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_InverseLerp.meta b/Editor/InternalResources/GPURendering/SFN_InverseLerp.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_InverseLerp.meta rename to Editor/InternalResources/GPURendering/SFN_InverseLerp.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_InverseLerp/SFN_InverseLerp.shader b/Editor/InternalResources/GPURendering/SFN_InverseLerp/SFN_InverseLerp.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_InverseLerp/SFN_InverseLerp.shader rename to Editor/InternalResources/GPURendering/SFN_InverseLerp/SFN_InverseLerp.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_InverseLerp/SFN_InverseLerp.shader.meta b/Editor/InternalResources/GPURendering/SFN_InverseLerp/SFN_InverseLerp.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_InverseLerp/SFN_InverseLerp.shader.meta rename to Editor/InternalResources/GPURendering/SFN_InverseLerp/SFN_InverseLerp.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Length.meta b/Editor/InternalResources/GPURendering/SFN_Length.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Length.meta rename to Editor/InternalResources/GPURendering/SFN_Length.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Length/SFN_Length.shader b/Editor/InternalResources/GPURendering/SFN_Length/SFN_Length.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Length/SFN_Length.shader rename to Editor/InternalResources/GPURendering/SFN_Length/SFN_Length.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Length/SFN_Length.shader.meta b/Editor/InternalResources/GPURendering/SFN_Length/SFN_Length.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Length/SFN_Length.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Length/SFN_Length.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Lerp.meta b/Editor/InternalResources/GPURendering/SFN_Lerp.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Lerp.meta rename to Editor/InternalResources/GPURendering/SFN_Lerp.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Lerp/SFN_Lerp.shader b/Editor/InternalResources/GPURendering/SFN_Lerp/SFN_Lerp.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Lerp/SFN_Lerp.shader rename to Editor/InternalResources/GPURendering/SFN_Lerp/SFN_Lerp.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Lerp/SFN_Lerp.shader.meta b/Editor/InternalResources/GPURendering/SFN_Lerp/SFN_Lerp.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Lerp/SFN_Lerp.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Lerp/SFN_Lerp.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightAttenuation.meta b/Editor/InternalResources/GPURendering/SFN_LightAttenuation.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightAttenuation.meta rename to Editor/InternalResources/GPURendering/SFN_LightAttenuation.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightAttenuation/SFN_LightAttenuation.shader b/Editor/InternalResources/GPURendering/SFN_LightAttenuation/SFN_LightAttenuation.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightAttenuation/SFN_LightAttenuation.shader rename to Editor/InternalResources/GPURendering/SFN_LightAttenuation/SFN_LightAttenuation.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightAttenuation/SFN_LightAttenuation.shader.meta b/Editor/InternalResources/GPURendering/SFN_LightAttenuation/SFN_LightAttenuation.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightAttenuation/SFN_LightAttenuation.shader.meta rename to Editor/InternalResources/GPURendering/SFN_LightAttenuation/SFN_LightAttenuation.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightColor.meta b/Editor/InternalResources/GPURendering/SFN_LightColor.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightColor.meta rename to Editor/InternalResources/GPURendering/SFN_LightColor.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightColor/SFN_LightColor.shader b/Editor/InternalResources/GPURendering/SFN_LightColor/SFN_LightColor.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightColor/SFN_LightColor.shader rename to Editor/InternalResources/GPURendering/SFN_LightColor/SFN_LightColor.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightColor/SFN_LightColor.shader.meta b/Editor/InternalResources/GPURendering/SFN_LightColor/SFN_LightColor.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightColor/SFN_LightColor.shader.meta rename to Editor/InternalResources/GPURendering/SFN_LightColor/SFN_LightColor.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightPosition.meta b/Editor/InternalResources/GPURendering/SFN_LightPosition.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightPosition.meta rename to Editor/InternalResources/GPURendering/SFN_LightPosition.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightPosition/SFN_LightPosition.shader b/Editor/InternalResources/GPURendering/SFN_LightPosition/SFN_LightPosition.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightPosition/SFN_LightPosition.shader rename to Editor/InternalResources/GPURendering/SFN_LightPosition/SFN_LightPosition.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightPosition/SFN_LightPosition.shader.meta b/Editor/InternalResources/GPURendering/SFN_LightPosition/SFN_LightPosition.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightPosition/SFN_LightPosition.shader.meta rename to Editor/InternalResources/GPURendering/SFN_LightPosition/SFN_LightPosition.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightVector.meta b/Editor/InternalResources/GPURendering/SFN_LightVector.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightVector.meta rename to Editor/InternalResources/GPURendering/SFN_LightVector.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightVector/SFN_LightVector.shader b/Editor/InternalResources/GPURendering/SFN_LightVector/SFN_LightVector.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightVector/SFN_LightVector.shader rename to Editor/InternalResources/GPURendering/SFN_LightVector/SFN_LightVector.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightVector/SFN_LightVector.shader.meta b/Editor/InternalResources/GPURendering/SFN_LightVector/SFN_LightVector.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_LightVector/SFN_LightVector.shader.meta rename to Editor/InternalResources/GPURendering/SFN_LightVector/SFN_LightVector.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Log.meta b/Editor/InternalResources/GPURendering/SFN_Log.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Log.meta rename to Editor/InternalResources/GPURendering/SFN_Log.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Log/SFN_Log_LOG.shader b/Editor/InternalResources/GPURendering/SFN_Log/SFN_Log_LOG.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Log/SFN_Log_LOG.shader rename to Editor/InternalResources/GPURendering/SFN_Log/SFN_Log_LOG.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Log/SFN_Log_LOG.shader.meta b/Editor/InternalResources/GPURendering/SFN_Log/SFN_Log_LOG.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Log/SFN_Log_LOG.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Log/SFN_Log_LOG.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Log/SFN_Log_LOG10.shader b/Editor/InternalResources/GPURendering/SFN_Log/SFN_Log_LOG10.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Log/SFN_Log_LOG10.shader rename to Editor/InternalResources/GPURendering/SFN_Log/SFN_Log_LOG10.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Log/SFN_Log_LOG10.shader.meta b/Editor/InternalResources/GPURendering/SFN_Log/SFN_Log_LOG10.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Log/SFN_Log_LOG10.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Log/SFN_Log_LOG10.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Log/SFN_Log_LOG2.shader b/Editor/InternalResources/GPURendering/SFN_Log/SFN_Log_LOG2.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Log/SFN_Log_LOG2.shader rename to Editor/InternalResources/GPURendering/SFN_Log/SFN_Log_LOG2.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Log/SFN_Log_LOG2.shader.meta b/Editor/InternalResources/GPURendering/SFN_Log/SFN_Log_LOG2.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Log/SFN_Log_LOG2.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Log/SFN_Log_LOG2.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Matrix4x4.meta b/Editor/InternalResources/GPURendering/SFN_Matrix4x4.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Matrix4x4.meta rename to Editor/InternalResources/GPURendering/SFN_Matrix4x4.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Matrix4x4/SFN_Matrix4x4.shader b/Editor/InternalResources/GPURendering/SFN_Matrix4x4/SFN_Matrix4x4.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Matrix4x4/SFN_Matrix4x4.shader rename to Editor/InternalResources/GPURendering/SFN_Matrix4x4/SFN_Matrix4x4.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Matrix4x4/SFN_Matrix4x4.shader.meta b/Editor/InternalResources/GPURendering/SFN_Matrix4x4/SFN_Matrix4x4.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Matrix4x4/SFN_Matrix4x4.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Matrix4x4/SFN_Matrix4x4.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Matrix4x4Property.meta b/Editor/InternalResources/GPURendering/SFN_Matrix4x4Property.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Matrix4x4Property.meta rename to Editor/InternalResources/GPURendering/SFN_Matrix4x4Property.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Matrix4x4Property/SFN_Matrix4x4Property.shader b/Editor/InternalResources/GPURendering/SFN_Matrix4x4Property/SFN_Matrix4x4Property.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Matrix4x4Property/SFN_Matrix4x4Property.shader rename to Editor/InternalResources/GPURendering/SFN_Matrix4x4Property/SFN_Matrix4x4Property.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Matrix4x4Property/SFN_Matrix4x4Property.shader.meta b/Editor/InternalResources/GPURendering/SFN_Matrix4x4Property/SFN_Matrix4x4Property.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Matrix4x4Property/SFN_Matrix4x4Property.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Matrix4x4Property/SFN_Matrix4x4Property.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Max.meta b/Editor/InternalResources/GPURendering/SFN_Max.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Max.meta rename to Editor/InternalResources/GPURendering/SFN_Max.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Max/SFN_Max_2.shader b/Editor/InternalResources/GPURendering/SFN_Max/SFN_Max_2.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Max/SFN_Max_2.shader rename to Editor/InternalResources/GPURendering/SFN_Max/SFN_Max_2.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Max/SFN_Max_2.shader.meta b/Editor/InternalResources/GPURendering/SFN_Max/SFN_Max_2.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Max/SFN_Max_2.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Max/SFN_Max_2.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Max/SFN_Max_3.shader b/Editor/InternalResources/GPURendering/SFN_Max/SFN_Max_3.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Max/SFN_Max_3.shader rename to Editor/InternalResources/GPURendering/SFN_Max/SFN_Max_3.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Max/SFN_Max_3.shader.meta b/Editor/InternalResources/GPURendering/SFN_Max/SFN_Max_3.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Max/SFN_Max_3.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Max/SFN_Max_3.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Max/SFN_Max_4.shader b/Editor/InternalResources/GPURendering/SFN_Max/SFN_Max_4.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Max/SFN_Max_4.shader rename to Editor/InternalResources/GPURendering/SFN_Max/SFN_Max_4.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Max/SFN_Max_4.shader.meta b/Editor/InternalResources/GPURendering/SFN_Max/SFN_Max_4.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Max/SFN_Max_4.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Max/SFN_Max_4.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Max/SFN_Max_5.shader b/Editor/InternalResources/GPURendering/SFN_Max/SFN_Max_5.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Max/SFN_Max_5.shader rename to Editor/InternalResources/GPURendering/SFN_Max/SFN_Max_5.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Max/SFN_Max_5.shader.meta b/Editor/InternalResources/GPURendering/SFN_Max/SFN_Max_5.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Max/SFN_Max_5.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Max/SFN_Max_5.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Min.meta b/Editor/InternalResources/GPURendering/SFN_Min.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Min.meta rename to Editor/InternalResources/GPURendering/SFN_Min.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Min/SFN_Min_2.shader b/Editor/InternalResources/GPURendering/SFN_Min/SFN_Min_2.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Min/SFN_Min_2.shader rename to Editor/InternalResources/GPURendering/SFN_Min/SFN_Min_2.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Min/SFN_Min_2.shader.meta b/Editor/InternalResources/GPURendering/SFN_Min/SFN_Min_2.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Min/SFN_Min_2.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Min/SFN_Min_2.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Min/SFN_Min_3.shader b/Editor/InternalResources/GPURendering/SFN_Min/SFN_Min_3.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Min/SFN_Min_3.shader rename to Editor/InternalResources/GPURendering/SFN_Min/SFN_Min_3.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Min/SFN_Min_3.shader.meta b/Editor/InternalResources/GPURendering/SFN_Min/SFN_Min_3.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Min/SFN_Min_3.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Min/SFN_Min_3.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Min/SFN_Min_4.shader b/Editor/InternalResources/GPURendering/SFN_Min/SFN_Min_4.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Min/SFN_Min_4.shader rename to Editor/InternalResources/GPURendering/SFN_Min/SFN_Min_4.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Min/SFN_Min_4.shader.meta b/Editor/InternalResources/GPURendering/SFN_Min/SFN_Min_4.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Min/SFN_Min_4.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Min/SFN_Min_4.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Min/SFN_Min_5.shader b/Editor/InternalResources/GPURendering/SFN_Min/SFN_Min_5.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Min/SFN_Min_5.shader rename to Editor/InternalResources/GPURendering/SFN_Min/SFN_Min_5.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Min/SFN_Min_5.shader.meta b/Editor/InternalResources/GPURendering/SFN_Min/SFN_Min_5.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Min/SFN_Min_5.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Min/SFN_Min_5.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Multiply.meta b/Editor/InternalResources/GPURendering/SFN_Multiply.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Multiply.meta rename to Editor/InternalResources/GPURendering/SFN_Multiply.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Multiply/SFN_Multiply_2.shader b/Editor/InternalResources/GPURendering/SFN_Multiply/SFN_Multiply_2.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Multiply/SFN_Multiply_2.shader rename to Editor/InternalResources/GPURendering/SFN_Multiply/SFN_Multiply_2.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Multiply/SFN_Multiply_2.shader.meta b/Editor/InternalResources/GPURendering/SFN_Multiply/SFN_Multiply_2.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Multiply/SFN_Multiply_2.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Multiply/SFN_Multiply_2.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Multiply/SFN_Multiply_3.shader b/Editor/InternalResources/GPURendering/SFN_Multiply/SFN_Multiply_3.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Multiply/SFN_Multiply_3.shader rename to Editor/InternalResources/GPURendering/SFN_Multiply/SFN_Multiply_3.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Multiply/SFN_Multiply_3.shader.meta b/Editor/InternalResources/GPURendering/SFN_Multiply/SFN_Multiply_3.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Multiply/SFN_Multiply_3.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Multiply/SFN_Multiply_3.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Multiply/SFN_Multiply_4.shader b/Editor/InternalResources/GPURendering/SFN_Multiply/SFN_Multiply_4.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Multiply/SFN_Multiply_4.shader rename to Editor/InternalResources/GPURendering/SFN_Multiply/SFN_Multiply_4.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Multiply/SFN_Multiply_4.shader.meta b/Editor/InternalResources/GPURendering/SFN_Multiply/SFN_Multiply_4.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Multiply/SFN_Multiply_4.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Multiply/SFN_Multiply_4.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Multiply/SFN_Multiply_5.shader b/Editor/InternalResources/GPURendering/SFN_Multiply/SFN_Multiply_5.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Multiply/SFN_Multiply_5.shader rename to Editor/InternalResources/GPURendering/SFN_Multiply/SFN_Multiply_5.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Multiply/SFN_Multiply_5.shader.meta b/Editor/InternalResources/GPURendering/SFN_Multiply/SFN_Multiply_5.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Multiply/SFN_Multiply_5.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Multiply/SFN_Multiply_5.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_MultiplyMatrix.meta b/Editor/InternalResources/GPURendering/SFN_MultiplyMatrix.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_MultiplyMatrix.meta rename to Editor/InternalResources/GPURendering/SFN_MultiplyMatrix.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_MultiplyMatrix/SFN_MultiplyMatrix.shader b/Editor/InternalResources/GPURendering/SFN_MultiplyMatrix/SFN_MultiplyMatrix.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_MultiplyMatrix/SFN_MultiplyMatrix.shader rename to Editor/InternalResources/GPURendering/SFN_MultiplyMatrix/SFN_MultiplyMatrix.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_MultiplyMatrix/SFN_MultiplyMatrix.shader.meta b/Editor/InternalResources/GPURendering/SFN_MultiplyMatrix/SFN_MultiplyMatrix.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_MultiplyMatrix/SFN_MultiplyMatrix.shader.meta rename to Editor/InternalResources/GPURendering/SFN_MultiplyMatrix/SFN_MultiplyMatrix.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Negate.meta b/Editor/InternalResources/GPURendering/SFN_Negate.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Negate.meta rename to Editor/InternalResources/GPURendering/SFN_Negate.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Negate/SFN_Negate.shader b/Editor/InternalResources/GPURendering/SFN_Negate/SFN_Negate.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Negate/SFN_Negate.shader rename to Editor/InternalResources/GPURendering/SFN_Negate/SFN_Negate.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Negate/SFN_Negate.shader.meta b/Editor/InternalResources/GPURendering/SFN_Negate/SFN_Negate.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Negate/SFN_Negate.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Negate/SFN_Negate.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Noise.meta b/Editor/InternalResources/GPURendering/SFN_Noise.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Noise.meta rename to Editor/InternalResources/GPURendering/SFN_Noise.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Noise/SFN_Noise.shader b/Editor/InternalResources/GPURendering/SFN_Noise/SFN_Noise.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Noise/SFN_Noise.shader rename to Editor/InternalResources/GPURendering/SFN_Noise/SFN_Noise.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Noise/SFN_Noise.shader.meta b/Editor/InternalResources/GPURendering/SFN_Noise/SFN_Noise.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Noise/SFN_Noise.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Noise/SFN_Noise.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_NormalBlend.meta b/Editor/InternalResources/GPURendering/SFN_NormalBlend.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_NormalBlend.meta rename to Editor/InternalResources/GPURendering/SFN_NormalBlend.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_NormalBlend/SFN_NormalBlend.shader b/Editor/InternalResources/GPURendering/SFN_NormalBlend/SFN_NormalBlend.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_NormalBlend/SFN_NormalBlend.shader rename to Editor/InternalResources/GPURendering/SFN_NormalBlend/SFN_NormalBlend.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_NormalBlend/SFN_NormalBlend.shader.meta b/Editor/InternalResources/GPURendering/SFN_NormalBlend/SFN_NormalBlend.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_NormalBlend/SFN_NormalBlend.shader.meta rename to Editor/InternalResources/GPURendering/SFN_NormalBlend/SFN_NormalBlend.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_NormalVector.meta b/Editor/InternalResources/GPURendering/SFN_NormalVector.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_NormalVector.meta rename to Editor/InternalResources/GPURendering/SFN_NormalVector.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_NormalVector/SFN_NormalVector.shader b/Editor/InternalResources/GPURendering/SFN_NormalVector/SFN_NormalVector.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_NormalVector/SFN_NormalVector.shader rename to Editor/InternalResources/GPURendering/SFN_NormalVector/SFN_NormalVector.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_NormalVector/SFN_NormalVector.shader.meta b/Editor/InternalResources/GPURendering/SFN_NormalVector/SFN_NormalVector.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_NormalVector/SFN_NormalVector.shader.meta rename to Editor/InternalResources/GPURendering/SFN_NormalVector/SFN_NormalVector.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Normalize.meta b/Editor/InternalResources/GPURendering/SFN_Normalize.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Normalize.meta rename to Editor/InternalResources/GPURendering/SFN_Normalize.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Normalize/SFN_Normalize.shader b/Editor/InternalResources/GPURendering/SFN_Normalize/SFN_Normalize.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Normalize/SFN_Normalize.shader rename to Editor/InternalResources/GPURendering/SFN_Normalize/SFN_Normalize.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Normalize/SFN_Normalize.shader.meta b/Editor/InternalResources/GPURendering/SFN_Normalize/SFN_Normalize.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Normalize/SFN_Normalize.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Normalize/SFN_Normalize.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ObjectPosition.meta b/Editor/InternalResources/GPURendering/SFN_ObjectPosition.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ObjectPosition.meta rename to Editor/InternalResources/GPURendering/SFN_ObjectPosition.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ObjectPosition/SFN_ObjectPosition.shader b/Editor/InternalResources/GPURendering/SFN_ObjectPosition/SFN_ObjectPosition.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ObjectPosition/SFN_ObjectPosition.shader rename to Editor/InternalResources/GPURendering/SFN_ObjectPosition/SFN_ObjectPosition.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ObjectPosition/SFN_ObjectPosition.shader.meta b/Editor/InternalResources/GPURendering/SFN_ObjectPosition/SFN_ObjectPosition.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ObjectPosition/SFN_ObjectPosition.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ObjectPosition/SFN_ObjectPosition.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ObjectScale.meta b/Editor/InternalResources/GPURendering/SFN_ObjectScale.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ObjectScale.meta rename to Editor/InternalResources/GPURendering/SFN_ObjectScale.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ObjectScale/SFN_ObjectScale_Default.shader b/Editor/InternalResources/GPURendering/SFN_ObjectScale/SFN_ObjectScale_Default.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ObjectScale/SFN_ObjectScale_Default.shader rename to Editor/InternalResources/GPURendering/SFN_ObjectScale/SFN_ObjectScale_Default.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ObjectScale/SFN_ObjectScale_Default.shader.meta b/Editor/InternalResources/GPURendering/SFN_ObjectScale/SFN_ObjectScale_Default.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ObjectScale/SFN_ObjectScale_Default.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ObjectScale/SFN_ObjectScale_Default.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ObjectScale/SFN_ObjectScale_Reciprocal.shader b/Editor/InternalResources/GPURendering/SFN_ObjectScale/SFN_ObjectScale_Reciprocal.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ObjectScale/SFN_ObjectScale_Reciprocal.shader rename to Editor/InternalResources/GPURendering/SFN_ObjectScale/SFN_ObjectScale_Reciprocal.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ObjectScale/SFN_ObjectScale_Reciprocal.shader.meta b/Editor/InternalResources/GPURendering/SFN_ObjectScale/SFN_ObjectScale_Reciprocal.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ObjectScale/SFN_ObjectScale_Reciprocal.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ObjectScale/SFN_ObjectScale_Reciprocal.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_OneMinus.meta b/Editor/InternalResources/GPURendering/SFN_OneMinus.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_OneMinus.meta rename to Editor/InternalResources/GPURendering/SFN_OneMinus.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_OneMinus/SFN_OneMinus.shader b/Editor/InternalResources/GPURendering/SFN_OneMinus/SFN_OneMinus.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_OneMinus/SFN_OneMinus.shader rename to Editor/InternalResources/GPURendering/SFN_OneMinus/SFN_OneMinus.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_OneMinus/SFN_OneMinus.shader.meta b/Editor/InternalResources/GPURendering/SFN_OneMinus/SFN_OneMinus.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_OneMinus/SFN_OneMinus.shader.meta rename to Editor/InternalResources/GPURendering/SFN_OneMinus/SFN_OneMinus.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Panner.meta b/Editor/InternalResources/GPURendering/SFN_Panner.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Panner.meta rename to Editor/InternalResources/GPURendering/SFN_Panner.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Panner/SFN_Panner_DIST.shader b/Editor/InternalResources/GPURendering/SFN_Panner/SFN_Panner_DIST.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Panner/SFN_Panner_DIST.shader rename to Editor/InternalResources/GPURendering/SFN_Panner/SFN_Panner_DIST.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Panner/SFN_Panner_DIST.shader.meta b/Editor/InternalResources/GPURendering/SFN_Panner/SFN_Panner_DIST.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Panner/SFN_Panner_DIST.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Panner/SFN_Panner_DIST.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Panner/SFN_Panner_REQONLY.shader b/Editor/InternalResources/GPURendering/SFN_Panner/SFN_Panner_REQONLY.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Panner/SFN_Panner_REQONLY.shader rename to Editor/InternalResources/GPURendering/SFN_Panner/SFN_Panner_REQONLY.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Panner/SFN_Panner_REQONLY.shader.meta b/Editor/InternalResources/GPURendering/SFN_Panner/SFN_Panner_REQONLY.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Panner/SFN_Panner_REQONLY.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Panner/SFN_Panner_REQONLY.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax.meta b/Editor/InternalResources/GPURendering/SFN_Parallax.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax.meta rename to Editor/InternalResources/GPURendering/SFN_Parallax.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_DEP.shader b/Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_DEP.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_DEP.shader rename to Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_DEP.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_DEP.shader.meta b/Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_DEP.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_DEP.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_DEP.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_DEP_REF.shader b/Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_DEP_REF.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_DEP_REF.shader rename to Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_DEP_REF.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_DEP_REF.shader.meta b/Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_DEP_REF.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_DEP_REF.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_DEP_REF.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_REF.shader b/Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_REF.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_REF.shader rename to Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_REF.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_REF.shader.meta b/Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_REF.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_REF.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_REF.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_REQONLY.shader b/Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_REQONLY.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_REQONLY.shader rename to Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_REQONLY.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_REQONLY.shader.meta b/Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_REQONLY.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_REQONLY.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_REQONLY.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_UV.shader b/Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_UV.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_UV.shader rename to Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_UV.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_UV.shader.meta b/Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_UV.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_UV.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_UV.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_UV_DEP.shader b/Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_UV_DEP.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_UV_DEP.shader rename to Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_UV_DEP.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_UV_DEP.shader.meta b/Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_UV_DEP.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_UV_DEP.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_UV_DEP.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_UV_DEP_REF.shader b/Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_UV_DEP_REF.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_UV_DEP_REF.shader rename to Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_UV_DEP_REF.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_UV_DEP_REF.shader.meta b/Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_UV_DEP_REF.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_UV_DEP_REF.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_UV_DEP_REF.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_UV_REF.shader b/Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_UV_REF.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_UV_REF.shader rename to Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_UV_REF.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_UV_REF.shader.meta b/Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_UV_REF.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Parallax/SFN_Parallax_UV_REF.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Parallax/SFN_Parallax_UV_REF.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_PixelSize.meta b/Editor/InternalResources/GPURendering/SFN_PixelSize.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_PixelSize.meta rename to Editor/InternalResources/GPURendering/SFN_PixelSize.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_PixelSize/SFN_PixelSize.shader b/Editor/InternalResources/GPURendering/SFN_PixelSize/SFN_PixelSize.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_PixelSize/SFN_PixelSize.shader rename to Editor/InternalResources/GPURendering/SFN_PixelSize/SFN_PixelSize.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_PixelSize/SFN_PixelSize.shader.meta b/Editor/InternalResources/GPURendering/SFN_PixelSize/SFN_PixelSize.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_PixelSize/SFN_PixelSize.shader.meta rename to Editor/InternalResources/GPURendering/SFN_PixelSize/SFN_PixelSize.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Posterize.meta b/Editor/InternalResources/GPURendering/SFN_Posterize.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Posterize.meta rename to Editor/InternalResources/GPURendering/SFN_Posterize.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Posterize/SFN_Posterize.shader b/Editor/InternalResources/GPURendering/SFN_Posterize/SFN_Posterize.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Posterize/SFN_Posterize.shader rename to Editor/InternalResources/GPURendering/SFN_Posterize/SFN_Posterize.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Posterize/SFN_Posterize.shader.meta b/Editor/InternalResources/GPURendering/SFN_Posterize/SFN_Posterize.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Posterize/SFN_Posterize.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Posterize/SFN_Posterize.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Power.meta b/Editor/InternalResources/GPURendering/SFN_Power.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Power.meta rename to Editor/InternalResources/GPURendering/SFN_Power.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Power/SFN_Power.shader b/Editor/InternalResources/GPURendering/SFN_Power/SFN_Power.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Power/SFN_Power.shader rename to Editor/InternalResources/GPURendering/SFN_Power/SFN_Power.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Power/SFN_Power.shader.meta b/Editor/InternalResources/GPURendering/SFN_Power/SFN_Power.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Power/SFN_Power.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Power/SFN_Power.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ProjectionParameters.meta b/Editor/InternalResources/GPURendering/SFN_ProjectionParameters.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ProjectionParameters.meta rename to Editor/InternalResources/GPURendering/SFN_ProjectionParameters.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ProjectionParameters/SFN_ProjectionParameters.shader b/Editor/InternalResources/GPURendering/SFN_ProjectionParameters/SFN_ProjectionParameters.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ProjectionParameters/SFN_ProjectionParameters.shader rename to Editor/InternalResources/GPURendering/SFN_ProjectionParameters/SFN_ProjectionParameters.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ProjectionParameters/SFN_ProjectionParameters.shader.meta b/Editor/InternalResources/GPURendering/SFN_ProjectionParameters/SFN_ProjectionParameters.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ProjectionParameters/SFN_ProjectionParameters.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ProjectionParameters/SFN_ProjectionParameters.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Reciprocal.meta b/Editor/InternalResources/GPURendering/SFN_Reciprocal.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Reciprocal.meta rename to Editor/InternalResources/GPURendering/SFN_Reciprocal.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Reciprocal/SFN_Reciprocal.shader b/Editor/InternalResources/GPURendering/SFN_Reciprocal/SFN_Reciprocal.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Reciprocal/SFN_Reciprocal.shader rename to Editor/InternalResources/GPURendering/SFN_Reciprocal/SFN_Reciprocal.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Reciprocal/SFN_Reciprocal.shader.meta b/Editor/InternalResources/GPURendering/SFN_Reciprocal/SFN_Reciprocal.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Reciprocal/SFN_Reciprocal.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Reciprocal/SFN_Reciprocal.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Reflect.meta b/Editor/InternalResources/GPURendering/SFN_Reflect.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Reflect.meta rename to Editor/InternalResources/GPURendering/SFN_Reflect.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Reflect/SFN_Reflect.shader b/Editor/InternalResources/GPURendering/SFN_Reflect/SFN_Reflect.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Reflect/SFN_Reflect.shader rename to Editor/InternalResources/GPURendering/SFN_Reflect/SFN_Reflect.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Reflect/SFN_Reflect.shader.meta b/Editor/InternalResources/GPURendering/SFN_Reflect/SFN_Reflect.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Reflect/SFN_Reflect.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Reflect/SFN_Reflect.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Relay.meta b/Editor/InternalResources/GPURendering/SFN_Relay.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Relay.meta rename to Editor/InternalResources/GPURendering/SFN_Relay.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Relay/SFN_Relay.shader b/Editor/InternalResources/GPURendering/SFN_Relay/SFN_Relay.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Relay/SFN_Relay.shader rename to Editor/InternalResources/GPURendering/SFN_Relay/SFN_Relay.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Relay/SFN_Relay.shader.meta b/Editor/InternalResources/GPURendering/SFN_Relay/SFN_Relay.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Relay/SFN_Relay.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Relay/SFN_Relay.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_RemapRange.meta b/Editor/InternalResources/GPURendering/SFN_RemapRange.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_RemapRange.meta rename to Editor/InternalResources/GPURendering/SFN_RemapRange.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_RemapRange/SFN_RemapRange.shader b/Editor/InternalResources/GPURendering/SFN_RemapRange/SFN_RemapRange.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_RemapRange/SFN_RemapRange.shader rename to Editor/InternalResources/GPURendering/SFN_RemapRange/SFN_RemapRange.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_RemapRange/SFN_RemapRange.shader.meta b/Editor/InternalResources/GPURendering/SFN_RemapRange/SFN_RemapRange.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_RemapRange/SFN_RemapRange.shader.meta rename to Editor/InternalResources/GPURendering/SFN_RemapRange/SFN_RemapRange.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_RemapRangeAdvanced.meta b/Editor/InternalResources/GPURendering/SFN_RemapRangeAdvanced.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_RemapRangeAdvanced.meta rename to Editor/InternalResources/GPURendering/SFN_RemapRangeAdvanced.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_RemapRangeAdvanced/SFN_RemapRangeAdvanced.shader b/Editor/InternalResources/GPURendering/SFN_RemapRangeAdvanced/SFN_RemapRangeAdvanced.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_RemapRangeAdvanced/SFN_RemapRangeAdvanced.shader rename to Editor/InternalResources/GPURendering/SFN_RemapRangeAdvanced/SFN_RemapRangeAdvanced.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_RemapRangeAdvanced/SFN_RemapRangeAdvanced.shader.meta b/Editor/InternalResources/GPURendering/SFN_RemapRangeAdvanced/SFN_RemapRangeAdvanced.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_RemapRangeAdvanced/SFN_RemapRangeAdvanced.shader.meta rename to Editor/InternalResources/GPURendering/SFN_RemapRangeAdvanced/SFN_RemapRangeAdvanced.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_RgbToHsv.meta b/Editor/InternalResources/GPURendering/SFN_RgbToHsv.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_RgbToHsv.meta rename to Editor/InternalResources/GPURendering/SFN_RgbToHsv.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_RgbToHsv/SFN_RgbToHsv.shader b/Editor/InternalResources/GPURendering/SFN_RgbToHsv/SFN_RgbToHsv.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_RgbToHsv/SFN_RgbToHsv.shader rename to Editor/InternalResources/GPURendering/SFN_RgbToHsv/SFN_RgbToHsv.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_RgbToHsv/SFN_RgbToHsv.shader.meta b/Editor/InternalResources/GPURendering/SFN_RgbToHsv/SFN_RgbToHsv.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_RgbToHsv/SFN_RgbToHsv.shader.meta rename to Editor/InternalResources/GPURendering/SFN_RgbToHsv/SFN_RgbToHsv.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator.meta b/Editor/InternalResources/GPURendering/SFN_Rotator.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator.meta rename to Editor/InternalResources/GPURendering/SFN_Rotator.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_ANG.shader b/Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_ANG.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_ANG.shader rename to Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_ANG.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_ANG.shader.meta b/Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_ANG.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_ANG.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_ANG.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_PIV.shader b/Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_PIV.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_PIV.shader rename to Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_PIV.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_PIV.shader.meta b/Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_PIV.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_PIV.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_PIV.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_PIV_ANG.shader b/Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_PIV_ANG.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_PIV_ANG.shader rename to Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_PIV_ANG.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_PIV_ANG.shader.meta b/Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_PIV_ANG.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_PIV_ANG.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_PIV_ANG.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_PIV_SPD.shader b/Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_PIV_SPD.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_PIV_SPD.shader rename to Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_PIV_SPD.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_PIV_SPD.shader.meta b/Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_PIV_SPD.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_PIV_SPD.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_PIV_SPD.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_PIV_SPD_ANG.shader b/Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_PIV_SPD_ANG.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_PIV_SPD_ANG.shader rename to Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_PIV_SPD_ANG.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_PIV_SPD_ANG.shader.meta b/Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_PIV_SPD_ANG.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_PIV_SPD_ANG.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_PIV_SPD_ANG.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_REQONLY.shader b/Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_REQONLY.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_REQONLY.shader rename to Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_REQONLY.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_REQONLY.shader.meta b/Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_REQONLY.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_REQONLY.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_REQONLY.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_SPD.shader b/Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_SPD.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_SPD.shader rename to Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_SPD.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_SPD.shader.meta b/Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_SPD.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_SPD.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_SPD.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_SPD_ANG.shader b/Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_SPD_ANG.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_SPD_ANG.shader rename to Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_SPD_ANG.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_SPD_ANG.shader.meta b/Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_SPD_ANG.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Rotator/SFN_Rotator_SPD_ANG.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Rotator/SFN_Rotator_SPD_ANG.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Round.meta b/Editor/InternalResources/GPURendering/SFN_Round.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Round.meta rename to Editor/InternalResources/GPURendering/SFN_Round.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Round/SFN_Round.shader b/Editor/InternalResources/GPURendering/SFN_Round/SFN_Round.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Round/SFN_Round.shader rename to Editor/InternalResources/GPURendering/SFN_Round/SFN_Round.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Round/SFN_Round.shader.meta b/Editor/InternalResources/GPURendering/SFN_Round/SFN_Round.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Round/SFN_Round.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Round/SFN_Round.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_SceneColor.meta b/Editor/InternalResources/GPURendering/SFN_SceneColor.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_SceneColor.meta rename to Editor/InternalResources/GPURendering/SFN_SceneColor.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_SceneColor/SFN_SceneColor.shader b/Editor/InternalResources/GPURendering/SFN_SceneColor/SFN_SceneColor.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_SceneColor/SFN_SceneColor.shader rename to Editor/InternalResources/GPURendering/SFN_SceneColor/SFN_SceneColor.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_SceneColor/SFN_SceneColor.shader.meta b/Editor/InternalResources/GPURendering/SFN_SceneColor/SFN_SceneColor.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_SceneColor/SFN_SceneColor.shader.meta rename to Editor/InternalResources/GPURendering/SFN_SceneColor/SFN_SceneColor.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_SceneDepth.meta b/Editor/InternalResources/GPURendering/SFN_SceneDepth.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_SceneDepth.meta rename to Editor/InternalResources/GPURendering/SFN_SceneDepth.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_SceneDepth/SFN_SceneDepth.shader b/Editor/InternalResources/GPURendering/SFN_SceneDepth/SFN_SceneDepth.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_SceneDepth/SFN_SceneDepth.shader rename to Editor/InternalResources/GPURendering/SFN_SceneDepth/SFN_SceneDepth.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_SceneDepth/SFN_SceneDepth.shader.meta b/Editor/InternalResources/GPURendering/SFN_SceneDepth/SFN_SceneDepth.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_SceneDepth/SFN_SceneDepth.shader.meta rename to Editor/InternalResources/GPURendering/SFN_SceneDepth/SFN_SceneDepth.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ScreenParameters.meta b/Editor/InternalResources/GPURendering/SFN_ScreenParameters.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ScreenParameters.meta rename to Editor/InternalResources/GPURendering/SFN_ScreenParameters.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ScreenParameters/SFN_ScreenParameters.shader b/Editor/InternalResources/GPURendering/SFN_ScreenParameters/SFN_ScreenParameters.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ScreenParameters/SFN_ScreenParameters.shader rename to Editor/InternalResources/GPURendering/SFN_ScreenParameters/SFN_ScreenParameters.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ScreenParameters/SFN_ScreenParameters.shader.meta b/Editor/InternalResources/GPURendering/SFN_ScreenParameters/SFN_ScreenParameters.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ScreenParameters/SFN_ScreenParameters.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ScreenParameters/SFN_ScreenParameters.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ScreenPos.meta b/Editor/InternalResources/GPURendering/SFN_ScreenPos.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ScreenPos.meta rename to Editor/InternalResources/GPURendering/SFN_ScreenPos.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ScreenPos/SFN_ScreenPos.shader b/Editor/InternalResources/GPURendering/SFN_ScreenPos/SFN_ScreenPos.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ScreenPos/SFN_ScreenPos.shader rename to Editor/InternalResources/GPURendering/SFN_ScreenPos/SFN_ScreenPos.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ScreenPos/SFN_ScreenPos.shader.meta b/Editor/InternalResources/GPURendering/SFN_ScreenPos/SFN_ScreenPos.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ScreenPos/SFN_ScreenPos.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ScreenPos/SFN_ScreenPos.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Set.meta b/Editor/InternalResources/GPURendering/SFN_Set.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Set.meta rename to Editor/InternalResources/GPURendering/SFN_Set.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Set/SFN_Set.shader b/Editor/InternalResources/GPURendering/SFN_Set/SFN_Set.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Set/SFN_Set.shader rename to Editor/InternalResources/GPURendering/SFN_Set/SFN_Set.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Set/SFN_Set.shader.meta b/Editor/InternalResources/GPURendering/SFN_Set/SFN_Set.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Set/SFN_Set.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Set/SFN_Set.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Sign.meta b/Editor/InternalResources/GPURendering/SFN_Sign.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Sign.meta rename to Editor/InternalResources/GPURendering/SFN_Sign.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Sign/SFN_Sign.shader b/Editor/InternalResources/GPURendering/SFN_Sign/SFN_Sign.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Sign/SFN_Sign.shader rename to Editor/InternalResources/GPURendering/SFN_Sign/SFN_Sign.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Sign/SFN_Sign.shader.meta b/Editor/InternalResources/GPURendering/SFN_Sign/SFN_Sign.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Sign/SFN_Sign.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Sign/SFN_Sign.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Sin.meta b/Editor/InternalResources/GPURendering/SFN_Sin.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Sin.meta rename to Editor/InternalResources/GPURendering/SFN_Sin.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Sin/SFN_Sin.shader b/Editor/InternalResources/GPURendering/SFN_Sin/SFN_Sin.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Sin/SFN_Sin.shader rename to Editor/InternalResources/GPURendering/SFN_Sin/SFN_Sin.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Sin/SFN_Sin.shader.meta b/Editor/InternalResources/GPURendering/SFN_Sin/SFN_Sin.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Sin/SFN_Sin.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Sin/SFN_Sin.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Smoothstep.meta b/Editor/InternalResources/GPURendering/SFN_Smoothstep.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Smoothstep.meta rename to Editor/InternalResources/GPURendering/SFN_Smoothstep.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Smoothstep/SFN_Smoothstep.shader b/Editor/InternalResources/GPURendering/SFN_Smoothstep/SFN_Smoothstep.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Smoothstep/SFN_Smoothstep.shader rename to Editor/InternalResources/GPURendering/SFN_Smoothstep/SFN_Smoothstep.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Smoothstep/SFN_Smoothstep.shader.meta b/Editor/InternalResources/GPURendering/SFN_Smoothstep/SFN_Smoothstep.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Smoothstep/SFN_Smoothstep.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Smoothstep/SFN_Smoothstep.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Sqrt.meta b/Editor/InternalResources/GPURendering/SFN_Sqrt.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Sqrt.meta rename to Editor/InternalResources/GPURendering/SFN_Sqrt.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Sqrt/SFN_Sqrt.shader b/Editor/InternalResources/GPURendering/SFN_Sqrt/SFN_Sqrt.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Sqrt/SFN_Sqrt.shader rename to Editor/InternalResources/GPURendering/SFN_Sqrt/SFN_Sqrt.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Sqrt/SFN_Sqrt.shader.meta b/Editor/InternalResources/GPURendering/SFN_Sqrt/SFN_Sqrt.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Sqrt/SFN_Sqrt.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Sqrt/SFN_Sqrt.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Step.meta b/Editor/InternalResources/GPURendering/SFN_Step.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Step.meta rename to Editor/InternalResources/GPURendering/SFN_Step.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Step/SFN_Step.shader b/Editor/InternalResources/GPURendering/SFN_Step/SFN_Step.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Step/SFN_Step.shader rename to Editor/InternalResources/GPURendering/SFN_Step/SFN_Step.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Step/SFN_Step.shader.meta b/Editor/InternalResources/GPURendering/SFN_Step/SFN_Step.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Step/SFN_Step.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Step/SFN_Step.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Subtract.meta b/Editor/InternalResources/GPURendering/SFN_Subtract.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Subtract.meta rename to Editor/InternalResources/GPURendering/SFN_Subtract.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Subtract/SFN_Subtract.shader b/Editor/InternalResources/GPURendering/SFN_Subtract/SFN_Subtract.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Subtract/SFN_Subtract.shader rename to Editor/InternalResources/GPURendering/SFN_Subtract/SFN_Subtract.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Subtract/SFN_Subtract.shader.meta b/Editor/InternalResources/GPURendering/SFN_Subtract/SFN_Subtract.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Subtract/SFN_Subtract.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Subtract/SFN_Subtract.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_SwitchProperty.meta b/Editor/InternalResources/GPURendering/SFN_SwitchProperty.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_SwitchProperty.meta rename to Editor/InternalResources/GPURendering/SFN_SwitchProperty.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_SwitchProperty/SFN_SwitchProperty.shader b/Editor/InternalResources/GPURendering/SFN_SwitchProperty/SFN_SwitchProperty.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_SwitchProperty/SFN_SwitchProperty.shader rename to Editor/InternalResources/GPURendering/SFN_SwitchProperty/SFN_SwitchProperty.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_SwitchProperty/SFN_SwitchProperty.shader.meta b/Editor/InternalResources/GPURendering/SFN_SwitchProperty/SFN_SwitchProperty.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_SwitchProperty/SFN_SwitchProperty.shader.meta rename to Editor/InternalResources/GPURendering/SFN_SwitchProperty/SFN_SwitchProperty.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tan.meta b/Editor/InternalResources/GPURendering/SFN_Tan.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tan.meta rename to Editor/InternalResources/GPURendering/SFN_Tan.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tan/SFN_Tan.shader b/Editor/InternalResources/GPURendering/SFN_Tan/SFN_Tan.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tan/SFN_Tan.shader rename to Editor/InternalResources/GPURendering/SFN_Tan/SFN_Tan.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tan/SFN_Tan.shader.meta b/Editor/InternalResources/GPURendering/SFN_Tan/SFN_Tan.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tan/SFN_Tan.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Tan/SFN_Tan.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tangent.meta b/Editor/InternalResources/GPURendering/SFN_Tangent.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tangent.meta rename to Editor/InternalResources/GPURendering/SFN_Tangent.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tangent/SFN_Tangent.shader b/Editor/InternalResources/GPURendering/SFN_Tangent/SFN_Tangent.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tangent/SFN_Tangent.shader rename to Editor/InternalResources/GPURendering/SFN_Tangent/SFN_Tangent.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tangent/SFN_Tangent.shader.meta b/Editor/InternalResources/GPURendering/SFN_Tangent/SFN_Tangent.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tangent/SFN_Tangent.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Tangent/SFN_Tangent.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2d.meta b/Editor/InternalResources/GPURendering/SFN_Tex2d.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2d.meta rename to Editor/InternalResources/GPURendering/SFN_Tex2d.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2d/SFN_Tex2d_MIP.shader b/Editor/InternalResources/GPURendering/SFN_Tex2d/SFN_Tex2d_MIP.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2d/SFN_Tex2d_MIP.shader rename to Editor/InternalResources/GPURendering/SFN_Tex2d/SFN_Tex2d_MIP.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2d/SFN_Tex2d_MIP.shader.meta b/Editor/InternalResources/GPURendering/SFN_Tex2d/SFN_Tex2d_MIP.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2d/SFN_Tex2d_MIP.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Tex2d/SFN_Tex2d_MIP.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2d/SFN_Tex2d_NoInputs.shader b/Editor/InternalResources/GPURendering/SFN_Tex2d/SFN_Tex2d_NoInputs.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2d/SFN_Tex2d_NoInputs.shader rename to Editor/InternalResources/GPURendering/SFN_Tex2d/SFN_Tex2d_NoInputs.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2d/SFN_Tex2d_NoInputs.shader.meta b/Editor/InternalResources/GPURendering/SFN_Tex2d/SFN_Tex2d_NoInputs.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2d/SFN_Tex2d_NoInputs.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Tex2d/SFN_Tex2d_NoInputs.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2d/SFN_Tex2d_UV.shader b/Editor/InternalResources/GPURendering/SFN_Tex2d/SFN_Tex2d_UV.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2d/SFN_Tex2d_UV.shader rename to Editor/InternalResources/GPURendering/SFN_Tex2d/SFN_Tex2d_UV.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2d/SFN_Tex2d_UV.shader.meta b/Editor/InternalResources/GPURendering/SFN_Tex2d/SFN_Tex2d_UV.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2d/SFN_Tex2d_UV.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Tex2d/SFN_Tex2d_UV.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2d/SFN_Tex2d_UV_MIP.shader b/Editor/InternalResources/GPURendering/SFN_Tex2d/SFN_Tex2d_UV_MIP.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2d/SFN_Tex2d_UV_MIP.shader rename to Editor/InternalResources/GPURendering/SFN_Tex2d/SFN_Tex2d_UV_MIP.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2d/SFN_Tex2d_UV_MIP.shader.meta b/Editor/InternalResources/GPURendering/SFN_Tex2d/SFN_Tex2d_UV_MIP.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2d/SFN_Tex2d_UV_MIP.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Tex2d/SFN_Tex2d_UV_MIP.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2dAsset.meta b/Editor/InternalResources/GPURendering/SFN_Tex2dAsset.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2dAsset.meta rename to Editor/InternalResources/GPURendering/SFN_Tex2dAsset.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2dAsset/SFN_Tex2dAsset.shader b/Editor/InternalResources/GPURendering/SFN_Tex2dAsset/SFN_Tex2dAsset.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2dAsset/SFN_Tex2dAsset.shader rename to Editor/InternalResources/GPURendering/SFN_Tex2dAsset/SFN_Tex2dAsset.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2dAsset/SFN_Tex2dAsset.shader.meta b/Editor/InternalResources/GPURendering/SFN_Tex2dAsset/SFN_Tex2dAsset.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Tex2dAsset/SFN_Tex2dAsset.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Tex2dAsset/SFN_Tex2dAsset.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_TexCoord.meta b/Editor/InternalResources/GPURendering/SFN_TexCoord.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_TexCoord.meta rename to Editor/InternalResources/GPURendering/SFN_TexCoord.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_TexCoord/SFN_TexCoord.shader b/Editor/InternalResources/GPURendering/SFN_TexCoord/SFN_TexCoord.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_TexCoord/SFN_TexCoord.shader rename to Editor/InternalResources/GPURendering/SFN_TexCoord/SFN_TexCoord.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_TexCoord/SFN_TexCoord.shader.meta b/Editor/InternalResources/GPURendering/SFN_TexCoord/SFN_TexCoord.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_TexCoord/SFN_TexCoord.shader.meta rename to Editor/InternalResources/GPURendering/SFN_TexCoord/SFN_TexCoord.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Time.meta b/Editor/InternalResources/GPURendering/SFN_Time.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Time.meta rename to Editor/InternalResources/GPURendering/SFN_Time.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Time/SFN_Time.shader b/Editor/InternalResources/GPURendering/SFN_Time/SFN_Time.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Time/SFN_Time.shader rename to Editor/InternalResources/GPURendering/SFN_Time/SFN_Time.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Time/SFN_Time.shader.meta b/Editor/InternalResources/GPURendering/SFN_Time/SFN_Time.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Time/SFN_Time.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Time/SFN_Time.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Transform.meta b/Editor/InternalResources/GPURendering/SFN_Transform.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Transform.meta rename to Editor/InternalResources/GPURendering/SFN_Transform.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Transform/SFN_Transform.shader b/Editor/InternalResources/GPURendering/SFN_Transform/SFN_Transform.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Transform/SFN_Transform.shader rename to Editor/InternalResources/GPURendering/SFN_Transform/SFN_Transform.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Transform/SFN_Transform.shader.meta b/Editor/InternalResources/GPURendering/SFN_Transform/SFN_Transform.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Transform/SFN_Transform.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Transform/SFN_Transform.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Transpose.meta b/Editor/InternalResources/GPURendering/SFN_Transpose.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Transpose.meta rename to Editor/InternalResources/GPURendering/SFN_Transpose.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Transpose/SFN_Transpose.shader b/Editor/InternalResources/GPURendering/SFN_Transpose/SFN_Transpose.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Transpose/SFN_Transpose.shader rename to Editor/InternalResources/GPURendering/SFN_Transpose/SFN_Transpose.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Transpose/SFN_Transpose.shader.meta b/Editor/InternalResources/GPURendering/SFN_Transpose/SFN_Transpose.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Transpose/SFN_Transpose.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Transpose/SFN_Transpose.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Trunc.meta b/Editor/InternalResources/GPURendering/SFN_Trunc.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Trunc.meta rename to Editor/InternalResources/GPURendering/SFN_Trunc.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Trunc/SFN_Trunc.shader b/Editor/InternalResources/GPURendering/SFN_Trunc/SFN_Trunc.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Trunc/SFN_Trunc.shader rename to Editor/InternalResources/GPURendering/SFN_Trunc/SFN_Trunc.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Trunc/SFN_Trunc.shader.meta b/Editor/InternalResources/GPURendering/SFN_Trunc/SFN_Trunc.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_Trunc/SFN_Trunc.shader.meta rename to Editor/InternalResources/GPURendering/SFN_Trunc/SFN_Trunc.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_UVTile.meta b/Editor/InternalResources/GPURendering/SFN_UVTile.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_UVTile.meta rename to Editor/InternalResources/GPURendering/SFN_UVTile.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_UVTile/SFN_UVTile.shader b/Editor/InternalResources/GPURendering/SFN_UVTile/SFN_UVTile.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_UVTile/SFN_UVTile.shader rename to Editor/InternalResources/GPURendering/SFN_UVTile/SFN_UVTile.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_UVTile/SFN_UVTile.shader.meta b/Editor/InternalResources/GPURendering/SFN_UVTile/SFN_UVTile.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_UVTile/SFN_UVTile.shader.meta rename to Editor/InternalResources/GPURendering/SFN_UVTile/SFN_UVTile.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_VectorProjection.meta b/Editor/InternalResources/GPURendering/SFN_VectorProjection.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_VectorProjection.meta rename to Editor/InternalResources/GPURendering/SFN_VectorProjection.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_VectorProjection/SFN_VectorProjection.shader b/Editor/InternalResources/GPURendering/SFN_VectorProjection/SFN_VectorProjection.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_VectorProjection/SFN_VectorProjection.shader rename to Editor/InternalResources/GPURendering/SFN_VectorProjection/SFN_VectorProjection.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_VectorProjection/SFN_VectorProjection.shader.meta b/Editor/InternalResources/GPURendering/SFN_VectorProjection/SFN_VectorProjection.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_VectorProjection/SFN_VectorProjection.shader.meta rename to Editor/InternalResources/GPURendering/SFN_VectorProjection/SFN_VectorProjection.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_VectorRejection.meta b/Editor/InternalResources/GPURendering/SFN_VectorRejection.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_VectorRejection.meta rename to Editor/InternalResources/GPURendering/SFN_VectorRejection.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_VectorRejection/SFN_VectorRejection.shader b/Editor/InternalResources/GPURendering/SFN_VectorRejection/SFN_VectorRejection.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_VectorRejection/SFN_VectorRejection.shader rename to Editor/InternalResources/GPURendering/SFN_VectorRejection/SFN_VectorRejection.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_VectorRejection/SFN_VectorRejection.shader.meta b/Editor/InternalResources/GPURendering/SFN_VectorRejection/SFN_VectorRejection.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_VectorRejection/SFN_VectorRejection.shader.meta rename to Editor/InternalResources/GPURendering/SFN_VectorRejection/SFN_VectorRejection.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_VertexColor.meta b/Editor/InternalResources/GPURendering/SFN_VertexColor.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_VertexColor.meta rename to Editor/InternalResources/GPURendering/SFN_VertexColor.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_VertexColor/SFN_VertexColor.shader b/Editor/InternalResources/GPURendering/SFN_VertexColor/SFN_VertexColor.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_VertexColor/SFN_VertexColor.shader rename to Editor/InternalResources/GPURendering/SFN_VertexColor/SFN_VertexColor.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_VertexColor/SFN_VertexColor.shader.meta b/Editor/InternalResources/GPURendering/SFN_VertexColor/SFN_VertexColor.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_VertexColor/SFN_VertexColor.shader.meta rename to Editor/InternalResources/GPURendering/SFN_VertexColor/SFN_VertexColor.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ViewPosition.meta b/Editor/InternalResources/GPURendering/SFN_ViewPosition.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ViewPosition.meta rename to Editor/InternalResources/GPURendering/SFN_ViewPosition.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ViewPosition/SFN_ViewPosition.shader b/Editor/InternalResources/GPURendering/SFN_ViewPosition/SFN_ViewPosition.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ViewPosition/SFN_ViewPosition.shader rename to Editor/InternalResources/GPURendering/SFN_ViewPosition/SFN_ViewPosition.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ViewPosition/SFN_ViewPosition.shader.meta b/Editor/InternalResources/GPURendering/SFN_ViewPosition/SFN_ViewPosition.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ViewPosition/SFN_ViewPosition.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ViewPosition/SFN_ViewPosition.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ViewReflectionVector.meta b/Editor/InternalResources/GPURendering/SFN_ViewReflectionVector.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ViewReflectionVector.meta rename to Editor/InternalResources/GPURendering/SFN_ViewReflectionVector.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ViewReflectionVector/SFN_ViewReflectionVector.shader b/Editor/InternalResources/GPURendering/SFN_ViewReflectionVector/SFN_ViewReflectionVector.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ViewReflectionVector/SFN_ViewReflectionVector.shader rename to Editor/InternalResources/GPURendering/SFN_ViewReflectionVector/SFN_ViewReflectionVector.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ViewReflectionVector/SFN_ViewReflectionVector.shader.meta b/Editor/InternalResources/GPURendering/SFN_ViewReflectionVector/SFN_ViewReflectionVector.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ViewReflectionVector/SFN_ViewReflectionVector.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ViewReflectionVector/SFN_ViewReflectionVector.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ViewVector.meta b/Editor/InternalResources/GPURendering/SFN_ViewVector.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ViewVector.meta rename to Editor/InternalResources/GPURendering/SFN_ViewVector.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ViewVector/SFN_ViewVector.shader b/Editor/InternalResources/GPURendering/SFN_ViewVector/SFN_ViewVector.shader similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ViewVector/SFN_ViewVector.shader rename to Editor/InternalResources/GPURendering/SFN_ViewVector/SFN_ViewVector.shader diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ViewVector/SFN_ViewVector.shader.meta b/Editor/InternalResources/GPURendering/SFN_ViewVector/SFN_ViewVector.shader.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/GPU Rendering/SFN_ViewVector/SFN_ViewVector.shader.meta rename to Editor/InternalResources/GPURendering/SFN_ViewVector/SFN_ViewVector.shader.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Inspectors.meta b/Editor/InternalResources/Inspectors.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Inspectors.meta rename to Editor/InternalResources/Inspectors.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Inspectors/ShaderForgeInspector.cs b/Editor/InternalResources/Inspectors/ShaderForgeInspector.cs similarity index 99% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Inspectors/ShaderForgeInspector.cs rename to Editor/InternalResources/Inspectors/ShaderForgeInspector.cs index d49f27ae..682d3cf8 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Inspectors/ShaderForgeInspector.cs +++ b/Editor/InternalResources/Inspectors/ShaderForgeInspector.cs @@ -168,7 +168,7 @@ public override void OnInspectorGUI() { if( hasShaderForgeData ) { if( GUILayout.Button( "Open in Shader Forge" ) ) { - if(Event.current.rawType != EventType.mouseDown) + if(Event.current.rawType != EventType.MouseDown) SF_Editor.Init( shader ); } } else { diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Inspectors/ShaderForgeInspector.cs.meta b/Editor/InternalResources/Inspectors/ShaderForgeInspector.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Inspectors/ShaderForgeInspector.cs.meta rename to Editor/InternalResources/Inspectors/ShaderForgeInspector.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Inspectors/ShaderForgeMaterialInspector.cs b/Editor/InternalResources/Inspectors/ShaderForgeMaterialInspector.cs similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Inspectors/ShaderForgeMaterialInspector.cs rename to Editor/InternalResources/Inspectors/ShaderForgeMaterialInspector.cs diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Inspectors/ShaderForgeMaterialInspector.cs.meta b/Editor/InternalResources/Inspectors/ShaderForgeMaterialInspector.cs.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Inspectors/ShaderForgeMaterialInspector.cs.meta rename to Editor/InternalResources/Inspectors/ShaderForgeMaterialInspector.cs.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface.meta b/Editor/InternalResources/Interface.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface.meta rename to Editor/InternalResources/Interface.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Fonts.meta b/Editor/InternalResources/Interface/Fonts.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Fonts.meta rename to Editor/InternalResources/Interface/Fonts.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Fonts/VeraMono-Bold-Italic.ttf b/Editor/InternalResources/Interface/Fonts/VeraMono-Bold-Italic.ttf old mode 100755 new mode 100644 similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Fonts/VeraMono-Bold-Italic.ttf rename to Editor/InternalResources/Interface/Fonts/VeraMono-Bold-Italic.ttf diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Fonts/VeraMono-Bold-Italic.ttf.meta b/Editor/InternalResources/Interface/Fonts/VeraMono-Bold-Italic.ttf.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Fonts/VeraMono-Bold-Italic.ttf.meta rename to Editor/InternalResources/Interface/Fonts/VeraMono-Bold-Italic.ttf.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Fonts/VeraMono-Bold.ttf b/Editor/InternalResources/Interface/Fonts/VeraMono-Bold.ttf old mode 100755 new mode 100644 similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Fonts/VeraMono-Bold.ttf rename to Editor/InternalResources/Interface/Fonts/VeraMono-Bold.ttf diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Fonts/VeraMono-Bold.ttf.meta b/Editor/InternalResources/Interface/Fonts/VeraMono-Bold.ttf.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Fonts/VeraMono-Bold.ttf.meta rename to Editor/InternalResources/Interface/Fonts/VeraMono-Bold.ttf.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Fonts/VeraMono-Italic.ttf b/Editor/InternalResources/Interface/Fonts/VeraMono-Italic.ttf old mode 100755 new mode 100644 similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Fonts/VeraMono-Italic.ttf rename to Editor/InternalResources/Interface/Fonts/VeraMono-Italic.ttf diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Fonts/VeraMono-Italic.ttf.meta b/Editor/InternalResources/Interface/Fonts/VeraMono-Italic.ttf.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Fonts/VeraMono-Italic.ttf.meta rename to Editor/InternalResources/Interface/Fonts/VeraMono-Italic.ttf.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Fonts/VeraMono.ttf b/Editor/InternalResources/Interface/Fonts/VeraMono.ttf old mode 100755 new mode 100644 similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Fonts/VeraMono.ttf rename to Editor/InternalResources/Interface/Fonts/VeraMono.ttf diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Fonts/VeraMono.ttf.meta b/Editor/InternalResources/Interface/Fonts/VeraMono.ttf.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Fonts/VeraMono.ttf.meta rename to Editor/InternalResources/Interface/Fonts/VeraMono.ttf.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes.meta b/Editor/InternalResources/Interface/Nodes.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes.meta rename to Editor/InternalResources/Interface/Nodes.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data.meta b/Editor/InternalResources/Interface/Nodes/Data.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data.meta rename to Editor/InternalResources/Interface/Nodes/Data.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/node_3d_data_mask.png b/Editor/InternalResources/Interface/Nodes/Data/node_3d_data_mask.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/node_3d_data_mask.png rename to Editor/InternalResources/Interface/Nodes/Data/node_3d_data_mask.png diff --git a/Editor/InternalResources/Interface/Nodes/Data/node_3d_data_mask.png.meta b/Editor/InternalResources/Interface/Nodes/Data/node_3d_data_mask.png.meta new file mode 100644 index 00000000..eab3a142 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/Data/node_3d_data_mask.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 93411440cabbd493e9d9b949ba3c82fd +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_bitangent.png b/Editor/InternalResources/Interface/Nodes/Data/sfn_bitangent.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_bitangent.png rename to Editor/InternalResources/Interface/Nodes/Data/sfn_bitangent.png diff --git a/Editor/InternalResources/Interface/Nodes/Data/sfn_bitangent.png.meta b/Editor/InternalResources/Interface/Nodes/Data/sfn_bitangent.png.meta new file mode 100644 index 00000000..407a0bef --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/Data/sfn_bitangent.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 51aa11ae9f6e54c76b49ebb6f6bf55a3 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_depth.png b/Editor/InternalResources/Interface/Nodes/Data/sfn_depth.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_depth.png rename to Editor/InternalResources/Interface/Nodes/Data/sfn_depth.png diff --git a/Editor/InternalResources/Interface/Nodes/Data/sfn_depth.png.meta b/Editor/InternalResources/Interface/Nodes/Data/sfn_depth.png.meta new file mode 100644 index 00000000..a2ad233e --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/Data/sfn_depth.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 9a06ccda88cf08040b15236734546bba +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_fragmentposition.png b/Editor/InternalResources/Interface/Nodes/Data/sfn_fragmentposition.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_fragmentposition.png rename to Editor/InternalResources/Interface/Nodes/Data/sfn_fragmentposition.png diff --git a/Editor/InternalResources/Interface/Nodes/Data/sfn_fragmentposition.png.meta b/Editor/InternalResources/Interface/Nodes/Data/sfn_fragmentposition.png.meta new file mode 100644 index 00000000..d9cb1ad0 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/Data/sfn_fragmentposition.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 335d39ac920954c01ac193e693291d4a +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_fresnel.png b/Editor/InternalResources/Interface/Nodes/Data/sfn_fresnel.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_fresnel.png rename to Editor/InternalResources/Interface/Nodes/Data/sfn_fresnel.png diff --git a/Editor/InternalResources/Interface/Nodes/Data/sfn_fresnel.png.meta b/Editor/InternalResources/Interface/Nodes/Data/sfn_fresnel.png.meta new file mode 100644 index 00000000..8b745cce --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/Data/sfn_fresnel.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 5de0eafe0c281495b8272d9a1d7c3ea8 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_halfvector.png b/Editor/InternalResources/Interface/Nodes/Data/sfn_halfvector.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_halfvector.png rename to Editor/InternalResources/Interface/Nodes/Data/sfn_halfvector.png diff --git a/Editor/InternalResources/Interface/Nodes/Data/sfn_halfvector.png.meta b/Editor/InternalResources/Interface/Nodes/Data/sfn_halfvector.png.meta new file mode 100644 index 00000000..a41810c0 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/Data/sfn_halfvector.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 7c62f563fecb4463caea085e4c88d754 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_lightattenuation.png b/Editor/InternalResources/Interface/Nodes/Data/sfn_lightattenuation.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_lightattenuation.png rename to Editor/InternalResources/Interface/Nodes/Data/sfn_lightattenuation.png diff --git a/Editor/InternalResources/Interface/Nodes/Data/sfn_lightattenuation.png.meta b/Editor/InternalResources/Interface/Nodes/Data/sfn_lightattenuation.png.meta new file mode 100644 index 00000000..c327be15 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/Data/sfn_lightattenuation.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: ba371855252614506947b2f28f1d8f17 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_lightcolor.png b/Editor/InternalResources/Interface/Nodes/Data/sfn_lightcolor.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_lightcolor.png rename to Editor/InternalResources/Interface/Nodes/Data/sfn_lightcolor.png diff --git a/Editor/InternalResources/Interface/Nodes/Data/sfn_lightcolor.png.meta b/Editor/InternalResources/Interface/Nodes/Data/sfn_lightcolor.png.meta new file mode 100644 index 00000000..53f78f4d --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/Data/sfn_lightcolor.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 67173129de388421e8f4932415108e68 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_lightvector.png b/Editor/InternalResources/Interface/Nodes/Data/sfn_lightvector.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_lightvector.png rename to Editor/InternalResources/Interface/Nodes/Data/sfn_lightvector.png diff --git a/Editor/InternalResources/Interface/Nodes/Data/sfn_lightvector.png.meta b/Editor/InternalResources/Interface/Nodes/Data/sfn_lightvector.png.meta new file mode 100644 index 00000000..5533a1ec --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/Data/sfn_lightvector.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 8e12b01a3c4a545ecb549a9b3c7670cd +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_normalvector.png b/Editor/InternalResources/Interface/Nodes/Data/sfn_normalvector.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_normalvector.png rename to Editor/InternalResources/Interface/Nodes/Data/sfn_normalvector.png diff --git a/Editor/InternalResources/Interface/Nodes/Data/sfn_normalvector.png.meta b/Editor/InternalResources/Interface/Nodes/Data/sfn_normalvector.png.meta new file mode 100644 index 00000000..f6f5b534 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/Data/sfn_normalvector.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 398df227343444572afe5e225ddd06aa +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_normalvector_2.png b/Editor/InternalResources/Interface/Nodes/Data/sfn_normalvector_2.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_normalvector_2.png rename to Editor/InternalResources/Interface/Nodes/Data/sfn_normalvector_2.png diff --git a/Editor/InternalResources/Interface/Nodes/Data/sfn_normalvector_2.png.meta b/Editor/InternalResources/Interface/Nodes/Data/sfn_normalvector_2.png.meta new file mode 100644 index 00000000..6c230215 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/Data/sfn_normalvector_2.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 630f164e44edb4d848a0fc4d010cfb42 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_tangent.png b/Editor/InternalResources/Interface/Nodes/Data/sfn_tangent.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_tangent.png rename to Editor/InternalResources/Interface/Nodes/Data/sfn_tangent.png diff --git a/Editor/InternalResources/Interface/Nodes/Data/sfn_tangent.png.meta b/Editor/InternalResources/Interface/Nodes/Data/sfn_tangent.png.meta new file mode 100644 index 00000000..337fabce --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/Data/sfn_tangent.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 82f57e53a2ef4405cbf39da50cebd6e4 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_viewreflectionvector.png b/Editor/InternalResources/Interface/Nodes/Data/sfn_viewreflectionvector.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_viewreflectionvector.png rename to Editor/InternalResources/Interface/Nodes/Data/sfn_viewreflectionvector.png diff --git a/Editor/InternalResources/Interface/Nodes/Data/sfn_viewreflectionvector.png.meta b/Editor/InternalResources/Interface/Nodes/Data/sfn_viewreflectionvector.png.meta new file mode 100644 index 00000000..6472337b --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/Data/sfn_viewreflectionvector.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 877bc628b69844ba081a63095156a6f1 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_viewvector.png b/Editor/InternalResources/Interface/Nodes/Data/sfn_viewvector.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_viewvector.png rename to Editor/InternalResources/Interface/Nodes/Data/sfn_viewvector.png diff --git a/Editor/InternalResources/Interface/Nodes/Data/sfn_viewvector.png.meta b/Editor/InternalResources/Interface/Nodes/Data/sfn_viewvector.png.meta new file mode 100644 index 00000000..8885f1c0 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/Data/sfn_viewvector.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 33a9188cb13b74e7493476e4060bcb32 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_ambientlight.png b/Editor/InternalResources/Interface/Nodes/sfn_ambientlight.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_ambientlight.png rename to Editor/InternalResources/Interface/Nodes/sfn_ambientlight.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_ambientlight.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_ambientlight.png.meta new file mode 100644 index 00000000..7683e776 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_ambientlight.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 87729cd9b749b43458e1874dcc21ed05 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_bitangent.png b/Editor/InternalResources/Interface/Nodes/sfn_bitangent.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_bitangent.png rename to Editor/InternalResources/Interface/Nodes/sfn_bitangent.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_bitangent.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_bitangent.png.meta new file mode 100644 index 00000000..403e44b9 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_bitangent.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 4be47db7f177b4f479a6a181cbeb169d +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_depth.png b/Editor/InternalResources/Interface/Nodes/sfn_depth.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_depth.png rename to Editor/InternalResources/Interface/Nodes/sfn_depth.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_depth.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_depth.png.meta new file mode 100644 index 00000000..445b8f86 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_depth.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 0522d757f9985e94c97df1ae1b76568f +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_e.png b/Editor/InternalResources/Interface/Nodes/sfn_e.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_e.png rename to Editor/InternalResources/Interface/Nodes/sfn_e.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_e.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_e.png.meta new file mode 100644 index 00000000..bc68963d --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_e.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: d3516e6f742ca7b4fba3134e831ae5ba +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_facesign.png b/Editor/InternalResources/Interface/Nodes/sfn_facesign.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_facesign.png rename to Editor/InternalResources/Interface/Nodes/sfn_facesign.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_facesign.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_facesign.png.meta new file mode 100644 index 00000000..0473cc1b --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_facesign.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: e3a845ef959fb8c48af98819ec486cfc +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_facesign_2.png b/Editor/InternalResources/Interface/Nodes/sfn_facesign_2.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_facesign_2.png rename to Editor/InternalResources/Interface/Nodes/sfn_facesign_2.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_facesign_2.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_facesign_2.png.meta new file mode 100644 index 00000000..3627357c --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_facesign_2.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 717b713fc8dbc194daf895e1e7a0521f +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_final.png b/Editor/InternalResources/Interface/Nodes/sfn_final.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_final.png rename to Editor/InternalResources/Interface/Nodes/sfn_final.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_final.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_final.png.meta new file mode 100644 index 00000000..a5222e6c --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_final.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 356d9441fe4ee4b3fa2897afb2dca0f6 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 425 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 106 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 106 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 212 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 212 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 212 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 106 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 106 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 212 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 212 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 106 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 106 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 106 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 106 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 106 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_fogcolor.png b/Editor/InternalResources/Interface/Nodes/sfn_fogcolor.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_fogcolor.png rename to Editor/InternalResources/Interface/Nodes/sfn_fogcolor.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_fogcolor.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_fogcolor.png.meta new file mode 100644 index 00000000..10bca9d2 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_fogcolor.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 70a0601c59b745d4288eb39ee069ab21 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_fogcolor_2.png b/Editor/InternalResources/Interface/Nodes/sfn_fogcolor_2.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_fogcolor_2.png rename to Editor/InternalResources/Interface/Nodes/sfn_fogcolor_2.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_fogcolor_2.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_fogcolor_2.png.meta new file mode 100644 index 00000000..d3e0b290 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_fogcolor_2.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 421c05cb33c35724db61a30e3a20003b +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_fragmentposition.png b/Editor/InternalResources/Interface/Nodes/sfn_fragmentposition.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_fragmentposition.png rename to Editor/InternalResources/Interface/Nodes/sfn_fragmentposition.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_fragmentposition.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_fragmentposition.png.meta new file mode 100644 index 00000000..210d8372 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_fragmentposition.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: ae1f4f08792e1b44aaadf1288ed261a1 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_halfvector.png b/Editor/InternalResources/Interface/Nodes/sfn_halfvector.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_halfvector.png rename to Editor/InternalResources/Interface/Nodes/sfn_halfvector.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_halfvector.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_halfvector.png.meta new file mode 100644 index 00000000..73934d84 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_halfvector.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 703379c961c27714cb7175c0e86d4557 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_lightattenuation.png b/Editor/InternalResources/Interface/Nodes/sfn_lightattenuation.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_lightattenuation.png rename to Editor/InternalResources/Interface/Nodes/sfn_lightattenuation.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_lightattenuation.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_lightattenuation.png.meta new file mode 100644 index 00000000..e9d97b39 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_lightattenuation.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: e0a571b2f1a21d446a1afcab341ccf2c +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_lightcolor.png b/Editor/InternalResources/Interface/Nodes/sfn_lightcolor.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_lightcolor.png rename to Editor/InternalResources/Interface/Nodes/sfn_lightcolor.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_lightcolor.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_lightcolor.png.meta new file mode 100644 index 00000000..f999383d --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_lightcolor.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 12f315fc33aa349479e27e765a0cd7a8 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_lightposition.png b/Editor/InternalResources/Interface/Nodes/sfn_lightposition.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_lightposition.png rename to Editor/InternalResources/Interface/Nodes/sfn_lightposition.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_lightposition.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_lightposition.png.meta new file mode 100644 index 00000000..b7837b7c --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_lightposition.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 7dfbcfcc4f146004b82d3c807613c4e3 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_lightvector.png b/Editor/InternalResources/Interface/Nodes/sfn_lightvector.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_lightvector.png rename to Editor/InternalResources/Interface/Nodes/sfn_lightvector.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_lightvector.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_lightvector.png.meta new file mode 100644 index 00000000..99802ac1 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_lightvector.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 456dbe7fcd6ef43408cca1f853a61aac +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_normalvector.png b/Editor/InternalResources/Interface/Nodes/sfn_normalvector.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_normalvector.png rename to Editor/InternalResources/Interface/Nodes/sfn_normalvector.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_normalvector.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_normalvector.png.meta new file mode 100644 index 00000000..4fe5de42 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_normalvector.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 588b8166bb671b440810e2f1d15bc3db +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_normalvector_2.png b/Editor/InternalResources/Interface/Nodes/sfn_normalvector_2.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_normalvector_2.png rename to Editor/InternalResources/Interface/Nodes/sfn_normalvector_2.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_normalvector_2.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_normalvector_2.png.meta new file mode 100644 index 00000000..fb62b043 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_normalvector_2.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: eb7f231caa33910479965b1e625cc13d +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_objectposition.png b/Editor/InternalResources/Interface/Nodes/sfn_objectposition.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_objectposition.png rename to Editor/InternalResources/Interface/Nodes/sfn_objectposition.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_objectposition.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_objectposition.png.meta new file mode 100644 index 00000000..01740e8a --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_objectposition.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: fde2ac1b0d8c67241a874aadfc933e33 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_objectscale.png b/Editor/InternalResources/Interface/Nodes/sfn_objectscale.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_objectscale.png rename to Editor/InternalResources/Interface/Nodes/sfn_objectscale.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_objectscale.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_objectscale.png.meta new file mode 100644 index 00000000..5288f234 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_objectscale.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 288c45822f3d8f549b95d7be2e3676d5 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_phi.png b/Editor/InternalResources/Interface/Nodes/sfn_phi.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_phi.png rename to Editor/InternalResources/Interface/Nodes/sfn_phi.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_phi.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_phi.png.meta new file mode 100644 index 00000000..950b8fd6 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_phi.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: e15c69e8d7d60e444be990c1972eb59c +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_pi.png b/Editor/InternalResources/Interface/Nodes/sfn_pi.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_pi.png rename to Editor/InternalResources/Interface/Nodes/sfn_pi.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_pi.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_pi.png.meta new file mode 100644 index 00000000..7b374a37 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_pi.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 313b48aa0593cc741802546fa5a1919e +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_projectionparameters.png b/Editor/InternalResources/Interface/Nodes/sfn_projectionparameters.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_projectionparameters.png rename to Editor/InternalResources/Interface/Nodes/sfn_projectionparameters.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_projectionparameters.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_projectionparameters.png.meta new file mode 100644 index 00000000..affcfb76 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_projectionparameters.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: a189481e94c05ea4c982d13fe59ff9ac +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_root2.png b/Editor/InternalResources/Interface/Nodes/sfn_root2.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_root2.png rename to Editor/InternalResources/Interface/Nodes/sfn_root2.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_root2.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_root2.png.meta new file mode 100644 index 00000000..ee57ba6a --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_root2.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 5a296b6d09babdd40b2b76ca29a97179 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_screenparameters.png b/Editor/InternalResources/Interface/Nodes/sfn_screenparameters.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_screenparameters.png rename to Editor/InternalResources/Interface/Nodes/sfn_screenparameters.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_screenparameters.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_screenparameters.png.meta new file mode 100644 index 00000000..0350b272 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_screenparameters.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: a7121136193cdc44eb2411196d54d1fd +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_screenpos.png b/Editor/InternalResources/Interface/Nodes/sfn_screenpos.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_screenpos.png rename to Editor/InternalResources/Interface/Nodes/sfn_screenpos.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_screenpos.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_screenpos.png.meta new file mode 100644 index 00000000..45cebf9d --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_screenpos.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 37f2601622a180946af899626dd1df67 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_screenpos_2.png b/Editor/InternalResources/Interface/Nodes/sfn_screenpos_2.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_screenpos_2.png rename to Editor/InternalResources/Interface/Nodes/sfn_screenpos_2.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_screenpos_2.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_screenpos_2.png.meta new file mode 100644 index 00000000..bb019266 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_screenpos_2.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 8132d6b257d4a9b49b062ad21bdc3688 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_screenpos_3.png b/Editor/InternalResources/Interface/Nodes/sfn_screenpos_3.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_screenpos_3.png rename to Editor/InternalResources/Interface/Nodes/sfn_screenpos_3.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_screenpos_3.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_screenpos_3.png.meta new file mode 100644 index 00000000..b48f8927 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_screenpos_3.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: e079001c5493e4784807dda76fe30aeb +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_tangent.png b/Editor/InternalResources/Interface/Nodes/sfn_tangent.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_tangent.png rename to Editor/InternalResources/Interface/Nodes/sfn_tangent.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_tangent.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_tangent.png.meta new file mode 100644 index 00000000..4a80720b --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_tangent.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: ecc4a0e9f929f6743b4aa623ad37a014 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_tau.png b/Editor/InternalResources/Interface/Nodes/sfn_tau.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_tau.png rename to Editor/InternalResources/Interface/Nodes/sfn_tau.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_tau.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_tau.png.meta new file mode 100644 index 00000000..c2deb80f --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_tau.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: e31a63f585d176646a3a20814a548c71 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_time.png b/Editor/InternalResources/Interface/Nodes/sfn_time.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_time.png rename to Editor/InternalResources/Interface/Nodes/sfn_time.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_time.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_time.png.meta new file mode 100644 index 00000000..b3bcef9a --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_time.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 97e13bc521d7b4dada406599941bef7a +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_vertexcolor.png b/Editor/InternalResources/Interface/Nodes/sfn_vertexcolor.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_vertexcolor.png rename to Editor/InternalResources/Interface/Nodes/sfn_vertexcolor.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_vertexcolor.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_vertexcolor.png.meta new file mode 100644 index 00000000..141099dd --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_vertexcolor.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: d97533a3ae000c74e9189e8f6a4be215 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_viewposition.png b/Editor/InternalResources/Interface/Nodes/sfn_viewposition.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_viewposition.png rename to Editor/InternalResources/Interface/Nodes/sfn_viewposition.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_viewposition.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_viewposition.png.meta new file mode 100644 index 00000000..0049085e --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_viewposition.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 2dec88f8c76aae1418330680aa539cf6 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_viewreflectionvector.png b/Editor/InternalResources/Interface/Nodes/sfn_viewreflectionvector.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_viewreflectionvector.png rename to Editor/InternalResources/Interface/Nodes/sfn_viewreflectionvector.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_viewreflectionvector.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_viewreflectionvector.png.meta new file mode 100644 index 00000000..7031719e --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_viewreflectionvector.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: fbcf50a1249763e499e2c1b6ecd03e21 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_viewvector.png b/Editor/InternalResources/Interface/Nodes/sfn_viewvector.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_viewvector.png rename to Editor/InternalResources/Interface/Nodes/sfn_viewvector.png diff --git a/Editor/InternalResources/Interface/Nodes/sfn_viewvector.png.meta b/Editor/InternalResources/Interface/Nodes/sfn_viewvector.png.meta new file mode 100644 index 00000000..b5aadb17 --- /dev/null +++ b/Editor/InternalResources/Interface/Nodes/sfn_viewvector.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 9b5bb8e552f448947a012c01ec08e6ff +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 96 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 48 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 24 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/chk.png b/Editor/InternalResources/Interface/chk.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/chk.png rename to Editor/InternalResources/Interface/chk.png diff --git a/Editor/InternalResources/Interface/chk.png.meta b/Editor/InternalResources/Interface/chk.png.meta new file mode 100644 index 00000000..f020190a --- /dev/null +++ b/Editor/InternalResources/Interface/chk.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 72f052122502345f1b365b37455a8e3d +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 256 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 256 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 21 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 10 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 10 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 10 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 10 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 10 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/chk_light.png b/Editor/InternalResources/Interface/chk_light.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/chk_light.png rename to Editor/InternalResources/Interface/chk_light.png diff --git a/Editor/InternalResources/Interface/chk_light.png.meta b/Editor/InternalResources/Interface/chk_light.png.meta new file mode 100644 index 00000000..acd495bc --- /dev/null +++ b/Editor/InternalResources/Interface/chk_light.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 6f03a95036ea64277b6dc1bbc2f6eba6 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 256 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 256 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 21 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 10 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 10 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 10 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 10 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 10 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/handle_drag.tga b/Editor/InternalResources/Interface/handle_drag.tga similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/handle_drag.tga rename to Editor/InternalResources/Interface/handle_drag.tga diff --git a/Editor/InternalResources/Interface/handle_drag.tga.meta b/Editor/InternalResources/Interface/handle_drag.tga.meta new file mode 100644 index 00000000..eb5b2eda --- /dev/null +++ b/Editor/InternalResources/Interface/handle_drag.tga.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: a1247bf5b8569364aa4c9c862f598ccf +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: -100 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/icon.png b/Editor/InternalResources/Interface/icon.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/icon.png rename to Editor/InternalResources/Interface/icon.png diff --git a/Editor/InternalResources/Interface/icon.png.meta b/Editor/InternalResources/Interface/icon.png.meta new file mode 100644 index 00000000..72f21be0 --- /dev/null +++ b/Editor/InternalResources/Interface/icon.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 7aae165d391b84eddbed5fd0ec9e6460 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 17 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/icon_light.png b/Editor/InternalResources/Interface/icon_light.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/icon_light.png rename to Editor/InternalResources/Interface/icon_light.png diff --git a/Editor/InternalResources/Interface/icon_light.png.meta b/Editor/InternalResources/Interface/icon_light.png.meta new file mode 100644 index 00000000..b6700ee4 --- /dev/null +++ b/Editor/InternalResources/Interface/icon_light.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: a67aa329325af46d4a9c18d7ad10dc51 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 18 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/icon_normal.tga b/Editor/InternalResources/Interface/icon_normal.tga similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/icon_normal.tga rename to Editor/InternalResources/Interface/icon_normal.tga diff --git a/Editor/InternalResources/Interface/icon_normal.tga.meta b/Editor/InternalResources/Interface/icon_normal.tga.meta new file mode 100644 index 00000000..a5a4d098 --- /dev/null +++ b/Editor/InternalResources/Interface/icon_normal.tga.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 8689fac7742124e4ebd4c379ee337bcc +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 16 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_frag.png b/Editor/InternalResources/Interface/inst_frag.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_frag.png rename to Editor/InternalResources/Interface/inst_frag.png diff --git a/Editor/InternalResources/Interface/inst_frag.png.meta b/Editor/InternalResources/Interface/inst_frag.png.meta new file mode 100644 index 00000000..72a8e2e6 --- /dev/null +++ b/Editor/InternalResources/Interface/inst_frag.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 46671ce9b6548d6418bf2b00bd46cd33 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 18 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_frag_light.png b/Editor/InternalResources/Interface/inst_frag_light.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_frag_light.png rename to Editor/InternalResources/Interface/inst_frag_light.png diff --git a/Editor/InternalResources/Interface/inst_frag_light.png.meta b/Editor/InternalResources/Interface/inst_frag_light.png.meta new file mode 100644 index 00000000..98007821 --- /dev/null +++ b/Editor/InternalResources/Interface/inst_frag_light.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 41a2cdabd76d17d4b8b0692eca20eeda +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 18 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_frag_tex.png b/Editor/InternalResources/Interface/inst_frag_tex.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_frag_tex.png rename to Editor/InternalResources/Interface/inst_frag_tex.png diff --git a/Editor/InternalResources/Interface/inst_frag_tex.png.meta b/Editor/InternalResources/Interface/inst_frag_tex.png.meta new file mode 100644 index 00000000..69981e08 --- /dev/null +++ b/Editor/InternalResources/Interface/inst_frag_tex.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 6cffc3611ab437f488a7fa36ae9f03c0 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 23 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 11 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 11 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 11 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 11 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 11 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_frag_tex_light.png b/Editor/InternalResources/Interface/inst_frag_tex_light.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_frag_tex_light.png rename to Editor/InternalResources/Interface/inst_frag_tex_light.png diff --git a/Editor/InternalResources/Interface/inst_frag_tex_light.png.meta b/Editor/InternalResources/Interface/inst_frag_tex_light.png.meta new file mode 100644 index 00000000..d5e5a1f9 --- /dev/null +++ b/Editor/InternalResources/Interface/inst_frag_tex_light.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: f03e39f9e5523ac4a8d46e573c6b8ef8 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 23 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 11 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 11 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 11 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 11 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 11 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_vert.png b/Editor/InternalResources/Interface/inst_vert.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_vert.png rename to Editor/InternalResources/Interface/inst_vert.png diff --git a/Editor/InternalResources/Interface/inst_vert.png.meta b/Editor/InternalResources/Interface/inst_vert.png.meta new file mode 100644 index 00000000..8dffda22 --- /dev/null +++ b/Editor/InternalResources/Interface/inst_vert.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 5f0ae3fa9bd0d9b48b89c99f2e6b8c81 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 18 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_vert_light.png b/Editor/InternalResources/Interface/inst_vert_light.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_vert_light.png rename to Editor/InternalResources/Interface/inst_vert_light.png diff --git a/Editor/InternalResources/Interface/inst_vert_light.png.meta b/Editor/InternalResources/Interface/inst_vert_light.png.meta new file mode 100644 index 00000000..c19c7f37 --- /dev/null +++ b/Editor/InternalResources/Interface/inst_vert_light.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: e483f81feb62ee941933401d86b3dbb4 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 18 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 9 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_vert_tex.png b/Editor/InternalResources/Interface/inst_vert_tex.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_vert_tex.png rename to Editor/InternalResources/Interface/inst_vert_tex.png diff --git a/Editor/InternalResources/Interface/inst_vert_tex.png.meta b/Editor/InternalResources/Interface/inst_vert_tex.png.meta new file mode 100644 index 00000000..fed5225b --- /dev/null +++ b/Editor/InternalResources/Interface/inst_vert_tex.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 2dc1af4131132724ea03a4dd4e88b052 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 23 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 11 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 11 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 11 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 11 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 11 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_vert_tex_light.png b/Editor/InternalResources/Interface/inst_vert_tex_light.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_vert_tex_light.png rename to Editor/InternalResources/Interface/inst_vert_tex_light.png diff --git a/Editor/InternalResources/Interface/inst_vert_tex_light.png.meta b/Editor/InternalResources/Interface/inst_vert_tex_light.png.meta new file mode 100644 index 00000000..7012c248 --- /dev/null +++ b/Editor/InternalResources/Interface/inst_vert_tex_light.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 5bba6f880887cc14d9dffee3b43bfae7 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 0 + mipBias: -100 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 23 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 11 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 11 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 11 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 11 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 11 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/logo.png b/Editor/InternalResources/Interface/logo.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/logo.png rename to Editor/InternalResources/Interface/logo.png diff --git a/Editor/InternalResources/Interface/logo.png.meta b/Editor/InternalResources/Interface/logo.png.meta new file mode 100644 index 00000000..9d1ad6d4 --- /dev/null +++ b/Editor/InternalResources/Interface/logo.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: b116bf56b843a432b96dc6e7e0788e93 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 256 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 256 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 164 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 41 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 41 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 82 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 82 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 82 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 41 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 41 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 82 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 82 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 41 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 41 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 41 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 41 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 41 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/logo_light.png b/Editor/InternalResources/Interface/logo_light.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/logo_light.png rename to Editor/InternalResources/Interface/logo_light.png diff --git a/Editor/InternalResources/Interface/logo_light.png.meta b/Editor/InternalResources/Interface/logo_light.png.meta new file mode 100644 index 00000000..78d85520 --- /dev/null +++ b/Editor/InternalResources/Interface/logo_light.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 2146b2a6a9c514e0db29ae39a34c1e21 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 256 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 256 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 164 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 41 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 41 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 82 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 82 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 82 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 41 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 41 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 82 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 82 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 41 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 41 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 41 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 41 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 41 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_custom.png b/Editor/InternalResources/Interface/preset_custom.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_custom.png rename to Editor/InternalResources/Interface/preset_custom.png diff --git a/Editor/InternalResources/Interface/preset_custom.png.meta b/Editor/InternalResources/Interface/preset_custom.png.meta new file mode 100644 index 00000000..68eaa756 --- /dev/null +++ b/Editor/InternalResources/Interface/preset_custom.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 4f6212f398f26bb479b2cf77f48ecbd0 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_highlight.png b/Editor/InternalResources/Interface/preset_highlight.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_highlight.png rename to Editor/InternalResources/Interface/preset_highlight.png diff --git a/Editor/InternalResources/Interface/preset_highlight.png.meta b/Editor/InternalResources/Interface/preset_highlight.png.meta new file mode 100644 index 00000000..250efd22 --- /dev/null +++ b/Editor/InternalResources/Interface/preset_highlight.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: c26c8eab4a46ffc408822bd6f77b0a6e +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_litbasic.png b/Editor/InternalResources/Interface/preset_litbasic.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_litbasic.png rename to Editor/InternalResources/Interface/preset_litbasic.png diff --git a/Editor/InternalResources/Interface/preset_litbasic.png.meta b/Editor/InternalResources/Interface/preset_litbasic.png.meta new file mode 100644 index 00000000..da8d6fb9 --- /dev/null +++ b/Editor/InternalResources/Interface/preset_litbasic.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 69e1494bf9c84a24abf1253a95a6652d +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_litpbr.png b/Editor/InternalResources/Interface/preset_litpbr.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_litpbr.png rename to Editor/InternalResources/Interface/preset_litpbr.png diff --git a/Editor/InternalResources/Interface/preset_litpbr.png.meta b/Editor/InternalResources/Interface/preset_litpbr.png.meta new file mode 100644 index 00000000..10d2b60f --- /dev/null +++ b/Editor/InternalResources/Interface/preset_litpbr.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: a4259037a0bba7b41884b33f9653b20e +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particleadditive.png b/Editor/InternalResources/Interface/preset_particleadditive.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particleadditive.png rename to Editor/InternalResources/Interface/preset_particleadditive.png diff --git a/Editor/InternalResources/Interface/preset_particleadditive.png.meta b/Editor/InternalResources/Interface/preset_particleadditive.png.meta new file mode 100644 index 00000000..16a6cdf4 --- /dev/null +++ b/Editor/InternalResources/Interface/preset_particleadditive.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 6841270787423ac4c9ee0a3cf1cc768d +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particleadditive_light.png b/Editor/InternalResources/Interface/preset_particleadditive_light.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particleadditive_light.png rename to Editor/InternalResources/Interface/preset_particleadditive_light.png diff --git a/Editor/InternalResources/Interface/preset_particleadditive_light.png.meta b/Editor/InternalResources/Interface/preset_particleadditive_light.png.meta new file mode 100644 index 00000000..0fc39984 --- /dev/null +++ b/Editor/InternalResources/Interface/preset_particleadditive_light.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 8fcd9b707db9dbf40933b1b4f346a767 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particlealphablended.png b/Editor/InternalResources/Interface/preset_particlealphablended.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particlealphablended.png rename to Editor/InternalResources/Interface/preset_particlealphablended.png diff --git a/Editor/InternalResources/Interface/preset_particlealphablended.png.meta b/Editor/InternalResources/Interface/preset_particlealphablended.png.meta new file mode 100644 index 00000000..de9e3245 --- /dev/null +++ b/Editor/InternalResources/Interface/preset_particlealphablended.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: b3d536f9af52ecd4082d779248bddd6e +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particlealphablended_light.png b/Editor/InternalResources/Interface/preset_particlealphablended_light.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particlealphablended_light.png rename to Editor/InternalResources/Interface/preset_particlealphablended_light.png diff --git a/Editor/InternalResources/Interface/preset_particlealphablended_light.png.meta b/Editor/InternalResources/Interface/preset_particlealphablended_light.png.meta new file mode 100644 index 00000000..56ec24da --- /dev/null +++ b/Editor/InternalResources/Interface/preset_particlealphablended_light.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: a9f2c075e122fa345a03d5fae7aa2540 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particlemultiplicative.png b/Editor/InternalResources/Interface/preset_particlemultiplicative.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particlemultiplicative.png rename to Editor/InternalResources/Interface/preset_particlemultiplicative.png diff --git a/Editor/InternalResources/Interface/preset_particlemultiplicative.png.meta b/Editor/InternalResources/Interface/preset_particlemultiplicative.png.meta new file mode 100644 index 00000000..f794e744 --- /dev/null +++ b/Editor/InternalResources/Interface/preset_particlemultiplicative.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 5c1c304737254284f95f0dc98043b4f3 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particlemultiplicative_light.png b/Editor/InternalResources/Interface/preset_particlemultiplicative_light.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particlemultiplicative_light.png rename to Editor/InternalResources/Interface/preset_particlemultiplicative_light.png diff --git a/Editor/InternalResources/Interface/preset_particlemultiplicative_light.png.meta b/Editor/InternalResources/Interface/preset_particlemultiplicative_light.png.meta new file mode 100644 index 00000000..14876a51 --- /dev/null +++ b/Editor/InternalResources/Interface/preset_particlemultiplicative_light.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 5fbec0f866d46b24bb9dfdfe5a4c4095 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_posteffect.png b/Editor/InternalResources/Interface/preset_posteffect.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_posteffect.png rename to Editor/InternalResources/Interface/preset_posteffect.png diff --git a/Editor/InternalResources/Interface/preset_posteffect.png.meta b/Editor/InternalResources/Interface/preset_posteffect.png.meta new file mode 100644 index 00000000..fa562fab --- /dev/null +++ b/Editor/InternalResources/Interface/preset_posteffect.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: da3c81f5610b82f439e06f9fab488b50 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_sky.png b/Editor/InternalResources/Interface/preset_sky.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_sky.png rename to Editor/InternalResources/Interface/preset_sky.png diff --git a/Editor/InternalResources/Interface/preset_sky.png.meta b/Editor/InternalResources/Interface/preset_sky.png.meta new file mode 100644 index 00000000..d7f45c06 --- /dev/null +++ b/Editor/InternalResources/Interface/preset_sky.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 0339e33cb7e5c1946a81626984c81eec +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_sprite.png b/Editor/InternalResources/Interface/preset_sprite.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_sprite.png rename to Editor/InternalResources/Interface/preset_sprite.png diff --git a/Editor/InternalResources/Interface/preset_sprite.png.meta b/Editor/InternalResources/Interface/preset_sprite.png.meta new file mode 100644 index 00000000..a197fe7d --- /dev/null +++ b/Editor/InternalResources/Interface/preset_sprite.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 32c295d87941a4142a911db9e6fbd446 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_unlit.png b/Editor/InternalResources/Interface/preset_unlit.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_unlit.png rename to Editor/InternalResources/Interface/preset_unlit.png diff --git a/Editor/InternalResources/Interface/preset_unlit.png.meta b/Editor/InternalResources/Interface/preset_unlit.png.meta new file mode 100644 index 00000000..a9dcc3e1 --- /dev/null +++ b/Editor/InternalResources/Interface/preset_unlit.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: ab0dd09bfc3eff2449047b44ac02f7ec +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/screenshot_icon.png b/Editor/InternalResources/Interface/screenshot_icon.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/screenshot_icon.png rename to Editor/InternalResources/Interface/screenshot_icon.png diff --git a/Editor/InternalResources/Interface/screenshot_icon.png.meta b/Editor/InternalResources/Interface/screenshot_icon.png.meta new file mode 100644 index 00000000..80402296 --- /dev/null +++ b/Editor/InternalResources/Interface/screenshot_icon.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 881bacfcd03154f1c9bdc3c7eb0aee22 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 21 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 10 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 10 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 10 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 10 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 10 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/screenshot_icon_light.png b/Editor/InternalResources/Interface/screenshot_icon_light.png similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/screenshot_icon_light.png rename to Editor/InternalResources/Interface/screenshot_icon_light.png diff --git a/Editor/InternalResources/Interface/screenshot_icon_light.png.meta b/Editor/InternalResources/Interface/screenshot_icon_light.png.meta new file mode 100644 index 00000000..160c9760 --- /dev/null +++ b/Editor/InternalResources/Interface/screenshot_icon_light.png.meta @@ -0,0 +1,253 @@ +fileFormatVersion: 2 +guid: 50e58e15548274d45bcad6ce2348edd3 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 21 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Web + maxTextureSize: 10 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WebGL + maxTextureSize: 10 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 10 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Tizen + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PSP2 + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: PS4 + maxTextureSize: 10 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: XboxOne + maxTextureSize: 10 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Samsung TV + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo 3DS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: WiiU + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Nintendo Switch + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 8 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Meshes.meta b/Editor/InternalResources/Meshes.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Meshes.meta rename to Editor/InternalResources/Meshes.meta diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Meshes/sf_meshes.fbx b/Editor/InternalResources/Meshes/sf_meshes.fbx similarity index 100% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Meshes/sf_meshes.fbx rename to Editor/InternalResources/Meshes/sf_meshes.fbx diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Meshes/sf_meshes.fbx.meta b/Editor/InternalResources/Meshes/sf_meshes.fbx.meta similarity index 70% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Meshes/sf_meshes.fbx.meta rename to Editor/InternalResources/Meshes/sf_meshes.fbx.meta index 5f066c98..aabe5f1c 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Meshes/sf_meshes.fbx.meta +++ b/Editor/InternalResources/Meshes/sf_meshes.fbx.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: 27cd3ffabf618924f9c9eeefb09b60e0 ModelImporter: - serializedVersion: 15 + serializedVersion: 23 fileIDToRecycleName: 100000: dodecahedron_soft 100002: plant @@ -86,55 +86,89 @@ ModelImporter: 4300028: sf_sphere_lowpoly 4300030: sf_torus_knot 9500000: //RootNode + externalObjects: {} materials: importMaterials: 0 materialName: 0 materialSearch: 1 + materialLocation: 0 animations: legacyGenerateAnimations: 4 bakeSimulation: 0 + resampleCurves: 1 optimizeGameObjects: 0 - animationCompression: 1 - animationRotationError: .5 - animationPositionError: .5 - animationScaleError: .5 + motionNodeName: + rigImportErrors: + rigImportWarnings: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 3 + animationRotationError: 0.1 + animationPositionError: 0.1 + animationScaleError: 0.1 animationWrapMode: 0 extraExposedTransformPaths: [] + extraUserProperties: [] clipAnimations: [] isReadable: 1 meshes: lODScreenPercentages: [] globalScale: 1 - meshCompression: 0 + meshCompression: 2 addColliders: 0 + useSRGBMaterialColor: 1 + importVisibility: 0 importBlendShapes: 1 + importCameras: 0 + importLights: 0 swapUVChannels: 0 generateSecondaryUV: 1 useFileUnits: 1 optimizeMeshForGPU: 1 + keepQuads: 0 weldVertices: 1 + preserveHierarchy: 0 + indexFormat: 1 secondaryUVAngleDistortion: 8 secondaryUVAreaDistortion: 15.000001 secondaryUVHardAngle: 88 secondaryUVPackMargin: 4 + useFileScale: 0 + previousCalculatedGlobalScale: 1 + hasPreviousCalculatedGlobalScale: 0 tangentSpace: normalSmoothAngle: 60 - splitTangentsAcrossUV: 1 normalImportMode: 0 - tangentImportMode: 1 + tangentImportMode: 4 + normalCalculationMode: 0 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 1 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 importAnimation: 1 copyAvatar: 0 humanDescription: + serializedVersion: 2 human: [] skeleton: [] - armTwist: .5 - foreArmTwist: .5 - upperLegTwist: .5 - legTwist: .5 - armStretch: .0500000007 - legStretch: .0500000007 + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 feetSpacing: 0 rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 0 lastHumanDescriptionAvatarSource: {instanceID: 0} animationType: 0 + humanoidOversampling: 1 + additionalBone: 0 userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets.meta b/Editor/InternalResources/ShaderPresets.meta similarity index 58% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets.meta rename to Editor/InternalResources/ShaderPresets.meta index 6c92d1d1..eb91703d 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets.meta +++ b/Editor/InternalResources/ShaderPresets.meta @@ -1,9 +1,8 @@ fileFormatVersion: 2 -guid: 7be614d992704694eac8a4557e9a7c4b +guid: aa716fd7768277c41a94b029fee1d02a folderAsset: yes -timeCreated: 1433060814 -licenseType: Pro DefaultImporter: + externalObjects: {} userData: assetBundleName: assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetBasic.shader b/Editor/InternalResources/ShaderPresets/PresetBasic.shader similarity index 71% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetBasic.shader rename to Editor/InternalResources/ShaderPresets/PresetBasic.shader index 37d8eed2..746e80d0 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetBasic.shader +++ b/Editor/InternalResources/ShaderPresets/PresetBasic.shader @@ -1,7 +1,8 @@ -// Shader created with Shader Forge v1.35 +// Shader created with Shader Forge v1.42 // Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/ +// Enhanced by Antoine Guillon / Arkham Development - http://www.arkham-development.com/ // Note: Manually altering this data may prevent you from opening it in Shader Forge -/*SF_DATA;ver:1.35;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,lico:1,lgpr:1,limd:1,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False;n:type:ShaderForge.SFN_Final,id:4013,x:32719,y:32712,varname:node_4013,prsc:2|diff-1304-RGB;n:type:ShaderForge.SFN_Color,id:1304,x:32443,y:32712,ptovrint:False,ptlb:Color,ptin:_Color,varname:node_1304,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:1,c2:1,c3:1,c4:1;proporder:1304;pass:END;sub:END;*/ +/*SF_DATA;ver:1.42;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:1,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:4013,x:32719,y:32712,varname:node_4013,prsc:2|diff-1304-RGB;n:type:ShaderForge.SFN_Color,id:1304,x:32443,y:32712,ptovrint:False,ptlb:Color,ptin:_Color,varname:node_1304,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:1,c2:1,c3:1,c4:1;proporder:1304;pass:END;sub:END;*/ Shader "Hidden/Shader Forge/PresetBasic" { Properties { @@ -21,12 +22,14 @@ Shader "Hidden/Shader Forge/PresetBasic" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDBASE #define UNITY_PASS_FORWARDBASE + #endif //UNITY_PASS_FORWARDBASE #include "UnityCG.cginc" #include "AutoLight.cginc" #pragma multi_compile_fwdbase_fullshadows #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform float4 _LightColor0; uniform float4 _Color; @@ -38,7 +41,7 @@ Shader "Hidden/Shader Forge/PresetBasic" { float4 pos : SV_POSITION; float4 posWorld : TEXCOORD0; float3 normalDir : TEXCOORD1; - LIGHTING_COORDS(2,3) + UNITY_LIGHTING_COORDS(2,3) UNITY_FOG_COORDS(4) }; VertexOutput vert (VertexInput v) { @@ -46,9 +49,9 @@ Shader "Hidden/Shader Forge/PresetBasic" { o.normalDir = UnityObjectToWorldNormal(v.normal); o.posWorld = mul(unity_ObjectToWorld, v.vertex); float3 lightColor = _LightColor0.rgb; - o.pos = UnityObjectToClipPos(v.vertex ); + o.pos = UnityObjectToClipPos( v.vertex ); UNITY_TRANSFER_FOG(o,o.pos); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, float2(0,0)); return o; } float4 frag(VertexOutput i) : COLOR { @@ -57,7 +60,7 @@ Shader "Hidden/Shader Forge/PresetBasic" { float3 lightDirection = normalize(_WorldSpaceLightPos0.xyz); float3 lightColor = _LightColor0.rgb; ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float3 attenColor = attenuation * _LightColor0.xyz; /////// Diffuse: float NdotL = max(0.0,dot( normalDirection, lightDirection )); @@ -85,12 +88,14 @@ Shader "Hidden/Shader Forge/PresetBasic" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDADD #define UNITY_PASS_FORWARDADD + #endif //UNITY_PASS_FORWARDADD #include "UnityCG.cginc" #include "AutoLight.cginc" #pragma multi_compile_fwdadd_fullshadows #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform float4 _LightColor0; uniform float4 _Color; @@ -102,7 +107,7 @@ Shader "Hidden/Shader Forge/PresetBasic" { float4 pos : SV_POSITION; float4 posWorld : TEXCOORD0; float3 normalDir : TEXCOORD1; - LIGHTING_COORDS(2,3) + UNITY_LIGHTING_COORDS(2,3) UNITY_FOG_COORDS(4) }; VertexOutput vert (VertexInput v) { @@ -110,9 +115,9 @@ Shader "Hidden/Shader Forge/PresetBasic" { o.normalDir = UnityObjectToWorldNormal(v.normal); o.posWorld = mul(unity_ObjectToWorld, v.vertex); float3 lightColor = _LightColor0.rgb; - o.pos = UnityObjectToClipPos(v.vertex ); + o.pos = UnityObjectToClipPos( v.vertex ); UNITY_TRANSFER_FOG(o,o.pos); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, float2(0,0)); return o; } float4 frag(VertexOutput i) : COLOR { @@ -121,7 +126,7 @@ Shader "Hidden/Shader Forge/PresetBasic" { float3 lightDirection = normalize(lerp(_WorldSpaceLightPos0.xyz, _WorldSpaceLightPos0.xyz - i.posWorld.xyz,_WorldSpaceLightPos0.w)); float3 lightColor = _LightColor0.rgb; ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float3 attenColor = attenuation * _LightColor0.xyz; /////// Diffuse: float NdotL = max(0.0,dot( normalDirection, lightDirection )); diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetBasic.shader.meta b/Editor/InternalResources/ShaderPresets/PresetBasic.shader.meta similarity index 75% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetBasic.shader.meta rename to Editor/InternalResources/ShaderPresets/PresetBasic.shader.meta index effadd9c..688a6cef 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetBasic.shader.meta +++ b/Editor/InternalResources/ShaderPresets/PresetBasic.shader.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 guid: 5e1a556be1de7574d91d1b0c6efef8ba -timeCreated: 1489236708 -licenseType: Pro ShaderImporter: + externalObjects: {} defaultTextures: [] + nonModifiableTextures: [] userData: assetBundleName: assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetCustomLighting.shader b/Editor/InternalResources/ShaderPresets/PresetCustomLighting.shader similarity index 57% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetCustomLighting.shader rename to Editor/InternalResources/ShaderPresets/PresetCustomLighting.shader index 110a2c78..7655ce47 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetCustomLighting.shader +++ b/Editor/InternalResources/ShaderPresets/PresetCustomLighting.shader @@ -1,7 +1,8 @@ -// Shader created with Shader Forge v1.35 +// Shader created with Shader Forge v1.42 // Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/ +// Enhanced by Antoine Guillon / Arkham Development - http://www.arkham-development.com/ // Note: Manually altering this data may prevent you from opening it in Shader Forge -/*SF_DATA;ver:1.35;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,lico:1,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False;n:type:ShaderForge.SFN_Final,id:9361,x:33209,y:32712,varname:node_9361,prsc:2|emission-2460-OUT,custl-5085-OUT;n:type:ShaderForge.SFN_LightAttenuation,id:8068,x:32734,y:33086,varname:node_8068,prsc:2;n:type:ShaderForge.SFN_LightColor,id:3406,x:32734,y:32952,varname:node_3406,prsc:2;n:type:ShaderForge.SFN_LightVector,id:6869,x:31858,y:32654,varname:node_6869,prsc:2;n:type:ShaderForge.SFN_NormalVector,id:9684,x:31858,y:32782,prsc:2,pt:True;n:type:ShaderForge.SFN_HalfVector,id:9471,x:31858,y:32933,varname:node_9471,prsc:2;n:type:ShaderForge.SFN_Dot,id:7782,x:32070,y:32697,cmnt:Lambert,varname:node_7782,prsc:2,dt:1|A-6869-OUT,B-9684-OUT;n:type:ShaderForge.SFN_Dot,id:3269,x:32070,y:32871,cmnt:Blinn-Phong,varname:node_3269,prsc:2,dt:1|A-9684-OUT,B-9471-OUT;n:type:ShaderForge.SFN_Multiply,id:2746,x:32465,y:32866,cmnt:Specular Contribution,varname:node_2746,prsc:2|A-7782-OUT,B-5267-OUT,C-4865-RGB;n:type:ShaderForge.SFN_Tex2d,id:851,x:32070,y:32349,ptovrint:False,ptlb:Diffuse,ptin:_Diffuse,varname:node_851,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Multiply,id:1941,x:32465,y:32693,cmnt:Diffuse Contribution,varname:node_1941,prsc:2|A-544-OUT,B-7782-OUT;n:type:ShaderForge.SFN_Color,id:5927,x:32070,y:32534,ptovrint:False,ptlb:Color,ptin:_Color,varname:node_5927,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.5,c2:0.5,c3:0.5,c4:1;n:type:ShaderForge.SFN_Exp,id:1700,x:32070,y:33054,varname:node_1700,prsc:2,et:1|IN-9978-OUT;n:type:ShaderForge.SFN_Slider,id:5328,x:31529,y:33056,ptovrint:False,ptlb:Gloss,ptin:_Gloss,varname:node_5328,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.5,max:1;n:type:ShaderForge.SFN_Power,id:5267,x:32268,y:32940,varname:node_5267,prsc:2|VAL-3269-OUT,EXP-1700-OUT;n:type:ShaderForge.SFN_Add,id:2159,x:32734,y:32812,cmnt:Combine,varname:node_2159,prsc:2|A-1941-OUT,B-2746-OUT;n:type:ShaderForge.SFN_Multiply,id:5085,x:32979,y:32952,cmnt:Attenuate and Color,varname:node_5085,prsc:2|A-2159-OUT,B-3406-RGB,C-8068-OUT;n:type:ShaderForge.SFN_ConstantLerp,id:9978,x:31858,y:33056,varname:node_9978,prsc:2,a:1,b:11|IN-5328-OUT;n:type:ShaderForge.SFN_Color,id:4865,x:32268,y:33095,ptovrint:False,ptlb:Spec Color,ptin:_SpecColor,varname:node_4865,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:1,c2:1,c3:1,c4:1;n:type:ShaderForge.SFN_AmbientLight,id:7528,x:32734,y:32646,varname:node_7528,prsc:2;n:type:ShaderForge.SFN_Multiply,id:2460,x:32927,y:32598,cmnt:Ambient Light,varname:node_2460,prsc:2|A-544-OUT,B-7528-RGB;n:type:ShaderForge.SFN_Multiply,id:544,x:32268,y:32448,cmnt:Diffuse Color,varname:node_544,prsc:2|A-851-RGB,B-5927-RGB;proporder:851-5927-5328-4865;pass:END;sub:END;*/ +/*SF_DATA;ver:1.42;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:9361,x:33209,y:32712,varname:node_9361,prsc:2|emission-2460-OUT,custl-5085-OUT;n:type:ShaderForge.SFN_LightAttenuation,id:8068,x:32734,y:33086,varname:node_8068,prsc:2;n:type:ShaderForge.SFN_LightColor,id:3406,x:32734,y:32952,varname:node_3406,prsc:2;n:type:ShaderForge.SFN_LightVector,id:6869,x:31858,y:32654,varname:node_6869,prsc:2;n:type:ShaderForge.SFN_NormalVector,id:9684,x:31858,y:32782,prsc:2,pt:True;n:type:ShaderForge.SFN_HalfVector,id:9471,x:31858,y:32933,varname:node_9471,prsc:2;n:type:ShaderForge.SFN_Dot,id:7782,x:32070,y:32697,cmnt:Lambert,varname:node_7782,prsc:2,dt:1|A-6869-OUT,B-9684-OUT;n:type:ShaderForge.SFN_Dot,id:3269,x:32070,y:32871,cmnt:Blinn-Phong,varname:node_3269,prsc:2,dt:1|A-9684-OUT,B-9471-OUT;n:type:ShaderForge.SFN_Multiply,id:2746,x:32465,y:32866,cmnt:Specular Contribution,varname:node_2746,prsc:2|A-7782-OUT,B-5267-OUT,C-4865-RGB;n:type:ShaderForge.SFN_Tex2d,id:851,x:32070,y:32349,ptovrint:False,ptlb:Diffuse,ptin:_Diffuse,varname:node_851,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Multiply,id:1941,x:32465,y:32693,cmnt:Diffuse Contribution,varname:node_1941,prsc:2|A-544-OUT,B-7782-OUT;n:type:ShaderForge.SFN_Color,id:5927,x:32070,y:32534,ptovrint:False,ptlb:Color,ptin:_Color,varname:node_5927,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.5,c2:0.5,c3:0.5,c4:1;n:type:ShaderForge.SFN_Exp,id:1700,x:32070,y:33054,varname:node_1700,prsc:2,et:1|IN-9978-OUT;n:type:ShaderForge.SFN_Slider,id:5328,x:31529,y:33056,ptovrint:False,ptlb:Gloss,ptin:_Gloss,varname:node_5328,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.5,max:1;n:type:ShaderForge.SFN_Power,id:5267,x:32268,y:32940,varname:node_5267,prsc:2|VAL-3269-OUT,EXP-1700-OUT;n:type:ShaderForge.SFN_Add,id:2159,x:32734,y:32812,cmnt:Combine,varname:node_2159,prsc:2|A-1941-OUT,B-2746-OUT;n:type:ShaderForge.SFN_Multiply,id:5085,x:32979,y:32952,cmnt:Attenuate and Color,varname:node_5085,prsc:2|A-2159-OUT,B-3406-RGB,C-8068-OUT;n:type:ShaderForge.SFN_ConstantLerp,id:9978,x:31858,y:33056,varname:node_9978,prsc:2,a:1,b:11|IN-5328-OUT;n:type:ShaderForge.SFN_Color,id:4865,x:32268,y:33095,ptovrint:False,ptlb:Spec Color,ptin:_SpecColor,varname:node_4865,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:1,c2:1,c3:1,c4:1;n:type:ShaderForge.SFN_AmbientLight,id:7528,x:32734,y:32646,varname:node_7528,prsc:2;n:type:ShaderForge.SFN_Multiply,id:2460,x:32927,y:32598,cmnt:Ambient Light,varname:node_2460,prsc:2|A-544-OUT,B-7528-RGB;n:type:ShaderForge.SFN_Multiply,id:544,x:32268,y:32448,cmnt:Diffuse Color,varname:node_544,prsc:2|A-851-RGB,B-5927-RGB;proporder:851-5927-5328-4865;pass:END;sub:END;*/ Shader "Hidden/Shader Forge/PresetCustomLighting" { Properties { @@ -24,13 +25,15 @@ Shader "Hidden/Shader Forge/PresetCustomLighting" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDBASE #define UNITY_PASS_FORWARDBASE + #endif //UNITY_PASS_FORWARDBASE #include "UnityCG.cginc" #include "AutoLight.cginc" #include "Lighting.cginc" #pragma multi_compile_fwdbase_fullshadows #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform sampler2D _Diffuse; uniform float4 _Diffuse_ST; uniform float4 _Color; @@ -45,7 +48,7 @@ Shader "Hidden/Shader Forge/PresetCustomLighting" { float2 uv0 : TEXCOORD0; float4 posWorld : TEXCOORD1; float3 normalDir : TEXCOORD2; - LIGHTING_COORDS(3,4) + UNITY_LIGHTING_COORDS(3,4) UNITY_FOG_COORDS(5) }; VertexOutput vert (VertexInput v) { @@ -54,9 +57,9 @@ Shader "Hidden/Shader Forge/PresetCustomLighting" { o.normalDir = UnityObjectToWorldNormal(v.normal); o.posWorld = mul(unity_ObjectToWorld, v.vertex); float3 lightColor = _LightColor0.rgb; - o.pos = UnityObjectToClipPos(v.vertex ); + o.pos = UnityObjectToClipPos( v.vertex ); UNITY_TRANSFER_FOG(o,o.pos); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, float2(0,0)); return o; } float4 frag(VertexOutput i) : COLOR { @@ -67,7 +70,7 @@ Shader "Hidden/Shader Forge/PresetCustomLighting" { float3 lightColor = _LightColor0.rgb; float3 halfDirection = normalize(viewDirection+lightDirection); ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); ////// Emissive: float4 _Diffuse_var = tex2D(_Diffuse,TRANSFORM_TEX(i.uv0, _Diffuse)); float3 node_544 = (_Diffuse_var.rgb*_Color.rgb); // Diffuse Color @@ -91,13 +94,15 @@ Shader "Hidden/Shader Forge/PresetCustomLighting" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDADD #define UNITY_PASS_FORWARDADD + #endif //UNITY_PASS_FORWARDADD #include "UnityCG.cginc" #include "AutoLight.cginc" #include "Lighting.cginc" #pragma multi_compile_fwdadd_fullshadows #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform sampler2D _Diffuse; uniform float4 _Diffuse_ST; uniform float4 _Color; @@ -112,7 +117,7 @@ Shader "Hidden/Shader Forge/PresetCustomLighting" { float2 uv0 : TEXCOORD0; float4 posWorld : TEXCOORD1; float3 normalDir : TEXCOORD2; - LIGHTING_COORDS(3,4) + UNITY_LIGHTING_COORDS(3,4) UNITY_FOG_COORDS(5) }; VertexOutput vert (VertexInput v) { @@ -121,9 +126,9 @@ Shader "Hidden/Shader Forge/PresetCustomLighting" { o.normalDir = UnityObjectToWorldNormal(v.normal); o.posWorld = mul(unity_ObjectToWorld, v.vertex); float3 lightColor = _LightColor0.rgb; - o.pos = UnityObjectToClipPos(v.vertex ); + o.pos = UnityObjectToClipPos( v.vertex ); UNITY_TRANSFER_FOG(o,o.pos); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, float2(0,0)); return o; } float4 frag(VertexOutput i) : COLOR { @@ -134,7 +139,7 @@ Shader "Hidden/Shader Forge/PresetCustomLighting" { float3 lightColor = _LightColor0.rgb; float3 halfDirection = normalize(viewDirection+lightDirection); ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float4 _Diffuse_var = tex2D(_Diffuse,TRANSFORM_TEX(i.uv0, _Diffuse)); float3 node_544 = (_Diffuse_var.rgb*_Color.rgb); // Diffuse Color float node_7782 = max(0,dot(lightDirection,normalDirection)); // Lambert diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetCustomLighting.shader.meta b/Editor/InternalResources/ShaderPresets/PresetCustomLighting.shader.meta similarity index 75% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetCustomLighting.shader.meta rename to Editor/InternalResources/ShaderPresets/PresetCustomLighting.shader.meta index 3a94c801..651f5ab1 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetCustomLighting.shader.meta +++ b/Editor/InternalResources/ShaderPresets/PresetCustomLighting.shader.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 guid: 7d799ee2ddc2af945bf159324e9ebb15 -timeCreated: 1489236711 -licenseType: Pro ShaderImporter: + externalObjects: {} defaultTextures: [] + nonModifiableTextures: [] userData: assetBundleName: assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetPBR.shader b/Editor/InternalResources/ShaderPresets/PresetPBR.shader similarity index 85% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetPBR.shader rename to Editor/InternalResources/ShaderPresets/PresetPBR.shader index 8fe0fbd1..323e8d8a 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetPBR.shader +++ b/Editor/InternalResources/ShaderPresets/PresetPBR.shader @@ -1,7 +1,8 @@ -// Shader created with Shader Forge v1.35 +// Shader created with Shader Forge v1.42 // Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/ +// Enhanced by Antoine Guillon / Arkham Development - http://www.arkham-development.com/ // Note: Manually altering this data may prevent you from opening it in Shader Forge -/*SF_DATA;ver:1.35;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,lico:1,lgpr:1,limd:3,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:True,hqlp:False,rprd:True,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False;n:type:ShaderForge.SFN_Final,id:2865,x:32719,y:32712,varname:node_2865,prsc:2|diff-6343-OUT,spec-358-OUT,gloss-1813-OUT,normal-5964-RGB;n:type:ShaderForge.SFN_Multiply,id:6343,x:32114,y:32712,varname:node_6343,prsc:2|A-7736-RGB,B-6665-RGB;n:type:ShaderForge.SFN_Color,id:6665,x:31921,y:32805,ptovrint:False,ptlb:Color,ptin:_Color,varname:_Color,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.5019608,c2:0.5019608,c3:0.5019608,c4:1;n:type:ShaderForge.SFN_Tex2d,id:7736,x:31921,y:32620,ptovrint:True,ptlb:Base Color,ptin:_MainTex,varname:_MainTex,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Tex2d,id:5964,x:32407,y:32978,ptovrint:True,ptlb:Normal Map,ptin:_BumpMap,varname:_BumpMap,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:3,isnm:True;n:type:ShaderForge.SFN_Slider,id:358,x:32250,y:32780,ptovrint:False,ptlb:Metallic,ptin:_Metallic,varname:node_358,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0,max:1;n:type:ShaderForge.SFN_Slider,id:1813,x:32250,y:32882,ptovrint:False,ptlb:Gloss,ptin:_Gloss,varname:_Metallic_copy,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.8,max:1;proporder:5964-6665-7736-358-1813;pass:END;sub:END;*/ +/*SF_DATA;ver:1.42;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:3,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:True,hqlp:False,rprd:True,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:2865,x:32719,y:32712,varname:node_2865,prsc:2|diff-6343-OUT,spec-358-OUT,gloss-1813-OUT,normal-5964-RGB;n:type:ShaderForge.SFN_Multiply,id:6343,x:32114,y:32712,varname:node_6343,prsc:2|A-7736-RGB,B-6665-RGB;n:type:ShaderForge.SFN_Color,id:6665,x:31921,y:32805,ptovrint:False,ptlb:Color,ptin:_Color,varname:_Color,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.5019608,c2:0.5019608,c3:0.5019608,c4:1;n:type:ShaderForge.SFN_Tex2d,id:7736,x:31921,y:32620,ptovrint:True,ptlb:Base Color,ptin:_MainTex,varname:_MainTex,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Tex2d,id:5964,x:32407,y:32978,ptovrint:True,ptlb:Normal Map,ptin:_BumpMap,varname:_BumpMap,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:3,isnm:True;n:type:ShaderForge.SFN_Slider,id:358,x:32250,y:32780,ptovrint:False,ptlb:Metallic,ptin:_Metallic,varname:node_358,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0,max:1;n:type:ShaderForge.SFN_Slider,id:1813,x:32250,y:32882,ptovrint:False,ptlb:Gloss,ptin:_Gloss,varname:_Metallic_copy,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.8,max:1;proporder:5964-6665-7736-358-1813;pass:END;sub:END;*/ Shader "Hidden/Shader Forge/PresetPBR" { Properties { @@ -25,7 +26,9 @@ Shader "Hidden/Shader Forge/PresetPBR" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDBASE #define UNITY_PASS_FORWARDBASE + #endif //UNITY_PASS_FORWARDBASE #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #define _GLOSSYENV 1 #include "UnityCG.cginc" @@ -38,7 +41,7 @@ Shader "Hidden/Shader Forge/PresetPBR" { #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform float4 _Color; uniform sampler2D _MainTex; uniform float4 _MainTex_ST; @@ -62,7 +65,7 @@ Shader "Hidden/Shader Forge/PresetPBR" { float3 normalDir : TEXCOORD4; float3 tangentDir : TEXCOORD5; float3 bitangentDir : TEXCOORD6; - LIGHTING_COORDS(7,8) + UNITY_LIGHTING_COORDS(7,8) UNITY_FOG_COORDS(9) #if defined(LIGHTMAP_ON) || defined(UNITY_SHOULD_SAMPLE_SH) float4 ambientOrLightmapUV : TEXCOORD10; @@ -86,9 +89,9 @@ Shader "Hidden/Shader Forge/PresetPBR" { o.bitangentDir = normalize(cross(o.normalDir, o.tangentDir) * v.tangent.w); o.posWorld = mul(unity_ObjectToWorld, v.vertex); float3 lightColor = _LightColor0.rgb; - o.pos = UnityObjectToClipPos(v.vertex ); + o.pos = UnityObjectToClipPos( v.vertex ); UNITY_TRANSFER_FOG(o,o.pos); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, v.texcoord1); return o; } float4 frag(VertexOutput i) : COLOR { @@ -103,7 +106,7 @@ Shader "Hidden/Shader Forge/PresetPBR" { float3 lightColor = _LightColor0.rgb; float3 halfDirection = normalize(viewDirection+lightDirection); ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float3 attenColor = attenuation * _LightColor0.xyz; float Pi = 3.141592654; float InvPi = 0.31830988618; @@ -111,7 +114,7 @@ Shader "Hidden/Shader Forge/PresetPBR" { float gloss = _Gloss; float perceptualRoughness = 1.0 - _Gloss; float roughness = perceptualRoughness * perceptualRoughness; - float specPow = exp2( gloss * 10.0+1.0); + float specPow = exp2( gloss * 10.0 + 1.0 ); /////// GI Data: UnityLight light; #ifdef LIGHTMAP_OFF @@ -215,7 +218,9 @@ Shader "Hidden/Shader Forge/PresetPBR" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDADD #define UNITY_PASS_FORWARDADD + #endif //UNITY_PASS_FORWARDADD #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #define _GLOSSYENV 1 #include "UnityCG.cginc" @@ -228,7 +233,7 @@ Shader "Hidden/Shader Forge/PresetPBR" { #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform float4 _Color; uniform sampler2D _MainTex; uniform float4 _MainTex_ST; @@ -252,7 +257,7 @@ Shader "Hidden/Shader Forge/PresetPBR" { float3 normalDir : TEXCOORD4; float3 tangentDir : TEXCOORD5; float3 bitangentDir : TEXCOORD6; - LIGHTING_COORDS(7,8) + UNITY_LIGHTING_COORDS(7,8) UNITY_FOG_COORDS(9) }; VertexOutput vert (VertexInput v) { @@ -265,9 +270,9 @@ Shader "Hidden/Shader Forge/PresetPBR" { o.bitangentDir = normalize(cross(o.normalDir, o.tangentDir) * v.tangent.w); o.posWorld = mul(unity_ObjectToWorld, v.vertex); float3 lightColor = _LightColor0.rgb; - o.pos = UnityObjectToClipPos(v.vertex ); + o.pos = UnityObjectToClipPos( v.vertex ); UNITY_TRANSFER_FOG(o,o.pos); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, v.texcoord1); return o; } float4 frag(VertexOutput i) : COLOR { @@ -281,7 +286,7 @@ Shader "Hidden/Shader Forge/PresetPBR" { float3 lightColor = _LightColor0.rgb; float3 halfDirection = normalize(viewDirection+lightDirection); ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float3 attenColor = attenuation * _LightColor0.xyz; float Pi = 3.141592654; float InvPi = 0.31830988618; @@ -289,7 +294,7 @@ Shader "Hidden/Shader Forge/PresetPBR" { float gloss = _Gloss; float perceptualRoughness = 1.0 - _Gloss; float roughness = perceptualRoughness * perceptualRoughness; - float specPow = exp2( gloss * 10.0+1.0); + float specPow = exp2( gloss * 10.0 + 1.0 ); ////// Specular: float NdotL = saturate(dot( normalDirection, lightDirection )); float LdotH = saturate(dot(lightDirection, halfDirection)); @@ -340,7 +345,9 @@ Shader "Hidden/Shader Forge/PresetPBR" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_META #define UNITY_PASS_META 1 + #endif UNITY_PASS_META #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #define _GLOSSYENV 1 #include "UnityCG.cginc" @@ -354,7 +361,7 @@ Shader "Hidden/Shader Forge/PresetPBR" { #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform float4 _Color; uniform sampler2D _MainTex; uniform float4 _MainTex_ST; diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetPBR.shader.meta b/Editor/InternalResources/ShaderPresets/PresetPBR.shader.meta similarity index 75% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetPBR.shader.meta rename to Editor/InternalResources/ShaderPresets/PresetPBR.shader.meta index 6e8c6466..ac963dc4 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetPBR.shader.meta +++ b/Editor/InternalResources/ShaderPresets/PresetPBR.shader.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 guid: 4b6bafb86a756f54b86a5309be75165b -timeCreated: 1489236730 -licenseType: Pro ShaderImporter: + externalObjects: {} defaultTextures: [] + nonModifiableTextures: [] userData: assetBundleName: assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetParticleAdditive.shader b/Editor/InternalResources/ShaderPresets/PresetParticleAdditive.shader similarity index 54% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetParticleAdditive.shader rename to Editor/InternalResources/ShaderPresets/PresetParticleAdditive.shader index e47056fc..b402d456 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetParticleAdditive.shader +++ b/Editor/InternalResources/ShaderPresets/PresetParticleAdditive.shader @@ -1,7 +1,8 @@ -// Shader created with Shader Forge v1.35 +// Shader created with Shader Forge v1.42 // Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/ +// Enhanced by Antoine Guillon / Arkham Development - http://www.arkham-development.com/ // Note: Manually altering this data may prevent you from opening it in Shader Forge -/*SF_DATA;ver:1.35;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,lico:1,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:0,dpts:2,wrdp:False,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:True,qofs:0,qpre:3,rntp:2,fgom:False,fgoc:True,fgod:False,fgor:False,fgmd:0,fgcr:0,fgcg:0,fgcb:0,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:True,fnfb:True;n:type:ShaderForge.SFN_Final,id:4795,x:32724,y:32693,varname:node_4795,prsc:2|emission-2393-OUT;n:type:ShaderForge.SFN_Tex2d,id:6074,x:32235,y:32601,ptovrint:False,ptlb:MainTex,ptin:_MainTex,varname:_MainTex,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Multiply,id:2393,x:32495,y:32793,varname:node_2393,prsc:2|A-6074-RGB,B-2053-RGB,C-797-RGB,D-9248-OUT;n:type:ShaderForge.SFN_VertexColor,id:2053,x:32235,y:32772,varname:node_2053,prsc:2;n:type:ShaderForge.SFN_Color,id:797,x:32235,y:32930,ptovrint:True,ptlb:Color,ptin:_TintColor,varname:_TintColor,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.5,c2:0.5,c3:0.5,c4:1;n:type:ShaderForge.SFN_Vector1,id:9248,x:32235,y:33081,varname:node_9248,prsc:2,v1:2;proporder:6074-797;pass:END;sub:END;*/ +/*SF_DATA;ver:1.42;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:0,dpts:2,wrdp:False,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:True,qofs:0,qpre:3,rntp:2,fgom:False,fgoc:True,fgod:False,fgor:False,fgmd:0,fgcr:0,fgcg:0,fgcb:0,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:True,fnfb:True,fsmp:False;n:type:ShaderForge.SFN_Final,id:4795,x:32724,y:32693,varname:node_4795,prsc:2|emission-2393-OUT;n:type:ShaderForge.SFN_Tex2d,id:6074,x:32235,y:32601,ptovrint:False,ptlb:MainTex,ptin:_MainTex,varname:_MainTex,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Multiply,id:2393,x:32495,y:32793,varname:node_2393,prsc:2|A-6074-RGB,B-2053-RGB,C-797-RGB,D-9248-OUT;n:type:ShaderForge.SFN_VertexColor,id:2053,x:32235,y:32772,varname:node_2053,prsc:2;n:type:ShaderForge.SFN_Color,id:797,x:32235,y:32930,ptovrint:True,ptlb:Color,ptin:_TintColor,varname:_TintColor,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.5,c2:0.5,c3:0.5,c4:1;n:type:ShaderForge.SFN_Vector1,id:9248,x:32235,y:33081,varname:node_9248,prsc:2,v1:2;proporder:6074-797;pass:END;sub:END;*/ Shader "Hidden/Shader Forge/PresetParticleAdditive" { Properties { @@ -25,11 +26,13 @@ Shader "Hidden/Shader Forge/PresetParticleAdditive" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDBASE #define UNITY_PASS_FORWARDBASE + #endif //UNITY_PASS_FORWARDBASE #include "UnityCG.cginc" #pragma multi_compile_fwdbase #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform sampler2D _MainTex; uniform float4 _MainTex_ST; uniform float4 _TintColor; @@ -48,7 +51,7 @@ Shader "Hidden/Shader Forge/PresetParticleAdditive" { VertexOutput o = (VertexOutput)0; o.uv0 = v.texcoord0; o.vertexColor = v.vertexColor; - o.pos = UnityObjectToClipPos(v.vertex ); + o.pos = UnityObjectToClipPos( v.vertex ); UNITY_TRANSFER_FOG(o,o.pos); return o; } diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetParticleAdditive.shader.meta b/Editor/InternalResources/ShaderPresets/PresetParticleAdditive.shader.meta similarity index 75% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetParticleAdditive.shader.meta rename to Editor/InternalResources/ShaderPresets/PresetParticleAdditive.shader.meta index 92902364..7a0e27a9 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetParticleAdditive.shader.meta +++ b/Editor/InternalResources/ShaderPresets/PresetParticleAdditive.shader.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 guid: 113d8ae5cd948e947accc45db1e1b4da -timeCreated: 1489236719 -licenseType: Pro ShaderImporter: + externalObjects: {} defaultTextures: [] + nonModifiableTextures: [] userData: assetBundleName: assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetParticleAlphaBlended.shader b/Editor/InternalResources/ShaderPresets/PresetParticleAlphaBlended.shader similarity index 53% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetParticleAlphaBlended.shader rename to Editor/InternalResources/ShaderPresets/PresetParticleAlphaBlended.shader index 3c175e0d..8f349aad 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetParticleAlphaBlended.shader +++ b/Editor/InternalResources/ShaderPresets/PresetParticleAlphaBlended.shader @@ -1,7 +1,8 @@ -// Shader created with Shader Forge v1.35 +// Shader created with Shader Forge v1.42 // Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/ +// Enhanced by Antoine Guillon / Arkham Development - http://www.arkham-development.com/ // Note: Manually altering this data may prevent you from opening it in Shader Forge -/*SF_DATA;ver:1.35;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,lico:1,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:3,bdst:7,dpts:2,wrdp:False,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:True,qofs:0,qpre:3,rntp:2,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0,fgcg:0,fgcb:0,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:True,fnfb:True;n:type:ShaderForge.SFN_Final,id:4795,x:32716,y:32678,varname:node_4795,prsc:2|emission-2393-OUT,alpha-798-OUT;n:type:ShaderForge.SFN_Tex2d,id:6074,x:32235,y:32601,ptovrint:False,ptlb:MainTex,ptin:_MainTex,varname:_MainTex,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Multiply,id:2393,x:32495,y:32793,varname:node_2393,prsc:2|A-6074-RGB,B-2053-RGB,C-797-RGB,D-9248-OUT;n:type:ShaderForge.SFN_VertexColor,id:2053,x:32235,y:32772,varname:node_2053,prsc:2;n:type:ShaderForge.SFN_Color,id:797,x:32235,y:32930,ptovrint:True,ptlb:Color,ptin:_TintColor,varname:_TintColor,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.5,c2:0.5,c3:0.5,c4:1;n:type:ShaderForge.SFN_Vector1,id:9248,x:32235,y:33081,varname:node_9248,prsc:2,v1:2;n:type:ShaderForge.SFN_Multiply,id:798,x:32495,y:32923,varname:node_798,prsc:2|A-6074-A,B-2053-A,C-797-A;proporder:6074-797;pass:END;sub:END;*/ +/*SF_DATA;ver:1.42;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:3,bdst:7,dpts:2,wrdp:False,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:True,qofs:0,qpre:3,rntp:2,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0,fgcg:0,fgcb:0,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:True,fnfb:True,fsmp:False;n:type:ShaderForge.SFN_Final,id:4795,x:32716,y:32678,varname:node_4795,prsc:2|emission-2393-OUT,alpha-798-OUT;n:type:ShaderForge.SFN_Tex2d,id:6074,x:32235,y:32601,ptovrint:False,ptlb:MainTex,ptin:_MainTex,varname:_MainTex,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Multiply,id:2393,x:32495,y:32793,varname:node_2393,prsc:2|A-6074-RGB,B-2053-RGB,C-797-RGB,D-9248-OUT;n:type:ShaderForge.SFN_VertexColor,id:2053,x:32235,y:32772,varname:node_2053,prsc:2;n:type:ShaderForge.SFN_Color,id:797,x:32235,y:32930,ptovrint:True,ptlb:Color,ptin:_TintColor,varname:_TintColor,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.5,c2:0.5,c3:0.5,c4:1;n:type:ShaderForge.SFN_Vector1,id:9248,x:32235,y:33081,varname:node_9248,prsc:2,v1:2;n:type:ShaderForge.SFN_Multiply,id:798,x:32495,y:32923,varname:node_798,prsc:2|A-6074-A,B-2053-A,C-797-A;proporder:6074-797;pass:END;sub:END;*/ Shader "Hidden/Shader Forge/PresetParticleAlphaBlended" { Properties { @@ -26,11 +27,13 @@ Shader "Hidden/Shader Forge/PresetParticleAlphaBlended" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDBASE #define UNITY_PASS_FORWARDBASE + #endif //UNITY_PASS_FORWARDBASE #include "UnityCG.cginc" #pragma multi_compile_fwdbase #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform sampler2D _MainTex; uniform float4 _MainTex_ST; uniform float4 _TintColor; @@ -49,7 +52,7 @@ Shader "Hidden/Shader Forge/PresetParticleAlphaBlended" { VertexOutput o = (VertexOutput)0; o.uv0 = v.texcoord0; o.vertexColor = v.vertexColor; - o.pos = UnityObjectToClipPos(v.vertex ); + o.pos = UnityObjectToClipPos( v.vertex ); UNITY_TRANSFER_FOG(o,o.pos); return o; } diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetParticleAlphaBlended.shader.meta b/Editor/InternalResources/ShaderPresets/PresetParticleAlphaBlended.shader.meta similarity index 75% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetParticleAlphaBlended.shader.meta rename to Editor/InternalResources/ShaderPresets/PresetParticleAlphaBlended.shader.meta index 4368635c..20f19673 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetParticleAlphaBlended.shader.meta +++ b/Editor/InternalResources/ShaderPresets/PresetParticleAlphaBlended.shader.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 guid: 3c7570234f10ad142854cd6a994911bb -timeCreated: 1489236722 -licenseType: Pro ShaderImporter: + externalObjects: {} defaultTextures: [] + nonModifiableTextures: [] userData: assetBundleName: assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetParticleMultiplicative.shader b/Editor/InternalResources/ShaderPresets/PresetParticleMultiplicative.shader similarity index 54% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetParticleMultiplicative.shader rename to Editor/InternalResources/ShaderPresets/PresetParticleMultiplicative.shader index 1c50618a..3ce40dc9 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetParticleMultiplicative.shader +++ b/Editor/InternalResources/ShaderPresets/PresetParticleMultiplicative.shader @@ -1,7 +1,8 @@ -// Shader created with Shader Forge v1.35 +// Shader created with Shader Forge v1.42 // Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/ +// Enhanced by Antoine Guillon / Arkham Development - http://www.arkham-development.com/ // Note: Manually altering this data may prevent you from opening it in Shader Forge -/*SF_DATA;ver:1.35;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,lico:1,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:4,bdst:1,dpts:2,wrdp:False,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:True,qofs:0,qpre:3,rntp:2,fgom:False,fgoc:True,fgod:False,fgor:False,fgmd:0,fgcr:1,fgcg:1,fgcb:1,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:True,fnfb:True;n:type:ShaderForge.SFN_Final,id:4795,x:32953,y:32712,varname:node_4795,prsc:2|emission-6958-OUT;n:type:ShaderForge.SFN_Tex2d,id:6074,x:32251,y:32746,ptovrint:False,ptlb:MainTex,ptin:_MainTex,varname:_MainTex,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Multiply,id:2393,x:32495,y:32793,varname:node_2393,prsc:2|A-6074-RGB,B-2053-RGB;n:type:ShaderForge.SFN_VertexColor,id:2053,x:32251,y:32917,varname:node_2053,prsc:2;n:type:ShaderForge.SFN_Lerp,id:6958,x:32759,y:32813,varname:node_6958,prsc:2|A-8003-OUT,B-2393-OUT,T-2797-OUT;n:type:ShaderForge.SFN_Multiply,id:2797,x:32495,y:32917,varname:node_2797,prsc:2|A-6074-A,B-2053-A;n:type:ShaderForge.SFN_Vector1,id:8003,x:32495,y:32731,varname:node_8003,prsc:2,v1:1;proporder:6074;pass:END;sub:END;*/ +/*SF_DATA;ver:1.42;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:4,bdst:1,dpts:2,wrdp:False,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:True,qofs:0,qpre:3,rntp:2,fgom:False,fgoc:True,fgod:False,fgor:False,fgmd:0,fgcr:1,fgcg:1,fgcb:1,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:True,fnfb:True,fsmp:False;n:type:ShaderForge.SFN_Final,id:4795,x:32953,y:32712,varname:node_4795,prsc:2|emission-6958-OUT;n:type:ShaderForge.SFN_Tex2d,id:6074,x:32251,y:32746,ptovrint:False,ptlb:MainTex,ptin:_MainTex,varname:_MainTex,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Multiply,id:2393,x:32495,y:32793,varname:node_2393,prsc:2|A-6074-RGB,B-2053-RGB;n:type:ShaderForge.SFN_VertexColor,id:2053,x:32251,y:32917,varname:node_2053,prsc:2;n:type:ShaderForge.SFN_Lerp,id:6958,x:32759,y:32813,varname:node_6958,prsc:2|A-8003-OUT,B-2393-OUT,T-2797-OUT;n:type:ShaderForge.SFN_Multiply,id:2797,x:32495,y:32917,varname:node_2797,prsc:2|A-6074-A,B-2053-A;n:type:ShaderForge.SFN_Vector1,id:8003,x:32495,y:32731,varname:node_8003,prsc:2,v1:1;proporder:6074;pass:END;sub:END;*/ Shader "Hidden/Shader Forge/PresetParticleMultiplicative" { Properties { @@ -24,11 +25,13 @@ Shader "Hidden/Shader Forge/PresetParticleMultiplicative" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDBASE #define UNITY_PASS_FORWARDBASE + #endif //UNITY_PASS_FORWARDBASE #include "UnityCG.cginc" #pragma multi_compile_fwdbase #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform sampler2D _MainTex; uniform float4 _MainTex_ST; struct VertexInput { @@ -46,7 +49,7 @@ Shader "Hidden/Shader Forge/PresetParticleMultiplicative" { VertexOutput o = (VertexOutput)0; o.uv0 = v.texcoord0; o.vertexColor = v.vertexColor; - o.pos = UnityObjectToClipPos(v.vertex ); + o.pos = UnityObjectToClipPos( v.vertex ); UNITY_TRANSFER_FOG(o,o.pos); return o; } diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetParticleMultiplicative.shader.meta b/Editor/InternalResources/ShaderPresets/PresetParticleMultiplicative.shader.meta similarity index 75% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetParticleMultiplicative.shader.meta rename to Editor/InternalResources/ShaderPresets/PresetParticleMultiplicative.shader.meta index 710a5181..9f8c684f 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetParticleMultiplicative.shader.meta +++ b/Editor/InternalResources/ShaderPresets/PresetParticleMultiplicative.shader.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 guid: e39d36519c93de7468e81b53aee01101 -timeCreated: 1489236726 -licenseType: Pro ShaderImporter: + externalObjects: {} defaultTextures: [] + nonModifiableTextures: [] userData: assetBundleName: assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetPostEffect.shader b/Editor/InternalResources/ShaderPresets/PresetPostEffect.shader similarity index 56% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetPostEffect.shader rename to Editor/InternalResources/ShaderPresets/PresetPostEffect.shader index 6961da3c..4876f599 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetPostEffect.shader +++ b/Editor/InternalResources/ShaderPresets/PresetPostEffect.shader @@ -1,7 +1,8 @@ -// Shader created with Shader Forge v1.37 +// Shader created with Shader Forge v1.42 // Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/ +// Enhanced by Antoine Guillon / Arkham Development - http://www.arkham-development.com/ // Note: Manually altering this data may prevent you from opening it in Shader Forge -/*SF_DATA;ver:1.37;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:0,spmd:1,trmd:1,grmd:0,uamb:True,mssp:True,bkdf:True,hqlp:False,rprd:True,enco:False,rmgx:True,imps:False,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:1,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:6,wrdp:False,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:False,aust:False,igpj:True,qofs:1,qpre:4,rntp:5,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:True,fnfb:True,fsmp:False;n:type:ShaderForge.SFN_Final,id:2865,x:32740,y:33254,varname:node_2865,prsc:2|emission-4676-OUT;n:type:ShaderForge.SFN_TexCoord,id:4219,x:31938,y:33237,cmnt:Default coordinates,varname:node_4219,prsc:2,uv:0,uaff:False;n:type:ShaderForge.SFN_Relay,id:8397,x:32163,y:33237,cmnt:Refract here,varname:node_8397,prsc:2|IN-4219-UVOUT;n:type:ShaderForge.SFN_Relay,id:4676,x:32523,y:33354,cmnt:Modify color here,varname:node_4676,prsc:2|IN-7542-RGB;n:type:ShaderForge.SFN_Tex2dAsset,id:4430,x:31938,y:33424,ptovrint:False,ptlb:MainTex,ptin:_MainTex,cmnt:MainTex contains the color of the scene,varname:node_9933,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Tex2d,id:7542,x:32339,y:33354,varname:node_1672,prsc:2,ntxv:0,isnm:False|UVIN-8397-OUT,TEX-4430-TEX;proporder:4430;pass:END;sub:END;*/ +/*SF_DATA;ver:1.42;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:0,spmd:1,trmd:1,grmd:0,uamb:True,mssp:True,bkdf:True,hqlp:False,rprd:True,enco:False,rmgx:True,imps:False,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:1,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:6,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:False,aust:False,igpj:True,qofs:1,qpre:4,rntp:5,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:True,fnfb:True,fsmp:False;n:type:ShaderForge.SFN_Final,id:2865,x:32740,y:33254,varname:node_2865,prsc:2|emission-4676-OUT;n:type:ShaderForge.SFN_TexCoord,id:4219,x:31938,y:33237,cmnt:Default coordinates,varname:node_4219,prsc:2,uv:0,uaff:False;n:type:ShaderForge.SFN_Relay,id:8397,x:32163,y:33237,cmnt:Refract here,varname:node_8397,prsc:2|IN-4219-UVOUT;n:type:ShaderForge.SFN_Relay,id:4676,x:32523,y:33354,cmnt:Modify color here,varname:node_4676,prsc:2|IN-7542-RGB;n:type:ShaderForge.SFN_Tex2dAsset,id:4430,x:31938,y:33424,ptovrint:False,ptlb:MainTex,ptin:_MainTex,cmnt:MainTex contains the color of the scene,varname:node_9933,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Tex2d,id:7542,x:32339,y:33354,varname:node_1672,prsc:2,ntxv:0,isnm:False|UVIN-8397-OUT,TEX-4430-TEX;proporder:4430;pass:END;sub:END;*/ Shader "Hidden/Shader Forge/PresetPostEffect" { Properties { @@ -19,18 +20,20 @@ Shader "Hidden/Shader Forge/PresetPostEffect" { "LightMode"="ForwardBase" } ZTest Always - ZWrite Off + CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDBASE #define UNITY_PASS_FORWARDBASE + #endif //UNITY_PASS_FORWARDBASE #define _GLOSSYENV 1 #include "UnityCG.cginc" #include "UnityPBSLighting.cginc" #include "UnityStandardBRDF.cginc" #pragma multi_compile_fwdbase - #pragma only_renderers d3d9 d3d11 glcore gles + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform sampler2D _MainTex; uniform float4 _MainTex_ST; struct VertexInput { diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetPostEffect.shader.meta b/Editor/InternalResources/ShaderPresets/PresetPostEffect.shader.meta similarity index 75% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetPostEffect.shader.meta rename to Editor/InternalResources/ShaderPresets/PresetPostEffect.shader.meta index 4624e302..d8e3d1c8 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetPostEffect.shader.meta +++ b/Editor/InternalResources/ShaderPresets/PresetPostEffect.shader.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 guid: 280f5fc8061bbd54bb11271efda0433a -timeCreated: 1497880326 -licenseType: Pro ShaderImporter: + externalObjects: {} defaultTextures: [] + nonModifiableTextures: [] userData: assetBundleName: assetBundleVariant: diff --git a/Editor/InternalResources/ShaderPresets/PresetSky.shader b/Editor/InternalResources/ShaderPresets/PresetSky.shader new file mode 100644 index 00000000..46332dcc --- /dev/null +++ b/Editor/InternalResources/ShaderPresets/PresetSky.shader @@ -0,0 +1,77 @@ +// Shader created with Shader Forge v1.42 +// Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/ +// Enhanced by Antoine Guillon / Arkham Development - http://www.arkham-development.com/ +// Note: Manually altering this data may prevent you from opening it in Shader Forge +/*SF_DATA;ver:1.42;sub:START;pass:START;ps:flbk:,iptp:2,cusa:False,bamd:0,cgin:,lico:0,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:False,aust:False,igpj:True,qofs:0,qpre:0,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:True,fnfb:True,fsmp:False;n:type:ShaderForge.SFN_Final,id:3554,x:32480,y:32959,varname:node_3554,prsc:2|emission-7568-OUT;n:type:ShaderForge.SFN_Color,id:8306,x:31772,y:32686,ptovrint:False,ptlb:Sky Color,ptin:_SkyColor,varname:node_8306,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.02553246,c2:0.03709318,c3:0.1827586,c4:1;n:type:ShaderForge.SFN_ViewVector,id:2265,x:31161,y:32872,varname:node_2265,prsc:2;n:type:ShaderForge.SFN_Dot,id:7606,x:31418,y:32953,varname:node_7606,prsc:2,dt:1|A-2265-OUT,B-3211-OUT;n:type:ShaderForge.SFN_Vector3,id:3211,x:31161,y:32997,varname:node_3211,prsc:2,v1:0,v2:-1,v3:0;n:type:ShaderForge.SFN_Color,id:3839,x:31772,y:32848,ptovrint:False,ptlb:Horizon Color,ptin:_HorizonColor,varname:_GroundColor_copy,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.06617647,c2:0.5468207,c3:1,c4:1;n:type:ShaderForge.SFN_Power,id:4050,x:31772,y:32995,varname:node_4050,prsc:2|VAL-6125-OUT,EXP-7609-OUT;n:type:ShaderForge.SFN_Vector1,id:7609,x:31587,y:33095,varname:node_7609,prsc:2,v1:8;n:type:ShaderForge.SFN_OneMinus,id:6125,x:31587,y:32953,varname:node_6125,prsc:2|IN-7606-OUT;n:type:ShaderForge.SFN_Lerp,id:2737,x:31999,y:32869,cmnt:Sky,varname:node_2737,prsc:2|A-8306-RGB,B-3839-RGB,T-4050-OUT;n:type:ShaderForge.SFN_LightVector,id:3559,x:30723,y:33040,cmnt:Auto-adapts to your directional light,varname:node_3559,prsc:2;n:type:ShaderForge.SFN_Dot,id:1472,x:31082,y:33150,cmnt:Linear falloff to sun angle,varname:node_1472,prsc:2,dt:1|A-8269-OUT,B-8750-OUT;n:type:ShaderForge.SFN_ViewVector,id:8750,x:30895,y:33160,varname:node_8750,prsc:2;n:type:ShaderForge.SFN_Add,id:7568,x:32262,y:33059,cmnt:Sky plus Sun,varname:node_7568,prsc:2|A-2737-OUT,B-5855-OUT;n:type:ShaderForge.SFN_Negate,id:8269,x:30895,y:33040,varname:node_8269,prsc:2|IN-3559-OUT;n:type:ShaderForge.SFN_RemapRangeAdvanced,id:3001,x:31383,y:33282,cmnt:Modify radius of falloff,varname:node_3001,prsc:2|IN-1472-OUT,IMIN-1476-OUT,IMAX-1574-OUT,OMIN-9430-OUT,OMAX-6262-OUT;n:type:ShaderForge.SFN_Slider,id:2435,x:30320,y:33466,ptovrint:False,ptlb:Sun Radius B,ptin:_SunRadiusB,varname:node_2435,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.1,max:0.1;n:type:ShaderForge.SFN_Slider,id:3144,x:30320,y:33360,ptovrint:False,ptlb:Sun Radius A,ptin:_SunRadiusA,varname:_SunOuterRadius_copy,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0,max:0.1;n:type:ShaderForge.SFN_Vector1,id:9430,x:31082,y:33610,varname:node_9430,prsc:2,v1:1;n:type:ShaderForge.SFN_Vector1,id:6262,x:31082,y:33668,varname:node_6262,prsc:2,v1:0;n:type:ShaderForge.SFN_Clamp01,id:7022,x:31556,y:33282,varname:node_7022,prsc:2|IN-3001-OUT;n:type:ShaderForge.SFN_OneMinus,id:1574,x:31082,y:33464,varname:node_1574,prsc:2|IN-8889-OUT;n:type:ShaderForge.SFN_OneMinus,id:1476,x:31082,y:33315,varname:node_1476,prsc:2|IN-3432-OUT;n:type:ShaderForge.SFN_Multiply,id:8889,x:30893,y:33464,varname:node_8889,prsc:2|A-9367-OUT,B-9367-OUT;n:type:ShaderForge.SFN_Multiply,id:3432,x:30893,y:33315,varname:node_3432,prsc:2|A-7933-OUT,B-7933-OUT;n:type:ShaderForge.SFN_Max,id:9367,x:30681,y:33464,varname:node_9367,prsc:2|A-3144-OUT,B-2435-OUT;n:type:ShaderForge.SFN_Min,id:7933,x:30681,y:33315,varname:node_7933,prsc:2|A-3144-OUT,B-2435-OUT;n:type:ShaderForge.SFN_Power,id:754,x:31772,y:33336,varname:node_754,prsc:2|VAL-7022-OUT,EXP-5929-OUT;n:type:ShaderForge.SFN_Vector1,id:5929,x:31556,y:33412,varname:node_5929,prsc:2,v1:5;n:type:ShaderForge.SFN_Multiply,id:5855,x:31957,y:33257,cmnt:Sun,varname:node_5855,prsc:2|A-2359-RGB,B-754-OUT,C-7055-OUT;n:type:ShaderForge.SFN_ValueProperty,id:7055,x:31772,y:33484,ptovrint:False,ptlb:Sun Intensity,ptin:_SunIntensity,varname:node_7055,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:2;n:type:ShaderForge.SFN_LightColor,id:2359,x:31772,y:33210,cmnt:Get color from directional light,varname:node_2359,prsc:2;proporder:8306-3839-2435-3144-7055;pass:END;sub:END;*/ + +Shader "Hidden/Shader Forge/PresetSky" { + Properties { + _SkyColor ("Sky Color", Color) = (0.02553246,0.03709318,0.1827586,1) + _HorizonColor ("Horizon Color", Color) = (0.06617647,0.5468207,1,1) + _SunRadiusB ("Sun Radius B", Range(0, 0.1)) = 0.1 + _SunRadiusA ("Sun Radius A", Range(0, 0.1)) = 0 + _SunIntensity ("Sun Intensity", Float ) = 2 + } + SubShader { + Tags { + "IgnoreProjector"="True" + "Queue"="Background" + "RenderType"="Opaque" + "PreviewType"="Skybox" + } + Pass { + Name "FORWARD" + Tags { + "LightMode"="ForwardBase" + } + + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #ifndef UNITY_PASS_FORWARDBASE + #define UNITY_PASS_FORWARDBASE + #endif //UNITY_PASS_FORWARDBASE + #include "UnityCG.cginc" + #pragma multi_compile_fwdbase + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan + #pragma target 3.0 + uniform float4 _LightColor0; + uniform float4 _SkyColor; + uniform float4 _HorizonColor; + uniform float _SunRadiusB; + uniform float _SunRadiusA; + uniform float _SunIntensity; + struct VertexInput { + float4 vertex : POSITION; + }; + struct VertexOutput { + float4 pos : SV_POSITION; + float4 posWorld : TEXCOORD0; + }; + VertexOutput vert (VertexInput v) { + VertexOutput o = (VertexOutput)0; + o.posWorld = mul(unity_ObjectToWorld, v.vertex); + float3 lightColor = _LightColor0.rgb; + o.pos = UnityObjectToClipPos( v.vertex ); + return o; + } + float4 frag(VertexOutput i) : COLOR { + float3 viewDirection = normalize(_WorldSpaceCameraPos.xyz - i.posWorld.xyz); + float3 lightDirection = normalize(_WorldSpaceLightPos0.xyz); + float3 lightColor = _LightColor0.rgb; +////// Lighting: +////// Emissive: + float node_7933 = min(_SunRadiusA,_SunRadiusB); + float node_1476 = (1.0 - (node_7933*node_7933)); + float node_9367 = max(_SunRadiusA,_SunRadiusB); + float node_9430 = 1.0; + float3 emissive = (lerp(_SkyColor.rgb,_HorizonColor.rgb,pow((1.0 - max(0,dot(viewDirection,float3(0,-1,0)))),8.0))+(_LightColor0.rgb*pow(saturate((node_9430 + ( (max(0,dot((-1*lightDirection),viewDirection)) - node_1476) * (0.0 - node_9430) ) / ((1.0 - (node_9367*node_9367)) - node_1476))),5.0)*_SunIntensity)); + float3 finalColor = emissive; + return fixed4(finalColor,1); + } + ENDCG + } + } + CustomEditor "ShaderForgeMaterialInspector" +} diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetSky.shader.meta b/Editor/InternalResources/ShaderPresets/PresetSky.shader.meta similarity index 75% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetSky.shader.meta rename to Editor/InternalResources/ShaderPresets/PresetSky.shader.meta index c8ac6a90..eb2591cd 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetSky.shader.meta +++ b/Editor/InternalResources/ShaderPresets/PresetSky.shader.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 guid: c5cb8effe2b770847ae224c5ad33c6f8 -timeCreated: 1489236736 -licenseType: Pro ShaderImporter: + externalObjects: {} defaultTextures: [] + nonModifiableTextures: [] userData: assetBundleName: assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetSprite.shader b/Editor/InternalResources/ShaderPresets/PresetSprite.shader similarity index 91% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetSprite.shader rename to Editor/InternalResources/ShaderPresets/PresetSprite.shader index 6766bd2c..762f129b 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetSprite.shader +++ b/Editor/InternalResources/ShaderPresets/PresetSprite.shader @@ -1,7 +1,8 @@ -// Shader created with Shader Forge v1.38 +// Shader created with Shader Forge v1.42 // Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/ +// Enhanced by Antoine Guillon / Arkham Development - http://www.arkham-development.com/ // Note: Manually altering this data may prevent you from opening it in Shader Forge -/*SF_DATA;ver:1.38;sub:START;pass:START;ps:flbk:,iptp:1,cusa:True,bamd:0,cgin:,lico:1,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:True,tesm:0,olmd:1,culm:2,bsrc:0,bdst:7,dpts:2,wrdp:False,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:False,aust:True,igpj:True,qofs:0,qpre:3,rntp:2,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:True,atwp:True,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:1873,x:33229,y:32719,varname:node_1873,prsc:2|emission-1749-OUT,alpha-603-OUT;n:type:ShaderForge.SFN_Tex2d,id:4805,x:32551,y:32729,ptovrint:False,ptlb:MainTex,ptin:_MainTex,varname:_MainTex_copy,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:True,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Multiply,id:1086,x:32812,y:32818,cmnt:RGB,varname:node_1086,prsc:2|A-4805-RGB,B-5983-RGB,C-5376-RGB;n:type:ShaderForge.SFN_Color,id:5983,x:32551,y:32915,ptovrint:False,ptlb:Color,ptin:_Color,varname:_Color_copy,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:1,c2:1,c3:1,c4:1;n:type:ShaderForge.SFN_VertexColor,id:5376,x:32551,y:33079,varname:node_5376,prsc:2;n:type:ShaderForge.SFN_Multiply,id:1749,x:33025,y:32818,cmnt:Premultiply Alpha,varname:node_1749,prsc:2|A-1086-OUT,B-603-OUT;n:type:ShaderForge.SFN_Multiply,id:603,x:32812,y:32992,cmnt:A,varname:node_603,prsc:2|A-4805-A,B-5983-A,C-5376-A;proporder:4805-5983;pass:END;sub:END;*/ +/*SF_DATA;ver:1.42;sub:START;pass:START;ps:flbk:,iptp:1,cusa:True,bamd:0,cgin:,lico:1,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:True,tesm:0,olmd:1,culm:2,bsrc:0,bdst:7,dpts:2,wrdp:False,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:False,aust:True,igpj:True,qofs:0,qpre:3,rntp:2,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:True,atwp:True,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:1873,x:33229,y:32719,varname:node_1873,prsc:2|emission-1749-OUT,alpha-603-OUT;n:type:ShaderForge.SFN_Tex2d,id:4805,x:32551,y:32729,ptovrint:False,ptlb:MainTex,ptin:_MainTex,varname:_MainTex_copy,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:True,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Multiply,id:1086,x:32812,y:32818,cmnt:RGB,varname:node_1086,prsc:2|A-4805-RGB,B-5983-RGB,C-5376-RGB;n:type:ShaderForge.SFN_Color,id:5983,x:32551,y:32915,ptovrint:False,ptlb:Color,ptin:_Color,varname:_Color_copy,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:1,c2:1,c3:1,c4:1;n:type:ShaderForge.SFN_VertexColor,id:5376,x:32551,y:33079,varname:node_5376,prsc:2;n:type:ShaderForge.SFN_Multiply,id:1749,x:33025,y:32818,cmnt:Premultiply Alpha,varname:node_1749,prsc:2|A-1086-OUT,B-603-OUT;n:type:ShaderForge.SFN_Multiply,id:603,x:32812,y:32992,cmnt:A,varname:node_603,prsc:2|A-4805-A,B-5983-A,C-5376-A;proporder:4805-5983;pass:END;sub:END;*/ Shader "Hidden/Shader Forge/PresetSprite" { Properties { @@ -46,11 +47,13 @@ Shader "Hidden/Shader Forge/PresetSprite" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDBASE #define UNITY_PASS_FORWARDBASE + #endif //UNITY_PASS_FORWARDBASE #pragma multi_compile _ PIXELSNAP_ON #include "UnityCG.cginc" #pragma multi_compile_fwdbase - #pragma only_renderers d3d9 d3d11 glcore gles + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform sampler2D _MainTex; uniform float4 _MainTex_ST; uniform float4 _Color; @@ -98,13 +101,15 @@ Shader "Hidden/Shader Forge/PresetSprite" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_SHADOWCASTER #define UNITY_PASS_SHADOWCASTER + #endif //UNITY_PASS_SHADOWCASTER #pragma multi_compile _ PIXELSNAP_ON #include "UnityCG.cginc" #include "Lighting.cginc" #pragma fragmentoption ARB_precision_hint_fastest #pragma multi_compile_shadowcaster - #pragma only_renderers d3d9 d3d11 glcore gles + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 struct VertexInput { float4 vertex : POSITION; diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetSprite.shader.meta b/Editor/InternalResources/ShaderPresets/PresetSprite.shader.meta similarity index 75% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetSprite.shader.meta rename to Editor/InternalResources/ShaderPresets/PresetSprite.shader.meta index 4fdfb551..c40e7074 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetSprite.shader.meta +++ b/Editor/InternalResources/ShaderPresets/PresetSprite.shader.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 guid: 3304156422545ea43a0f5c0968b97a63 -timeCreated: 1502811818 -licenseType: Pro ShaderImporter: + externalObjects: {} defaultTextures: [] + nonModifiableTextures: [] userData: assetBundleName: assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetUnlit.shader b/Editor/InternalResources/ShaderPresets/PresetUnlit.shader similarity index 50% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetUnlit.shader rename to Editor/InternalResources/ShaderPresets/PresetUnlit.shader index 949e4b3b..be0f3d59 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetUnlit.shader +++ b/Editor/InternalResources/ShaderPresets/PresetUnlit.shader @@ -1,7 +1,8 @@ -// Shader created with Shader Forge v1.35 +// Shader created with Shader Forge v1.42 // Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/ +// Enhanced by Antoine Guillon / Arkham Development - http://www.arkham-development.com/ // Note: Manually altering this data may prevent you from opening it in Shader Forge -/*SF_DATA;ver:1.35;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,lico:1,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:False,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False;n:type:ShaderForge.SFN_Final,id:3138,x:32719,y:32712,varname:node_3138,prsc:2|emission-7241-RGB;n:type:ShaderForge.SFN_Color,id:7241,x:32471,y:32812,ptovrint:False,ptlb:Color,ptin:_Color,varname:node_7241,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.07843138,c2:0.3921569,c3:0.7843137,c4:1;proporder:7241;pass:END;sub:END;*/ +/*SF_DATA;ver:1.42;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:False,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:3138,x:32719,y:32712,varname:node_3138,prsc:2|emission-7241-RGB;n:type:ShaderForge.SFN_Color,id:7241,x:32471,y:32812,ptovrint:False,ptlb:Color,ptin:_Color,varname:node_7241,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.07843138,c2:0.3921569,c3:0.7843137,c4:1;proporder:7241;pass:END;sub:END;*/ Shader "Hidden/Shader Forge/PresetUnlit" { Properties { @@ -21,10 +22,12 @@ Shader "Hidden/Shader Forge/PresetUnlit" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDBASE #define UNITY_PASS_FORWARDBASE + #endif //UNITY_PASS_FORWARDBASE #include "UnityCG.cginc" #pragma multi_compile_fwdbase_fullshadows - #pragma only_renderers d3d9 d3d11 glcore gles + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform float4 _Color; struct VertexInput { @@ -35,7 +38,7 @@ Shader "Hidden/Shader Forge/PresetUnlit" { }; VertexOutput vert (VertexInput v) { VertexOutput o = (VertexOutput)0; - o.pos = UnityObjectToClipPos(v.vertex ); + o.pos = UnityObjectToClipPos( v.vertex ); return o; } float4 frag(VertexOutput i) : COLOR { diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetUnlit.shader.meta b/Editor/InternalResources/ShaderPresets/PresetUnlit.shader.meta similarity index 75% rename from Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetUnlit.shader.meta rename to Editor/InternalResources/ShaderPresets/PresetUnlit.shader.meta index 704113d8..21d542ce 100644 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetUnlit.shader.meta +++ b/Editor/InternalResources/ShaderPresets/PresetUnlit.shader.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 guid: bb7f32a658dae4b4e855fa11222f1628 -timeCreated: 1489236743 -licenseType: Pro ShaderImporter: + externalObjects: {} defaultTextures: [] + nonModifiableTextures: [] userData: assetBundleName: assetBundleVariant: diff --git a/Examples.meta b/Examples.meta new file mode 100644 index 00000000..df8e1135 --- /dev/null +++ b/Examples.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a0d21d1c83e7c5f44b284ed192ca2f98 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/CustomLighting.mat b/Examples/CustomLighting.mat similarity index 96% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/CustomLighting.mat rename to Examples/CustomLighting.mat index 328e51b3..02da3ff5 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/CustomLighting.mat +++ b/Examples/CustomLighting.mat @@ -1,43 +1,43 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: CustomLighting - m_Shader: {fileID: 4800000, guid: e570c2adf90d6a24b8634788025bb2bb, type: 3} - m_ShaderKeywords: [] - m_CustomRenderQueue: -1 - m_SavedProperties: - serializedVersion: 2 - m_TexEnvs: - data: - first: - name: _Normals - second: - m_Texture: {fileID: 2800000, guid: c6dfb00dbee6bc044a8a3bb22e56e064, type: 3} - m_Scale: {x: 32, y: 32} - m_Offset: {x: 0, y: 0} - data: - first: - name: _Diffuse - second: - m_Texture: {fileID: 2800000, guid: 8993b617f08498f43adcbd90697f1c5d, type: 3} - m_Scale: {x: 16, y: 16} - m_Offset: {x: 0, y: 0} - m_Floats: - data: - first: - name: _Gloss - second: .410714298 - data: - first: - name: _Bands - second: 5 - m_Colors: - data: - first: - name: _Color - second: {r: .551470578, g: .981440127, b: 1, a: 1} +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: CustomLighting + m_Shader: {fileID: 4800000, guid: e570c2adf90d6a24b8634788025bb2bb, type: 3} + m_ShaderKeywords: [] + m_CustomRenderQueue: -1 + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _Normals + second: + m_Texture: {fileID: 2800000, guid: c6dfb00dbee6bc044a8a3bb22e56e064, type: 3} + m_Scale: {x: 32, y: 32} + m_Offset: {x: 0, y: 0} + data: + first: + name: _Diffuse + second: + m_Texture: {fileID: 2800000, guid: 8993b617f08498f43adcbd90697f1c5d, type: 3} + m_Scale: {x: 16, y: 16} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _Gloss + second: .410714298 + data: + first: + name: _Bands + second: 5 + m_Colors: + data: + first: + name: _Color + second: {r: .551470578, g: .981440127, b: 1, a: 1} diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/CustomLighting.mat.meta b/Examples/CustomLighting.mat.meta similarity index 95% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/CustomLighting.mat.meta rename to Examples/CustomLighting.mat.meta index 15f40b7e..0fe464ec 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/CustomLighting.mat.meta +++ b/Examples/CustomLighting.mat.meta @@ -1,4 +1,4 @@ -fileFormatVersion: 2 -guid: cadfde2f3ef294043affa7194ae69b94 -NativeFormatImporter: - userData: +fileFormatVersion: 2 +guid: cadfde2f3ef294043affa7194ae69b94 +NativeFormatImporter: + userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/CustomLighting.shader b/Examples/CustomLighting.shader similarity index 56% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/CustomLighting.shader rename to Examples/CustomLighting.shader index 5d79f548..0270888a 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/CustomLighting.shader +++ b/Examples/CustomLighting.shader @@ -1,51 +1,21 @@ -// Shader created with Shader Forge v1.38 +// Shader created with Shader Forge v1.42 // Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/ +// Enhanced by Antoine Guillon / Arkham Development - http://www.arkham-development.com/ // Note: Manually altering this data may prevent you from opening it in Shader Forge -/*SF_DATA;ver:1.38;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:True,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:False,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:0,x:34330,y:31982,varname:node_0,prsc:2|normal-83-RGB,custl-64-OUT,olwid-255-OUT;n:type:ShaderForge.SFN_LightAttenuation,id:37,x:33872,y:32026,varname:node_37,prsc:2;n:type:ShaderForge.SFN_Dot,id:40,x:32931,y:32250,varname:node_40,prsc:2,dt:1|A-42-OUT,B-41-OUT;n:type:ShaderForge.SFN_NormalVector,id:41,x:32722,y:32344,prsc:2,pt:True;n:type:ShaderForge.SFN_LightVector,id:42,x:32722,y:32223,varname:node_42,prsc:2;n:type:ShaderForge.SFN_Dot,id:52,x:32931,y:32423,varname:node_52,prsc:2,dt:1|A-41-OUT,B-62-OUT;n:type:ShaderForge.SFN_Add,id:55,x:33872,y:32288,varname:node_55,prsc:2|A-84-OUT,B-187-RGB,C-265-OUT;n:type:ShaderForge.SFN_Power,id:58,x:33133,y:32523,cmnt:Specular Light,varname:node_58,prsc:2|VAL-52-OUT,EXP-244-OUT;n:type:ShaderForge.SFN_HalfVector,id:62,x:32722,y:32483,varname:node_62,prsc:2;n:type:ShaderForge.SFN_LightColor,id:63,x:33872,y:32155,varname:node_63,prsc:2;n:type:ShaderForge.SFN_Multiply,id:64,x:34056,y:32155,varname:node_64,prsc:2|A-37-OUT,B-63-RGB,C-55-OUT;n:type:ShaderForge.SFN_Color,id:80,x:33368,y:32178,ptovrint:False,ptlb:Color,ptin:_Color,varname:_Color,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.6544118,c2:0.8426978,c3:1,c4:1;n:type:ShaderForge.SFN_Tex2d,id:82,x:33368,y:32002,ptovrint:False,ptlb:Diffuse,ptin:_Diffuse,varname:_Diffuse,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:8993b617f08498f43adcbd90697f1c5d,ntxv:0,isnm:False|UVIN-272-UVOUT;n:type:ShaderForge.SFN_Tex2d,id:83,x:34056,y:31966,ptovrint:False,ptlb:Normals,ptin:_Normals,varname:_Normals,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:c6dfb00dbee6bc044a8a3bb22e56e064,ntxv:3,isnm:True|UVIN-272-UVOUT;n:type:ShaderForge.SFN_Multiply,id:84,x:33573,y:32160,cmnt:Diffuse Light,varname:node_84,prsc:2|A-82-RGB,B-80-RGB,C-264-OUT;n:type:ShaderForge.SFN_AmbientLight,id:187,x:33573,y:32280,varname:node_187,prsc:2;n:type:ShaderForge.SFN_ValueProperty,id:216,x:33133,y:32423,ptovrint:False,ptlb:Bands,ptin:_Bands,varname:_Bands,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:8;n:type:ShaderForge.SFN_Slider,id:239,x:31984,y:32591,ptovrint:False,ptlb:Gloss,ptin:_Gloss,varname:_Gloss,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.4511278,max:1;n:type:ShaderForge.SFN_Add,id:240,x:32722,y:32640,varname:node_240,prsc:2|A-242-OUT,B-241-OUT;n:type:ShaderForge.SFN_Vector1,id:241,x:32554,y:32728,varname:node_241,prsc:2,v1:1;n:type:ShaderForge.SFN_Multiply,id:242,x:32554,y:32578,varname:node_242,prsc:2|A-239-OUT,B-243-OUT;n:type:ShaderForge.SFN_Vector1,id:243,x:32141,y:32661,varname:node_243,prsc:2,v1:10;n:type:ShaderForge.SFN_Exp,id:244,x:32893,y:32640,varname:node_244,prsc:2,et:1|IN-240-OUT;n:type:ShaderForge.SFN_Vector1,id:255,x:34056,y:32288,varname:node_255,prsc:2,v1:0.05;n:type:ShaderForge.SFN_Posterize,id:264,x:33368,y:32344,varname:node_264,prsc:2|IN-40-OUT,STPS-216-OUT;n:type:ShaderForge.SFN_Posterize,id:265,x:33368,y:32475,varname:node_265,prsc:2|IN-58-OUT,STPS-216-OUT;n:type:ShaderForge.SFN_TexCoord,id:272,x:33121,y:32051,varname:node_272,prsc:2,uv:0,uaff:False;proporder:80-82-83-216-239;pass:END;sub:END;*/ +/*SF_DATA;ver:1.42;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:True,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:False,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:0,x:34330,y:31982,varname:node_0,prsc:2|normal-83-RGB,custl-64-OUT;n:type:ShaderForge.SFN_LightAttenuation,id:37,x:33872,y:32026,varname:node_37,prsc:2;n:type:ShaderForge.SFN_Dot,id:40,x:32931,y:32250,varname:node_40,prsc:2,dt:1|A-42-OUT,B-41-OUT;n:type:ShaderForge.SFN_NormalVector,id:41,x:32722,y:32344,prsc:2,pt:True;n:type:ShaderForge.SFN_LightVector,id:42,x:32722,y:32223,varname:node_42,prsc:2;n:type:ShaderForge.SFN_Dot,id:52,x:32931,y:32423,varname:node_52,prsc:2,dt:1|A-41-OUT,B-62-OUT;n:type:ShaderForge.SFN_Add,id:55,x:33872,y:32295,varname:node_55,prsc:2|A-84-OUT,B-187-RGB;n:type:ShaderForge.SFN_Power,id:58,x:33229,y:32558,cmnt:Specular Light,varname:node_58,prsc:2|VAL-52-OUT,EXP-244-OUT;n:type:ShaderForge.SFN_HalfVector,id:62,x:32722,y:32483,varname:node_62,prsc:2;n:type:ShaderForge.SFN_LightColor,id:63,x:33872,y:32155,varname:node_63,prsc:2;n:type:ShaderForge.SFN_Multiply,id:64,x:34106,y:32166,varname:node_64,prsc:2|A-37-OUT,B-63-RGB,C-8121-OUT;n:type:ShaderForge.SFN_Color,id:80,x:33368,y:32192,ptovrint:False,ptlb:Color,ptin:_Color,varname:_Color,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.6544118,c2:0.8426978,c3:1,c4:1;n:type:ShaderForge.SFN_Tex2d,id:82,x:33368,y:32002,ptovrint:False,ptlb:Diffuse,ptin:_Diffuse,varname:_Diffuse,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:e77c8304f206a7043b58e3aa1ee2b730,ntxv:2,isnm:False|UVIN-272-UVOUT;n:type:ShaderForge.SFN_Tex2d,id:83,x:33368,y:31817,ptovrint:False,ptlb:Normals,ptin:_Normals,varname:_Normals,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:dff878613857997448b879796c93d426,ntxv:3,isnm:True|UVIN-272-UVOUT;n:type:ShaderForge.SFN_Multiply,id:84,x:33573,y:32160,cmnt:Diffuse Light,varname:node_84,prsc:2|A-82-RGB,B-80-RGB,C-40-OUT;n:type:ShaderForge.SFN_AmbientLight,id:187,x:33573,y:32280,varname:node_187,prsc:2;n:type:ShaderForge.SFN_Slider,id:239,x:32141,y:32578,ptovrint:False,ptlb:Gloss,ptin:_Gloss,varname:_Gloss,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.3742047,max:1;n:type:ShaderForge.SFN_Add,id:240,x:32722,y:32640,varname:node_240,prsc:2|A-242-OUT,B-241-OUT;n:type:ShaderForge.SFN_Vector1,id:241,x:32554,y:32728,varname:node_241,prsc:2,v1:1;n:type:ShaderForge.SFN_Multiply,id:242,x:32554,y:32578,varname:node_242,prsc:2|A-239-OUT,B-243-OUT;n:type:ShaderForge.SFN_Vector1,id:243,x:32298,y:32660,varname:node_243,prsc:2,v1:10;n:type:ShaderForge.SFN_Exp,id:244,x:32893,y:32640,varname:node_244,prsc:2,et:1|IN-240-OUT;n:type:ShaderForge.SFN_TexCoord,id:272,x:33125,y:31930,varname:node_272,prsc:2,uv:0,uaff:False;n:type:ShaderForge.SFN_Tex2d,id:3968,x:33368,y:32367,ptovrint:False,ptlb:Specular,ptin:_Specular,varname:node_3968,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:754067f16ed6147498c4f9a2722bb147,ntxv:0,isnm:False|UVIN-272-UVOUT;n:type:ShaderForge.SFN_Multiply,id:4226,x:33573,y:32490,varname:node_4226,prsc:2|A-3968-R,B-58-OUT;n:type:ShaderForge.SFN_Add,id:8121,x:33837,y:32474,varname:node_8121,prsc:2|A-55-OUT,B-4226-OUT;proporder:80-82-83-239-3968;pass:END;sub:END;*/ Shader "Shader Forge/Examples/Custom Lighting" { Properties { _Color ("Color", Color) = (0.6544118,0.8426978,1,1) - _Diffuse ("Diffuse", 2D) = "white" {} + _Diffuse ("Diffuse", 2D) = "black" {} _Normals ("Normals", 2D) = "bump" {} - _Bands ("Bands", Float ) = 8 - _Gloss ("Gloss", Range(0, 1)) = 0.4511278 + _Gloss ("Gloss", Range(0, 1)) = 0.3742047 + _Specular ("Specular", 2D) = "white" {} } SubShader { Tags { "RenderType"="Opaque" } - Pass { - Name "Outline" - Tags { - } - Cull Front - - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - #include "UnityCG.cginc" - #pragma fragmentoption ARB_precision_hint_fastest - #pragma multi_compile_shadowcaster - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu - #pragma target 3.0 - struct VertexInput { - float4 vertex : POSITION; - float3 normal : NORMAL; - }; - struct VertexOutput { - float4 pos : SV_POSITION; - }; - VertexOutput vert (VertexInput v) { - VertexOutput o = (VertexOutput)0; - o.pos = UnityObjectToClipPos( float4(v.vertex.xyz + v.normal*0.05,1) ); - return o; - } - float4 frag(VertexOutput i) : COLOR { - return fixed4(float3(0,0,0),0); - } - ENDCG - } Pass { Name "FORWARD" Tags { @@ -56,18 +26,20 @@ Shader "Shader Forge/Examples/Custom Lighting" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDBASE #define UNITY_PASS_FORWARDBASE + #endif //UNITY_PASS_FORWARDBASE #include "UnityCG.cginc" #include "AutoLight.cginc" #include "Lighting.cginc" #pragma multi_compile_fwdbase_fullshadows - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform float4 _Color; uniform sampler2D _Diffuse; uniform float4 _Diffuse_ST; uniform sampler2D _Normals; uniform float4 _Normals_ST; - uniform float _Bands; uniform float _Gloss; + uniform sampler2D _Specular; uniform float4 _Specular_ST; struct VertexInput { float4 vertex : POSITION; float3 normal : NORMAL; @@ -81,7 +53,7 @@ Shader "Shader Forge/Examples/Custom Lighting" { float3 normalDir : TEXCOORD2; float3 tangentDir : TEXCOORD3; float3 bitangentDir : TEXCOORD4; - LIGHTING_COORDS(5,6) + UNITY_LIGHTING_COORDS(5,6) }; VertexOutput vert (VertexInput v) { VertexOutput o = (VertexOutput)0; @@ -92,7 +64,7 @@ Shader "Shader Forge/Examples/Custom Lighting" { o.posWorld = mul(unity_ObjectToWorld, v.vertex); float3 lightColor = _LightColor0.rgb; o.pos = UnityObjectToClipPos( v.vertex ); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, float2(0,0)); return o; } float4 frag(VertexOutput i) : COLOR { @@ -106,9 +78,10 @@ Shader "Shader Forge/Examples/Custom Lighting" { float3 lightColor = _LightColor0.rgb; float3 halfDirection = normalize(viewDirection+lightDirection); ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float4 _Diffuse_var = tex2D(_Diffuse,TRANSFORM_TEX(i.uv0, _Diffuse)); - float3 finalColor = (attenuation*_LightColor0.rgb*((_Diffuse_var.rgb*_Color.rgb*floor(max(0,dot(lightDirection,normalDirection)) * _Bands) / (_Bands - 1))+UNITY_LIGHTMODEL_AMBIENT.rgb+floor(pow(max(0,dot(normalDirection,halfDirection)),exp2(((_Gloss*10.0)+1.0))) * _Bands) / (_Bands - 1))); + float4 _Specular_var = tex2D(_Specular,TRANSFORM_TEX(i.uv0, _Specular)); + float3 finalColor = (attenuation*_LightColor0.rgb*(((_Diffuse_var.rgb*_Color.rgb*max(0,dot(lightDirection,normalDirection)))+UNITY_LIGHTMODEL_AMBIENT.rgb)+(_Specular_var.r*pow(max(0,dot(normalDirection,halfDirection)),exp2(((_Gloss*10.0)+1.0)))))); return fixed4(finalColor,1); } ENDCG @@ -124,18 +97,20 @@ Shader "Shader Forge/Examples/Custom Lighting" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDADD #define UNITY_PASS_FORWARDADD + #endif //UNITY_PASS_FORWARDADD #include "UnityCG.cginc" #include "AutoLight.cginc" #include "Lighting.cginc" #pragma multi_compile_fwdadd_fullshadows - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform float4 _Color; uniform sampler2D _Diffuse; uniform float4 _Diffuse_ST; uniform sampler2D _Normals; uniform float4 _Normals_ST; - uniform float _Bands; uniform float _Gloss; + uniform sampler2D _Specular; uniform float4 _Specular_ST; struct VertexInput { float4 vertex : POSITION; float3 normal : NORMAL; @@ -149,7 +124,7 @@ Shader "Shader Forge/Examples/Custom Lighting" { float3 normalDir : TEXCOORD2; float3 tangentDir : TEXCOORD3; float3 bitangentDir : TEXCOORD4; - LIGHTING_COORDS(5,6) + UNITY_LIGHTING_COORDS(5,6) }; VertexOutput vert (VertexInput v) { VertexOutput o = (VertexOutput)0; @@ -160,7 +135,7 @@ Shader "Shader Forge/Examples/Custom Lighting" { o.posWorld = mul(unity_ObjectToWorld, v.vertex); float3 lightColor = _LightColor0.rgb; o.pos = UnityObjectToClipPos( v.vertex ); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, float2(0,0)); return o; } float4 frag(VertexOutput i) : COLOR { @@ -174,9 +149,10 @@ Shader "Shader Forge/Examples/Custom Lighting" { float3 lightColor = _LightColor0.rgb; float3 halfDirection = normalize(viewDirection+lightDirection); ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float4 _Diffuse_var = tex2D(_Diffuse,TRANSFORM_TEX(i.uv0, _Diffuse)); - float3 finalColor = (attenuation*_LightColor0.rgb*((_Diffuse_var.rgb*_Color.rgb*floor(max(0,dot(lightDirection,normalDirection)) * _Bands) / (_Bands - 1))+UNITY_LIGHTMODEL_AMBIENT.rgb+floor(pow(max(0,dot(normalDirection,halfDirection)),exp2(((_Gloss*10.0)+1.0))) * _Bands) / (_Bands - 1))); + float4 _Specular_var = tex2D(_Specular,TRANSFORM_TEX(i.uv0, _Specular)); + float3 finalColor = (attenuation*_LightColor0.rgb*(((_Diffuse_var.rgb*_Color.rgb*max(0,dot(lightDirection,normalDirection)))+UNITY_LIGHTMODEL_AMBIENT.rgb)+(_Specular_var.r*pow(max(0,dot(normalDirection,halfDirection)),exp2(((_Gloss*10.0)+1.0)))))); return fixed4(finalColor * 1,0); } ENDCG diff --git a/Examples/CustomLighting.shader.meta b/Examples/CustomLighting.shader.meta new file mode 100644 index 00000000..1f6becf7 --- /dev/null +++ b/Examples/CustomLighting.shader.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e570c2adf90d6a24b8634788025bb2bb +ShaderImporter: + externalObjects: {} + defaultTextures: + - _Diffuse: {fileID: 2800000, guid: e77c8304f206a7043b58e3aa1ee2b730, type: 3} + - _Normals: {fileID: 2800000, guid: dff878613857997448b879796c93d426, type: 3} + - _Specular: {fileID: 2800000, guid: 754067f16ed6147498c4f9a2722bb147, type: 3} + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/LightWrapping.mat b/Examples/LightWrapping.mat similarity index 100% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/LightWrapping.mat rename to Examples/LightWrapping.mat diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/LightWrapping.mat.meta b/Examples/LightWrapping.mat.meta similarity index 95% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/LightWrapping.mat.meta rename to Examples/LightWrapping.mat.meta index 9775d63b..6f8e1e6d 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/LightWrapping.mat.meta +++ b/Examples/LightWrapping.mat.meta @@ -1,4 +1,4 @@ -fileFormatVersion: 2 -guid: 0baa0be77ffe0ec4bbba3c06cb8f887b -NativeFormatImporter: - userData: +fileFormatVersion: 2 +guid: 0baa0be77ffe0ec4bbba3c06cb8f887b +NativeFormatImporter: + userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/LightWrapping.shader b/Examples/LightWrapping.shader similarity index 95% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/LightWrapping.shader rename to Examples/LightWrapping.shader index 2aa87c34..1d12e832 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/LightWrapping.shader +++ b/Examples/LightWrapping.shader @@ -1,7 +1,8 @@ -// Shader created with Shader Forge v1.38 +// Shader created with Shader Forge v1.42 // Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/ +// Enhanced by Antoine Guillon / Arkham Development - http://www.arkham-development.com/ // Note: Manually altering this data may prevent you from opening it in Shader Forge -/*SF_DATA;ver:1.38;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:3,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:True,hqlp:False,rprd:True,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:False,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:0,x:33560,y:32563,varname:node_0,prsc:2|diff-270-RGB,spec-1906-OUT,gloss-8495-OUT,lwrap-272-RGB;n:type:ShaderForge.SFN_Color,id:270,x:33250,y:32393,ptovrint:False,ptlb:Diffuse,ptin:_Diffuse,varname:_Diffuse,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.9117647,c2:0.8760425,c3:0.8179066,c4:1;n:type:ShaderForge.SFN_Color,id:272,x:33250,y:32735,ptovrint:False,ptlb:Light Wrapping,ptin:_LightWrapping,varname:_LightWrapping,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.9058824,c2:0.4941176,c3:0.4901961,c4:1;n:type:ShaderForge.SFN_Vector1,id:1906,x:33250,y:32541,varname:node_1906,prsc:2,v1:0;n:type:ShaderForge.SFN_Slider,id:8495,x:33093,y:32628,ptovrint:False,ptlb:Gloss,ptin:_Gloss,varname:node_8495,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0,max:1;proporder:272-270-8495;pass:END;sub:END;*/ +/*SF_DATA;ver:1.42;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:3,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:True,hqlp:False,rprd:True,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:False,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:0,x:33560,y:32563,varname:node_0,prsc:2|diff-270-RGB,spec-1906-OUT,gloss-8495-OUT,lwrap-272-RGB;n:type:ShaderForge.SFN_Color,id:270,x:33250,y:32393,ptovrint:False,ptlb:Diffuse,ptin:_Diffuse,varname:_Diffuse,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.9117647,c2:0.8760425,c3:0.8179066,c4:1;n:type:ShaderForge.SFN_Color,id:272,x:33250,y:32735,ptovrint:False,ptlb:Light Wrapping,ptin:_LightWrapping,varname:_LightWrapping,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.9058824,c2:0.4941176,c3:0.4901961,c4:1;n:type:ShaderForge.SFN_Vector1,id:1906,x:33250,y:32541,varname:node_1906,prsc:2,v1:0;n:type:ShaderForge.SFN_Slider,id:8495,x:33093,y:32628,ptovrint:False,ptlb:Gloss,ptin:_Gloss,varname:node_8495,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0,max:1;proporder:272-270-8495;pass:END;sub:END;*/ Shader "Shader Forge/Examples/LightWrapping" { Properties { @@ -23,7 +24,9 @@ Shader "Shader Forge/Examples/LightWrapping" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDBASE #define UNITY_PASS_FORWARDBASE + #endif //UNITY_PASS_FORWARDBASE #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #define _GLOSSYENV 1 #include "UnityCG.cginc" @@ -35,7 +38,7 @@ Shader "Shader Forge/Examples/LightWrapping" { #pragma multi_compile LIGHTMAP_OFF LIGHTMAP_ON #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform float4 _Diffuse; uniform float4 _LightWrapping; @@ -55,7 +58,7 @@ Shader "Shader Forge/Examples/LightWrapping" { float3 normalDir : TEXCOORD3; float3 tangentDir : TEXCOORD4; float3 bitangentDir : TEXCOORD5; - LIGHTING_COORDS(6,7) + UNITY_LIGHTING_COORDS(6,7) #if defined(LIGHTMAP_ON) || defined(UNITY_SHOULD_SAMPLE_SH) float4 ambientOrLightmapUV : TEXCOORD8; #endif @@ -78,7 +81,7 @@ Shader "Shader Forge/Examples/LightWrapping" { o.posWorld = mul(unity_ObjectToWorld, v.vertex); float3 lightColor = _LightColor0.rgb; o.pos = UnityObjectToClipPos( v.vertex ); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, v.texcoord1); return o; } float4 frag(VertexOutput i) : COLOR { @@ -91,7 +94,7 @@ Shader "Shader Forge/Examples/LightWrapping" { float3 lightColor = _LightColor0.rgb; float3 halfDirection = normalize(viewDirection+lightDirection); ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float3 attenColor = attenuation * _LightColor0.xyz; float Pi = 3.141592654; float InvPi = 0.31830988618; @@ -204,7 +207,9 @@ Shader "Shader Forge/Examples/LightWrapping" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDADD #define UNITY_PASS_FORWARDADD + #endif //UNITY_PASS_FORWARDADD #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #define _GLOSSYENV 1 #include "UnityCG.cginc" @@ -216,7 +221,7 @@ Shader "Shader Forge/Examples/LightWrapping" { #pragma multi_compile LIGHTMAP_OFF LIGHTMAP_ON #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform float4 _Diffuse; uniform float4 _LightWrapping; @@ -236,7 +241,7 @@ Shader "Shader Forge/Examples/LightWrapping" { float3 normalDir : TEXCOORD3; float3 tangentDir : TEXCOORD4; float3 bitangentDir : TEXCOORD5; - LIGHTING_COORDS(6,7) + UNITY_LIGHTING_COORDS(6,7) }; VertexOutput vert (VertexInput v) { VertexOutput o = (VertexOutput)0; @@ -248,7 +253,7 @@ Shader "Shader Forge/Examples/LightWrapping" { o.posWorld = mul(unity_ObjectToWorld, v.vertex); float3 lightColor = _LightColor0.rgb; o.pos = UnityObjectToClipPos( v.vertex ); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, v.texcoord1); return o; } float4 frag(VertexOutput i) : COLOR { @@ -260,7 +265,7 @@ Shader "Shader Forge/Examples/LightWrapping" { float3 lightColor = _LightColor0.rgb; float3 halfDirection = normalize(viewDirection+lightDirection); ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float3 attenColor = attenuation * _LightColor0.xyz; float Pi = 3.141592654; float InvPi = 0.31830988618; @@ -320,7 +325,9 @@ Shader "Shader Forge/Examples/LightWrapping" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_META #define UNITY_PASS_META 1 + #endif UNITY_PASS_META #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #define _GLOSSYENV 1 #include "UnityCG.cginc" @@ -333,7 +340,7 @@ Shader "Shader Forge/Examples/LightWrapping" { #pragma multi_compile LIGHTMAP_OFF LIGHTMAP_ON #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform float4 _Diffuse; uniform float _Gloss; diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/LightWrapping.shader.meta b/Examples/LightWrapping.shader.meta similarity index 75% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/LightWrapping.shader.meta rename to Examples/LightWrapping.shader.meta index 3b2e7edf..7f704f51 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/LightWrapping.shader.meta +++ b/Examples/LightWrapping.shader.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 guid: 12dc48c8a56df784b93db42c5d582f3e -timeCreated: 1503327504 -licenseType: Pro ShaderImporter: + externalObjects: {} defaultTextures: [] + nonModifiableTextures: [] userData: assetBundleName: assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Parallax.mat b/Examples/Parallax.mat similarity index 96% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Parallax.mat rename to Examples/Parallax.mat index a629dc5d..fb7380aa 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Parallax.mat +++ b/Examples/Parallax.mat @@ -1,66 +1,66 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: Parallax - m_Shader: {fileID: 4800000, guid: 848a7fd7a01ca494bbaad23b3f926b42, type: 3} - m_ShaderKeywords: [] - m_CustomRenderQueue: -1 - m_SavedProperties: - serializedVersion: 2 - m_TexEnvs: - data: - first: - name: _Normal - second: - m_Texture: {fileID: 2800000, guid: cf20bfced7e912046a9ce991a4d775ec, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _DiffuseRGB - second: - m_Texture: {fileID: 2800000, guid: 5fb7986dd6d0a8e4093ba82369dd6a4d, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _HeightA - second: - m_Texture: {fileID: 2800000, guid: 5fb7986dd6d0a8e4093ba82369dd6a4d, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _node49 - second: - m_Texture: {fileID: 8900000, guid: f466cf7415226e046b096197eb7341aa, type: 2} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _node113 - second: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _AORGBHeightA - second: - m_Texture: {fileID: 2800000, guid: 5fb7986dd6d0a8e4093ba82369dd6a4d, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _node114 - second: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: {} - m_Colors: {} +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Parallax + m_Shader: {fileID: 4800000, guid: 848a7fd7a01ca494bbaad23b3f926b42, type: 3} + m_ShaderKeywords: [] + m_CustomRenderQueue: -1 + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _Normal + second: + m_Texture: {fileID: 2800000, guid: cf20bfced7e912046a9ce991a4d775ec, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DiffuseRGB + second: + m_Texture: {fileID: 2800000, guid: 5fb7986dd6d0a8e4093ba82369dd6a4d, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _HeightA + second: + m_Texture: {fileID: 2800000, guid: 5fb7986dd6d0a8e4093ba82369dd6a4d, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _node49 + second: + m_Texture: {fileID: 8900000, guid: f466cf7415226e046b096197eb7341aa, type: 2} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _node113 + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _AORGBHeightA + second: + m_Texture: {fileID: 2800000, guid: 5fb7986dd6d0a8e4093ba82369dd6a4d, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _node114 + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: {} + m_Colors: {} diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Parallax.mat.meta b/Examples/Parallax.mat.meta similarity index 95% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Parallax.mat.meta rename to Examples/Parallax.mat.meta index 1da45a2a..893c6152 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Parallax.mat.meta +++ b/Examples/Parallax.mat.meta @@ -1,4 +1,4 @@ -fileFormatVersion: 2 -guid: 3ee7d13d3dbe94b459c2935d8b993866 -NativeFormatImporter: - userData: +fileFormatVersion: 2 +guid: 3ee7d13d3dbe94b459c2935d8b993866 +NativeFormatImporter: + userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Parallax.shader b/Examples/Parallax.shader similarity index 92% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Parallax.shader rename to Examples/Parallax.shader index 10de31ab..2b47df79 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Parallax.shader +++ b/Examples/Parallax.shader @@ -1,7 +1,8 @@ -// Shader created with Shader Forge v1.38 +// Shader created with Shader Forge v1.42 // Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/ +// Enhanced by Antoine Guillon / Arkham Development - http://www.arkham-development.com/ // Note: Manually altering this data may prevent you from opening it in Shader Forge -/*SF_DATA;ver:1.38;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:3,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:True,hqlp:True,rprd:True,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:0,x:33740,y:32624,varname:node_0,prsc:2|diff-123-RGB,spec-46-OUT,gloss-42-OUT,normal-47-RGB;n:type:ShaderForge.SFN_Multiply,id:35,x:32898,y:32736,varname:node_35,prsc:2|A-37-UVOUT,B-36-OUT;n:type:ShaderForge.SFN_Vector1,id:36,x:32701,y:32828,varname:node_36,prsc:2,v1:8;n:type:ShaderForge.SFN_TexCoord,id:37,x:32701,y:32682,varname:node_37,prsc:2,uv:0,uaff:False;n:type:ShaderForge.SFN_Vector1,id:42,x:33559,y:32729,varname:node_42,prsc:2,v1:0.7;n:type:ShaderForge.SFN_Vector1,id:46,x:33559,y:32673,varname:node_46,prsc:2,v1:0;n:type:ShaderForge.SFN_Tex2d,id:47,x:33559,y:32821,ptovrint:False,ptlb:Normal,ptin:_Normal,varname:_Normal,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:cf20bfced7e912046a9ce991a4d775ec,ntxv:3,isnm:True|UVIN-110-UVOUT;n:type:ShaderForge.SFN_Parallax,id:110,x:33299,y:32714,varname:node_110,prsc:2|UVIN-35-OUT,HEI-111-A,DEP-112-OUT;n:type:ShaderForge.SFN_Tex2d,id:111,x:33095,y:32608,varname:node_574,prsc:2,tex:5fb7986dd6d0a8e4093ba82369dd6a4d,ntxv:0,isnm:False|UVIN-35-OUT,TEX-113-TEX;n:type:ShaderForge.SFN_Vector1,id:112,x:33095,y:32793,varname:node_112,prsc:2,v1:0.15;n:type:ShaderForge.SFN_Tex2dAsset,id:113,x:32898,y:32571,ptovrint:False,ptlb:AO (RGB) Height (A),ptin:_AORGBHeightA,varname:_AORGBHeightA,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:5fb7986dd6d0a8e4093ba82369dd6a4d,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Tex2d,id:123,x:33559,y:32544,varname:node_577,prsc:2,tex:5fb7986dd6d0a8e4093ba82369dd6a4d,ntxv:0,isnm:False|UVIN-110-UVOUT,TEX-113-TEX;proporder:113-47;pass:END;sub:END;*/ +/*SF_DATA;ver:1.42;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:3,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:True,hqlp:True,rprd:True,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:0,x:33740,y:32624,varname:node_0,prsc:2|diff-123-RGB,spec-46-OUT,gloss-42-OUT,normal-47-RGB;n:type:ShaderForge.SFN_Multiply,id:35,x:32898,y:32736,varname:node_35,prsc:2|A-37-UVOUT,B-36-OUT;n:type:ShaderForge.SFN_Vector1,id:36,x:32701,y:32828,varname:node_36,prsc:2,v1:8;n:type:ShaderForge.SFN_TexCoord,id:37,x:32701,y:32682,varname:node_37,prsc:2,uv:0,uaff:False;n:type:ShaderForge.SFN_Vector1,id:42,x:33559,y:32729,varname:node_42,prsc:2,v1:0.7;n:type:ShaderForge.SFN_Vector1,id:46,x:33559,y:32673,varname:node_46,prsc:2,v1:0;n:type:ShaderForge.SFN_Tex2d,id:47,x:33559,y:32821,ptovrint:False,ptlb:Normal,ptin:_Normal,varname:_Normal,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:3,isnm:True|UVIN-110-UVOUT;n:type:ShaderForge.SFN_Parallax,id:110,x:33299,y:32714,varname:node_110,prsc:2|UVIN-35-OUT,HEI-111-A,DEP-112-OUT;n:type:ShaderForge.SFN_Tex2d,id:111,x:33095,y:32608,varname:node_574,prsc:2,ntxv:0,isnm:False|UVIN-35-OUT,TEX-113-TEX;n:type:ShaderForge.SFN_Vector1,id:112,x:33095,y:32793,varname:node_112,prsc:2,v1:0.15;n:type:ShaderForge.SFN_Tex2dAsset,id:113,x:32898,y:32571,ptovrint:False,ptlb:AO (RGB) Height (A),ptin:_AORGBHeightA,varname:_AORGBHeightA,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Tex2d,id:123,x:33559,y:32544,varname:node_577,prsc:2,ntxv:0,isnm:False|UVIN-110-UVOUT,TEX-113-TEX;proporder:113-47;pass:END;sub:END;*/ Shader "Shader Forge/Examples/Parallax" { Properties { @@ -23,7 +24,9 @@ Shader "Shader Forge/Examples/Parallax" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDBASE #define UNITY_PASS_FORWARDBASE + #endif //UNITY_PASS_FORWARDBASE #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #define _GLOSSYENV 1 #include "UnityCG.cginc" @@ -36,7 +39,7 @@ Shader "Shader Forge/Examples/Parallax" { #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform sampler2D _Normal; uniform float4 _Normal_ST; uniform sampler2D _AORGBHeightA; uniform float4 _AORGBHeightA_ST; @@ -57,7 +60,7 @@ Shader "Shader Forge/Examples/Parallax" { float3 normalDir : TEXCOORD4; float3 tangentDir : TEXCOORD5; float3 bitangentDir : TEXCOORD6; - LIGHTING_COORDS(7,8) + UNITY_LIGHTING_COORDS(7,8) UNITY_FOG_COORDS(9) #if defined(LIGHTMAP_ON) || defined(UNITY_SHOULD_SAMPLE_SH) float4 ambientOrLightmapUV : TEXCOORD10; @@ -82,7 +85,7 @@ Shader "Shader Forge/Examples/Parallax" { float3 lightColor = _LightColor0.rgb; o.pos = UnityObjectToClipPos( v.vertex ); UNITY_TRANSFER_FOG(o,o.pos); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, v.texcoord1); return o; } float4 frag(VertexOutput i) : COLOR { @@ -100,7 +103,7 @@ Shader "Shader Forge/Examples/Parallax" { float3 lightColor = _LightColor0.rgb; float3 halfDirection = normalize(viewDirection+lightDirection); ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float3 attenColor = attenuation * _LightColor0.xyz; float Pi = 3.141592654; float InvPi = 0.31830988618; @@ -212,7 +215,9 @@ Shader "Shader Forge/Examples/Parallax" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDADD #define UNITY_PASS_FORWARDADD + #endif //UNITY_PASS_FORWARDADD #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #define _GLOSSYENV 1 #include "UnityCG.cginc" @@ -225,7 +230,7 @@ Shader "Shader Forge/Examples/Parallax" { #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform sampler2D _Normal; uniform float4 _Normal_ST; uniform sampler2D _AORGBHeightA; uniform float4 _AORGBHeightA_ST; @@ -246,7 +251,7 @@ Shader "Shader Forge/Examples/Parallax" { float3 normalDir : TEXCOORD4; float3 tangentDir : TEXCOORD5; float3 bitangentDir : TEXCOORD6; - LIGHTING_COORDS(7,8) + UNITY_LIGHTING_COORDS(7,8) UNITY_FOG_COORDS(9) }; VertexOutput vert (VertexInput v) { @@ -261,7 +266,7 @@ Shader "Shader Forge/Examples/Parallax" { float3 lightColor = _LightColor0.rgb; o.pos = UnityObjectToClipPos( v.vertex ); UNITY_TRANSFER_FOG(o,o.pos); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, v.texcoord1); return o; } float4 frag(VertexOutput i) : COLOR { @@ -278,7 +283,7 @@ Shader "Shader Forge/Examples/Parallax" { float3 lightColor = _LightColor0.rgb; float3 halfDirection = normalize(viewDirection+lightDirection); ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float3 attenColor = attenuation * _LightColor0.xyz; float Pi = 3.141592654; float InvPi = 0.31830988618; @@ -337,7 +342,9 @@ Shader "Shader Forge/Examples/Parallax" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_META #define UNITY_PASS_META 1 + #endif UNITY_PASS_META #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #define _GLOSSYENV 1 #include "UnityCG.cginc" @@ -351,7 +358,7 @@ Shader "Shader Forge/Examples/Parallax" { #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform sampler2D _AORGBHeightA; uniform float4 _AORGBHeightA_ST; struct VertexInput { diff --git a/Examples/Parallax.shader.meta b/Examples/Parallax.shader.meta new file mode 100644 index 00000000..91aa4ab8 --- /dev/null +++ b/Examples/Parallax.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 848a7fd7a01ca494bbaad23b3f926b42 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/PixelRotator.mat b/Examples/PixelRotator.mat similarity index 96% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/PixelRotator.mat rename to Examples/PixelRotator.mat index f203826d..10bab614 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/PixelRotator.mat +++ b/Examples/PixelRotator.mat @@ -1,80 +1,80 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: PixelRotator - m_Shader: {fileID: 4800000, guid: 3c2ff98dd53924d0b85358d999cf6890, type: 3} - m_ShaderKeywords: [] - m_CustomRenderQueue: -1 - m_SavedProperties: - serializedVersion: 2 - m_TexEnvs: - data: - first: - name: _Normal - second: - m_Texture: {fileID: 2800000, guid: bbab0a6f7bae9cf42bf057d8ee2755f6, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _Diffuse - second: - m_Texture: {fileID: 2800000, guid: 6a985dfcd1d3ca94e9753748ed65c697, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _node32 - second: - m_Texture: {fileID: 2800000, guid: eb6f3d7f90ac0d14186a8ea5a44e1b3e, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _node10 - second: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _SpecMaskR - second: - m_Texture: {fileID: 2800000, guid: b66bceaf0cc0ace4e9bdc92f14bba709, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - data: - first: - name: _Gloss - second: .0983606577 - data: - first: - name: _NormalIntensity - second: .258196741 - data: - first: - name: _node9 - second: 1 - data: - first: - name: _MIP - second: 2.85714269 - data: - first: - name: _node67 - second: .625 - m_Colors: - data: - first: - name: _Specular - second: {r: .99999994, g: .425458819, b: .156017184, a: 1} - data: - first: - name: _Diffuse - second: {r: .415291131, g: 0, b: 0, a: 1} +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: PixelRotator + m_Shader: {fileID: 4800000, guid: 3c2ff98dd53924d0b85358d999cf6890, type: 3} + m_ShaderKeywords: [] + m_CustomRenderQueue: -1 + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _Normal + second: + m_Texture: {fileID: 2800000, guid: bbab0a6f7bae9cf42bf057d8ee2755f6, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _Diffuse + second: + m_Texture: {fileID: 2800000, guid: 6a985dfcd1d3ca94e9753748ed65c697, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _node32 + second: + m_Texture: {fileID: 2800000, guid: eb6f3d7f90ac0d14186a8ea5a44e1b3e, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _node10 + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _SpecMaskR + second: + m_Texture: {fileID: 2800000, guid: b66bceaf0cc0ace4e9bdc92f14bba709, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _Gloss + second: .0983606577 + data: + first: + name: _NormalIntensity + second: .258196741 + data: + first: + name: _node9 + second: 1 + data: + first: + name: _MIP + second: 2.85714269 + data: + first: + name: _node67 + second: .625 + m_Colors: + data: + first: + name: _Specular + second: {r: .99999994, g: .425458819, b: .156017184, a: 1} + data: + first: + name: _Diffuse + second: {r: .415291131, g: 0, b: 0, a: 1} diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/PixelRotator.mat.meta b/Examples/PixelRotator.mat.meta similarity index 95% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/PixelRotator.mat.meta rename to Examples/PixelRotator.mat.meta index 63f321bd..e4f74263 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/PixelRotator.mat.meta +++ b/Examples/PixelRotator.mat.meta @@ -1,4 +1,4 @@ -fileFormatVersion: 2 -guid: ad0f5de566d7147fe91238a7111958f1 -NativeFormatImporter: - userData: +fileFormatVersion: 2 +guid: ad0f5de566d7147fe91238a7111958f1 +NativeFormatImporter: + userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/PixelRotator.shader b/Examples/PixelRotator.shader similarity index 92% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/PixelRotator.shader rename to Examples/PixelRotator.shader index acd388a8..5e24dca4 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/PixelRotator.shader +++ b/Examples/PixelRotator.shader @@ -1,7 +1,8 @@ -// Shader created with Shader Forge v1.38 +// Shader created with Shader Forge v1.42 // Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/ +// Enhanced by Antoine Guillon / Arkham Development - http://www.arkham-development.com/ // Note: Manually altering this data may prevent you from opening it in Shader Forge -/*SF_DATA;ver:1.38;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:2,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:1,x:35749,y:31801,varname:node_1,prsc:2|diff-748-OUT;n:type:ShaderForge.SFN_TexCoord,id:544,x:32941,y:31716,varname:node_544,prsc:2,uv:0,uaff:False;n:type:ShaderForge.SFN_Multiply,id:545,x:33168,y:31794,varname:node_545,prsc:2|A-544-UVOUT,B-546-OUT;n:type:ShaderForge.SFN_Vector1,id:546,x:32941,y:31928,varname:node_546,prsc:2,v1:10;n:type:ShaderForge.SFN_Frac,id:556,x:33395,y:31872,varname:node_556,prsc:2|IN-545-OUT;n:type:ShaderForge.SFN_RemapRange,id:559,x:33622,y:31873,varname:node_559,prsc:2,frmn:0,frmx:1,tomn:-1,tomx:1|IN-556-OUT;n:type:ShaderForge.SFN_Length,id:561,x:34530,y:32037,varname:node_561,prsc:2|IN-585-OUT;n:type:ShaderForge.SFN_Floor,id:562,x:34984,y:32043,varname:node_562,prsc:2|IN-607-OUT;n:type:ShaderForge.SFN_Rotator,id:563,x:34076,y:32056,varname:node_563,prsc:2|UVIN-764-OUT,PIV-574-OUT;n:type:ShaderForge.SFN_Vector2,id:574,x:33849,y:32159,varname:node_574,prsc:2,v1:0,v2:0;n:type:ShaderForge.SFN_Multiply,id:585,x:34303,y:31993,varname:node_585,prsc:2|A-586-OUT,B-563-UVOUT;n:type:ShaderForge.SFN_Vector2,id:586,x:34076,y:31906,varname:node_586,prsc:2,v1:1,v2:3;n:type:ShaderForge.SFN_Clamp01,id:607,x:34757,y:31992,varname:node_607,prsc:2|IN-561-OUT;n:type:ShaderForge.SFN_Vector1,id:641,x:33622,y:32093,varname:node_641,prsc:2,v1:8;n:type:ShaderForge.SFN_Floor,id:736,x:34076,y:31720,varname:node_736,prsc:2|IN-545-OUT;n:type:ShaderForge.SFN_Noise,id:737,x:34530,y:31533,varname:node_737,prsc:2|XY-736-OUT;n:type:ShaderForge.SFN_Noise,id:739,x:34530,y:31701,varname:node_739,prsc:2|XY-743-OUT;n:type:ShaderForge.SFN_Noise,id:741,x:34757,y:31824,varname:node_741,prsc:2|XY-744-OUT;n:type:ShaderForge.SFN_Add,id:743,x:34303,y:31825,varname:node_743,prsc:2|A-736-OUT,B-546-OUT;n:type:ShaderForge.SFN_Add,id:744,x:34530,y:31869,varname:node_744,prsc:2|A-743-OUT,B-546-OUT;n:type:ShaderForge.SFN_Append,id:745,x:34757,y:31656,varname:node_745,prsc:2|A-737-OUT,B-739-OUT;n:type:ShaderForge.SFN_Append,id:746,x:34984,y:31707,varname:node_746,prsc:2|A-745-OUT,B-741-OUT;n:type:ShaderForge.SFN_OneMinus,id:747,x:35211,y:31991,varname:node_747,prsc:2|IN-562-OUT;n:type:ShaderForge.SFN_Multiply,id:748,x:35438,y:31899,varname:node_748,prsc:2|A-753-OUT,B-747-OUT;n:type:ShaderForge.SFN_Power,id:753,x:35211,y:31823,varname:node_753,prsc:2|VAL-746-OUT,EXP-754-OUT;n:type:ShaderForge.SFN_Vector1,id:754,x:34984,y:31909,varname:node_754,prsc:2,v1:2;n:type:ShaderForge.SFN_Posterize,id:764,x:33849,y:31973,varname:node_764,prsc:2|IN-559-OUT,STPS-641-OUT;pass:END;sub:END;*/ +/*SF_DATA;ver:1.42;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:2,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:1,x:35749,y:31801,varname:node_1,prsc:2|diff-748-OUT;n:type:ShaderForge.SFN_TexCoord,id:544,x:32941,y:31716,varname:node_544,prsc:2,uv:0,uaff:False;n:type:ShaderForge.SFN_Multiply,id:545,x:33168,y:31794,varname:node_545,prsc:2|A-544-UVOUT,B-546-OUT;n:type:ShaderForge.SFN_Vector1,id:546,x:32941,y:31928,varname:node_546,prsc:2,v1:10;n:type:ShaderForge.SFN_Frac,id:556,x:33395,y:31872,varname:node_556,prsc:2|IN-545-OUT;n:type:ShaderForge.SFN_RemapRange,id:559,x:33622,y:31873,varname:node_559,prsc:2,frmn:0,frmx:1,tomn:-1,tomx:1|IN-556-OUT;n:type:ShaderForge.SFN_Length,id:561,x:34530,y:32037,varname:node_561,prsc:2|IN-585-OUT;n:type:ShaderForge.SFN_Floor,id:562,x:34984,y:32043,varname:node_562,prsc:2|IN-607-OUT;n:type:ShaderForge.SFN_Rotator,id:563,x:34076,y:32056,varname:node_563,prsc:2|UVIN-764-OUT,PIV-574-OUT;n:type:ShaderForge.SFN_Vector2,id:574,x:33849,y:32159,varname:node_574,prsc:2,v1:0,v2:0;n:type:ShaderForge.SFN_Multiply,id:585,x:34303,y:31993,varname:node_585,prsc:2|A-586-OUT,B-563-UVOUT;n:type:ShaderForge.SFN_Vector2,id:586,x:34076,y:31906,varname:node_586,prsc:2,v1:1,v2:3;n:type:ShaderForge.SFN_Clamp01,id:607,x:34757,y:31992,varname:node_607,prsc:2|IN-561-OUT;n:type:ShaderForge.SFN_Vector1,id:641,x:33622,y:32093,varname:node_641,prsc:2,v1:8;n:type:ShaderForge.SFN_Floor,id:736,x:34076,y:31720,varname:node_736,prsc:2|IN-545-OUT;n:type:ShaderForge.SFN_Noise,id:737,x:34530,y:31533,varname:node_737,prsc:2|XY-736-OUT;n:type:ShaderForge.SFN_Noise,id:739,x:34530,y:31701,varname:node_739,prsc:2|XY-743-OUT;n:type:ShaderForge.SFN_Noise,id:741,x:34757,y:31824,varname:node_741,prsc:2|XY-744-OUT;n:type:ShaderForge.SFN_Add,id:743,x:34303,y:31825,varname:node_743,prsc:2|A-736-OUT,B-546-OUT;n:type:ShaderForge.SFN_Add,id:744,x:34530,y:31869,varname:node_744,prsc:2|A-743-OUT,B-546-OUT;n:type:ShaderForge.SFN_Append,id:745,x:34757,y:31656,varname:node_745,prsc:2|A-737-OUT,B-739-OUT;n:type:ShaderForge.SFN_Append,id:746,x:34984,y:31707,varname:node_746,prsc:2|A-745-OUT,B-741-OUT;n:type:ShaderForge.SFN_OneMinus,id:747,x:35211,y:31991,varname:node_747,prsc:2|IN-562-OUT;n:type:ShaderForge.SFN_Multiply,id:748,x:35438,y:31899,varname:node_748,prsc:2|A-753-OUT,B-747-OUT;n:type:ShaderForge.SFN_Power,id:753,x:35211,y:31823,varname:node_753,prsc:2|VAL-746-OUT,EXP-754-OUT;n:type:ShaderForge.SFN_Vector1,id:754,x:34984,y:31909,varname:node_754,prsc:2,v1:2;n:type:ShaderForge.SFN_Posterize,id:764,x:33849,y:31973,varname:node_764,prsc:2|IN-559-OUT,STPS-641-OUT;pass:END;sub:END;*/ Shader "Shader Forge/Examples/Pixel Rotator" { Properties { @@ -20,12 +21,14 @@ Shader "Shader Forge/Examples/Pixel Rotator" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDBASE #define UNITY_PASS_FORWARDBASE + #endif //UNITY_PASS_FORWARDBASE #include "UnityCG.cginc" #include "AutoLight.cginc" #pragma multi_compile_fwdbase_fullshadows #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform float4 _LightColor0; struct VertexInput { @@ -38,7 +41,7 @@ Shader "Shader Forge/Examples/Pixel Rotator" { float2 uv0 : TEXCOORD0; float4 posWorld : TEXCOORD1; float3 normalDir : TEXCOORD2; - LIGHTING_COORDS(3,4) + UNITY_LIGHTING_COORDS(3,4) UNITY_FOG_COORDS(5) }; VertexOutput vert (VertexInput v) { @@ -49,7 +52,7 @@ Shader "Shader Forge/Examples/Pixel Rotator" { float3 lightColor = _LightColor0.rgb; o.pos = UnityObjectToClipPos( v.vertex ); UNITY_TRANSFER_FOG(o,o.pos); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, float2(0,0)); return o; } float4 frag(VertexOutput i) : COLOR { @@ -58,7 +61,7 @@ Shader "Shader Forge/Examples/Pixel Rotator" { float3 lightDirection = normalize(_WorldSpaceLightPos0.xyz); float3 lightColor = _LightColor0.rgb; ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float3 attenColor = attenuation * _LightColor0.xyz; /////// Diffuse: float NdotL = max(0.0,dot( normalDirection, lightDirection )); @@ -79,8 +82,8 @@ Shader "Shader Forge/Examples/Pixel Rotator" { float2 node_741_skew = node_744 + 0.2127+node_744.x*0.3713*node_744.y; float2 node_741_rnd = 4.789*sin(489.123*(node_741_skew)); float node_741 = frac(node_741_rnd.x*node_741_rnd.y*(1+node_741_skew.x)); - float4 node_1817 = _Time; - float node_563_ang = node_1817.g; + float4 node_1785 = _Time; + float node_563_ang = node_1785.g; float node_563_spd = 1.0; float node_563_cos = cos(node_563_spd*node_563_ang); float node_563_sin = sin(node_563_spd*node_563_ang); @@ -108,12 +111,14 @@ Shader "Shader Forge/Examples/Pixel Rotator" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDADD #define UNITY_PASS_FORWARDADD + #endif //UNITY_PASS_FORWARDADD #include "UnityCG.cginc" #include "AutoLight.cginc" #pragma multi_compile_fwdadd_fullshadows #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform float4 _LightColor0; struct VertexInput { @@ -126,7 +131,7 @@ Shader "Shader Forge/Examples/Pixel Rotator" { float2 uv0 : TEXCOORD0; float4 posWorld : TEXCOORD1; float3 normalDir : TEXCOORD2; - LIGHTING_COORDS(3,4) + UNITY_LIGHTING_COORDS(3,4) UNITY_FOG_COORDS(5) }; VertexOutput vert (VertexInput v) { @@ -137,7 +142,7 @@ Shader "Shader Forge/Examples/Pixel Rotator" { float3 lightColor = _LightColor0.rgb; o.pos = UnityObjectToClipPos( v.vertex ); UNITY_TRANSFER_FOG(o,o.pos); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, float2(0,0)); return o; } float4 frag(VertexOutput i) : COLOR { @@ -146,7 +151,7 @@ Shader "Shader Forge/Examples/Pixel Rotator" { float3 lightDirection = normalize(lerp(_WorldSpaceLightPos0.xyz, _WorldSpaceLightPos0.xyz - i.posWorld.xyz,_WorldSpaceLightPos0.w)); float3 lightColor = _LightColor0.rgb; ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float3 attenColor = attenuation * _LightColor0.xyz; /////// Diffuse: float NdotL = max(0.0,dot( normalDirection, lightDirection )); @@ -165,8 +170,8 @@ Shader "Shader Forge/Examples/Pixel Rotator" { float2 node_741_skew = node_744 + 0.2127+node_744.x*0.3713*node_744.y; float2 node_741_rnd = 4.789*sin(489.123*(node_741_skew)); float node_741 = frac(node_741_rnd.x*node_741_rnd.y*(1+node_741_skew.x)); - float4 node_1127 = _Time; - float node_563_ang = node_1127.g; + float4 node_9318 = _Time; + float node_563_ang = node_9318.g; float node_563_spd = 1.0; float node_563_cos = cos(node_563_spd*node_563_ang); float node_563_sin = sin(node_563_spd*node_563_ang); diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/PixelRotator.shader.meta b/Examples/PixelRotator.shader.meta similarity index 75% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/PixelRotator.shader.meta rename to Examples/PixelRotator.shader.meta index 5a747784..5c7b8ef3 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/PixelRotator.shader.meta +++ b/Examples/PixelRotator.shader.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 guid: 3c2ff98dd53924d0b85358d999cf6890 -timeCreated: 1503327511 -licenseType: Pro ShaderImporter: + externalObjects: {} defaultTextures: [] + nonModifiableTextures: [] userData: assetBundleName: assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Refraction.mat b/Examples/Refraction.mat similarity index 96% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Refraction.mat rename to Examples/Refraction.mat index 66661d5b..c590248e 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Refraction.mat +++ b/Examples/Refraction.mat @@ -1,43 +1,43 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: Refraction - m_Shader: {fileID: 4800000, guid: 6562ed1722964fc4fa4eba1d756e19b7, type: 3} - m_ShaderKeywords: [] - m_CustomRenderQueue: -1 - m_SavedProperties: - serializedVersion: 2 - m_TexEnvs: - data: - first: - name: _Refraction - second: - m_Texture: {fileID: 2800000, guid: bbab0a6f7bae9cf42bf057d8ee2755f6, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _node78 - second: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - data: - first: - name: _RefractionIntensity - second: .285714269 - m_Colors: - data: - first: - name: _TileB - second: {r: .426470608, g: .426470608, b: .426470608, a: 1} - data: - first: - name: _TileA - second: {r: 1, g: 1, b: 1, a: 1} +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Refraction + m_Shader: {fileID: 4800000, guid: 6562ed1722964fc4fa4eba1d756e19b7, type: 3} + m_ShaderKeywords: [] + m_CustomRenderQueue: -1 + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _Refraction + second: + m_Texture: {fileID: 2800000, guid: bbab0a6f7bae9cf42bf057d8ee2755f6, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _node78 + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _RefractionIntensity + second: .285714269 + m_Colors: + data: + first: + name: _TileB + second: {r: .426470608, g: .426470608, b: .426470608, a: 1} + data: + first: + name: _TileA + second: {r: 1, g: 1, b: 1, a: 1} diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Refraction.mat.meta b/Examples/Refraction.mat.meta similarity index 95% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Refraction.mat.meta rename to Examples/Refraction.mat.meta index a1037f96..73f2b566 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Refraction.mat.meta +++ b/Examples/Refraction.mat.meta @@ -1,4 +1,4 @@ -fileFormatVersion: 2 -guid: 2eced452d5ec44e49985d30395b1e7d3 -NativeFormatImporter: - userData: +fileFormatVersion: 2 +guid: 2eced452d5ec44e49985d30395b1e7d3 +NativeFormatImporter: + userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Refraction.shader b/Examples/Refraction.shader similarity index 90% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Refraction.shader rename to Examples/Refraction.shader index 6a765d74..2cf3477f 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Refraction.shader +++ b/Examples/Refraction.shader @@ -1,7 +1,8 @@ -// Shader created with Shader Forge v1.38 +// Shader created with Shader Forge v1.42 // Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/ +// Enhanced by Antoine Guillon / Arkham Development - http://www.arkham-development.com/ // Note: Manually altering this data may prevent you from opening it in Shader Forge -/*SF_DATA;ver:1.38;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:3,spmd:1,trmd:0,grmd:0,uamb:False,mssp:True,bkdf:False,hqlp:False,rprd:True,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:0,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:2,bsrc:3,bdst:7,dpts:2,wrdp:False,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:False,aust:False,igpj:False,qofs:0,qpre:3,rntp:2,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:0,x:34414,y:32442,varname:node_0,prsc:2|diff-5610-OUT,spec-75-OUT,gloss-76-OUT,normal-215-OUT,transm-29-OUT,lwrap-29-OUT,alpha-22-OUT,refract-14-OUT;n:type:ShaderForge.SFN_Slider,id:13,x:33580,y:32752,ptovrint:False,ptlb:Refraction Intensity,ptin:_RefractionIntensity,varname:_RefractionIntensity,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.1,max:1;n:type:ShaderForge.SFN_Multiply,id:14,x:34145,y:32724,varname:node_14,prsc:2|A-16-OUT,B-220-OUT;n:type:ShaderForge.SFN_ComponentMask,id:16,x:33975,y:32651,varname:node_16,prsc:2,cc1:0,cc2:1,cc3:-1,cc4:-1|IN-25-RGB;n:type:ShaderForge.SFN_Vector1,id:22,x:34145,y:32651,varname:node_22,prsc:2,v1:0.3;n:type:ShaderForge.SFN_Tex2d,id:25,x:33737,y:32566,ptovrint:False,ptlb:Refraction,ptin:_Refraction,varname:_Refraction,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:bbab0a6f7bae9cf42bf057d8ee2755f6,ntxv:3,isnm:True|UVIN-27-OUT;n:type:ShaderForge.SFN_TexCoord,id:26,x:33379,y:32505,varname:node_26,prsc:2,uv:0,uaff:False;n:type:ShaderForge.SFN_Multiply,id:27,x:33550,y:32566,varname:node_27,prsc:2|A-26-UVOUT,B-28-OUT;n:type:ShaderForge.SFN_Vector1,id:28,x:33379,y:32662,varname:node_28,prsc:2,v1:1;n:type:ShaderForge.SFN_Vector1,id:29,x:34145,y:32577,varname:node_29,prsc:2,v1:1;n:type:ShaderForge.SFN_Vector1,id:75,x:34145,y:32430,varname:node_75,prsc:2,v1:0;n:type:ShaderForge.SFN_Vector1,id:76,x:34145,y:32486,varname:node_76,prsc:2,v1:0.8;n:type:ShaderForge.SFN_Lerp,id:215,x:33975,y:32524,varname:node_215,prsc:2|A-216-OUT,B-25-RGB,T-13-OUT;n:type:ShaderForge.SFN_Vector3,id:216,x:33737,y:32445,varname:node_216,prsc:2,v1:0,v2:0,v3:1;n:type:ShaderForge.SFN_Multiply,id:220,x:33975,y:32803,varname:node_220,prsc:2|A-13-OUT,B-221-OUT;n:type:ShaderForge.SFN_Vector1,id:221,x:33737,y:32831,varname:node_221,prsc:2,v1:0.2;n:type:ShaderForge.SFN_Vector1,id:5610,x:34145,y:32366,varname:node_5610,prsc:2,v1:0.2;proporder:13-25;pass:END;sub:END;*/ +/*SF_DATA;ver:1.42;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:3,spmd:1,trmd:0,grmd:0,uamb:False,mssp:True,bkdf:False,hqlp:False,rprd:True,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:0,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:2,bsrc:3,bdst:7,dpts:2,wrdp:False,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:False,aust:False,igpj:False,qofs:0,qpre:3,rntp:2,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:0,x:34414,y:32442,varname:node_0,prsc:2|diff-5610-OUT,spec-75-OUT,gloss-76-OUT,normal-215-OUT,transm-29-OUT,lwrap-29-OUT,alpha-22-OUT,refract-14-OUT;n:type:ShaderForge.SFN_Slider,id:13,x:33580,y:32752,ptovrint:False,ptlb:Refraction Intensity,ptin:_RefractionIntensity,varname:_RefractionIntensity,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.1,max:1;n:type:ShaderForge.SFN_Multiply,id:14,x:34145,y:32724,varname:node_14,prsc:2|A-16-OUT,B-220-OUT;n:type:ShaderForge.SFN_ComponentMask,id:16,x:33975,y:32651,varname:node_16,prsc:2,cc1:0,cc2:1,cc3:-1,cc4:-1|IN-25-RGB;n:type:ShaderForge.SFN_Vector1,id:22,x:34145,y:32651,varname:node_22,prsc:2,v1:0.3;n:type:ShaderForge.SFN_Tex2d,id:25,x:33737,y:32566,ptovrint:False,ptlb:Refraction,ptin:_Refraction,varname:_Refraction,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:3,isnm:True|UVIN-27-OUT;n:type:ShaderForge.SFN_TexCoord,id:26,x:33379,y:32505,varname:node_26,prsc:2,uv:0,uaff:False;n:type:ShaderForge.SFN_Multiply,id:27,x:33550,y:32566,varname:node_27,prsc:2|A-26-UVOUT,B-28-OUT;n:type:ShaderForge.SFN_Vector1,id:28,x:33379,y:32662,varname:node_28,prsc:2,v1:1;n:type:ShaderForge.SFN_Vector1,id:29,x:34145,y:32577,varname:node_29,prsc:2,v1:1;n:type:ShaderForge.SFN_Vector1,id:75,x:34145,y:32430,varname:node_75,prsc:2,v1:0;n:type:ShaderForge.SFN_Vector1,id:76,x:34145,y:32486,varname:node_76,prsc:2,v1:0.8;n:type:ShaderForge.SFN_Lerp,id:215,x:33975,y:32524,varname:node_215,prsc:2|A-216-OUT,B-25-RGB,T-13-OUT;n:type:ShaderForge.SFN_Vector3,id:216,x:33737,y:32445,varname:node_216,prsc:2,v1:0,v2:0,v3:1;n:type:ShaderForge.SFN_Multiply,id:220,x:33975,y:32803,varname:node_220,prsc:2|A-13-OUT,B-221-OUT;n:type:ShaderForge.SFN_Vector1,id:221,x:33737,y:32831,varname:node_221,prsc:2,v1:0.2;n:type:ShaderForge.SFN_Vector1,id:5610,x:34145,y:32366,varname:node_5610,prsc:2,v1:0.2;proporder:13-25;pass:END;sub:END;*/ Shader "Shader Forge/Examples/Refraction" { Properties { @@ -27,14 +28,16 @@ Shader "Shader Forge/Examples/Refraction" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDBASE #define UNITY_PASS_FORWARDBASE + #endif //UNITY_PASS_FORWARDBASE #define _GLOSSYENV 1 #include "UnityCG.cginc" #include "AutoLight.cginc" #include "UnityPBSLighting.cginc" #include "UnityStandardBRDF.cginc" #pragma multi_compile_fwdbase_fullshadows - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform sampler2D _GrabTexture; uniform float _RefractionIntensity; @@ -53,7 +56,7 @@ Shader "Shader Forge/Examples/Refraction" { float3 tangentDir : TEXCOORD3; float3 bitangentDir : TEXCOORD4; float4 projPos : TEXCOORD5; - LIGHTING_COORDS(6,7) + UNITY_LIGHTING_COORDS(6,7) }; VertexOutput vert (VertexInput v) { VertexOutput o = (VertexOutput)0; @@ -66,7 +69,7 @@ Shader "Shader Forge/Examples/Refraction" { o.pos = UnityObjectToClipPos( v.vertex ); o.projPos = ComputeScreenPos (o.pos); COMPUTE_EYEDEPTH(o.projPos.z); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, float2(0,0)); return o; } float4 frag(VertexOutput i, float facing : VFACE) : COLOR { @@ -85,7 +88,7 @@ Shader "Shader Forge/Examples/Refraction" { float3 lightColor = _LightColor0.rgb; float3 halfDirection = normalize(viewDirection+lightDirection); ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float3 attenColor = attenuation * _LightColor0.xyz; float Pi = 3.141592654; float InvPi = 0.31830988618; @@ -194,14 +197,16 @@ Shader "Shader Forge/Examples/Refraction" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDADD #define UNITY_PASS_FORWARDADD + #endif //UNITY_PASS_FORWARDADD #define _GLOSSYENV 1 #include "UnityCG.cginc" #include "AutoLight.cginc" #include "UnityPBSLighting.cginc" #include "UnityStandardBRDF.cginc" #pragma multi_compile_fwdadd_fullshadows - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform sampler2D _GrabTexture; uniform float _RefractionIntensity; @@ -220,7 +225,7 @@ Shader "Shader Forge/Examples/Refraction" { float3 tangentDir : TEXCOORD3; float3 bitangentDir : TEXCOORD4; float4 projPos : TEXCOORD5; - LIGHTING_COORDS(6,7) + UNITY_LIGHTING_COORDS(6,7) }; VertexOutput vert (VertexInput v) { VertexOutput o = (VertexOutput)0; @@ -233,7 +238,7 @@ Shader "Shader Forge/Examples/Refraction" { o.pos = UnityObjectToClipPos( v.vertex ); o.projPos = ComputeScreenPos (o.pos); COMPUTE_EYEDEPTH(o.projPos.z); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, float2(0,0)); return o; } float4 frag(VertexOutput i, float facing : VFACE) : COLOR { @@ -251,7 +256,7 @@ Shader "Shader Forge/Examples/Refraction" { float3 lightColor = _LightColor0.rgb; float3 halfDirection = normalize(viewDirection+lightDirection); ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float3 attenColor = attenuation * _LightColor0.xyz; float Pi = 3.141592654; float InvPi = 0.31830988618; @@ -315,7 +320,9 @@ Shader "Shader Forge/Examples/Refraction" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_SHADOWCASTER #define UNITY_PASS_SHADOWCASTER + #endif //UNITY_PASS_SHADOWCASTER #define _GLOSSYENV 1 #include "UnityCG.cginc" #include "Lighting.cginc" @@ -323,7 +330,7 @@ Shader "Shader Forge/Examples/Refraction" { #include "UnityStandardBRDF.cginc" #pragma fragmentoption ARB_precision_hint_fastest #pragma multi_compile_shadowcaster - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 struct VertexInput { float4 vertex : POSITION; diff --git a/Examples/Refraction.shader.meta b/Examples/Refraction.shader.meta new file mode 100644 index 00000000..2f962ac3 --- /dev/null +++ b/Examples/Refraction.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6562ed1722964fc4fa4eba1d756e19b7 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/TessellationDisplacement.mat b/Examples/TessellationDisplacement.mat similarity index 100% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/TessellationDisplacement.mat rename to Examples/TessellationDisplacement.mat diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/TessellationDisplacement.mat.meta b/Examples/TessellationDisplacement.mat.meta similarity index 95% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/TessellationDisplacement.mat.meta rename to Examples/TessellationDisplacement.mat.meta index dbf34114..8b53e9d8 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/TessellationDisplacement.mat.meta +++ b/Examples/TessellationDisplacement.mat.meta @@ -1,4 +1,4 @@ -fileFormatVersion: 2 -guid: d753811ecd38cd149b3a958022853c18 -NativeFormatImporter: - userData: +fileFormatVersion: 2 +guid: d753811ecd38cd149b3a958022853c18 +NativeFormatImporter: + userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/TessellationDisplacement.shader b/Examples/TessellationDisplacement.shader similarity index 87% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/TessellationDisplacement.shader rename to Examples/TessellationDisplacement.shader index 1cc8f63b..026ffce7 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/TessellationDisplacement.shader +++ b/Examples/TessellationDisplacement.shader @@ -1,7 +1,8 @@ -// Shader created with Shader Forge v1.38 +// Shader created with Shader Forge v1.42 // Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/ +// Enhanced by Antoine Guillon / Arkham Development - http://www.arkham-development.com/ // Note: Manually altering this data may prevent you from opening it in Shader Forge -/*SF_DATA;ver:1.38;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:1,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:True,hqlp:False,rprd:True,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:1,x:34362,y:32994,varname:node_1,prsc:2|diff-162-OUT,spec-165-OUT,gloss-66-OUT,normal-160-OUT,lwrap-237-OUT,disp-13-OUT,tess-8-OUT;n:type:ShaderForge.SFN_Tex2d,id:3,x:33597,y:33194,ptovrint:False,ptlb:Normals,ptin:_Normals,varname:_Normals,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:cf20bfced7e912046a9ce991a4d775ec,ntxv:3,isnm:True|UVIN-6-OUT;n:type:ShaderForge.SFN_Tex2d,id:4,x:32986,y:33006,varname:node_798,prsc:2,tex:5fb7986dd6d0a8e4093ba82369dd6a4d,ntxv:0,isnm:False|UVIN-6-OUT,TEX-254-TEX;n:type:ShaderForge.SFN_TexCoord,id:5,x:32078,y:33020,varname:node_5,prsc:2,uv:0,uaff:False;n:type:ShaderForge.SFN_Multiply,id:6,x:32307,y:33100,varname:node_6,prsc:2|A-5-UVOUT,B-7-OUT;n:type:ShaderForge.SFN_Vector1,id:7,x:32078,y:33232,varname:node_7,prsc:2,v1:2;n:type:ShaderForge.SFN_Vector1,id:8,x:34051,y:33620,varname:node_8,prsc:2,v1:3;n:type:ShaderForge.SFN_Tex2d,id:12,x:32759,y:33284,varname:node_803,prsc:2,tex:5fb7986dd6d0a8e4093ba82369dd6a4d,ntxv:0,isnm:False|UVIN-6-OUT,MIP-15-OUT,TEX-254-TEX;n:type:ShaderForge.SFN_Multiply,id:13,x:34051,y:33418,varname:node_13,prsc:2|A-14-OUT,B-17-OUT;n:type:ShaderForge.SFN_NormalVector,id:14,x:33824,y:33442,prsc:2,pt:False;n:type:ShaderForge.SFN_Vector1,id:15,x:32532,y:33364,varname:node_15,prsc:2,v1:1;n:type:ShaderForge.SFN_Slider,id:16,x:33213,y:33639,ptovrint:False,ptlb:Depth,ptin:_Depth,varname:_Depth,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.25,max:0.25;n:type:ShaderForge.SFN_Multiply,id:17,x:33824,y:33620,varname:node_17,prsc:2|A-23-OUT,B-26-OUT;n:type:ShaderForge.SFN_OneMinus,id:23,x:33597,y:33379,varname:node_23,prsc:2|IN-153-OUT;n:type:ShaderForge.SFN_Multiply,id:26,x:33597,y:33537,varname:node_26,prsc:2|A-27-OUT,B-16-OUT;n:type:ShaderForge.SFN_Vector1,id:27,x:33370,y:33478,varname:node_27,prsc:2,v1:-1;n:type:ShaderForge.SFN_Vector1,id:66,x:34051,y:32948,varname:node_66,prsc:2,v1:10;n:type:ShaderForge.SFN_Tex2d,id:152,x:32759,y:33099,ptovrint:False,ptlb:Displacement (R),ptin:_DisplacementR,varname:_DisplacementR,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:28c7aad1372ff114b90d330f8a2dd938,ntxv:0,isnm:False|UVIN-161-UVOUT,MIP-15-OUT;n:type:ShaderForge.SFN_Max,id:153,x:33370,y:33276,varname:node_153,prsc:2|A-152-R,B-12-A;n:type:ShaderForge.SFN_Subtract,id:154,x:32986,y:33174,varname:node_154,prsc:2|A-12-A,B-152-R;n:type:ShaderForge.SFN_Clamp01,id:156,x:33370,y:33108,varname:node_156,prsc:2|IN-154-OUT;n:type:ShaderForge.SFN_Lerp,id:157,x:33824,y:32948,varname:node_157,prsc:2|A-159-OUT,B-3-RGB,T-156-OUT;n:type:ShaderForge.SFN_Vector3,id:159,x:33597,y:33061,varname:node_159,prsc:2,v1:0,v2:0,v3:1;n:type:ShaderForge.SFN_Normalize,id:160,x:34051,y:33082,varname:node_160,prsc:2|IN-157-OUT;n:type:ShaderForge.SFN_Panner,id:161,x:32532,y:32984,varname:node_161,prsc:2,spu:0.4,spv:0|UVIN-6-OUT;n:type:ShaderForge.SFN_Lerp,id:162,x:33597,y:32875,varname:node_162,prsc:2|A-163-OUT,B-170-OUT,T-156-OUT;n:type:ShaderForge.SFN_Vector3,id:163,x:33370,y:32790,varname:node_163,prsc:2,v1:0.4117647,v2:0.3826572,v3:0.3602941;n:type:ShaderForge.SFN_Multiply,id:165,x:34051,y:32746,varname:node_165,prsc:2|A-156-OUT,B-172-OUT;n:type:ShaderForge.SFN_Multiply,id:170,x:33370,y:32940,varname:node_170,prsc:2|A-3497-RGB,B-4-RGB;n:type:ShaderForge.SFN_ComponentMask,id:172,x:33824,y:32770,varname:node_172,prsc:2,cc1:0,cc2:-1,cc3:-1,cc4:-1|IN-162-OUT;n:type:ShaderForge.SFN_OneMinus,id:174,x:33824,y:33284,varname:node_174,prsc:2|IN-156-OUT;n:type:ShaderForge.SFN_Multiply,id:237,x:34051,y:33250,varname:node_237,prsc:2|A-238-OUT,B-174-OUT;n:type:ShaderForge.SFN_Vector1,id:238,x:33824,y:33150,varname:node_238,prsc:2,v1:0.5;n:type:ShaderForge.SFN_Tex2dAsset,id:254,x:32532,y:33145,ptovrint:False,ptlb:AO (RGB) Height (A),ptin:_AORGBHeightA,varname:_AORGBHeightA,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:5fb7986dd6d0a8e4093ba82369dd6a4d,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Tex2d,id:3497,x:32986,y:32833,ptovrint:False,ptlb:Diffuse,ptin:_Diffuse,varname:node_3497,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:b66bceaf0cc0ace4e9bdc92f14bba709,ntxv:0,isnm:False;proporder:3-254-152-16-3497;pass:END;sub:END;*/ +/*SF_DATA;ver:1.42;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:1,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:True,hqlp:False,rprd:True,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:1,x:34362,y:32994,varname:node_1,prsc:2|diff-162-OUT,spec-165-OUT,gloss-66-OUT,normal-160-OUT,lwrap-237-OUT,disp-13-OUT,tess-8-OUT;n:type:ShaderForge.SFN_Tex2d,id:3,x:33597,y:33194,ptovrint:False,ptlb:Normals,ptin:_Normals,varname:_Normals,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:3,isnm:True|UVIN-6-OUT;n:type:ShaderForge.SFN_Tex2d,id:4,x:32986,y:33006,varname:node_798,prsc:2,ntxv:0,isnm:False|UVIN-6-OUT,TEX-254-TEX;n:type:ShaderForge.SFN_TexCoord,id:5,x:32078,y:33020,varname:node_5,prsc:2,uv:0,uaff:False;n:type:ShaderForge.SFN_Multiply,id:6,x:32307,y:33100,varname:node_6,prsc:2|A-5-UVOUT,B-7-OUT;n:type:ShaderForge.SFN_Vector1,id:7,x:32078,y:33232,varname:node_7,prsc:2,v1:2;n:type:ShaderForge.SFN_Vector1,id:8,x:34051,y:33620,varname:node_8,prsc:2,v1:3;n:type:ShaderForge.SFN_Tex2d,id:12,x:32759,y:33284,varname:node_803,prsc:2,ntxv:0,isnm:False|UVIN-6-OUT,MIP-15-OUT,TEX-254-TEX;n:type:ShaderForge.SFN_Multiply,id:13,x:34051,y:33418,varname:node_13,prsc:2|A-14-OUT,B-17-OUT;n:type:ShaderForge.SFN_NormalVector,id:14,x:33824,y:33442,prsc:2,pt:False;n:type:ShaderForge.SFN_Vector1,id:15,x:32532,y:33364,varname:node_15,prsc:2,v1:1;n:type:ShaderForge.SFN_Slider,id:16,x:33213,y:33639,ptovrint:False,ptlb:Depth,ptin:_Depth,varname:_Depth,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.25,max:0.25;n:type:ShaderForge.SFN_Multiply,id:17,x:33824,y:33620,varname:node_17,prsc:2|A-23-OUT,B-26-OUT;n:type:ShaderForge.SFN_OneMinus,id:23,x:33597,y:33379,varname:node_23,prsc:2|IN-153-OUT;n:type:ShaderForge.SFN_Multiply,id:26,x:33597,y:33537,varname:node_26,prsc:2|A-27-OUT,B-16-OUT;n:type:ShaderForge.SFN_Vector1,id:27,x:33370,y:33478,varname:node_27,prsc:2,v1:-1;n:type:ShaderForge.SFN_Vector1,id:66,x:34051,y:32948,varname:node_66,prsc:2,v1:10;n:type:ShaderForge.SFN_Tex2d,id:152,x:32759,y:33099,ptovrint:False,ptlb:Displacement (R),ptin:_DisplacementR,varname:_DisplacementR,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False|UVIN-161-UVOUT,MIP-15-OUT;n:type:ShaderForge.SFN_Max,id:153,x:33370,y:33276,varname:node_153,prsc:2|A-152-R,B-12-A;n:type:ShaderForge.SFN_Subtract,id:154,x:32986,y:33174,varname:node_154,prsc:2|A-12-A,B-152-R;n:type:ShaderForge.SFN_Clamp01,id:156,x:33370,y:33108,varname:node_156,prsc:2|IN-154-OUT;n:type:ShaderForge.SFN_Lerp,id:157,x:33824,y:32948,varname:node_157,prsc:2|A-159-OUT,B-3-RGB,T-156-OUT;n:type:ShaderForge.SFN_Vector3,id:159,x:33597,y:33061,varname:node_159,prsc:2,v1:0,v2:0,v3:1;n:type:ShaderForge.SFN_Normalize,id:160,x:34051,y:33082,varname:node_160,prsc:2|IN-157-OUT;n:type:ShaderForge.SFN_Panner,id:161,x:32532,y:32984,varname:node_161,prsc:2,spu:0.4,spv:0|UVIN-6-OUT;n:type:ShaderForge.SFN_Lerp,id:162,x:33597,y:32875,varname:node_162,prsc:2|A-163-OUT,B-170-OUT,T-156-OUT;n:type:ShaderForge.SFN_Vector3,id:163,x:33370,y:32790,varname:node_163,prsc:2,v1:0.4117647,v2:0.3826572,v3:0.3602941;n:type:ShaderForge.SFN_Multiply,id:165,x:34051,y:32746,varname:node_165,prsc:2|A-156-OUT,B-172-OUT;n:type:ShaderForge.SFN_Multiply,id:170,x:33370,y:32940,varname:node_170,prsc:2|A-3497-RGB,B-4-RGB;n:type:ShaderForge.SFN_ComponentMask,id:172,x:33824,y:32770,varname:node_172,prsc:2,cc1:0,cc2:-1,cc3:-1,cc4:-1|IN-162-OUT;n:type:ShaderForge.SFN_OneMinus,id:174,x:33824,y:33284,varname:node_174,prsc:2|IN-156-OUT;n:type:ShaderForge.SFN_Multiply,id:237,x:34051,y:33250,varname:node_237,prsc:2|A-238-OUT,B-174-OUT;n:type:ShaderForge.SFN_Vector1,id:238,x:33824,y:33150,varname:node_238,prsc:2,v1:0.5;n:type:ShaderForge.SFN_Tex2dAsset,id:254,x:32532,y:33145,ptovrint:False,ptlb:AO (RGB) Height (A),ptin:_AORGBHeightA,varname:_AORGBHeightA,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Tex2d,id:3497,x:32986,y:32833,ptovrint:False,ptlb:Diffuse,ptin:_Diffuse,varname:node_3497,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;proporder:3-254-152-16-3497;pass:END;sub:END;*/ Shader "Shader Forge/Examples/TessellationDisplacement" { Properties { @@ -27,7 +28,9 @@ Shader "Shader Forge/Examples/TessellationDisplacement" { #pragma domain domain #pragma vertex tessvert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDBASE #define UNITY_PASS_FORWARDBASE + #endif //UNITY_PASS_FORWARDBASE #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #define _GLOSSYENV 1 #include "UnityCG.cginc" @@ -41,7 +44,7 @@ Shader "Shader Forge/Examples/TessellationDisplacement" { #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles3 metal d3d11_9x xboxone ps4 psp2 + #pragma only_renderers d3d9 d3d11 glcore gles3 metal d3d11_9x xboxone ps4 psp2 switch vulkan #pragma target 5.0 uniform sampler2D _Normals; uniform float4 _Normals_ST; uniform float _Depth; @@ -65,7 +68,7 @@ Shader "Shader Forge/Examples/TessellationDisplacement" { float3 normalDir : TEXCOORD4; float3 tangentDir : TEXCOORD5; float3 bitangentDir : TEXCOORD6; - LIGHTING_COORDS(7,8) + UNITY_LIGHTING_COORDS(7,8) UNITY_FOG_COORDS(9) #if defined(LIGHTMAP_ON) || defined(UNITY_SHOULD_SAMPLE_SH) float4 ambientOrLightmapUV : TEXCOORD10; @@ -91,7 +94,7 @@ Shader "Shader Forge/Examples/TessellationDisplacement" { float3 lightColor = _LightColor0.rgb; o.pos = UnityObjectToClipPos( v.vertex ); UNITY_TRANSFER_FOG(o,o.pos); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, v.texcoord1); return o; } #ifdef UNITY_CAN_COMPILE_TESSELLATION @@ -123,9 +126,9 @@ Shader "Shader Forge/Examples/TessellationDisplacement" { return o; } void displacement (inout VertexInput v){ - float4 node_21 = _Time; + float4 node_6008 = _Time; float2 node_6 = (v.texcoord0*2.0); - float2 node_161 = (node_6+node_21.g*float2(0.4,0)); + float2 node_161 = (node_6+node_6008.g*float2(0.4,0)); float node_15 = 1.0; float4 _DisplacementR_var = tex2Dlod(_DisplacementR,float4(TRANSFORM_TEX(node_161, _DisplacementR),0.0,node_15)); float4 node_803 = tex2Dlod(_AORGBHeightA,float4(TRANSFORM_TEX(node_6, _AORGBHeightA),0.0,node_15)); @@ -178,8 +181,8 @@ Shader "Shader Forge/Examples/TessellationDisplacement" { float3 _Normals_var = UnpackNormal(tex2D(_Normals,TRANSFORM_TEX(node_6, _Normals))); float node_15 = 1.0; float4 node_803 = tex2Dlod(_AORGBHeightA,float4(TRANSFORM_TEX(node_6, _AORGBHeightA),0.0,node_15)); - float4 node_21 = _Time; - float2 node_161 = (node_6+node_21.g*float2(0.4,0)); + float4 node_6008 = _Time; + float2 node_161 = (node_6+node_6008.g*float2(0.4,0)); float4 _DisplacementR_var = tex2Dlod(_DisplacementR,float4(TRANSFORM_TEX(node_161, _DisplacementR),0.0,node_15)); float node_156 = saturate((node_803.a-_DisplacementR_var.r)); float3 normalLocal = normalize(lerp(float3(0,0,1),_Normals_var.rgb,node_156)); @@ -189,7 +192,7 @@ Shader "Shader Forge/Examples/TessellationDisplacement" { float3 lightColor = _LightColor0.rgb; float3 halfDirection = normalize(viewDirection+lightDirection); ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float3 attenColor = attenuation * _LightColor0.xyz; ///////// Gloss: float gloss = 10.0; @@ -277,7 +280,9 @@ Shader "Shader Forge/Examples/TessellationDisplacement" { #pragma domain domain #pragma vertex tessvert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDADD #define UNITY_PASS_FORWARDADD + #endif //UNITY_PASS_FORWARDADD #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #define _GLOSSYENV 1 #include "UnityCG.cginc" @@ -291,7 +296,7 @@ Shader "Shader Forge/Examples/TessellationDisplacement" { #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles3 metal d3d11_9x xboxone ps4 psp2 + #pragma only_renderers d3d9 d3d11 glcore gles3 metal d3d11_9x xboxone ps4 psp2 switch vulkan #pragma target 5.0 uniform sampler2D _Normals; uniform float4 _Normals_ST; uniform float _Depth; @@ -315,7 +320,7 @@ Shader "Shader Forge/Examples/TessellationDisplacement" { float3 normalDir : TEXCOORD4; float3 tangentDir : TEXCOORD5; float3 bitangentDir : TEXCOORD6; - LIGHTING_COORDS(7,8) + UNITY_LIGHTING_COORDS(7,8) UNITY_FOG_COORDS(9) }; VertexOutput vert (VertexInput v) { @@ -330,7 +335,7 @@ Shader "Shader Forge/Examples/TessellationDisplacement" { float3 lightColor = _LightColor0.rgb; o.pos = UnityObjectToClipPos( v.vertex ); UNITY_TRANSFER_FOG(o,o.pos); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, v.texcoord1); return o; } #ifdef UNITY_CAN_COMPILE_TESSELLATION @@ -362,9 +367,9 @@ Shader "Shader Forge/Examples/TessellationDisplacement" { return o; } void displacement (inout VertexInput v){ - float4 node_2942 = _Time; + float4 node_2721 = _Time; float2 node_6 = (v.texcoord0*2.0); - float2 node_161 = (node_6+node_2942.g*float2(0.4,0)); + float2 node_161 = (node_6+node_2721.g*float2(0.4,0)); float node_15 = 1.0; float4 _DisplacementR_var = tex2Dlod(_DisplacementR,float4(TRANSFORM_TEX(node_161, _DisplacementR),0.0,node_15)); float4 node_803 = tex2Dlod(_AORGBHeightA,float4(TRANSFORM_TEX(node_6, _AORGBHeightA),0.0,node_15)); @@ -417,8 +422,8 @@ Shader "Shader Forge/Examples/TessellationDisplacement" { float3 _Normals_var = UnpackNormal(tex2D(_Normals,TRANSFORM_TEX(node_6, _Normals))); float node_15 = 1.0; float4 node_803 = tex2Dlod(_AORGBHeightA,float4(TRANSFORM_TEX(node_6, _AORGBHeightA),0.0,node_15)); - float4 node_2942 = _Time; - float2 node_161 = (node_6+node_2942.g*float2(0.4,0)); + float4 node_2721 = _Time; + float2 node_161 = (node_6+node_2721.g*float2(0.4,0)); float4 _DisplacementR_var = tex2Dlod(_DisplacementR,float4(TRANSFORM_TEX(node_161, _DisplacementR),0.0,node_15)); float node_156 = saturate((node_803.a-_DisplacementR_var.r)); float3 normalLocal = normalize(lerp(float3(0,0,1),_Normals_var.rgb,node_156)); @@ -427,7 +432,7 @@ Shader "Shader Forge/Examples/TessellationDisplacement" { float3 lightColor = _LightColor0.rgb; float3 halfDirection = normalize(viewDirection+lightDirection); ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float3 attenColor = attenuation * _LightColor0.xyz; ///////// Gloss: float gloss = 10.0; @@ -472,7 +477,9 @@ Shader "Shader Forge/Examples/TessellationDisplacement" { #pragma domain domain #pragma vertex tessvert #pragma fragment frag + #ifndef UNITY_PASS_SHADOWCASTER #define UNITY_PASS_SHADOWCASTER + #endif //UNITY_PASS_SHADOWCASTER #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #define _GLOSSYENV 1 #include "UnityCG.cginc" @@ -486,7 +493,7 @@ Shader "Shader Forge/Examples/TessellationDisplacement" { #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles3 metal d3d11_9x xboxone ps4 psp2 + #pragma only_renderers d3d9 d3d11 glcore gles3 metal d3d11_9x xboxone ps4 psp2 switch vulkan #pragma target 5.0 uniform float _Depth; uniform sampler2D _DisplacementR; uniform float4 _DisplacementR_ST; @@ -547,9 +554,9 @@ Shader "Shader Forge/Examples/TessellationDisplacement" { return o; } void displacement (inout VertexInput v){ - float4 node_7647 = _Time; + float4 node_1796 = _Time; float2 node_6 = (v.texcoord0*2.0); - float2 node_161 = (node_6+node_7647.g*float2(0.4,0)); + float2 node_161 = (node_6+node_1796.g*float2(0.4,0)); float node_15 = 1.0; float4 _DisplacementR_var = tex2Dlod(_DisplacementR,float4(TRANSFORM_TEX(node_161, _DisplacementR),0.0,node_15)); float4 node_803 = tex2Dlod(_AORGBHeightA,float4(TRANSFORM_TEX(node_6, _AORGBHeightA),0.0,node_15)); @@ -614,7 +621,9 @@ Shader "Shader Forge/Examples/TessellationDisplacement" { #pragma domain domain #pragma vertex tessvert #pragma fragment frag + #ifndef UNITY_PASS_META #define UNITY_PASS_META 1 + #endif UNITY_PASS_META #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #define _GLOSSYENV 1 #include "UnityCG.cginc" @@ -629,7 +638,7 @@ Shader "Shader Forge/Examples/TessellationDisplacement" { #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles3 metal d3d11_9x xboxone ps4 psp2 + #pragma only_renderers d3d9 d3d11 glcore gles3 metal d3d11_9x xboxone ps4 psp2 switch vulkan #pragma target 5.0 uniform float _Depth; uniform sampler2D _DisplacementR; uniform float4 _DisplacementR_ST; @@ -690,9 +699,9 @@ Shader "Shader Forge/Examples/TessellationDisplacement" { return o; } void displacement (inout VertexInput v){ - float4 node_5250 = _Time; + float4 node_6771 = _Time; float2 node_6 = (v.texcoord0*2.0); - float2 node_161 = (node_6+node_5250.g*float2(0.4,0)); + float2 node_161 = (node_6+node_6771.g*float2(0.4,0)); float node_15 = 1.0; float4 _DisplacementR_var = tex2Dlod(_DisplacementR,float4(TRANSFORM_TEX(node_161, _DisplacementR),0.0,node_15)); float4 node_803 = tex2Dlod(_AORGBHeightA,float4(TRANSFORM_TEX(node_6, _AORGBHeightA),0.0,node_15)); @@ -751,8 +760,8 @@ Shader "Shader Forge/Examples/TessellationDisplacement" { float4 node_798 = tex2D(_AORGBHeightA,TRANSFORM_TEX(node_6, _AORGBHeightA)); float node_15 = 1.0; float4 node_803 = tex2Dlod(_AORGBHeightA,float4(TRANSFORM_TEX(node_6, _AORGBHeightA),0.0,node_15)); - float4 node_5250 = _Time; - float2 node_161 = (node_6+node_5250.g*float2(0.4,0)); + float4 node_6771 = _Time; + float2 node_161 = (node_6+node_6771.g*float2(0.4,0)); float4 _DisplacementR_var = tex2Dlod(_DisplacementR,float4(TRANSFORM_TEX(node_161, _DisplacementR),0.0,node_15)); float node_156 = saturate((node_803.a-_DisplacementR_var.r)); float3 node_162 = lerp(float3(0.4117647,0.3826572,0.3602941),(_Diffuse_var.rgb*node_798.rgb),node_156); diff --git a/Examples/TessellationDisplacement.shader.meta b/Examples/TessellationDisplacement.shader.meta new file mode 100644 index 00000000..cf937fd8 --- /dev/null +++ b/Examples/TessellationDisplacement.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5e81283b11113de4295d1943aec0a765 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Tiles.mat b/Examples/Tiles.mat similarity index 100% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Tiles.mat rename to Examples/Tiles.mat diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Tiles.mat.meta b/Examples/Tiles.mat.meta similarity index 95% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Tiles.mat.meta rename to Examples/Tiles.mat.meta index 9827f925..649c589c 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Tiles.mat.meta +++ b/Examples/Tiles.mat.meta @@ -1,4 +1,4 @@ -fileFormatVersion: 2 -guid: 393931f1639a1fe40b68d72551bef241 -NativeFormatImporter: - userData: +fileFormatVersion: 2 +guid: 393931f1639a1fe40b68d72551bef241 +NativeFormatImporter: + userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Tiles.shader b/Examples/Tiles.shader similarity index 93% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Tiles.shader rename to Examples/Tiles.shader index 331776e7..7200d1ae 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Tiles.shader +++ b/Examples/Tiles.shader @@ -1,7 +1,8 @@ -// Shader created with Shader Forge v1.38 +// Shader created with Shader Forge v1.42 // Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/ +// Enhanced by Antoine Guillon / Arkham Development - http://www.arkham-development.com/ // Note: Manually altering this data may prevent you from opening it in Shader Forge -/*SF_DATA;ver:1.38;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:3,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:True,hqlp:False,rprd:True,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:0,x:33638,y:32808,varname:node_0,prsc:2|diff-138-RGB,spec-145-OUT,gloss-144-OUT;n:type:ShaderForge.SFN_Tex2d,id:138,x:33259,y:32700,ptovrint:False,ptlb:Base Color,ptin:_BaseColor,varname:_Diffuse,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:b66bceaf0cc0ace4e9bdc92f14bba709,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Slider,id:144,x:33102,y:32979,ptovrint:False,ptlb:Gloss,ptin:_Gloss,varname:_Gloss,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.5,max:1;n:type:ShaderForge.SFN_Slider,id:145,x:33102,y:32879,ptovrint:False,ptlb:Metallic,ptin:_Metallic,varname:_Specular,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0,max:1;proporder:138-145-144;pass:END;sub:END;*/ +/*SF_DATA;ver:1.42;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:3,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:True,hqlp:False,rprd:True,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:0,x:33638,y:32808,varname:node_0,prsc:2|diff-138-RGB,spec-145-OUT,gloss-144-OUT;n:type:ShaderForge.SFN_Tex2d,id:138,x:33259,y:32700,ptovrint:False,ptlb:Base Color,ptin:_BaseColor,varname:_Diffuse,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Slider,id:144,x:33102,y:32979,ptovrint:False,ptlb:Gloss,ptin:_Gloss,varname:_Gloss,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.5,max:1;n:type:ShaderForge.SFN_Slider,id:145,x:33102,y:32879,ptovrint:False,ptlb:Metallic,ptin:_Metallic,varname:_Specular,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0,max:1;proporder:138-145-144;pass:END;sub:END;*/ Shader "Shader Forge/Examples/Tiles" { Properties { @@ -23,7 +24,9 @@ Shader "Shader Forge/Examples/Tiles" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDBASE #define UNITY_PASS_FORWARDBASE + #endif //UNITY_PASS_FORWARDBASE #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #define _GLOSSYENV 1 #include "UnityCG.cginc" @@ -36,7 +39,7 @@ Shader "Shader Forge/Examples/Tiles" { #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform sampler2D _BaseColor; uniform float4 _BaseColor_ST; uniform float _Gloss; @@ -58,7 +61,7 @@ Shader "Shader Forge/Examples/Tiles" { float3 normalDir : TEXCOORD4; float3 tangentDir : TEXCOORD5; float3 bitangentDir : TEXCOORD6; - LIGHTING_COORDS(7,8) + UNITY_LIGHTING_COORDS(7,8) UNITY_FOG_COORDS(9) #if defined(LIGHTMAP_ON) || defined(UNITY_SHOULD_SAMPLE_SH) float4 ambientOrLightmapUV : TEXCOORD10; @@ -84,7 +87,7 @@ Shader "Shader Forge/Examples/Tiles" { float3 lightColor = _LightColor0.rgb; o.pos = UnityObjectToClipPos( v.vertex ); UNITY_TRANSFER_FOG(o,o.pos); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, v.texcoord1); return o; } float4 frag(VertexOutput i) : COLOR { @@ -97,7 +100,7 @@ Shader "Shader Forge/Examples/Tiles" { float3 lightColor = _LightColor0.rgb; float3 halfDirection = normalize(viewDirection+lightDirection); ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float3 attenColor = attenuation * _LightColor0.xyz; float Pi = 3.141592654; float InvPi = 0.31830988618; @@ -209,7 +212,9 @@ Shader "Shader Forge/Examples/Tiles" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDADD #define UNITY_PASS_FORWARDADD + #endif //UNITY_PASS_FORWARDADD #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #define _GLOSSYENV 1 #include "UnityCG.cginc" @@ -222,7 +227,7 @@ Shader "Shader Forge/Examples/Tiles" { #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform sampler2D _BaseColor; uniform float4 _BaseColor_ST; uniform float _Gloss; @@ -244,7 +249,7 @@ Shader "Shader Forge/Examples/Tiles" { float3 normalDir : TEXCOORD4; float3 tangentDir : TEXCOORD5; float3 bitangentDir : TEXCOORD6; - LIGHTING_COORDS(7,8) + UNITY_LIGHTING_COORDS(7,8) UNITY_FOG_COORDS(9) }; VertexOutput vert (VertexInput v) { @@ -259,7 +264,7 @@ Shader "Shader Forge/Examples/Tiles" { float3 lightColor = _LightColor0.rgb; o.pos = UnityObjectToClipPos( v.vertex ); UNITY_TRANSFER_FOG(o,o.pos); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, v.texcoord1); return o; } float4 frag(VertexOutput i) : COLOR { @@ -271,7 +276,7 @@ Shader "Shader Forge/Examples/Tiles" { float3 lightColor = _LightColor0.rgb; float3 halfDirection = normalize(viewDirection+lightDirection); ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float3 attenColor = attenuation * _LightColor0.xyz; float Pi = 3.141592654; float InvPi = 0.31830988618; @@ -330,7 +335,9 @@ Shader "Shader Forge/Examples/Tiles" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_META #define UNITY_PASS_META 1 + #endif UNITY_PASS_META #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #define _GLOSSYENV 1 #include "UnityCG.cginc" @@ -344,7 +351,7 @@ Shader "Shader Forge/Examples/Tiles" { #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform sampler2D _BaseColor; uniform float4 _BaseColor_ST; uniform float _Gloss; diff --git a/Examples/Tiles.shader.meta b/Examples/Tiles.shader.meta new file mode 100644 index 00000000..6c737557 --- /dev/null +++ b/Examples/Tiles.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 05eb3a2c382b4154cb71394a349d0909 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Vegetation.mat b/Examples/Vegetation.mat similarity index 100% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Vegetation.mat rename to Examples/Vegetation.mat diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Vegetation.mat.meta b/Examples/Vegetation.mat.meta similarity index 95% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Vegetation.mat.meta rename to Examples/Vegetation.mat.meta index e5cc20ce..4dcafcf7 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Vegetation.mat.meta +++ b/Examples/Vegetation.mat.meta @@ -1,4 +1,4 @@ -fileFormatVersion: 2 -guid: d2accf36f48355a4cbd925162706dbb1 -NativeFormatImporter: - userData: +fileFormatVersion: 2 +guid: d2accf36f48355a4cbd925162706dbb1 +NativeFormatImporter: + userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Vegetation.shader b/Examples/Vegetation.shader similarity index 86% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Vegetation.shader rename to Examples/Vegetation.shader index 0cbfab75..17939bc1 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Vegetation.shader +++ b/Examples/Vegetation.shader @@ -1,7 +1,8 @@ -// Shader created with Shader Forge v1.38 +// Shader created with Shader Forge v1.42 // Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/ +// Enhanced by Antoine Guillon / Arkham Development - http://www.arkham-development.com/ // Note: Manually altering this data may prevent you from opening it in Shader Forge -/*SF_DATA;ver:1.38;sub:START;pass:START;ps:flbk:Transparent/Cutout/Diffuse,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:1,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:True,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:2,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:True,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:2,rntp:3,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:0,x:34000,y:32640,varname:node_0,prsc:2|diff-322-OUT,spec-3-OUT,gloss-270-OUT,normal-2-RGB,transm-7-OUT,lwrap-6-OUT,clip-1-A,voffset-394-OUT;n:type:ShaderForge.SFN_Tex2d,id:1,x:33572,y:32631,ptovrint:False,ptlb:Diffuse,ptin:_Diffuse,varname:_Diffuse,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:66321cc856b03e245ac41ed8a53e0ecc,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Tex2d,id:2,x:33572,y:32818,ptovrint:False,ptlb:Normal,ptin:_Normal,varname:_Normal,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:cb6c5165ed180c543be39ed70e72abc8,ntxv:3,isnm:True;n:type:ShaderForge.SFN_Vector1,id:3,x:33777,y:32641,varname:node_3,prsc:2,v1:0.2;n:type:ShaderForge.SFN_Vector3,id:6,x:33572,y:33075,varname:node_6,prsc:2,v1:0.3275862,v2:0.3275862,v3:0.2911878;n:type:ShaderForge.SFN_Vector3,id:7,x:33572,y:32976,varname:node_7,prsc:2,v1:0.2824138,v2:0.3137931,v3:0.1568965;n:type:ShaderForge.SFN_Vector1,id:270,x:33777,y:32701,varname:node_270,prsc:2,v1:0.4;n:type:ShaderForge.SFN_VertexColor,id:321,x:33330,y:32501,varname:node_321,prsc:2;n:type:ShaderForge.SFN_Multiply,id:322,x:33777,y:32508,varname:node_322,prsc:2|A-330-OUT,B-1-RGB;n:type:ShaderForge.SFN_Lerp,id:330,x:33572,y:32478,varname:node_330,prsc:2|A-331-OUT,B-337-OUT,T-321-B;n:type:ShaderForge.SFN_Vector1,id:331,x:33330,y:32356,varname:node_331,prsc:2,v1:1;n:type:ShaderForge.SFN_Vector3,id:337,x:33330,y:32410,varname:node_337,prsc:2,v1:0.9632353,v2:0.8224623,v3:0.03541304;n:type:ShaderForge.SFN_VertexColor,id:389,x:32886,y:33347,varname:node_389,prsc:2;n:type:ShaderForge.SFN_NormalVector,id:391,x:33073,y:33231,prsc:2,pt:False;n:type:ShaderForge.SFN_Time,id:392,x:33073,y:33586,varname:node_392,prsc:2;n:type:ShaderForge.SFN_Sin,id:393,x:33479,y:33548,varname:node_393,prsc:2|IN-413-OUT;n:type:ShaderForge.SFN_Multiply,id:394,x:33729,y:33420,cmnt:Wind animation,varname:node_394,prsc:2|A-562-OUT,B-389-R,C-393-OUT,D-403-OUT;n:type:ShaderForge.SFN_Vector1,id:403,x:33479,y:33699,varname:node_403,prsc:2,v1:0.016;n:type:ShaderForge.SFN_Add,id:413,x:33298,y:33548,varname:node_413,prsc:2|A-519-OUT,B-392-T;n:type:ShaderForge.SFN_Multiply,id:519,x:33073,y:33457,varname:node_519,prsc:2|A-389-B,B-520-OUT;n:type:ShaderForge.SFN_Pi,id:520,x:32919,y:33494,varname:node_520,prsc:2;n:type:ShaderForge.SFN_Add,id:561,x:33294,y:33171,varname:node_561,prsc:2|A-563-OUT,B-391-OUT;n:type:ShaderForge.SFN_Normalize,id:562,x:33479,y:33280,varname:node_562,prsc:2|IN-561-OUT;n:type:ShaderForge.SFN_Vector3,id:563,x:33073,y:33131,cmnt:Wind direction,varname:node_563,prsc:2,v1:1,v2:0.5,v3:0.5;proporder:1-2;pass:END;sub:END;*/ +/*SF_DATA;ver:1.42;sub:START;pass:START;ps:flbk:Transparent/Cutout/Diffuse,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:1,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:True,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:2,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:True,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:2,rntp:3,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:0,x:34000,y:32640,varname:node_0,prsc:2|diff-322-OUT,spec-3-OUT,gloss-270-OUT,normal-2-RGB,transm-7-OUT,lwrap-6-OUT,clip-1-A,voffset-394-OUT;n:type:ShaderForge.SFN_Tex2d,id:1,x:33572,y:32631,ptovrint:False,ptlb:Diffuse,ptin:_Diffuse,varname:_Diffuse,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Tex2d,id:2,x:33572,y:32818,ptovrint:False,ptlb:Normal,ptin:_Normal,varname:_Normal,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:3,isnm:True;n:type:ShaderForge.SFN_Vector1,id:3,x:33777,y:32641,varname:node_3,prsc:2,v1:0.2;n:type:ShaderForge.SFN_Vector3,id:6,x:33572,y:33075,varname:node_6,prsc:2,v1:0.3275862,v2:0.3275862,v3:0.2911878;n:type:ShaderForge.SFN_Vector3,id:7,x:33572,y:32976,varname:node_7,prsc:2,v1:0.2824138,v2:0.3137931,v3:0.1568965;n:type:ShaderForge.SFN_Vector1,id:270,x:33777,y:32701,varname:node_270,prsc:2,v1:0.4;n:type:ShaderForge.SFN_VertexColor,id:321,x:33330,y:32501,varname:node_321,prsc:2;n:type:ShaderForge.SFN_Multiply,id:322,x:33777,y:32508,varname:node_322,prsc:2|A-330-OUT,B-1-RGB;n:type:ShaderForge.SFN_Lerp,id:330,x:33572,y:32478,varname:node_330,prsc:2|A-331-OUT,B-337-OUT,T-321-B;n:type:ShaderForge.SFN_Vector1,id:331,x:33330,y:32356,varname:node_331,prsc:2,v1:1;n:type:ShaderForge.SFN_Vector3,id:337,x:33330,y:32410,varname:node_337,prsc:2,v1:0.9632353,v2:0.8224623,v3:0.03541304;n:type:ShaderForge.SFN_VertexColor,id:389,x:32886,y:33347,varname:node_389,prsc:2;n:type:ShaderForge.SFN_NormalVector,id:391,x:33073,y:33231,prsc:2,pt:False;n:type:ShaderForge.SFN_Time,id:392,x:33073,y:33586,varname:node_392,prsc:2;n:type:ShaderForge.SFN_Sin,id:393,x:33479,y:33548,varname:node_393,prsc:2|IN-413-OUT;n:type:ShaderForge.SFN_Multiply,id:394,x:33729,y:33420,cmnt:Wind animation,varname:node_394,prsc:2|A-562-OUT,B-389-R,C-393-OUT,D-403-OUT;n:type:ShaderForge.SFN_Vector1,id:403,x:33479,y:33699,varname:node_403,prsc:2,v1:0.016;n:type:ShaderForge.SFN_Add,id:413,x:33298,y:33548,varname:node_413,prsc:2|A-519-OUT,B-392-T;n:type:ShaderForge.SFN_Multiply,id:519,x:33073,y:33457,varname:node_519,prsc:2|A-389-B,B-520-OUT;n:type:ShaderForge.SFN_Pi,id:520,x:32919,y:33494,varname:node_520,prsc:2;n:type:ShaderForge.SFN_Add,id:561,x:33294,y:33171,varname:node_561,prsc:2|A-563-OUT,B-391-OUT;n:type:ShaderForge.SFN_Normalize,id:562,x:33479,y:33280,varname:node_562,prsc:2|IN-561-OUT;n:type:ShaderForge.SFN_Vector3,id:563,x:33073,y:33131,cmnt:Wind direction,varname:node_563,prsc:2,v1:1,v2:0.5,v3:0.5;proporder:1-2;pass:END;sub:END;*/ Shader "Shader Forge/Examples/Animated Vegetation" { Properties { @@ -26,7 +27,9 @@ Shader "Shader Forge/Examples/Animated Vegetation" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDBASE #define UNITY_PASS_FORWARDBASE + #endif //UNITY_PASS_FORWARDBASE #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #include "UnityCG.cginc" #include "AutoLight.cginc" @@ -38,7 +41,7 @@ Shader "Shader Forge/Examples/Animated Vegetation" { #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform sampler2D _Diffuse; uniform float4 _Diffuse_ST; uniform sampler2D _Normal; uniform float4 _Normal_ST; @@ -61,7 +64,7 @@ Shader "Shader Forge/Examples/Animated Vegetation" { float3 tangentDir : TEXCOORD5; float3 bitangentDir : TEXCOORD6; float4 vertexColor : COLOR; - LIGHTING_COORDS(7,8) + UNITY_LIGHTING_COORDS(7,8) UNITY_FOG_COORDS(9) #if defined(LIGHTMAP_ON) || defined(UNITY_SHOULD_SAMPLE_SH) float4 ambientOrLightmapUV : TEXCOORD10; @@ -90,7 +93,7 @@ Shader "Shader Forge/Examples/Animated Vegetation" { float3 lightColor = _LightColor0.rgb; o.pos = UnityObjectToClipPos( v.vertex ); UNITY_TRANSFER_FOG(o,o.pos); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, v.texcoord1); return o; } float4 frag(VertexOutput i, float facing : VFACE) : COLOR { @@ -110,7 +113,7 @@ Shader "Shader Forge/Examples/Animated Vegetation" { float3 lightColor = _LightColor0.rgb; float3 halfDirection = normalize(viewDirection+lightDirection); ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float3 attenColor = attenuation * _LightColor0.xyz; ///////// Gloss: float gloss = 0.4; @@ -182,7 +185,9 @@ Shader "Shader Forge/Examples/Animated Vegetation" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDADD #define UNITY_PASS_FORWARDADD + #endif //UNITY_PASS_FORWARDADD #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #include "UnityCG.cginc" #include "AutoLight.cginc" @@ -194,7 +199,7 @@ Shader "Shader Forge/Examples/Animated Vegetation" { #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform sampler2D _Diffuse; uniform float4 _Diffuse_ST; uniform sampler2D _Normal; uniform float4 _Normal_ST; @@ -217,7 +222,7 @@ Shader "Shader Forge/Examples/Animated Vegetation" { float3 tangentDir : TEXCOORD5; float3 bitangentDir : TEXCOORD6; float4 vertexColor : COLOR; - LIGHTING_COORDS(7,8) + UNITY_LIGHTING_COORDS(7,8) UNITY_FOG_COORDS(9) }; VertexOutput vert (VertexInput v) { @@ -235,7 +240,7 @@ Shader "Shader Forge/Examples/Animated Vegetation" { float3 lightColor = _LightColor0.rgb; o.pos = UnityObjectToClipPos( v.vertex ); UNITY_TRANSFER_FOG(o,o.pos); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, v.texcoord1); return o; } float4 frag(VertexOutput i, float facing : VFACE) : COLOR { @@ -254,7 +259,7 @@ Shader "Shader Forge/Examples/Animated Vegetation" { float3 lightColor = _LightColor0.rgb; float3 halfDirection = normalize(viewDirection+lightDirection); ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float3 attenColor = attenuation * _LightColor0.xyz; ///////// Gloss: float gloss = 0.4; @@ -295,7 +300,9 @@ Shader "Shader Forge/Examples/Animated Vegetation" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_SHADOWCASTER #define UNITY_PASS_SHADOWCASTER + #endif //UNITY_PASS_SHADOWCASTER #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #include "UnityCG.cginc" #include "Lighting.cginc" @@ -307,7 +314,7 @@ Shader "Shader Forge/Examples/Animated Vegetation" { #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform sampler2D _Diffuse; uniform float4 _Diffuse_ST; struct VertexInput { @@ -364,7 +371,9 @@ Shader "Shader Forge/Examples/Animated Vegetation" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_META #define UNITY_PASS_META 1 + #endif UNITY_PASS_META #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #include "UnityCG.cginc" #include "Lighting.cginc" @@ -377,7 +386,7 @@ Shader "Shader Forge/Examples/Animated Vegetation" { #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform sampler2D _Diffuse; uniform float4 _Diffuse_ST; struct VertexInput { diff --git a/Examples/Vegetation.shader.meta b/Examples/Vegetation.shader.meta new file mode 100644 index 00000000..8e8458a0 --- /dev/null +++ b/Examples/Vegetation.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e17d9c256530145c39caf8efc8c94a16 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexAnimation.mat b/Examples/VertexAnimation.mat similarity index 96% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexAnimation.mat rename to Examples/VertexAnimation.mat index 5aadb318..c3b706cf 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexAnimation.mat +++ b/Examples/VertexAnimation.mat @@ -1,97 +1,97 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: VertexAnimation - m_Shader: {fileID: 4800000, guid: 6dedef75fd0484cdf8557f522ceaa8bf, type: 3} - m_ShaderKeywords: [] - m_CustomRenderQueue: -1 - m_SavedProperties: - serializedVersion: 2 - m_TexEnvs: - data: - first: - name: _Normals - second: - m_Texture: {fileID: 2800000, guid: bbab0a6f7bae9cf42bf057d8ee2755f6, type: 3} - m_Scale: {x: 16, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _Diffuse - second: - m_Texture: {fileID: 2800000, guid: b66bceaf0cc0ace4e9bdc92f14bba709, type: 3} - m_Scale: {x: 16, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _node72 - second: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _node85 - second: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _node108 - second: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _InnerNormals - second: - m_Texture: {fileID: 2800000, guid: cf20bfced7e912046a9ce991a4d775ec, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _node116 - second: - m_Texture: {fileID: 2800000, guid: 5fb7986dd6d0a8e4093ba82369dd6a4d, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _node117 - second: - m_Texture: {fileID: 2800000, guid: 5fb7986dd6d0a8e4093ba82369dd6a4d, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - data: - first: - name: _GlowIntensity - second: 1.79999995 - data: - first: - name: _BulgeShape - second: 5 - data: - first: - name: _BulgeScale - second: .200000003 - data: - first: - name: _Magnitude - second: .230769247 - data: - first: - name: _Sharpness - second: 2.61538434 - m_Colors: - data: - first: - name: _GlowColor - second: {r: 1, g: .239148095, b: .110294104, a: 1} +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: VertexAnimation + m_Shader: {fileID: 4800000, guid: 6dedef75fd0484cdf8557f522ceaa8bf, type: 3} + m_ShaderKeywords: [] + m_CustomRenderQueue: -1 + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _Normals + second: + m_Texture: {fileID: 2800000, guid: bbab0a6f7bae9cf42bf057d8ee2755f6, type: 3} + m_Scale: {x: 16, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _Diffuse + second: + m_Texture: {fileID: 2800000, guid: b66bceaf0cc0ace4e9bdc92f14bba709, type: 3} + m_Scale: {x: 16, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _node72 + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _node85 + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _node108 + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _InnerNormals + second: + m_Texture: {fileID: 2800000, guid: cf20bfced7e912046a9ce991a4d775ec, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _node116 + second: + m_Texture: {fileID: 2800000, guid: 5fb7986dd6d0a8e4093ba82369dd6a4d, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _node117 + second: + m_Texture: {fileID: 2800000, guid: 5fb7986dd6d0a8e4093ba82369dd6a4d, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _GlowIntensity + second: 1.79999995 + data: + first: + name: _BulgeShape + second: 5 + data: + first: + name: _BulgeScale + second: .200000003 + data: + first: + name: _Magnitude + second: .230769247 + data: + first: + name: _Sharpness + second: 2.61538434 + m_Colors: + data: + first: + name: _GlowColor + second: {r: 1, g: .239148095, b: .110294104, a: 1} diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexAnimation.mat.meta b/Examples/VertexAnimation.mat.meta similarity index 95% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexAnimation.mat.meta rename to Examples/VertexAnimation.mat.meta index 74b11ae9..cc60e0dd 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexAnimation.mat.meta +++ b/Examples/VertexAnimation.mat.meta @@ -1,4 +1,4 @@ -fileFormatVersion: 2 -guid: 23fc898268709d346b696ab505c07656 -NativeFormatImporter: - userData: +fileFormatVersion: 2 +guid: 23fc898268709d346b696ab505c07656 +NativeFormatImporter: + userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexAnimation.shader b/Examples/VertexAnimation.shader similarity index 86% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexAnimation.shader rename to Examples/VertexAnimation.shader index 8779b653..47dd9acc 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexAnimation.shader +++ b/Examples/VertexAnimation.shader @@ -1,7 +1,8 @@ -// Shader created with Shader Forge v1.38 +// Shader created with Shader Forge v1.42 // Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/ +// Enhanced by Antoine Guillon / Arkham Development - http://www.arkham-development.com/ // Note: Manually altering this data may prevent you from opening it in Shader Forge -/*SF_DATA;ver:1.38;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:1,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:True,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:1,x:33430,y:32397,varname:node_1,prsc:2|diff-149-OUT,spec-4921-OUT,normal-4935-OUT,emission-166-OUT,transm-133-OUT,lwrap-133-OUT,voffset-140-OUT;n:type:ShaderForge.SFN_Subtract,id:18,x:32114,y:32340,varname:node_18,prsc:2|A-22-OUT,B-19-OUT;n:type:ShaderForge.SFN_Vector1,id:19,x:31935,y:32422,varname:node_19,prsc:2,v1:0.5;n:type:ShaderForge.SFN_Abs,id:21,x:32286,y:32340,varname:node_21,prsc:2|IN-18-OUT;n:type:ShaderForge.SFN_Frac,id:22,x:31935,y:32288,varname:node_22,prsc:2|IN-24-OUT;n:type:ShaderForge.SFN_Panner,id:23,x:31597,y:32288,varname:node_23,prsc:2,spu:0.25,spv:0|UVIN-5169-UVOUT;n:type:ShaderForge.SFN_ComponentMask,id:24,x:31764,y:32288,varname:node_24,prsc:2,cc1:0,cc2:-1,cc3:-1,cc4:-1|IN-23-UVOUT;n:type:ShaderForge.SFN_Multiply,id:25,x:32461,y:32390,cmnt:Triangle Wave,varname:node_25,prsc:2|A-21-OUT,B-26-OUT;n:type:ShaderForge.SFN_Vector1,id:26,x:32286,y:32476,varname:node_26,prsc:2,v1:2;n:type:ShaderForge.SFN_Power,id:133,x:32665,y:32453,cmnt:Panning gradient,varname:node_133,prsc:2|VAL-25-OUT,EXP-8547-OUT;n:type:ShaderForge.SFN_NormalVector,id:139,x:32892,y:32957,prsc:2,pt:False;n:type:ShaderForge.SFN_Multiply,id:140,x:33119,y:32787,varname:node_140,prsc:2|A-1924-OUT,B-142-OUT,C-139-OUT;n:type:ShaderForge.SFN_ValueProperty,id:142,x:32892,y:32789,ptovrint:False,ptlb:Bulge Scale,ptin:_BulgeScale,varname:_BulgeScale,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:0.2;n:type:ShaderForge.SFN_Lerp,id:149,x:33119,y:32115,varname:node_149,prsc:2|A-151-RGB,B-8608-OUT,T-133-OUT;n:type:ShaderForge.SFN_Lerp,id:150,x:32892,y:32285,varname:node_150,prsc:2|A-267-RGB,B-265-OUT,T-133-OUT;n:type:ShaderForge.SFN_Tex2d,id:151,x:32892,y:31949,ptovrint:False,ptlb:Diffuse,ptin:_Diffuse,varname:_Diffuse,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:b66bceaf0cc0ace4e9bdc92f14bba709,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Multiply,id:166,x:33119,y:32619,cmnt:Glow,varname:node_166,prsc:2|A-168-RGB,B-8677-OUT,C-1924-OUT;n:type:ShaderForge.SFN_Color,id:168,x:32892,y:32453,ptovrint:False,ptlb:Glow Color,ptin:_GlowColor,varname:_GlowColor,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:1,c2:0.2391481,c3:0.1102941,c4:1;n:type:ShaderForge.SFN_Vector3,id:265,x:32665,y:32301,varname:node_265,prsc:2,v1:0,v2:0,v3:1;n:type:ShaderForge.SFN_Tex2d,id:267,x:32665,y:32133,ptovrint:False,ptlb:Normals,ptin:_Normals,varname:_Normals,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:bbab0a6f7bae9cf42bf057d8ee2755f6,ntxv:3,isnm:True;n:type:ShaderForge.SFN_Vector1,id:4921,x:33119,y:32283,varname:node_4921,prsc:2,v1:1;n:type:ShaderForge.SFN_Normalize,id:4935,x:33119,y:32451,varname:node_4935,prsc:2|IN-150-OUT;n:type:ShaderForge.SFN_ValueProperty,id:8547,x:32461,y:32537,ptovrint:False,ptlb:Bulge Shape,ptin:_BulgeShape,varname:_BulgeShape,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:5;n:type:ShaderForge.SFN_Vector1,id:8608,x:32892,y:32117,varname:node_8608,prsc:2,v1:0.1;n:type:ShaderForge.SFN_ValueProperty,id:8677,x:32892,y:32621,ptovrint:False,ptlb:Glow Intensity,ptin:_GlowIntensity,varname:_GlowIntensity,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:1.2;n:type:ShaderForge.SFN_TexCoord,id:5169,x:31434,y:32288,varname:node_5169,prsc:2,uv:0,uaff:False;n:type:ShaderForge.SFN_Relay,id:1924,x:32892,y:32697,varname:node_1924,prsc:2|IN-133-OUT;proporder:151-267-168-142-8547-8677;pass:END;sub:END;*/ +/*SF_DATA;ver:1.42;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:1,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:True,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:1,x:33430,y:32397,varname:node_1,prsc:2|diff-149-OUT,spec-4921-OUT,normal-4935-OUT,emission-166-OUT,transm-133-OUT,lwrap-133-OUT,voffset-140-OUT;n:type:ShaderForge.SFN_Subtract,id:18,x:32114,y:32340,varname:node_18,prsc:2|A-22-OUT,B-19-OUT;n:type:ShaderForge.SFN_Vector1,id:19,x:31935,y:32422,varname:node_19,prsc:2,v1:0.5;n:type:ShaderForge.SFN_Abs,id:21,x:32286,y:32340,varname:node_21,prsc:2|IN-18-OUT;n:type:ShaderForge.SFN_Frac,id:22,x:31935,y:32288,varname:node_22,prsc:2|IN-24-OUT;n:type:ShaderForge.SFN_Panner,id:23,x:31597,y:32288,varname:node_23,prsc:2,spu:0.25,spv:0|UVIN-5169-UVOUT;n:type:ShaderForge.SFN_ComponentMask,id:24,x:31764,y:32288,varname:node_24,prsc:2,cc1:0,cc2:-1,cc3:-1,cc4:-1|IN-23-UVOUT;n:type:ShaderForge.SFN_Multiply,id:25,x:32461,y:32390,cmnt:Triangle Wave,varname:node_25,prsc:2|A-21-OUT,B-26-OUT;n:type:ShaderForge.SFN_Vector1,id:26,x:32286,y:32476,varname:node_26,prsc:2,v1:2;n:type:ShaderForge.SFN_Power,id:133,x:32665,y:32453,cmnt:Panning gradient,varname:node_133,prsc:2|VAL-25-OUT,EXP-8547-OUT;n:type:ShaderForge.SFN_NormalVector,id:139,x:32892,y:32957,prsc:2,pt:False;n:type:ShaderForge.SFN_Multiply,id:140,x:33119,y:32787,varname:node_140,prsc:2|A-1924-OUT,B-142-OUT,C-139-OUT;n:type:ShaderForge.SFN_ValueProperty,id:142,x:32892,y:32789,ptovrint:False,ptlb:Bulge Scale,ptin:_BulgeScale,varname:_BulgeScale,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:0.2;n:type:ShaderForge.SFN_Lerp,id:149,x:33119,y:32115,varname:node_149,prsc:2|A-151-RGB,B-8608-OUT,T-133-OUT;n:type:ShaderForge.SFN_Lerp,id:150,x:32892,y:32285,varname:node_150,prsc:2|A-267-RGB,B-265-OUT,T-133-OUT;n:type:ShaderForge.SFN_Tex2d,id:151,x:32892,y:31949,ptovrint:False,ptlb:Diffuse,ptin:_Diffuse,varname:_Diffuse,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Multiply,id:166,x:33119,y:32619,cmnt:Glow,varname:node_166,prsc:2|A-168-RGB,B-8677-OUT,C-1924-OUT;n:type:ShaderForge.SFN_Color,id:168,x:32892,y:32453,ptovrint:False,ptlb:Glow Color,ptin:_GlowColor,varname:_GlowColor,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:1,c2:0.2391481,c3:0.1102941,c4:1;n:type:ShaderForge.SFN_Vector3,id:265,x:32665,y:32301,varname:node_265,prsc:2,v1:0,v2:0,v3:1;n:type:ShaderForge.SFN_Tex2d,id:267,x:32665,y:32133,ptovrint:False,ptlb:Normals,ptin:_Normals,varname:_Normals,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:3,isnm:True;n:type:ShaderForge.SFN_Vector1,id:4921,x:33119,y:32283,varname:node_4921,prsc:2,v1:1;n:type:ShaderForge.SFN_Normalize,id:4935,x:33119,y:32451,varname:node_4935,prsc:2|IN-150-OUT;n:type:ShaderForge.SFN_ValueProperty,id:8547,x:32461,y:32537,ptovrint:False,ptlb:Bulge Shape,ptin:_BulgeShape,varname:_BulgeShape,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:5;n:type:ShaderForge.SFN_Vector1,id:8608,x:32892,y:32117,varname:node_8608,prsc:2,v1:0.1;n:type:ShaderForge.SFN_ValueProperty,id:8677,x:32892,y:32621,ptovrint:False,ptlb:Glow Intensity,ptin:_GlowIntensity,varname:_GlowIntensity,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:1.2;n:type:ShaderForge.SFN_TexCoord,id:5169,x:31434,y:32288,varname:node_5169,prsc:2,uv:0,uaff:False;n:type:ShaderForge.SFN_Relay,id:1924,x:32892,y:32697,varname:node_1924,prsc:2|IN-133-OUT;proporder:151-267-168-142-8547-8677;pass:END;sub:END;*/ Shader "Shader Forge/Examples/Vertex Animation" { Properties { @@ -26,7 +27,9 @@ Shader "Shader Forge/Examples/Vertex Animation" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDBASE #define UNITY_PASS_FORWARDBASE + #endif //UNITY_PASS_FORWARDBASE #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #include "UnityCG.cginc" #include "AutoLight.cginc" @@ -38,7 +41,7 @@ Shader "Shader Forge/Examples/Vertex Animation" { #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform float _BulgeScale; uniform sampler2D _Diffuse; uniform float4 _Diffuse_ST; @@ -63,7 +66,7 @@ Shader "Shader Forge/Examples/Vertex Animation" { float3 normalDir : TEXCOORD4; float3 tangentDir : TEXCOORD5; float3 bitangentDir : TEXCOORD6; - LIGHTING_COORDS(7,8) + UNITY_LIGHTING_COORDS(7,8) UNITY_FOG_COORDS(9) #if defined(LIGHTMAP_ON) || defined(UNITY_SHOULD_SAMPLE_SH) float4 ambientOrLightmapUV : TEXCOORD10; @@ -85,15 +88,15 @@ Shader "Shader Forge/Examples/Vertex Animation" { o.normalDir = UnityObjectToWorldNormal(v.normal); o.tangentDir = normalize( mul( unity_ObjectToWorld, float4( v.tangent.xyz, 0.0 ) ).xyz ); o.bitangentDir = normalize(cross(o.normalDir, o.tangentDir) * v.tangent.w); - float4 node_3210 = _Time; - float node_133 = pow((abs((frac((o.uv0+node_3210.g*float2(0.25,0)).r)-0.5))*2.0),_BulgeShape); // Panning gradient + float4 node_6127 = _Time; + float node_133 = pow((abs((frac((o.uv0+node_6127.g*float2(0.25,0)).r)-0.5))*2.0),_BulgeShape); // Panning gradient float node_1924 = node_133; v.vertex.xyz += (node_1924*_BulgeScale*v.normal); o.posWorld = mul(unity_ObjectToWorld, v.vertex); float3 lightColor = _LightColor0.rgb; o.pos = UnityObjectToClipPos( v.vertex ); UNITY_TRANSFER_FOG(o,o.pos); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, v.texcoord1); return o; } float4 frag(VertexOutput i) : COLOR { @@ -101,8 +104,8 @@ Shader "Shader Forge/Examples/Vertex Animation" { float3x3 tangentTransform = float3x3( i.tangentDir, i.bitangentDir, i.normalDir); float3 viewDirection = normalize(_WorldSpaceCameraPos.xyz - i.posWorld.xyz); float3 _Normals_var = UnpackNormal(tex2D(_Normals,TRANSFORM_TEX(i.uv0, _Normals))); - float4 node_3210 = _Time; - float node_133 = pow((abs((frac((i.uv0+node_3210.g*float2(0.25,0)).r)-0.5))*2.0),_BulgeShape); // Panning gradient + float4 node_6127 = _Time; + float node_133 = pow((abs((frac((i.uv0+node_6127.g*float2(0.25,0)).r)-0.5))*2.0),_BulgeShape); // Panning gradient float3 normalLocal = normalize(lerp(_Normals_var.rgb,float3(0,0,1),node_133)); float3 normalDirection = normalize(mul( normalLocal, tangentTransform )); // Perturbed normals float3 viewReflectDirection = reflect( -viewDirection, normalDirection ); @@ -110,7 +113,7 @@ Shader "Shader Forge/Examples/Vertex Animation" { float3 lightColor = _LightColor0.rgb; float3 halfDirection = normalize(viewDirection+lightDirection); ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float3 attenColor = attenuation * _LightColor0.xyz; ///////// Gloss: float gloss = 0.5; @@ -185,7 +188,9 @@ Shader "Shader Forge/Examples/Vertex Animation" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDADD #define UNITY_PASS_FORWARDADD + #endif //UNITY_PASS_FORWARDADD #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #include "UnityCG.cginc" #include "AutoLight.cginc" @@ -197,7 +202,7 @@ Shader "Shader Forge/Examples/Vertex Animation" { #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform float _BulgeScale; uniform sampler2D _Diffuse; uniform float4 _Diffuse_ST; @@ -222,7 +227,7 @@ Shader "Shader Forge/Examples/Vertex Animation" { float3 normalDir : TEXCOORD4; float3 tangentDir : TEXCOORD5; float3 bitangentDir : TEXCOORD6; - LIGHTING_COORDS(7,8) + UNITY_LIGHTING_COORDS(7,8) UNITY_FOG_COORDS(9) }; VertexOutput vert (VertexInput v) { @@ -233,15 +238,15 @@ Shader "Shader Forge/Examples/Vertex Animation" { o.normalDir = UnityObjectToWorldNormal(v.normal); o.tangentDir = normalize( mul( unity_ObjectToWorld, float4( v.tangent.xyz, 0.0 ) ).xyz ); o.bitangentDir = normalize(cross(o.normalDir, o.tangentDir) * v.tangent.w); - float4 node_982 = _Time; - float node_133 = pow((abs((frac((o.uv0+node_982.g*float2(0.25,0)).r)-0.5))*2.0),_BulgeShape); // Panning gradient + float4 node_5107 = _Time; + float node_133 = pow((abs((frac((o.uv0+node_5107.g*float2(0.25,0)).r)-0.5))*2.0),_BulgeShape); // Panning gradient float node_1924 = node_133; v.vertex.xyz += (node_1924*_BulgeScale*v.normal); o.posWorld = mul(unity_ObjectToWorld, v.vertex); float3 lightColor = _LightColor0.rgb; o.pos = UnityObjectToClipPos( v.vertex ); UNITY_TRANSFER_FOG(o,o.pos); - TRANSFER_VERTEX_TO_FRAGMENT(o) + UNITY_TRANSFER_LIGHTING(o, v.texcoord1); return o; } float4 frag(VertexOutput i) : COLOR { @@ -249,15 +254,15 @@ Shader "Shader Forge/Examples/Vertex Animation" { float3x3 tangentTransform = float3x3( i.tangentDir, i.bitangentDir, i.normalDir); float3 viewDirection = normalize(_WorldSpaceCameraPos.xyz - i.posWorld.xyz); float3 _Normals_var = UnpackNormal(tex2D(_Normals,TRANSFORM_TEX(i.uv0, _Normals))); - float4 node_982 = _Time; - float node_133 = pow((abs((frac((i.uv0+node_982.g*float2(0.25,0)).r)-0.5))*2.0),_BulgeShape); // Panning gradient + float4 node_5107 = _Time; + float node_133 = pow((abs((frac((i.uv0+node_5107.g*float2(0.25,0)).r)-0.5))*2.0),_BulgeShape); // Panning gradient float3 normalLocal = normalize(lerp(_Normals_var.rgb,float3(0,0,1),node_133)); float3 normalDirection = normalize(mul( normalLocal, tangentTransform )); // Perturbed normals float3 lightDirection = normalize(lerp(_WorldSpaceLightPos0.xyz, _WorldSpaceLightPos0.xyz - i.posWorld.xyz,_WorldSpaceLightPos0.w)); float3 lightColor = _LightColor0.rgb; float3 halfDirection = normalize(viewDirection+lightDirection); ////// Lighting: - float attenuation = LIGHT_ATTENUATION(i); + UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); float3 attenColor = attenuation * _LightColor0.xyz; ///////// Gloss: float gloss = 0.5; @@ -299,7 +304,9 @@ Shader "Shader Forge/Examples/Vertex Animation" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_SHADOWCASTER #define UNITY_PASS_SHADOWCASTER + #endif //UNITY_PASS_SHADOWCASTER #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #include "UnityCG.cginc" #include "Lighting.cginc" @@ -311,7 +318,7 @@ Shader "Shader Forge/Examples/Vertex Animation" { #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform float _BulgeScale; uniform float _BulgeShape; @@ -336,8 +343,8 @@ Shader "Shader Forge/Examples/Vertex Animation" { o.uv1 = v.texcoord1; o.uv2 = v.texcoord2; o.normalDir = UnityObjectToWorldNormal(v.normal); - float4 node_8271 = _Time; - float node_133 = pow((abs((frac((o.uv0+node_8271.g*float2(0.25,0)).r)-0.5))*2.0),_BulgeShape); // Panning gradient + float4 node_8824 = _Time; + float node_133 = pow((abs((frac((o.uv0+node_8824.g*float2(0.25,0)).r)-0.5))*2.0),_BulgeShape); // Panning gradient float node_1924 = node_133; v.vertex.xyz += (node_1924*_BulgeScale*v.normal); o.posWorld = mul(unity_ObjectToWorld, v.vertex); @@ -363,7 +370,9 @@ Shader "Shader Forge/Examples/Vertex Animation" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_META #define UNITY_PASS_META 1 + #endif UNITY_PASS_META #define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) ) #include "UnityCG.cginc" #include "Lighting.cginc" @@ -376,7 +385,7 @@ Shader "Shader Forge/Examples/Vertex Animation" { #pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON #pragma multi_compile_fog - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform float _BulgeScale; uniform sampler2D _Diffuse; uniform float4 _Diffuse_ST; @@ -404,8 +413,8 @@ Shader "Shader Forge/Examples/Vertex Animation" { o.uv1 = v.texcoord1; o.uv2 = v.texcoord2; o.normalDir = UnityObjectToWorldNormal(v.normal); - float4 node_6924 = _Time; - float node_133 = pow((abs((frac((o.uv0+node_6924.g*float2(0.25,0)).r)-0.5))*2.0),_BulgeShape); // Panning gradient + float4 node_2929 = _Time; + float node_133 = pow((abs((frac((o.uv0+node_2929.g*float2(0.25,0)).r)-0.5))*2.0),_BulgeShape); // Panning gradient float node_1924 = node_133; v.vertex.xyz += (node_1924*_BulgeScale*v.normal); o.posWorld = mul(unity_ObjectToWorld, v.vertex); @@ -419,8 +428,8 @@ Shader "Shader Forge/Examples/Vertex Animation" { UnityMetaInput o; UNITY_INITIALIZE_OUTPUT( UnityMetaInput, o ); - float4 node_6924 = _Time; - float node_133 = pow((abs((frac((i.uv0+node_6924.g*float2(0.25,0)).r)-0.5))*2.0),_BulgeShape); // Panning gradient + float4 node_2929 = _Time; + float node_133 = pow((abs((frac((i.uv0+node_2929.g*float2(0.25,0)).r)-0.5))*2.0),_BulgeShape); // Panning gradient float node_1924 = node_133; o.Emission = (_GlowColor.rgb*_GlowIntensity*node_1924); diff --git a/Examples/VertexAnimation.shader.meta b/Examples/VertexAnimation.shader.meta new file mode 100644 index 00000000..326df0dc --- /dev/null +++ b/Examples/VertexAnimation.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6dedef75fd0484cdf8557f522ceaa8bf +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexAnimation_blue.mat b/Examples/VertexAnimation_blue.mat similarity index 96% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexAnimation_blue.mat rename to Examples/VertexAnimation_blue.mat index 008bf587..8bf59e31 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexAnimation_blue.mat +++ b/Examples/VertexAnimation_blue.mat @@ -1,97 +1,97 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: VertexAnimation_blue - m_Shader: {fileID: 4800000, guid: 6dedef75fd0484cdf8557f522ceaa8bf, type: 3} - m_ShaderKeywords: [] - m_CustomRenderQueue: -1 - m_SavedProperties: - serializedVersion: 2 - m_TexEnvs: - data: - first: - name: _Normals - second: - m_Texture: {fileID: 2800000, guid: bbab0a6f7bae9cf42bf057d8ee2755f6, type: 3} - m_Scale: {x: 16, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _Diffuse - second: - m_Texture: {fileID: 2800000, guid: b66bceaf0cc0ace4e9bdc92f14bba709, type: 3} - m_Scale: {x: 16, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _node72 - second: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _node85 - second: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _node108 - second: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _InnerNormals - second: - m_Texture: {fileID: 2800000, guid: cf20bfced7e912046a9ce991a4d775ec, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _node116 - second: - m_Texture: {fileID: 2800000, guid: 5fb7986dd6d0a8e4093ba82369dd6a4d, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _node117 - second: - m_Texture: {fileID: 2800000, guid: 5fb7986dd6d0a8e4093ba82369dd6a4d, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - data: - first: - name: _GlowIntensity - second: 8.51000023 - data: - first: - name: _BulgeShape - second: 5 - data: - first: - name: _BulgeScale - second: .200000003 - data: - first: - name: _Magnitude - second: .230769247 - data: - first: - name: _Sharpness - second: 2.61538434 - m_Colors: - data: - first: - name: _GlowColor - second: {r: .110294104, g: .410953432, b: 1, a: 1} +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: VertexAnimation_blue + m_Shader: {fileID: 4800000, guid: 6dedef75fd0484cdf8557f522ceaa8bf, type: 3} + m_ShaderKeywords: [] + m_CustomRenderQueue: -1 + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _Normals + second: + m_Texture: {fileID: 2800000, guid: bbab0a6f7bae9cf42bf057d8ee2755f6, type: 3} + m_Scale: {x: 16, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _Diffuse + second: + m_Texture: {fileID: 2800000, guid: b66bceaf0cc0ace4e9bdc92f14bba709, type: 3} + m_Scale: {x: 16, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _node72 + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _node85 + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _node108 + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _InnerNormals + second: + m_Texture: {fileID: 2800000, guid: cf20bfced7e912046a9ce991a4d775ec, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _node116 + second: + m_Texture: {fileID: 2800000, guid: 5fb7986dd6d0a8e4093ba82369dd6a4d, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _node117 + second: + m_Texture: {fileID: 2800000, guid: 5fb7986dd6d0a8e4093ba82369dd6a4d, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _GlowIntensity + second: 8.51000023 + data: + first: + name: _BulgeShape + second: 5 + data: + first: + name: _BulgeScale + second: .200000003 + data: + first: + name: _Magnitude + second: .230769247 + data: + first: + name: _Sharpness + second: 2.61538434 + m_Colors: + data: + first: + name: _GlowColor + second: {r: .110294104, g: .410953432, b: 1, a: 1} diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexAnimation_blue.mat.meta b/Examples/VertexAnimation_blue.mat.meta similarity index 95% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexAnimation_blue.mat.meta rename to Examples/VertexAnimation_blue.mat.meta index 51f81369..1d72d0d0 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexAnimation_blue.mat.meta +++ b/Examples/VertexAnimation_blue.mat.meta @@ -1,4 +1,4 @@ -fileFormatVersion: 2 -guid: 4a36ae71b48f14d6fb2eae31da682a32 -NativeFormatImporter: - userData: +fileFormatVersion: 2 +guid: 4a36ae71b48f14d6fb2eae31da682a32 +NativeFormatImporter: + userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexColorRounding.mat b/Examples/VertexColorRounding.mat similarity index 96% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexColorRounding.mat rename to Examples/VertexColorRounding.mat index 74170e8e..def5ee64 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexColorRounding.mat +++ b/Examples/VertexColorRounding.mat @@ -1,21 +1,21 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: VertexColorRounding - m_Shader: {fileID: 4800000, guid: 49227bca0885f49f9898c7a9ba353bc1, type: 3} - m_ShaderKeywords: [] - m_CustomRenderQueue: -1 - m_SavedProperties: - serializedVersion: 2 - m_TexEnvs: {} - m_Floats: - data: - first: - name: _Divisions - second: .523076952 - m_Colors: {} +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: VertexColorRounding + m_Shader: {fileID: 4800000, guid: 49227bca0885f49f9898c7a9ba353bc1, type: 3} + m_ShaderKeywords: [] + m_CustomRenderQueue: -1 + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: {} + m_Floats: + data: + first: + name: _Divisions + second: .523076952 + m_Colors: {} diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexColorRounding.mat.meta b/Examples/VertexColorRounding.mat.meta similarity index 95% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexColorRounding.mat.meta rename to Examples/VertexColorRounding.mat.meta index 5e4ddc07..7eda021f 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexColorRounding.mat.meta +++ b/Examples/VertexColorRounding.mat.meta @@ -1,4 +1,4 @@ -fileFormatVersion: 2 -guid: 5d9b849895144ea4983f3b1f36bbacae -NativeFormatImporter: - userData: +fileFormatVersion: 2 +guid: 5d9b849895144ea4983f3b1f36bbacae +NativeFormatImporter: + userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexColorRounding.shader b/Examples/VertexColorRounding.shader similarity index 91% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexColorRounding.shader rename to Examples/VertexColorRounding.shader index 9e1394ee..5c311680 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexColorRounding.shader +++ b/Examples/VertexColorRounding.shader @@ -1,7 +1,8 @@ -// Shader created with Shader Forge v1.38 +// Shader created with Shader Forge v1.42 // Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/ +// Enhanced by Antoine Guillon / Arkham Development - http://www.arkham-development.com/ // Note: Manually altering this data may prevent you from opening it in Shader Forge -/*SF_DATA;ver:1.38;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:0,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:False,mssp:True,bkdf:True,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:False,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:0,x:34043,y:32815,varname:node_0,prsc:2|emission-585-OUT;n:type:ShaderForge.SFN_VertexColor,id:4,x:33627,y:32845,varname:node_4,prsc:2;n:type:ShaderForge.SFN_Slider,id:38,x:33095,y:32967,ptovrint:False,ptlb:Divisions,ptin:_Divisions,varname:_Divisions,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.5639098,max:1;n:type:ShaderForge.SFN_Power,id:42,x:33443,y:32990,varname:node_42,prsc:2|VAL-38-OUT,EXP-44-OUT;n:type:ShaderForge.SFN_Vector1,id:44,x:33252,y:33034,varname:node_44,prsc:2,v1:2;n:type:ShaderForge.SFN_ConstantLerp,id:137,x:33627,y:32990,varname:node_137,prsc:2,a:0.5,b:12|IN-42-OUT;n:type:ShaderForge.SFN_Posterize,id:585,x:33845,y:32915,varname:node_585,prsc:2|IN-4-RGB,STPS-137-OUT;proporder:38;pass:END;sub:END;*/ +/*SF_DATA;ver:1.42;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:0,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:False,mssp:True,bkdf:True,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:False,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:0,x:34043,y:32815,varname:node_0,prsc:2|emission-585-OUT;n:type:ShaderForge.SFN_VertexColor,id:4,x:33627,y:32845,varname:node_4,prsc:2;n:type:ShaderForge.SFN_Slider,id:38,x:33095,y:32967,ptovrint:False,ptlb:Divisions,ptin:_Divisions,varname:_Divisions,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.5639098,max:1;n:type:ShaderForge.SFN_Power,id:42,x:33443,y:32990,varname:node_42,prsc:2|VAL-38-OUT,EXP-44-OUT;n:type:ShaderForge.SFN_Vector1,id:44,x:33252,y:33034,varname:node_44,prsc:2,v1:2;n:type:ShaderForge.SFN_ConstantLerp,id:137,x:33627,y:32990,varname:node_137,prsc:2,a:0.5,b:12|IN-42-OUT;n:type:ShaderForge.SFN_Posterize,id:585,x:33845,y:32915,varname:node_585,prsc:2|IN-4-RGB,STPS-137-OUT;proporder:38;pass:END;sub:END;*/ Shader "Shader Forge/Examples/Vertex Color Rounding" { Properties { @@ -21,10 +22,12 @@ Shader "Shader Forge/Examples/Vertex Color Rounding" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_FORWARDBASE #define UNITY_PASS_FORWARDBASE + #endif //UNITY_PASS_FORWARDBASE #include "UnityCG.cginc" #pragma multi_compile_fwdbase_fullshadows - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform float _Divisions; struct VertexInput { @@ -61,12 +64,14 @@ Shader "Shader Forge/Examples/Vertex Color Rounding" { CGPROGRAM #pragma vertex vert #pragma fragment frag + #ifndef UNITY_PASS_META #define UNITY_PASS_META 1 + #endif UNITY_PASS_META #include "UnityCG.cginc" #include "UnityMetaPass.cginc" #pragma fragmentoption ARB_precision_hint_fastest #pragma multi_compile_shadowcaster - #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu switch vulkan #pragma target 3.0 uniform float _Divisions; struct VertexInput { diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexColorRounding.shader.meta b/Examples/VertexColorRounding.shader.meta similarity index 75% rename from Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexColorRounding.shader.meta rename to Examples/VertexColorRounding.shader.meta index 8ad756b6..72ea7569 100644 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexColorRounding.shader.meta +++ b/Examples/VertexColorRounding.shader.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 guid: 49227bca0885f49f9898c7a9ba353bc1 -timeCreated: 1503327570 -licenseType: Pro ShaderImporter: + externalObjects: {} defaultTextures: [] + nonModifiableTextures: [] userData: assetBundleName: assetBundleVariant: diff --git a/README.md.meta b/README.md.meta new file mode 100644 index 00000000..4b3570db --- /dev/null +++ b/README.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9ef6b369f8c40f34fa4a3da003e678b1 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Readme.txt b/Readme.txt similarity index 96% rename from Shader Forge/Assets/ShaderForge/Readme.txt rename to Readme.txt index 86c66ba4..aa8ea7a2 100644 --- a/Shader Forge/Assets/ShaderForge/Readme.txt +++ b/Readme.txt @@ -1,7 +1,6 @@  README - SHADER FORGE - Contact: -------- Keep in mind that Shader Forge has been discontinued! @@ -14,6 +13,9 @@ Website: -------- http://www.acegikmo.com/shaderforge/ (Includes documentation, tutorials, links to forum threads, and more!) +Enhancements +------------ +This version is enhanced by Arkham Development - http://www.arkham-development.com/ Installation: ------------- diff --git a/Shader Forge/Assets/ShaderForge/Readme.txt.meta b/Readme.txt.meta similarity index 100% rename from Shader Forge/Assets/ShaderForge/Readme.txt.meta rename to Readme.txt.meta diff --git a/Shader Forge/Assets/ShaderForge.meta b/Shader Forge/Assets/ShaderForge.meta deleted file mode 100644 index 90fca34e..00000000 --- a/Shader Forge/Assets/ShaderForge.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 2d430c5bfdc804d0abab4ea9f96aa950 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/node_3d_data_mask.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/node_3d_data_mask.png.meta deleted file mode 100644 index 88f71250..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/node_3d_data_mask.png.meta +++ /dev/null @@ -1,47 +0,0 @@ -fileFormatVersion: 2 -guid: 93411440cabbd493e9d9b949ba3c82fd -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_bitangent.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_bitangent.png.meta deleted file mode 100644 index ff9813e3..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_bitangent.png.meta +++ /dev/null @@ -1,47 +0,0 @@ -fileFormatVersion: 2 -guid: 51aa11ae9f6e54c76b49ebb6f6bf55a3 -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 1 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_depth.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_depth.png.meta deleted file mode 100644 index 3053d41c..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_depth.png.meta +++ /dev/null @@ -1,52 +0,0 @@ -fileFormatVersion: 2 -guid: 9a06ccda88cf08040b15236734546bba -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 1 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_fragmentposition.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_fragmentposition.png.meta deleted file mode 100644 index 602faeae..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_fragmentposition.png.meta +++ /dev/null @@ -1,47 +0,0 @@ -fileFormatVersion: 2 -guid: 335d39ac920954c01ac193e693291d4a -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 1 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_fresnel.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_fresnel.png.meta deleted file mode 100644 index 8e3c8567..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_fresnel.png.meta +++ /dev/null @@ -1,47 +0,0 @@ -fileFormatVersion: 2 -guid: 5de0eafe0c281495b8272d9a1d7c3ea8 -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 1 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_halfvector.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_halfvector.png.meta deleted file mode 100644 index 76d68986..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_halfvector.png.meta +++ /dev/null @@ -1,47 +0,0 @@ -fileFormatVersion: 2 -guid: 7c62f563fecb4463caea085e4c88d754 -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 1 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_lightattenuation.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_lightattenuation.png.meta deleted file mode 100644 index bf2aa3a4..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_lightattenuation.png.meta +++ /dev/null @@ -1,47 +0,0 @@ -fileFormatVersion: 2 -guid: ba371855252614506947b2f28f1d8f17 -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 1 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_lightcolor.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_lightcolor.png.meta deleted file mode 100644 index c9bf1111..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_lightcolor.png.meta +++ /dev/null @@ -1,47 +0,0 @@ -fileFormatVersion: 2 -guid: 67173129de388421e8f4932415108e68 -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 1 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_lightvector.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_lightvector.png.meta deleted file mode 100644 index 5b574c5a..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_lightvector.png.meta +++ /dev/null @@ -1,47 +0,0 @@ -fileFormatVersion: 2 -guid: 8e12b01a3c4a545ecb549a9b3c7670cd -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 1 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_normalvector.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_normalvector.png.meta deleted file mode 100644 index 09880fb4..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_normalvector.png.meta +++ /dev/null @@ -1,47 +0,0 @@ -fileFormatVersion: 2 -guid: 398df227343444572afe5e225ddd06aa -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 1 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_normalvector_2.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_normalvector_2.png.meta deleted file mode 100644 index 3a0e07d8..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_normalvector_2.png.meta +++ /dev/null @@ -1,47 +0,0 @@ -fileFormatVersion: 2 -guid: 630f164e44edb4d848a0fc4d010cfb42 -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 1 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_tangent.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_tangent.png.meta deleted file mode 100644 index 772abaa6..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_tangent.png.meta +++ /dev/null @@ -1,47 +0,0 @@ -fileFormatVersion: 2 -guid: 82f57e53a2ef4405cbf39da50cebd6e4 -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 1 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_viewreflectionvector.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_viewreflectionvector.png.meta deleted file mode 100644 index 7dedb5fc..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_viewreflectionvector.png.meta +++ /dev/null @@ -1,47 +0,0 @@ -fileFormatVersion: 2 -guid: 877bc628b69844ba081a63095156a6f1 -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 1 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_viewvector.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_viewvector.png.meta deleted file mode 100644 index 6a28719d..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/Data/sfn_viewvector.png.meta +++ /dev/null @@ -1,47 +0,0 @@ -fileFormatVersion: 2 -guid: 33a9188cb13b74e7493476e4060bcb32 -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 1 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_ambientlight.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_ambientlight.png.meta deleted file mode 100644 index 152e6378..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_ambientlight.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 87729cd9b749b43458e1874dcc21ed05 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_bitangent.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_bitangent.png.meta deleted file mode 100644 index 1c795d3f..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_bitangent.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 4be47db7f177b4f479a6a181cbeb169d -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_depth.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_depth.png.meta deleted file mode 100644 index 9398ac13..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_depth.png.meta +++ /dev/null @@ -1,52 +0,0 @@ -fileFormatVersion: 2 -guid: 0522d757f9985e94c97df1ae1b76568f -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_e.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_e.png.meta deleted file mode 100644 index ce7ec734..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_e.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: d3516e6f742ca7b4fba3134e831ae5ba -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_facesign.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_facesign.png.meta deleted file mode 100644 index 89d76017..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_facesign.png.meta +++ /dev/null @@ -1,55 +0,0 @@ -fileFormatVersion: 2 -guid: e3a845ef959fb8c48af98819ec486cfc -timeCreated: 1439891827 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 1 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_facesign_2.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_facesign_2.png.meta deleted file mode 100644 index 46d3e28f..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_facesign_2.png.meta +++ /dev/null @@ -1,55 +0,0 @@ -fileFormatVersion: 2 -guid: 717b713fc8dbc194daf895e1e7a0521f -timeCreated: 1439891827 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 1 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_final.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_final.png.meta deleted file mode 100644 index fbca9fbc..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_final.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 356d9441fe4ee4b3fa2897afb2dca0f6 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_fogcolor.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_fogcolor.png.meta deleted file mode 100644 index bc155b84..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_fogcolor.png.meta +++ /dev/null @@ -1,52 +0,0 @@ -fileFormatVersion: 2 -guid: 70a0601c59b745d4288eb39ee069ab21 -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 1 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_fogcolor_2.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_fogcolor_2.png.meta deleted file mode 100644 index 0fa53825..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_fogcolor_2.png.meta +++ /dev/null @@ -1,52 +0,0 @@ -fileFormatVersion: 2 -guid: 421c05cb33c35724db61a30e3a20003b -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 1 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_fragmentposition.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_fragmentposition.png.meta deleted file mode 100644 index 25922baf..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_fragmentposition.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: ae1f4f08792e1b44aaadf1288ed261a1 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_halfvector.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_halfvector.png.meta deleted file mode 100644 index f56a4db5..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_halfvector.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 703379c961c27714cb7175c0e86d4557 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_lightattenuation.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_lightattenuation.png.meta deleted file mode 100644 index d242dc65..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_lightattenuation.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: e0a571b2f1a21d446a1afcab341ccf2c -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_lightcolor.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_lightcolor.png.meta deleted file mode 100644 index 6ded8c69..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_lightcolor.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 12f315fc33aa349479e27e765a0cd7a8 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_lightposition.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_lightposition.png.meta deleted file mode 100644 index 6cc328e2..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_lightposition.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 7dfbcfcc4f146004b82d3c807613c4e3 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_lightvector.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_lightvector.png.meta deleted file mode 100644 index 53453cb2..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_lightvector.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 456dbe7fcd6ef43408cca1f853a61aac -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_normalvector.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_normalvector.png.meta deleted file mode 100644 index dce43447..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_normalvector.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 588b8166bb671b440810e2f1d15bc3db -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_normalvector_2.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_normalvector_2.png.meta deleted file mode 100644 index e997d759..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_normalvector_2.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: eb7f231caa33910479965b1e625cc13d -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_objectposition.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_objectposition.png.meta deleted file mode 100644 index fb42d0cd..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_objectposition.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: fde2ac1b0d8c67241a874aadfc933e33 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_objectscale.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_objectscale.png.meta deleted file mode 100644 index cd7415f5..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_objectscale.png.meta +++ /dev/null @@ -1,52 +0,0 @@ -fileFormatVersion: 2 -guid: 288c45822f3d8f549b95d7be2e3676d5 -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_phi.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_phi.png.meta deleted file mode 100644 index 9897b8e9..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_phi.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: e15c69e8d7d60e444be990c1972eb59c -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_pi.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_pi.png.meta deleted file mode 100644 index 7cf95a92..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_pi.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 313b48aa0593cc741802546fa5a1919e -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_projectionparameters.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_projectionparameters.png.meta deleted file mode 100644 index c496b917..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_projectionparameters.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: a189481e94c05ea4c982d13fe59ff9ac -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_root2.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_root2.png.meta deleted file mode 100644 index d8af6f70..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_root2.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 5a296b6d09babdd40b2b76ca29a97179 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_screenparameters.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_screenparameters.png.meta deleted file mode 100644 index fc2595ae..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_screenparameters.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: a7121136193cdc44eb2411196d54d1fd -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_screenpos.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_screenpos.png.meta deleted file mode 100644 index 77e9ec61..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_screenpos.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 37f2601622a180946af899626dd1df67 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_screenpos_2.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_screenpos_2.png.meta deleted file mode 100644 index e80a3aac..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_screenpos_2.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 8132d6b257d4a9b49b062ad21bdc3688 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_screenpos_3.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_screenpos_3.png.meta deleted file mode 100644 index 848e3a12..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_screenpos_3.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: e079001c5493e4784807dda76fe30aeb -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_tangent.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_tangent.png.meta deleted file mode 100644 index c9ff8014..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_tangent.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: ecc4a0e9f929f6743b4aa623ad37a014 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_tau.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_tau.png.meta deleted file mode 100644 index b67ba412..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_tau.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: e31a63f585d176646a3a20814a548c71 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_time.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_time.png.meta deleted file mode 100644 index f8a18df2..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_time.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 97e13bc521d7b4dada406599941bef7a -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_vertexcolor.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_vertexcolor.png.meta deleted file mode 100644 index ddb59ca1..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_vertexcolor.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: d97533a3ae000c74e9189e8f6a4be215 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_viewposition.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_viewposition.png.meta deleted file mode 100644 index 7914f88d..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_viewposition.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 2dec88f8c76aae1418330680aa539cf6 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: -1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_viewreflectionvector.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_viewreflectionvector.png.meta deleted file mode 100644 index 34745b4b..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_viewreflectionvector.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: fbcf50a1249763e499e2c1b6ecd03e21 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_viewvector.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_viewvector.png.meta deleted file mode 100644 index cc2f4ab9..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/Nodes/sfn_viewvector.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 9b5bb8e552f448947a012c01ec08e6ff -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/chk.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/chk.png.meta deleted file mode 100644 index 984ca0a6..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/chk.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 72f052122502345f1b365b37455a8e3d -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 256 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/chk_light.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/chk_light.png.meta deleted file mode 100644 index 37c007a2..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/chk_light.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 6f03a95036ea64277b6dc1bbc2f6eba6 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 256 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/handle_drag.tga.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/handle_drag.tga.meta deleted file mode 100644 index 2eeda33f..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/handle_drag.tga.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: a1247bf5b8569364aa4c9c862f598ccf -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/icon.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/icon.png.meta deleted file mode 100644 index 1c7e4910..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/icon.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 7aae165d391b84eddbed5fd0ec9e6460 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/icon_light.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/icon_light.png.meta deleted file mode 100644 index 945fe4ff..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/icon_light.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: a67aa329325af46d4a9c18d7ad10dc51 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 1024 - textureSettings: - filterMode: 1 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/icon_normal.tga.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/icon_normal.tga.meta deleted file mode 100644 index 9b10f24e..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/icon_normal.tga.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 8689fac7742124e4ebd4c379ee337bcc -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 1 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_frag.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_frag.png.meta deleted file mode 100644 index e0295aef..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_frag.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 46671ce9b6548d6418bf2b00bd46cd33 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_frag_light.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_frag_light.png.meta deleted file mode 100644 index d4f71ccf..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_frag_light.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 41a2cdabd76d17d4b8b0692eca20eeda -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_frag_tex.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_frag_tex.png.meta deleted file mode 100644 index 97ff775e..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_frag_tex.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 6cffc3611ab437f488a7fa36ae9f03c0 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_frag_tex_light.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_frag_tex_light.png.meta deleted file mode 100644 index 39358e85..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_frag_tex_light.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: f03e39f9e5523ac4a8d46e573c6b8ef8 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_vert.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_vert.png.meta deleted file mode 100644 index 2f457569..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_vert.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 5f0ae3fa9bd0d9b48b89c99f2e6b8c81 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_vert_light.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_vert_light.png.meta deleted file mode 100644 index 3db4ca0b..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_vert_light.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: e483f81feb62ee941933401d86b3dbb4 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_vert_tex.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_vert_tex.png.meta deleted file mode 100644 index ca9c5844..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_vert_tex.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 2dc1af4131132724ea03a4dd4e88b052 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_vert_tex_light.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_vert_tex_light.png.meta deleted file mode 100644 index cbb1e043..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/inst_vert_tex_light.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 5bba6f880887cc14d9dffee3b43bfae7 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: -1 - aniso: 0 - mipBias: -1 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/logo.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/logo.png.meta deleted file mode 100644 index d0dec2e5..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/logo.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: b116bf56b843a432b96dc6e7e0788e93 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 256 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/logo_light.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/logo_light.png.meta deleted file mode 100644 index bcc08043..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/logo_light.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 2146b2a6a9c514e0db29ae39a34c1e21 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 256 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_custom.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_custom.png.meta deleted file mode 100644 index becc3cd0..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_custom.png.meta +++ /dev/null @@ -1,55 +0,0 @@ -fileFormatVersion: 2 -guid: 4f6212f398f26bb479b2cf77f48ecbd0 -timeCreated: 1432981781 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 1 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_highlight.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_highlight.png.meta deleted file mode 100644 index fb33f889..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_highlight.png.meta +++ /dev/null @@ -1,55 +0,0 @@ -fileFormatVersion: 2 -guid: c26c8eab4a46ffc408822bd6f77b0a6e -timeCreated: 1432989587 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 1 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_litbasic.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_litbasic.png.meta deleted file mode 100644 index 20787ac6..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_litbasic.png.meta +++ /dev/null @@ -1,55 +0,0 @@ -fileFormatVersion: 2 -guid: 69e1494bf9c84a24abf1253a95a6652d -timeCreated: 1432980361 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 1 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_litpbr.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_litpbr.png.meta deleted file mode 100644 index 9c847df8..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_litpbr.png.meta +++ /dev/null @@ -1,55 +0,0 @@ -fileFormatVersion: 2 -guid: a4259037a0bba7b41884b33f9653b20e -timeCreated: 1432979897 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 1 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particleadditive.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particleadditive.png.meta deleted file mode 100644 index 085ccffa..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particleadditive.png.meta +++ /dev/null @@ -1,56 +0,0 @@ -fileFormatVersion: 2 -guid: 6841270787423ac4c9ee0a3cf1cc768d -timeCreated: 1432981781 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 0 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particleadditive_light.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particleadditive_light.png.meta deleted file mode 100644 index e05eef9c..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particleadditive_light.png.meta +++ /dev/null @@ -1,56 +0,0 @@ -fileFormatVersion: 2 -guid: 8fcd9b707db9dbf40933b1b4f346a767 -timeCreated: 1433072426 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 0 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particlealphablended.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particlealphablended.png.meta deleted file mode 100644 index 03598841..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particlealphablended.png.meta +++ /dev/null @@ -1,56 +0,0 @@ -fileFormatVersion: 2 -guid: b3d536f9af52ecd4082d779248bddd6e -timeCreated: 1433000243 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 0 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particlealphablended_light.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particlealphablended_light.png.meta deleted file mode 100644 index d5ca77fe..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particlealphablended_light.png.meta +++ /dev/null @@ -1,56 +0,0 @@ -fileFormatVersion: 2 -guid: a9f2c075e122fa345a03d5fae7aa2540 -timeCreated: 1433072426 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 0 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particlemultiplicative.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particlemultiplicative.png.meta deleted file mode 100644 index 1814b079..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particlemultiplicative.png.meta +++ /dev/null @@ -1,56 +0,0 @@ -fileFormatVersion: 2 -guid: 5c1c304737254284f95f0dc98043b4f3 -timeCreated: 1433000243 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 0 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particlemultiplicative_light.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particlemultiplicative_light.png.meta deleted file mode 100644 index 077cb53d..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_particlemultiplicative_light.png.meta +++ /dev/null @@ -1,56 +0,0 @@ -fileFormatVersion: 2 -guid: 5fbec0f866d46b24bb9dfdfe5a4c4095 -timeCreated: 1433072426 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 0 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_posteffect.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_posteffect.png.meta deleted file mode 100644 index 4901d5f0..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_posteffect.png.meta +++ /dev/null @@ -1,56 +0,0 @@ -fileFormatVersion: 2 -guid: da3c81f5610b82f439e06f9fab488b50 -timeCreated: 1442165307 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 0 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_sky.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_sky.png.meta deleted file mode 100644 index d6ec6b13..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_sky.png.meta +++ /dev/null @@ -1,55 +0,0 @@ -fileFormatVersion: 2 -guid: 0339e33cb7e5c1946a81626984c81eec -timeCreated: 1432980864 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 1 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_sprite.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_sprite.png.meta deleted file mode 100644 index a62c23d8..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_sprite.png.meta +++ /dev/null @@ -1,55 +0,0 @@ -fileFormatVersion: 2 -guid: 32c295d87941a4142a911db9e6fbd446 -timeCreated: 1432982045 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 1 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_unlit.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_unlit.png.meta deleted file mode 100644 index e35ee257..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/preset_unlit.png.meta +++ /dev/null @@ -1,55 +0,0 @@ -fileFormatVersion: 2 -guid: ab0dd09bfc3eff2449047b44ac02f7ec -timeCreated: 1432980503 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: 2 - aniso: 0 - mipBias: -1 - wrapMode: 1 - nPOTScale: 1 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/screenshot_icon.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/screenshot_icon.png.meta deleted file mode 100644 index a75da36f..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/screenshot_icon.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 881bacfcd03154f1c9bdc3c7eb0aee22 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/screenshot_icon_light.png.meta b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/screenshot_icon_light.png.meta deleted file mode 100644 index fbea42b3..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Interface/screenshot_icon_light.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 50e58e15548274d45bcad6ce2348edd3 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetSky.shader b/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetSky.shader deleted file mode 100644 index 8663cd60..00000000 --- a/Shader Forge/Assets/ShaderForge/Editor/InternalResources/Shader Presets/PresetSky.shader +++ /dev/null @@ -1,74 +0,0 @@ -// Shader created with Shader Forge v1.35 -// Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/ -// Note: Manually altering this data may prevent you from opening it in Shader Forge -/*SF_DATA;ver:1.35;sub:START;pass:START;ps:flbk:,iptp:2,cusa:False,bamd:0,lico:0,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:False,aust:False,igpj:True,qofs:0,qpre:0,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:True,fnfb:True;n:type:ShaderForge.SFN_Final,id:3554,x:32480,y:32959,varname:node_3554,prsc:2|emission-7568-OUT;n:type:ShaderForge.SFN_Color,id:8306,x:31772,y:32686,ptovrint:False,ptlb:Sky Color,ptin:_SkyColor,varname:node_8306,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.02553246,c2:0.03709318,c3:0.1827586,c4:1;n:type:ShaderForge.SFN_ViewVector,id:2265,x:31161,y:32872,varname:node_2265,prsc:2;n:type:ShaderForge.SFN_Dot,id:7606,x:31418,y:32953,varname:node_7606,prsc:2,dt:1|A-2265-OUT,B-3211-OUT;n:type:ShaderForge.SFN_Vector3,id:3211,x:31161,y:32997,varname:node_3211,prsc:2,v1:0,v2:-1,v3:0;n:type:ShaderForge.SFN_Color,id:3839,x:31772,y:32848,ptovrint:False,ptlb:Horizon Color,ptin:_HorizonColor,varname:_GroundColor_copy,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.06617647,c2:0.5468207,c3:1,c4:1;n:type:ShaderForge.SFN_Power,id:4050,x:31772,y:32995,varname:node_4050,prsc:2|VAL-6125-OUT,EXP-7609-OUT;n:type:ShaderForge.SFN_Vector1,id:7609,x:31587,y:33095,varname:node_7609,prsc:2,v1:8;n:type:ShaderForge.SFN_OneMinus,id:6125,x:31587,y:32953,varname:node_6125,prsc:2|IN-7606-OUT;n:type:ShaderForge.SFN_Lerp,id:2737,x:31999,y:32869,cmnt:Sky,varname:node_2737,prsc:2|A-8306-RGB,B-3839-RGB,T-4050-OUT;n:type:ShaderForge.SFN_LightVector,id:3559,x:30723,y:33040,cmnt:Auto-adapts to your directional light,varname:node_3559,prsc:2;n:type:ShaderForge.SFN_Dot,id:1472,x:31082,y:33150,cmnt:Linear falloff to sun angle,varname:node_1472,prsc:2,dt:1|A-8269-OUT,B-8750-OUT;n:type:ShaderForge.SFN_ViewVector,id:8750,x:30895,y:33160,varname:node_8750,prsc:2;n:type:ShaderForge.SFN_Add,id:7568,x:32262,y:33059,cmnt:Sky plus Sun,varname:node_7568,prsc:2|A-2737-OUT,B-5855-OUT;n:type:ShaderForge.SFN_Negate,id:8269,x:30895,y:33040,varname:node_8269,prsc:2|IN-3559-OUT;n:type:ShaderForge.SFN_RemapRangeAdvanced,id:3001,x:31383,y:33282,cmnt:Modify radius of falloff,varname:node_3001,prsc:2|IN-1472-OUT,IMIN-1476-OUT,IMAX-1574-OUT,OMIN-9430-OUT,OMAX-6262-OUT;n:type:ShaderForge.SFN_Slider,id:2435,x:30320,y:33466,ptovrint:False,ptlb:Sun Radius B,ptin:_SunRadiusB,varname:node_2435,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.1,max:0.1;n:type:ShaderForge.SFN_Slider,id:3144,x:30320,y:33360,ptovrint:False,ptlb:Sun Radius A,ptin:_SunRadiusA,varname:_SunOuterRadius_copy,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0,max:0.1;n:type:ShaderForge.SFN_Vector1,id:9430,x:31082,y:33610,varname:node_9430,prsc:2,v1:1;n:type:ShaderForge.SFN_Vector1,id:6262,x:31082,y:33668,varname:node_6262,prsc:2,v1:0;n:type:ShaderForge.SFN_Clamp01,id:7022,x:31556,y:33282,varname:node_7022,prsc:2|IN-3001-OUT;n:type:ShaderForge.SFN_OneMinus,id:1574,x:31082,y:33464,varname:node_1574,prsc:2|IN-8889-OUT;n:type:ShaderForge.SFN_OneMinus,id:1476,x:31082,y:33315,varname:node_1476,prsc:2|IN-3432-OUT;n:type:ShaderForge.SFN_Multiply,id:8889,x:30893,y:33464,varname:node_8889,prsc:2|A-9367-OUT,B-9367-OUT;n:type:ShaderForge.SFN_Multiply,id:3432,x:30893,y:33315,varname:node_3432,prsc:2|A-7933-OUT,B-7933-OUT;n:type:ShaderForge.SFN_Max,id:9367,x:30681,y:33464,varname:node_9367,prsc:2|A-3144-OUT,B-2435-OUT;n:type:ShaderForge.SFN_Min,id:7933,x:30681,y:33315,varname:node_7933,prsc:2|A-3144-OUT,B-2435-OUT;n:type:ShaderForge.SFN_Power,id:754,x:31772,y:33336,varname:node_754,prsc:2|VAL-7022-OUT,EXP-5929-OUT;n:type:ShaderForge.SFN_Vector1,id:5929,x:31556,y:33412,varname:node_5929,prsc:2,v1:5;n:type:ShaderForge.SFN_Multiply,id:5855,x:31957,y:33257,cmnt:Sun,varname:node_5855,prsc:2|A-2359-RGB,B-754-OUT,C-7055-OUT;n:type:ShaderForge.SFN_ValueProperty,id:7055,x:31772,y:33484,ptovrint:False,ptlb:Sun Intensity,ptin:_SunIntensity,varname:node_7055,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:2;n:type:ShaderForge.SFN_LightColor,id:2359,x:31772,y:33210,cmnt:Get color from directional light,varname:node_2359,prsc:2;proporder:8306-3839-2435-3144-7055;pass:END;sub:END;*/ - -Shader "Hidden/Shader Forge/PresetSky" { - Properties { - _SkyColor ("Sky Color", Color) = (0.02553246,0.03709318,0.1827586,1) - _HorizonColor ("Horizon Color", Color) = (0.06617647,0.5468207,1,1) - _SunRadiusB ("Sun Radius B", Range(0, 0.1)) = 0.1 - _SunRadiusA ("Sun Radius A", Range(0, 0.1)) = 0 - _SunIntensity ("Sun Intensity", Float ) = 2 - } - SubShader { - Tags { - "IgnoreProjector"="True" - "Queue"="Background" - "RenderType"="Opaque" - "PreviewType"="Skybox" - } - Pass { - Name "FORWARD" - Tags { - "LightMode"="ForwardBase" - } - - - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - #define UNITY_PASS_FORWARDBASE - #include "UnityCG.cginc" - #pragma multi_compile_fwdbase - #pragma only_renderers d3d9 d3d11 glcore gles - #pragma target 3.0 - uniform float4 _LightColor0; - uniform float4 _SkyColor; - uniform float4 _HorizonColor; - uniform float _SunRadiusB; - uniform float _SunRadiusA; - uniform float _SunIntensity; - struct VertexInput { - float4 vertex : POSITION; - }; - struct VertexOutput { - float4 pos : SV_POSITION; - float4 posWorld : TEXCOORD0; - }; - VertexOutput vert (VertexInput v) { - VertexOutput o = (VertexOutput)0; - o.posWorld = mul(unity_ObjectToWorld, v.vertex); - float3 lightColor = _LightColor0.rgb; - o.pos = UnityObjectToClipPos(v.vertex ); - return o; - } - float4 frag(VertexOutput i) : COLOR { - float3 viewDirection = normalize(_WorldSpaceCameraPos.xyz - i.posWorld.xyz); - float3 lightDirection = normalize(_WorldSpaceLightPos0.xyz); - float3 lightColor = _LightColor0.rgb; -////// Lighting: -////// Emissive: - float node_7933 = min(_SunRadiusA,_SunRadiusB); - float node_1476 = (1.0 - (node_7933*node_7933)); - float node_9367 = max(_SunRadiusA,_SunRadiusB); - float node_9430 = 1.0; - float3 emissive = (lerp(_SkyColor.rgb,_HorizonColor.rgb,pow((1.0 - max(0,dot(viewDirection,float3(0,-1,0)))),8.0))+(_LightColor0.rgb*pow(saturate((node_9430 + ( (max(0,dot((-1*lightDirection),viewDirection)) - node_1476) * (0.0 - node_9430) ) / ((1.0 - (node_9367*node_9367)) - node_1476))),5.0)*_SunIntensity)); - float3 finalColor = emissive; - return fixed4(finalColor,1); - } - ENDCG - } - } - CustomEditor "ShaderForgeMaterialInspector" -} diff --git a/Shader Forge/Assets/ShaderForge/Example Assets.meta b/Shader Forge/Assets/ShaderForge/Example Assets.meta deleted file mode 100644 index c6cb0f0e..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 029ca6d0d38f84838936b5e5bd9bc3ea -folderAsset: yes -DefaultImporter: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Meshes.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Meshes.meta deleted file mode 100644 index fb256922..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Meshes.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 07107ae0fb0d85f42ac9b24330d08cb8 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Meshes/sf_example_meshes.fbx b/Shader Forge/Assets/ShaderForge/Example Assets/Meshes/sf_example_meshes.fbx deleted file mode 100644 index 2ce8db7b..00000000 Binary files a/Shader Forge/Assets/ShaderForge/Example Assets/Meshes/sf_example_meshes.fbx and /dev/null differ diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Meshes/sf_example_meshes.fbx.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Meshes/sf_example_meshes.fbx.meta deleted file mode 100644 index 2a65ad75..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Meshes/sf_example_meshes.fbx.meta +++ /dev/null @@ -1,90 +0,0 @@ -fileFormatVersion: 2 -guid: 17819e54aa185472089096cf688428a9 -ModelImporter: - serializedVersion: 15 - fileIDToRecycleName: - 100000: //RootNode - 100002: sf_filledframe - 100004: sf_lightcone - 100006: sf_mat_platform - 100008: sf_plant - 100010: sf_vertex_color_hexagon - 100012: sf_frame - 400000: //RootNode - 400002: sf_filledframe - 400004: sf_lightcone - 400006: sf_mat_platform - 400008: sf_plant - 400010: sf_vertex_color_hexagon - 400012: sf_frame - 2300000: sf_filledframe - 2300002: sf_lightcone - 2300004: sf_mat_platform - 2300006: sf_plant - 2300008: sf_vertex_color_hexagon - 2300010: sf_frame - 3300000: sf_filledframe - 3300002: sf_lightcone - 3300004: sf_mat_platform - 3300006: sf_plant - 3300008: sf_vertex_color_hexagon - 3300010: sf_frame - 4300000: sf_plant - 4300002: sf_lightcone - 4300004: sf_filledframe - 4300006: sf_mat_platform - 4300008: sf_vertex_color_hexagon - 4300010: sf_frame - 9500000: //RootNode - materials: - importMaterials: 0 - materialName: 0 - materialSearch: 1 - animations: - legacyGenerateAnimations: 4 - bakeSimulation: 0 - optimizeGameObjects: 0 - animationCompression: 1 - animationRotationError: .5 - animationPositionError: .5 - animationScaleError: .5 - animationWrapMode: 0 - extraExposedTransformPaths: [] - clipAnimations: [] - isReadable: 1 - meshes: - lODScreenPercentages: [] - globalScale: 1 - meshCompression: 0 - addColliders: 0 - importBlendShapes: 1 - swapUVChannels: 0 - generateSecondaryUV: 1 - useFileUnits: 1 - optimizeMeshForGPU: 1 - weldVertices: 1 - secondaryUVAngleDistortion: 8 - secondaryUVAreaDistortion: 15.000001 - secondaryUVHardAngle: 88 - secondaryUVPackMargin: 4 - tangentSpace: - normalSmoothAngle: 60 - splitTangentsAcrossUV: 1 - normalImportMode: 0 - tangentImportMode: 1 - importAnimation: 1 - copyAvatar: 0 - humanDescription: - human: [] - skeleton: [] - armTwist: .5 - foreArmTwist: .5 - upperLegTwist: .5 - legTwist: .5 - armStretch: .0500000007 - legStretch: .0500000007 - feetSpacing: 0 - rootMotionBoneName: - lastHumanDescriptionAvatarSource: {instanceID: 0} - animationType: 0 - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Scripts.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Scripts.meta deleted file mode 100644 index cc043b07..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Scripts.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: a2f343278b7594f4cbd9ff7b1d48da5b -folderAsset: yes -DefaultImporter: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Scripts/EditorLabel.cs b/Shader Forge/Assets/ShaderForge/Example Assets/Scripts/EditorLabel.cs deleted file mode 100644 index a3cefa58..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Scripts/EditorLabel.cs +++ /dev/null @@ -1,81 +0,0 @@ -#if UNITY_EDITOR - using UnityEngine; - using UnityEditor; - using System.Collections; - - public class EditorLabel : MonoBehaviour { - - - - public string text; - - private static GUIStyle style; - private static GUIStyle Style{ - get{ - if(style == null){ - style = new GUIStyle( EditorStyles.largeLabel ); - style.alignment = TextAnchor.MiddleCenter; - style.normal.textColor = new Color(0.9f,0.9f,0.9f); - style.fontSize = 32; - } - return style; - } - - } - - - void OnDrawGizmos(){ - - - RaycastHit hit; - Ray r = new Ray(transform.position + Camera.current.transform.up * 8f, -Camera.current.transform.up ); - if( GetComponent().Raycast( r, out hit, Mathf.Infinity) ){ - - float dist = (Camera.current.transform.position - hit.point).magnitude; - - float fontSize = Mathf.Lerp(64, 12, dist/10f); - - Style.fontSize = (int)fontSize; - - Vector3 wPos = hit.point + Camera.current.transform.up*dist*0.07f; - - - - Vector3 scPos = Camera.current.WorldToScreenPoint(wPos); - if(scPos.z <= 0){ - return; - } - - - - float alpha = Mathf.Clamp(-Camera.current.transform.forward.y, 0f, 1f); - alpha = 1f-((1f-alpha)*(1f-alpha)); - - alpha = Mathf.Lerp(-0.2f,1f,alpha); - - Handles.BeginGUI(); - - - scPos.y = Screen.height - scPos.y; // Flip Y - - - Vector2 strSize = Style.CalcSize(new GUIContent(text)); - - Rect rect = new Rect(0f, 0f, strSize.x + 6,strSize.y + 4); - rect.center = scPos - Vector3.up*rect.height*0.5f; - GUI.color = new Color(0f,0f,0f,0.8f * alpha); - GUI.DrawTexture(rect, EditorGUIUtility.whiteTexture); - GUI.color = Color.white; - GUI.color = new Color(GUI.color.r, GUI.color.g, GUI.color.b, alpha); - GUI.Label(rect, text, Style); - GUI.color = Color.white; - - Handles.EndGUI(); - } - - - - - } - } -#endif diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Scripts/EditorLabel.cs.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Scripts/EditorLabel.cs.meta deleted file mode 100644 index 7b4e7999..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Scripts/EditorLabel.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 9aa8c0bd4777c43ba983f5819ce0f5f7 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Scripts/EnableCameraDepthInForward.cs b/Shader Forge/Assets/ShaderForge/Example Assets/Scripts/EnableCameraDepthInForward.cs deleted file mode 100644 index 382bfd26..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Scripts/EnableCameraDepthInForward.cs +++ /dev/null @@ -1,22 +0,0 @@ -// -// Attach this script to your camera in order to use depth nodes in forward rendering -// - -using UnityEngine; -using System.Collections; - -[RequireComponent(typeof(Camera))] -public class EnableCameraDepthInForward : MonoBehaviour { -#if UNITY_EDITOR - void OnDrawGizmos(){ - Set(); - } -#endif - void Start () { - Set(); - } - void Set(){ - if(GetComponent().depthTextureMode == DepthTextureMode.None) - GetComponent().depthTextureMode = DepthTextureMode.Depth; - } -} diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Scripts/EnableCameraDepthInForward.cs.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Scripts/EnableCameraDepthInForward.cs.meta deleted file mode 100644 index 9140ecb8..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Scripts/EnableCameraDepthInForward.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a67cf5608eb6c4b228afc4fd355b7a0d -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Scripts/SoftNormalsToVertexColor.cs b/Shader Forge/Assets/ShaderForge/Example Assets/Scripts/SoftNormalsToVertexColor.cs deleted file mode 100644 index 1045fed1..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Scripts/SoftNormalsToVertexColor.cs +++ /dev/null @@ -1,99 +0,0 @@ -using UnityEngine; -#if UNITY_EDITOR -using UnityEditor; -#endif -using System.Collections; -using System.Collections.Generic; - -[RequireComponent(typeof(MeshFilter))] -public class SoftNormalsToVertexColor : MonoBehaviour { - - public enum Method { Simple, AngularDeviation }; - - public Method method = Method.AngularDeviation; - public bool generateOnAwake = false; - public bool generateNow = false; - - void OnDrawGizmos() { - if( generateNow ) { - generateNow = false; - TryGenerate(); - } - } - - void Awake() { - if(generateOnAwake) - TryGenerate(); - } - - void TryGenerate() { - MeshFilter mf = GetComponent(); - if( mf == null ) { - Debug.LogError( "MeshFilter missing on the vertex color generator", gameObject ); - return; - } - if( mf.sharedMesh == null ) { - Debug.LogError( "Assign a mesh to the MeshFilter before generating vertex colors", gameObject ); - return; - } - Generate(mf.sharedMesh); - Debug.Log("Vertex colors generated", gameObject); - } - - void Generate(Mesh m) { - - Vector3[] n = m.normals; - Vector3[] v = m.vertices; - Color[] colors = new Color[n.Length]; - List> groups = new List>(); - - for( int i = 0; i < v.Length; i++ ) { // Group verts at the same location - bool added = false; - foreach( List group in groups ) { // Add to exsisting group if possible - if( v[group[0]] == v[i] ) { - group.Add(i); - added = true; - break; - } - } - if( !added ) { // Create new group if necessary - List newList = new List(); - newList.Add( i ); - groups.Add( newList ); - } - } - - foreach( List group in groups ) { // Calculate soft normals - Vector3 avgNrm = Vector3.zero; - foreach( int i in group ) { // TODO: This can actually be improved. Averaging will not give the best outline. - avgNrm += n[i]; - } - avgNrm.Normalize(); // Average normal done - if( method == Method.AngularDeviation ) { - float avgDot = 0f; // Calculate deviation to alter length - foreach( int i in group ) { - avgDot += Vector3.Dot( n[i], avgNrm ); - } - avgDot /= group.Count; - float angDeviation = Mathf.Acos( avgDot ) * Mathf.Rad2Deg; - float aAng = 180f - angDeviation - 90; - float lMult = 0.5f / Mathf.Sin( aAng * Mathf.Deg2Rad ); // 0.5f looks better empirically, but mathematically it should be 1f - avgNrm *= lMult; - } - - foreach( int i in group ) { - colors[i] = new Color( avgNrm.x, avgNrm.y, avgNrm.z ); // Save normals as colors - } - } - - m.colors = colors; // Assign as vertex colors - -#if UNITY_EDITOR - EditorUtility.SetDirty( this ); - SceneView.RepaintAll(); -#endif - - } - - -} \ No newline at end of file diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Scripts/SoftNormalsToVertexColor.cs.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Scripts/SoftNormalsToVertexColor.cs.meta deleted file mode 100644 index ce67f188..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Scripts/SoftNormalsToVertexColor.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 2b52095f465a0ae4b96dc9e985ba34c1 -timeCreated: 1442143168 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Shaders.meta deleted file mode 100644 index efa7db9b..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 9940df91279f7664ead55ed8f0f277e8 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/CustomLighting.shader.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/CustomLighting.shader.meta deleted file mode 100644 index afc26cc7..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/CustomLighting.shader.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e570c2adf90d6a24b8634788025bb2bb -timeCreated: 1503327501 -licenseType: Pro -ShaderImporter: - defaultTextures: - - _Diffuse: {fileID: 2800000, guid: 8993b617f08498f43adcbd90697f1c5d, type: 3} - - _Normals: {fileID: 2800000, guid: c6dfb00dbee6bc044a8a3bb22e56e064, type: 3} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Parallax.shader.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Parallax.shader.meta deleted file mode 100644 index 4b22187d..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Parallax.shader.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 848a7fd7a01ca494bbaad23b3f926b42 -timeCreated: 1503327507 -licenseType: Pro -ShaderImporter: - defaultTextures: - - _Normal: {fileID: 2800000, guid: cf20bfced7e912046a9ce991a4d775ec, type: 3} - - _AORGBHeightA: {fileID: 2800000, guid: 5fb7986dd6d0a8e4093ba82369dd6a4d, type: 3} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Refraction.shader.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Refraction.shader.meta deleted file mode 100644 index f3f1efe9..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Refraction.shader.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 6562ed1722964fc4fa4eba1d756e19b7 -timeCreated: 1502814920 -licenseType: Pro -ShaderImporter: - defaultTextures: - - _Refraction: {fileID: 2800000, guid: bbab0a6f7bae9cf42bf057d8ee2755f6, type: 3} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/TessellationDisplacement.shader.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/TessellationDisplacement.shader.meta deleted file mode 100644 index 1f37dba9..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/TessellationDisplacement.shader.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 5e81283b11113de4295d1943aec0a765 -timeCreated: 1503327524 -licenseType: Pro -ShaderImporter: - defaultTextures: - - _Normals: {fileID: 2800000, guid: cf20bfced7e912046a9ce991a4d775ec, type: 3} - - _DisplacementR: {fileID: 2800000, guid: 28c7aad1372ff114b90d330f8a2dd938, type: 3} - - _AORGBHeightA: {fileID: 2800000, guid: 5fb7986dd6d0a8e4093ba82369dd6a4d, type: 3} - - _Diffuse: {fileID: 2800000, guid: b66bceaf0cc0ace4e9bdc92f14bba709, type: 3} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Tiles.shader.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Tiles.shader.meta deleted file mode 100644 index 0cfc4dca..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Tiles.shader.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 05eb3a2c382b4154cb71394a349d0909 -timeCreated: 1503327527 -licenseType: Pro -ShaderImporter: - defaultTextures: - - _BaseColor: {fileID: 2800000, guid: b66bceaf0cc0ace4e9bdc92f14bba709, type: 3} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Vegetation.shader.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Vegetation.shader.meta deleted file mode 100644 index 655f7968..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/Vegetation.shader.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e17d9c256530145c39caf8efc8c94a16 -timeCreated: 1503327530 -licenseType: Pro -ShaderImporter: - defaultTextures: - - _Diffuse: {fileID: 2800000, guid: 66321cc856b03e245ac41ed8a53e0ecc, type: 3} - - _Normal: {fileID: 2800000, guid: cb6c5165ed180c543be39ed70e72abc8, type: 3} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexAnimation.shader.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexAnimation.shader.meta deleted file mode 100644 index 086ec59e..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Shaders/VertexAnimation.shader.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6dedef75fd0484cdf8557f522ceaa8bf -timeCreated: 1503327533 -licenseType: Pro -ShaderImporter: - defaultTextures: - - _Diffuse: {fileID: 2800000, guid: b66bceaf0cc0ace4e9bdc92f14bba709, type: 3} - - _Normals: {fileID: 2800000, guid: bbab0a6f7bae9cf42bf057d8ee2755f6, type: 3} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Textures.meta deleted file mode 100644 index fdc6ce7c..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Textures.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 8b42b5734d3d1bb4d969021d0ce7d016 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_alpha_circle.png b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_alpha_circle.png deleted file mode 100644 index c409d522..00000000 Binary files a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_alpha_circle.png and /dev/null differ diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_alpha_circle.png.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_alpha_circle.png.meta deleted file mode 100644 index 9822ca9b..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_alpha_circle.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 3a5a96df060a5cf4a9cc0c59e13486b7 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 512 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_alpha_circle_02.png b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_alpha_circle_02.png deleted file mode 100644 index ac79d373..00000000 Binary files a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_alpha_circle_02.png and /dev/null differ diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_alpha_circle_02.png.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_alpha_circle_02.png.meta deleted file mode 100644 index 00c178da..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_alpha_circle_02.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 6a985dfcd1d3ca94e9753748ed65c697 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 512 - textureSettings: - filterMode: 2 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_conc_floor_01_d.tga b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_conc_floor_01_d.tga deleted file mode 100644 index f7429473..00000000 Binary files a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_conc_floor_01_d.tga and /dev/null differ diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_conc_floor_01_d.tga.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_conc_floor_01_d.tga.meta deleted file mode 100644 index 0c28d52a..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_conc_floor_01_d.tga.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: b66bceaf0cc0ace4e9bdc92f14bba709 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 2048 - textureSettings: - filterMode: 2 - aniso: 3 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_conc_floor_01_n.tga b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_conc_floor_01_n.tga deleted file mode 100644 index 619dc07e..00000000 Binary files a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_conc_floor_01_n.tga and /dev/null differ diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_conc_floor_01_n.tga.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_conc_floor_01_n.tga.meta deleted file mode 100644 index e363b363..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_conc_floor_01_n.tga.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: bbab0a6f7bae9cf42bf057d8ee2755f6 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 1 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: 3 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_gradient_light_01.png b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_gradient_light_01.png deleted file mode 100644 index 4d6627f1..00000000 Binary files a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_gradient_light_01.png and /dev/null differ diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_gradient_light_01.png.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_gradient_light_01.png.meta deleted file mode 100644 index e444fe80..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_gradient_light_01.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 857a8e9195b715848abbbbb790d378b1 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_gradient_ramp_01.png b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_gradient_ramp_01.png deleted file mode 100644 index f58a2418..00000000 Binary files a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_gradient_ramp_01.png and /dev/null differ diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_gradient_ramp_01.png.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_gradient_ramp_01.png.meta deleted file mode 100644 index 512fcb65..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_gradient_ramp_01.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 271f5ee3273dd7f4fae6e204d4f8c4bf -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 256 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_gradient_ramp_02.png b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_gradient_ramp_02.png deleted file mode 100644 index 457c71ac..00000000 Binary files a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_gradient_ramp_02.png and /dev/null differ diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_gradient_ramp_02.png.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_gradient_ramp_02.png.meta deleted file mode 100644 index 7b477c9d..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_gradient_ramp_02.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 181ec605fb3b4314bbee61db18ab41c0 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_leaves_01_d.tga b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_leaves_01_d.tga deleted file mode 100644 index 2b47cbdd..00000000 Binary files a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_leaves_01_d.tga and /dev/null differ diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_leaves_01_d.tga.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_leaves_01_d.tga.meta deleted file mode 100644 index 7144c287..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_leaves_01_d.tga.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 66321cc856b03e245ac41ed8a53e0ecc -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: 1 - mipBias: -1 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_leaves_01_n.png b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_leaves_01_n.png deleted file mode 100644 index 5419f377..00000000 Binary files a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_leaves_01_n.png and /dev/null differ diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_leaves_01_n.png.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_leaves_01_n.png.meta deleted file mode 100644 index 6c3baa3e..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_leaves_01_n.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: cb6c5165ed180c543be39ed70e72abc8 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 1 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 2048 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 5 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_noise_clouds_01.png b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_noise_clouds_01.png deleted file mode 100755 index 9eca152f..00000000 Binary files a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_noise_clouds_01.png and /dev/null differ diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_noise_clouds_01.png.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_noise_clouds_01.png.meta deleted file mode 100644 index e8d2d328..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_noise_clouds_01.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 28c7aad1372ff114b90d330f8a2dd938 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_noise_grain_01.png b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_noise_grain_01.png deleted file mode 100644 index ba027b44..00000000 Binary files a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_noise_grain_01.png and /dev/null differ diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_noise_grain_01.png.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_noise_grain_01.png.meta deleted file mode 100644 index 2b2980fd..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_noise_grain_01.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: e958c6041cfe445e987c73751e8d4082 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 2 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: 3 - maxTextureSize: 1024 - textureSettings: - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapMode: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_parallax_test_ao_height.tga b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_parallax_test_ao_height.tga deleted file mode 100644 index 3d6fc2a5..00000000 Binary files a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_parallax_test_ao_height.tga and /dev/null differ diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_parallax_test_ao_height.tga.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_parallax_test_ao_height.tga.meta deleted file mode 100644 index 8a3896f2..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_parallax_test_ao_height.tga.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 5fb7986dd6d0a8e4093ba82369dd6a4d -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_parallax_test_normals.tga b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_parallax_test_normals.tga deleted file mode 100644 index 2b9b8812..00000000 Binary files a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_parallax_test_normals.tga and /dev/null differ diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_parallax_test_normals.tga.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_parallax_test_normals.tga.meta deleted file mode 100644 index 2f8233ec..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_parallax_test_normals.tga.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: cf20bfced7e912046a9ce991a4d775ec -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 1 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_rgb_overlap.png b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_rgb_overlap.png deleted file mode 100644 index c8f944e3..00000000 Binary files a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_rgb_overlap.png and /dev/null differ diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_rgb_overlap.png.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_rgb_overlap.png.meta deleted file mode 100644 index 8c4a340f..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_rgb_overlap.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: aa762ee7680f35f4fb9a9210fa94ce61 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_texcoords.png b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_texcoords.png deleted file mode 100644 index 5d974bef..00000000 Binary files a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_texcoords.png and /dev/null differ diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_texcoords.png.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_texcoords.png.meta deleted file mode 100644 index bd03ca9f..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_texcoords.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: e6e7abfd01541984db62a8d677d6b2d7 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 256 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_tile_01_d.tga b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_tile_01_d.tga deleted file mode 100644 index a65b2945..00000000 Binary files a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_tile_01_d.tga and /dev/null differ diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_tile_01_d.tga.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_tile_01_d.tga.meta deleted file mode 100644 index 3a093ac2..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_tile_01_d.tga.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 8993b617f08498f43adcbd90697f1c5d -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_tile_01_n.tga b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_tile_01_n.tga deleted file mode 100644 index eaf54cbd..00000000 Binary files a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_tile_01_n.tga and /dev/null differ diff --git a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_tile_01_n.tga.meta b/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_tile_01_n.tga.meta deleted file mode 100644 index 135a4aa6..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Assets/Textures/sf_tile_01_n.tga.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: c6dfb00dbee6bc044a8a3bb22e56e064 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 1 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/Shader Forge/Assets/ShaderForge/Example Scene.unity b/Shader Forge/Assets/ShaderForge/Example Scene.unity deleted file mode 100644 index a3cb986a..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Scene.unity +++ /dev/null @@ -1,1437 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -SceneSettings: - m_ObjectHideFlags: 0 - m_PVSData: - m_PVSObjectsArray: [] - m_PVSPortalsArray: [] - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: .25 - backfaceThreshold: 100 ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 6 - m_Fog: 1 - m_FogColor: {r: .128027678, g: .195346579, b: .235294104, a: 1} - m_FogMode: 3 - m_FogDensity: .00999999978 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: .0348183364, g: .0522013865, b: .102941155, a: 1} - m_AmbientEquatorColor: {r: .0348183364, g: .0522013865, b: .102941155, a: 1} - m_AmbientGroundColor: {r: .0348183364, g: .0522013865, b: .102941155, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: .5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} ---- !u!127 &3 -LevelGameManager: - m_ObjectHideFlags: 0 ---- !u!157 &4 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 5 - m_GIWorkflowMode: 1 - m_LightmapsMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_TemporalCoherenceThreshold: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 3 - m_Resolution: 1 - m_BakeResolution: 25 - m_TextureWidth: 1024 - m_TextureHeight: 1024 - m_AOMaxDistance: 1 - m_Padding: 2 - m_CompAOExponent: 0 - m_LightmapParameters: {fileID: 0} - m_TextureCompression: 0 - m_FinalGather: 0 - m_FinalGatherRayCount: 1024 - m_LightmapSnapshot: {fileID: 112000000, guid: 54a4b10a28ea63a409b8e8b65bdef2e2, - type: 2} - m_RuntimeCPUUsage: 25 ---- !u!196 &5 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentRadius: .5 - agentHeight: 2 - agentSlope: 45 - agentClimb: .400000006 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - accuratePlacement: 0 - minRegionArea: 2 - cellSize: .166666657 - manualCellSize: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &200992697 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 200992700} - - 33: {fileID: 200992699} - - 23: {fileID: 200992698} - m_Layer: 0 - m_Name: torus - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &200992698 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 200992697} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 2100000, guid: cadfde2f3ef294043affa7194ae69b94, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!33 &200992699 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 200992697} - m_Mesh: {fileID: 4300020, guid: 27cd3ffabf618924f9c9eeefb09b60e0, type: 3} ---- !u!4 &200992700 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 200992697} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0, y: -.598715723, z: -2.23370385} - m_LocalScale: {x: .827757418, y: .827757418, z: .827757418} - m_Children: [] - m_Father: {fileID: 312096755} - m_RootOrder: 0 ---- !u!1 &257028406 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 257028409} - - 33: {fileID: 257028408} - - 23: {fileID: 257028407} - m_Layer: 0 - m_Name: torus - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &257028407 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 257028406} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 2100000, guid: 393931f1639a1fe40b68d72551bef241, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!33 &257028408 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 257028406} - m_Mesh: {fileID: 4300020, guid: 27cd3ffabf618924f9c9eeefb09b60e0, type: 3} ---- !u!4 &257028409 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 257028406} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0, y: -.558938503, z: -2.23370361} - m_LocalScale: {x: .827757418, y: .827757418, z: .827757418} - m_Children: [] - m_Father: {fileID: 2109476129} - m_RootOrder: 0 ---- !u!1 &271048997 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 271049000} - - 33: {fileID: 271048999} - - 23: {fileID: 271048998} - - 135: {fileID: 271049002} - - 114: {fileID: 271049001} - m_Layer: 0 - m_Name: 6. Vegetation Shader - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 4294967295 - m_IsActive: 1 ---- !u!23 &271048998 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 271048997} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 2100000, guid: d2accf36f48355a4cbd925162706dbb1, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!33 &271048999 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 271048997} - m_Mesh: {fileID: 4300000, guid: 17819e54aa185472089096cf688428a9, type: 3} ---- !u!4 &271049000 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 271048997} - m_LocalRotation: {x: 0, y: -2.98023224e-08, z: 0, w: 1} - m_LocalPosition: {x: -11.9999876, y: 0, z: -11.5000296} - m_LocalScale: {x: 4.68877411, y: 4.68877411, z: 4.6887784} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 5 ---- !u!114 &271049001 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 271048997} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9aa8c0bd4777c43ba983f5819ce0f5f7, type: 3} - m_Name: - m_EditorClassIdentifier: - text: Vegetation Shader ---- !u!135 &271049002 -SphereCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 271048997} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: .49000001 - m_Center: {x: -.0533101857, y: .22221607, z: .0061943531} ---- !u!1 &312096752 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 312096755} - - 33: {fileID: 312096754} - - 23: {fileID: 312096753} - - 114: {fileID: 312096757} - - 135: {fileID: 312096756} - m_Layer: 0 - m_Name: 3. Custom Lighting + Outline - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &312096753 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 312096752} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 2100000, guid: cadfde2f3ef294043affa7194ae69b94, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!33 &312096754 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 312096752} - m_Mesh: {fileID: 4300024, guid: 27cd3ffabf618924f9c9eeefb09b60e0, type: 3} ---- !u!4 &312096755 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 312096752} - m_LocalRotation: {x: 0, y: -2.98023224e-08, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1.27999997, z: .699999988} - m_LocalScale: {x: 1.20808339, y: 1.20808339, z: 1.20808339} - m_Children: - - {fileID: 200992700} - m_Father: {fileID: 0} - m_RootOrder: 2 ---- !u!135 &312096756 -SphereCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 312096752} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 1 - m_Center: {x: -3.27825546e-07, y: 5.96046448e-08, z: 2.08616257e-07} ---- !u!114 &312096757 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 312096752} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9aa8c0bd4777c43ba983f5819ce0f5f7, type: 3} - m_Name: - m_EditorClassIdentifier: - text: Custom Lighting + Outline ---- !u!1 &319108395 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 319108398} - - 33: {fileID: 319108397} - - 23: {fileID: 319108396} - m_Layer: 0 - m_Name: torus - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &319108396 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 319108395} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 2100000, guid: ad0f5de566d7147fe91238a7111958f1, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!33 &319108397 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 319108395} - m_Mesh: {fileID: 4300020, guid: 27cd3ffabf618924f9c9eeefb09b60e0, type: 3} ---- !u!4 &319108398 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 319108395} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0, y: -.558938503, z: -2.23370361} - m_LocalScale: {x: .827757418, y: .827757418, z: .827757418} - m_Children: [] - m_Father: {fileID: 1788167972} - m_RootOrder: 0 ---- !u!1 &429649897 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 429649900} - - 33: {fileID: 429649899} - - 23: {fileID: 429649898} - m_Layer: 0 - m_Name: torus - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &429649898 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 429649897} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 0 - m_Materials: - - {fileID: 2100000, guid: 0baa0be77ffe0ec4bbba3c06cb8f887b, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!33 &429649899 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 429649897} - m_Mesh: {fileID: 4300020, guid: 27cd3ffabf618924f9c9eeefb09b60e0, type: 3} ---- !u!4 &429649900 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 429649897} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: -.558938503, z: -2.23370314} - m_LocalScale: {x: .827757418, y: .827757418, z: .827757418} - m_Children: [] - m_Father: {fileID: 1615958079} - m_RootOrder: 0 ---- !u!1 &795338755 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 795338758} - - 33: {fileID: 795338757} - - 23: {fileID: 795338756} - m_Layer: 0 - m_Name: torus - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &795338756 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 795338755} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 2100000, guid: 3ee7d13d3dbe94b459c2935d8b993866, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!33 &795338757 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 795338755} - m_Mesh: {fileID: 4300020, guid: 27cd3ffabf618924f9c9eeefb09b60e0, type: 3} ---- !u!4 &795338758 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 795338755} - m_LocalRotation: {x: 0, y: -1, z: 0, w: 4.61935997e-07} - m_LocalPosition: {x: -0, y: -.558938503, z: -2.23370814} - m_LocalScale: {x: .827757418, y: .827757418, z: .827757418} - m_Children: [] - m_Father: {fileID: 2017781022} - m_RootOrder: 0 ---- !u!1 &1129467016 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1129467018} - - 108: {fileID: 1129467017} - m_Layer: 0 - m_Name: Sunlight - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &1129467017 -Light: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1129467016} - m_Enabled: 1 - serializedVersion: 6 - m_Type: 1 - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_CookieSize: 10 - m_Shadows: - m_Type: 1 - m_Resolution: -1 - m_Strength: .522000015 - m_Bias: .0799999982 - m_NormalBias: .400000006 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_Lightmapping: 1 - m_BounceIntensity: 1 - m_ShadowRadius: 0 - m_ShadowAngle: 0 - m_AreaSize: {x: 1, y: 1} ---- !u!4 &1129467018 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1129467016} - m_LocalRotation: {x: .00263890065, y: -.259949565, z: .962510943, w: -.0774079636} - m_LocalPosition: {x: 0, y: 16, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 10 ---- !u!1 &1196865671 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1196865674} - - 33: {fileID: 1196865673} - - 23: {fileID: 1196865672} - - 135: {fileID: 1196865676} - - 114: {fileID: 1196865675} - m_Layer: 0 - m_Name: 7. Vertex Animation & Emission - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &1196865672 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1196865671} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 2100000, guid: 23fc898268709d346b696ab505c07656, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!33 &1196865673 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1196865671} - m_Mesh: {fileID: 4300030, guid: 27cd3ffabf618924f9c9eeefb09b60e0, type: 3} ---- !u!4 &1196865674 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1196865671} - m_LocalRotation: {x: 0, y: -2.98023224e-08, z: 0, w: 1} - m_LocalPosition: {x: -5.99998999, y: 1.00618076, z: -11.5000315} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 ---- !u!114 &1196865675 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1196865671} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9aa8c0bd4777c43ba983f5819ce0f5f7, type: 3} - m_Name: - m_EditorClassIdentifier: - text: Vertex Animation & Emission ---- !u!135 &1196865676 -SphereCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1196865671} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 1.43384349 - m_Center: {x: .208132505, y: -9.00030136e-06, z: 7.51018524e-06} ---- !u!1 &1362709308 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1362709311} - - 33: {fileID: 1362709310} - - 23: {fileID: 1362709309} - - 135: {fileID: 1362709313} - - 114: {fileID: 1362709312} - m_Layer: 0 - m_Name: 9. DX11 Tessellation (Windows Only) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &1362709309 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1362709308} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 2100000, guid: d753811ecd38cd149b3a958022853c18, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!33 &1362709310 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1362709308} - m_Mesh: {fileID: 4300026, guid: 27cd3ffabf618924f9c9eeefb09b60e0, type: 3} ---- !u!4 &1362709311 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1362709308} - m_LocalRotation: {x: 0, y: -1, z: 0, w: 4.32133675e-07} - m_LocalPosition: {x: 6, y: .5, z: -11.5000296} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 8 ---- !u!114 &1362709312 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1362709308} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9aa8c0bd4777c43ba983f5819ce0f5f7, type: 3} - m_Name: - m_EditorClassIdentifier: - text: DX11 Tessellation (Windows Only) ---- !u!135 &1362709313 -SphereCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1362709308} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 1.5000006 - m_Center: {x: 1.78813934e-07, y: -8.94069672e-08, z: -2.38418579e-07} ---- !u!1 &1513778013 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1513778016} - - 33: {fileID: 1513778015} - - 23: {fileID: 1513778014} - m_Layer: 0 - m_Name: Blue torus knot - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &1513778014 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1513778013} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 2100000, guid: 4a36ae71b48f14d6fb2eae31da682a32, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!33 &1513778015 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1513778013} - m_Mesh: {fileID: 4300030, guid: 27cd3ffabf618924f9c9eeefb09b60e0, type: 3} ---- !u!4 &1513778016 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1513778013} - m_LocalRotation: {x: .353553236, y: .612372637, z: .612372458, w: .353553355} - m_LocalPosition: {x: 0, y: -1.87565947, z: -1.243819} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 2034374530} - m_RootOrder: 0 ---- !u!1 &1615958075 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1615958079} - - 33: {fileID: 1615958078} - - 23: {fileID: 1615958076} - - 135: {fileID: 1615958080} - - 114: {fileID: 1615958077} - m_Layer: 0 - m_Name: 4. Light Wrapping (SSS Approx.) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &1615958076 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1615958075} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 0 - m_Materials: - - {fileID: 2100000, guid: 0baa0be77ffe0ec4bbba3c06cb8f887b, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!114 &1615958077 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1615958075} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9aa8c0bd4777c43ba983f5819ce0f5f7, type: 3} - m_Name: - m_EditorClassIdentifier: - text: Light Wrapping (SSS Approx.) ---- !u!33 &1615958078 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1615958075} - m_Mesh: {fileID: 4300024, guid: 27cd3ffabf618924f9c9eeefb09b60e0, type: 3} ---- !u!4 &1615958079 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1615958075} - m_LocalRotation: {x: 0, y: -2.98023224e-08, z: 0, w: 1} - m_LocalPosition: {x: 6, y: 1.17999995, z: .699999988} - m_LocalScale: {x: 1.20808339, y: 1.20808339, z: 1.20808339} - m_Children: - - {fileID: 429649900} - m_Father: {fileID: 0} - m_RootOrder: 3 ---- !u!135 &1615958080 -SphereCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1615958075} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 1 - m_Center: {x: -3.27825546e-07, y: 5.96046448e-08, z: 2.08616257e-07} ---- !u!1 &1622710533 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1622710534} - - 33: {fileID: 1622710537} - - 23: {fileID: 1622710535} - m_Layer: 0 - m_Name: Refraction Pane - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1622710534 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1622710533} - m_LocalRotation: {x: .707106769, y: -1.42108564e-14, z: -1.42108564e-14, w: .707106888} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 4, y: 4, z: 4} - m_Children: [] - m_Father: {fileID: 2034374530} - m_RootOrder: 1 ---- !u!23 &1622710535 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1622710533} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 2100000, guid: 2eced452d5ec44e49985d30395b1e7d3, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!33 &1622710537 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1622710533} - m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &1788167971 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1788167972} - - 33: {fileID: 1788167976} - - 23: {fileID: 1788167975} - - 114: {fileID: 1788167974} - - 135: {fileID: 1788167973} - m_Layer: 0 - m_Name: 1. Pixelated Rotator - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1788167972 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1788167971} - m_LocalRotation: {x: 0, y: -2.98023224e-08, z: 0, w: 1} - m_LocalPosition: {x: -13, y: 1.17524433, z: .698500097} - m_LocalScale: {x: 1.20808339, y: 1.20808339, z: 1.20808339} - m_Children: - - {fileID: 319108398} - m_Father: {fileID: 0} - m_RootOrder: 0 ---- !u!135 &1788167973 -SphereCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1788167971} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 1 - m_Center: {x: -3.27825546e-07, y: 5.96046448e-08, z: 2.08616257e-07} ---- !u!114 &1788167974 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1788167971} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9aa8c0bd4777c43ba983f5819ce0f5f7, type: 3} - m_Name: - m_EditorClassIdentifier: - text: Pixelated Rotator ---- !u!23 &1788167975 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1788167971} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 2100000, guid: ad0f5de566d7147fe91238a7111958f1, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!33 &1788167976 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1788167971} - m_Mesh: {fileID: 4300024, guid: 27cd3ffabf618924f9c9eeefb09b60e0, type: 3} ---- !u!1 &1958782409 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1958782412} - - 33: {fileID: 1958782411} - - 23: {fileID: 1958782410} - - 135: {fileID: 1958782414} - - 114: {fileID: 1958782413} - m_Layer: 0 - m_Name: 10. Unlit Vertex Colored - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &1958782410 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1958782409} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 2100000, guid: 5d9b849895144ea4983f3b1f36bbacae, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!33 &1958782411 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1958782409} - m_Mesh: {fileID: 4300008, guid: 17819e54aa185472089096cf688428a9, type: 3} ---- !u!4 &1958782412 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1958782409} - m_LocalRotation: {x: 0, y: -2.98023224e-08, z: 0, w: 1} - m_LocalPosition: {x: 12.0000076, y: .0653896332, z: -11.5000315} - m_LocalScale: {x: 4, y: 4, z: 4} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 9 ---- !u!114 &1958782413 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1958782409} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9aa8c0bd4777c43ba983f5819ce0f5f7, type: 3} - m_Name: - m_EditorClassIdentifier: - text: Unlit Vertex Colored ---- !u!135 &1958782414 -SphereCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1958782409} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: .499998599 - m_Center: {x: 0, y: 0, z: 0} ---- !u!1 &2017781019 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 2017781022} - - 33: {fileID: 2017781021} - - 23: {fileID: 2017781020} - - 135: {fileID: 2017781024} - - 114: {fileID: 2017781023} - m_Layer: 0 - m_Name: 5. Parallax Mapping - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &2017781020 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2017781019} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 2100000, guid: 3ee7d13d3dbe94b459c2935d8b993866, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!33 &2017781021 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2017781019} - m_Mesh: {fileID: 4300024, guid: 27cd3ffabf618924f9c9eeefb09b60e0, type: 3} ---- !u!4 &2017781022 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2017781019} - m_LocalRotation: {x: 0, y: -2.98023224e-08, z: 0, w: 1} - m_LocalPosition: {x: 12.0000057, y: 1.17524433, z: .698500156} - m_LocalScale: {x: 1.20808339, y: 1.20808339, z: 1.20808339} - m_Children: - - {fileID: 795338758} - m_Father: {fileID: 0} - m_RootOrder: 4 ---- !u!114 &2017781023 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2017781019} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9aa8c0bd4777c43ba983f5819ce0f5f7, type: 3} - m_Name: - m_EditorClassIdentifier: - text: Parallax Mapping ---- !u!135 &2017781024 -SphereCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2017781019} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 1 - m_Center: {x: -3.27825546e-07, y: 5.96046448e-08, z: 1.49011612e-07} ---- !u!1 &2034374527 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 2034374530} - - 33: {fileID: 2034374529} - - 23: {fileID: 2034374528} - - 114: {fileID: 2034374532} - - 135: {fileID: 2034374531} - m_Layer: 0 - m_Name: 8. Refraction - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &2034374528 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2034374527} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 1 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!33 &2034374529 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2034374527} - m_Mesh: {fileID: 4300010, guid: 17819e54aa185472089096cf688428a9, type: 3} ---- !u!4 &2034374530 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2034374527} - m_LocalRotation: {x: -.707106709, y: -4.47034836e-08, z: -2.92673583e-08, w: .707106948} - m_LocalPosition: {x: 8.10623169e-06, y: 2.25, z: -13.3756905} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 1513778016} - - {fileID: 1622710534} - m_Father: {fileID: 0} - m_RootOrder: 7 ---- !u!135 &2034374531 -SphereCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2034374527} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 2.25000048 - m_Center: {x: 0, y: 0, z: 0} ---- !u!114 &2034374532 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2034374527} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9aa8c0bd4777c43ba983f5819ce0f5f7, type: 3} - m_Name: - m_EditorClassIdentifier: - text: Double-Sided Refraction ---- !u!1 &2109476125 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 2109476129} - - 33: {fileID: 2109476128} - - 23: {fileID: 2109476126} - - 114: {fileID: 2109476130} - - 135: {fileID: 2109476127} - m_Layer: 0 - m_Name: 2. Physically Based Shader - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &2109476126 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2109476125} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 2100000, guid: 393931f1639a1fe40b68d72551bef241, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!135 &2109476127 -SphereCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2109476125} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 1 - m_Center: {x: -3.27825546e-07, y: 5.96046448e-08, z: 2.08616257e-07} ---- !u!33 &2109476128 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2109476125} - m_Mesh: {fileID: 4300024, guid: 27cd3ffabf618924f9c9eeefb09b60e0, type: 3} ---- !u!4 &2109476129 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2109476125} - m_LocalRotation: {x: 0, y: -2.98023224e-08, z: 0, w: 1} - m_LocalPosition: {x: -6, y: 1.17999995, z: .699999988} - m_LocalScale: {x: 1.20808339, y: 1.20808339, z: 1.20808339} - m_Children: - - {fileID: 257028409} - m_Father: {fileID: 0} - m_RootOrder: 1 ---- !u!114 &2109476130 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2109476125} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9aa8c0bd4777c43ba983f5819ce0f5f7, type: 3} - m_Name: - m_EditorClassIdentifier: - text: Physically Based Shader diff --git a/Shader Forge/Assets/ShaderForge/Example Scene.unity.meta b/Shader Forge/Assets/ShaderForge/Example Scene.unity.meta deleted file mode 100644 index 04378d0f..00000000 --- a/Shader Forge/Assets/ShaderForge/Example Scene.unity.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 2db7122e3ce1796498a39efd913c754a -DefaultImporter: - userData: diff --git a/Shader Forge/ProjectSettings/AudioManager.asset b/Shader Forge/ProjectSettings/AudioManager.asset deleted file mode 100644 index ec6be29c..00000000 --- a/Shader Forge/ProjectSettings/AudioManager.asset +++ /dev/null @@ -1,12 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!11 &1 -AudioManager: - m_ObjectHideFlags: 0 - m_Volume: 1 - Rolloff Scale: 1 - m_SpeedOfSound: 347 - Doppler Factor: 1 - Default Speaker Mode: 2 - m_DSPBufferSize: 0 - m_DisableAudio: 0 diff --git a/Shader Forge/ProjectSettings/ClusterInputManager.asset b/Shader Forge/ProjectSettings/ClusterInputManager.asset deleted file mode 100644 index e7886b26..00000000 --- a/Shader Forge/ProjectSettings/ClusterInputManager.asset +++ /dev/null @@ -1,6 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!236 &1 -ClusterInputManager: - m_ObjectHideFlags: 0 - m_Inputs: [] diff --git a/Shader Forge/ProjectSettings/DynamicsManager.asset b/Shader Forge/ProjectSettings/DynamicsManager.asset deleted file mode 100644 index 717b5c27..00000000 --- a/Shader Forge/ProjectSettings/DynamicsManager.asset +++ /dev/null @@ -1,15 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!55 &1 -PhysicsManager: - m_ObjectHideFlags: 0 - m_Gravity: {x: 0, y: -9.81000042, z: 0} - m_DefaultMaterial: {fileID: 0} - m_BounceThreshold: 2 - m_SleepVelocity: .150000006 - m_SleepAngularVelocity: .140000001 - m_MaxAngularVelocity: 7 - m_MinPenetrationForPenalty: .00999999978 - m_SolverIterationCount: 6 - m_RaycastsHitTriggers: 1 - m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff diff --git a/Shader Forge/ProjectSettings/EditorBuildSettings.asset b/Shader Forge/ProjectSettings/EditorBuildSettings.asset deleted file mode 100644 index d5b5c7c1..00000000 --- a/Shader Forge/ProjectSettings/EditorBuildSettings.asset +++ /dev/null @@ -1,9 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1045 &1 -EditorBuildSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Scenes: - - enabled: 0 - path: Assets/Scenes/Level.unity diff --git a/Shader Forge/ProjectSettings/EditorSettings.asset b/Shader Forge/ProjectSettings/EditorSettings.asset deleted file mode 100644 index 7726ac9b..00000000 --- a/Shader Forge/ProjectSettings/EditorSettings.asset +++ /dev/null @@ -1,15 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!159 &1 -EditorSettings: - m_ObjectHideFlags: 0 - serializedVersion: 3 - m_ExternalVersionControlSupport: Hidden Meta Files - m_SerializationMode: 2 - m_WebSecurityEmulationEnabled: 0 - m_WebSecurityEmulationHostUrl: http://www.mydomain.com/mygame.unity3d - m_DefaultBehaviorMode: 0 - m_SpritePackerMode: 2 - m_SpritePackerPaddingPower: 1 - m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd - m_ProjectGenerationRootNamespace: diff --git a/Shader Forge/ProjectSettings/GraphicsSettings.asset b/Shader Forge/ProjectSettings/GraphicsSettings.asset deleted file mode 100644 index 89a8e284..00000000 --- a/Shader Forge/ProjectSettings/GraphicsSettings.asset +++ /dev/null @@ -1,76 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!30 &1 -GraphicsSettings: - m_ObjectHideFlags: 0 - serializedVersion: 12 - m_Deferred: - m_Mode: 1 - m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} - m_DeferredReflections: - m_Mode: 1 - m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} - m_ScreenSpaceShadows: - m_Mode: 1 - m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} - m_LegacyDeferred: - m_Mode: 1 - m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} - m_DepthNormals: - m_Mode: 1 - m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} - m_MotionVectors: - m_Mode: 1 - m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} - m_LightHalo: - m_Mode: 1 - m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} - m_LensFlare: - m_Mode: 1 - m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} - m_AlwaysIncludedShaders: - - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} - - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} - - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} - - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} - - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} - - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} - m_PreloadedShaders: [] - m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, - type: 0} - m_CustomRenderPipeline: {fileID: 0} - m_TransparencySortMode: 0 - m_TransparencySortAxis: {x: 0, y: 0, z: 1} - m_DefaultRenderingPath: 3 - m_DefaultMobileRenderingPath: 1 - m_TierSettings: - - serializedVersion: 4 - m_BuildTarget: 1 - m_Tier: 2 - m_Settings: - standardShaderQuality: 2 - renderingPath: 1 - hdrMode: 1 - realtimeGICPUUsage: 50 - useReflectionProbeBoxProjection: 1 - useReflectionProbeBlending: 1 - useHDR: 1 - useDetailNormalMap: 0 - useCascadedShadowMaps: 1 - useDitherMaskForAlphaBlendedShadows: 0 - m_Automatic: 0 - m_LightmapStripping: 0 - m_FogStripping: 0 - m_InstancingStripping: 0 - m_LightmapKeepPlain: 1 - m_LightmapKeepDirCombined: 1 - m_LightmapKeepDynamicPlain: 1 - m_LightmapKeepDynamicDirCombined: 1 - m_LightmapKeepShadowMask: 1 - m_LightmapKeepSubtractive: 1 - m_FogKeepLinear: 1 - m_FogKeepExp: 1 - m_FogKeepExp2: 1 - m_AlbedoSwatchInfos: [] - m_LightsUseLinearIntensity: 0 - m_LightsUseColorTemperature: 0 diff --git a/Shader Forge/ProjectSettings/InputManager.asset b/Shader Forge/ProjectSettings/InputManager.asset deleted file mode 100644 index 21863fbd..00000000 --- a/Shader Forge/ProjectSettings/InputManager.asset +++ /dev/null @@ -1,246 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!13 &1 -InputManager: - m_ObjectHideFlags: 0 - m_Axes: - - serializedVersion: 3 - m_Name: Horizontal - descriptiveName: - descriptiveNegativeName: - negativeButton: left - positiveButton: right - altNegativeButton: a - altPositiveButton: d - gravity: 3 - dead: .00100000005 - sensitivity: 3 - snap: 1 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Vertical - descriptiveName: - descriptiveNegativeName: - negativeButton: down - positiveButton: up - altNegativeButton: s - altPositiveButton: w - gravity: 3 - dead: .00100000005 - sensitivity: 3 - snap: 1 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire1 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: left ctrl - altNegativeButton: - altPositiveButton: mouse 0 - gravity: 1000 - dead: .00100000005 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire2 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: left alt - altNegativeButton: - altPositiveButton: mouse 1 - gravity: 1000 - dead: .00100000005 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire3 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: left cmd - altNegativeButton: - altPositiveButton: mouse 2 - gravity: 1000 - dead: .00100000005 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Jump - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: space - altNegativeButton: up - altPositiveButton: - gravity: 1000 - dead: .00100000005 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Mouse X - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0 - sensitivity: .100000001 - snap: 0 - invert: 0 - type: 1 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Mouse Y - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0 - sensitivity: .100000001 - snap: 0 - invert: 0 - type: 1 - axis: 1 - joyNum: 0 - - serializedVersion: 3 - m_Name: Mouse ScrollWheel - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0 - sensitivity: .100000001 - snap: 0 - invert: 0 - type: 1 - axis: 2 - joyNum: 0 - - serializedVersion: 3 - m_Name: Horizontal - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: .189999998 - sensitivity: 1 - snap: 0 - invert: 0 - type: 2 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Vertical - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: .189999998 - sensitivity: 1 - snap: 0 - invert: 1 - type: 2 - axis: 1 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire1 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 0 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: .00100000005 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire2 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 1 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: .00100000005 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire3 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 2 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: .00100000005 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Jump - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 3 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: .00100000005 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 diff --git a/Shader Forge/ProjectSettings/NavMeshAreas.asset b/Shader Forge/ProjectSettings/NavMeshAreas.asset deleted file mode 100644 index 79cb3ae9..00000000 --- a/Shader Forge/ProjectSettings/NavMeshAreas.asset +++ /dev/null @@ -1,133 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!126 &1 -NavMeshLayers: - m_ObjectHideFlags: 0 - Built-in Layer 0: - name: Default - cost: 1 - editType: 2 - Built-in Layer 1: - name: Not Walkable - cost: 1 - editType: 0 - Built-in Layer 2: - name: Jump - cost: 2 - editType: 2 - User Layer 0: - name: - cost: 1 - editType: 3 - User Layer 1: - name: - cost: 1 - editType: 3 - User Layer 2: - name: - cost: 1 - editType: 3 - User Layer 3: - name: - cost: 1 - editType: 3 - User Layer 4: - name: - cost: 1 - editType: 3 - User Layer 5: - name: - cost: 1 - editType: 3 - User Layer 6: - name: - cost: 1 - editType: 3 - User Layer 7: - name: - cost: 1 - editType: 3 - User Layer 8: - name: - cost: 1 - editType: 3 - User Layer 9: - name: - cost: 1 - editType: 3 - User Layer 10: - name: - cost: 1 - editType: 3 - User Layer 11: - name: - cost: 1 - editType: 3 - User Layer 12: - name: - cost: 1 - editType: 3 - User Layer 13: - name: - cost: 1 - editType: 3 - User Layer 14: - name: - cost: 1 - editType: 3 - User Layer 15: - name: - cost: 1 - editType: 3 - User Layer 16: - name: - cost: 1 - editType: 3 - User Layer 17: - name: - cost: 1 - editType: 3 - User Layer 18: - name: - cost: 1 - editType: 3 - User Layer 19: - name: - cost: 1 - editType: 3 - User Layer 20: - name: - cost: 1 - editType: 3 - User Layer 21: - name: - cost: 1 - editType: 3 - User Layer 22: - name: - cost: 1 - editType: 3 - User Layer 23: - name: - cost: 1 - editType: 3 - User Layer 24: - name: - cost: 1 - editType: 3 - User Layer 25: - name: - cost: 1 - editType: 3 - User Layer 26: - name: - cost: 1 - editType: 3 - User Layer 27: - name: - cost: 1 - editType: 3 - User Layer 28: - name: - cost: 1 - editType: 3 diff --git a/Shader Forge/ProjectSettings/NavMeshLayers.asset b/Shader Forge/ProjectSettings/NavMeshLayers.asset deleted file mode 100644 index 79cb3ae9..00000000 --- a/Shader Forge/ProjectSettings/NavMeshLayers.asset +++ /dev/null @@ -1,133 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!126 &1 -NavMeshLayers: - m_ObjectHideFlags: 0 - Built-in Layer 0: - name: Default - cost: 1 - editType: 2 - Built-in Layer 1: - name: Not Walkable - cost: 1 - editType: 0 - Built-in Layer 2: - name: Jump - cost: 2 - editType: 2 - User Layer 0: - name: - cost: 1 - editType: 3 - User Layer 1: - name: - cost: 1 - editType: 3 - User Layer 2: - name: - cost: 1 - editType: 3 - User Layer 3: - name: - cost: 1 - editType: 3 - User Layer 4: - name: - cost: 1 - editType: 3 - User Layer 5: - name: - cost: 1 - editType: 3 - User Layer 6: - name: - cost: 1 - editType: 3 - User Layer 7: - name: - cost: 1 - editType: 3 - User Layer 8: - name: - cost: 1 - editType: 3 - User Layer 9: - name: - cost: 1 - editType: 3 - User Layer 10: - name: - cost: 1 - editType: 3 - User Layer 11: - name: - cost: 1 - editType: 3 - User Layer 12: - name: - cost: 1 - editType: 3 - User Layer 13: - name: - cost: 1 - editType: 3 - User Layer 14: - name: - cost: 1 - editType: 3 - User Layer 15: - name: - cost: 1 - editType: 3 - User Layer 16: - name: - cost: 1 - editType: 3 - User Layer 17: - name: - cost: 1 - editType: 3 - User Layer 18: - name: - cost: 1 - editType: 3 - User Layer 19: - name: - cost: 1 - editType: 3 - User Layer 20: - name: - cost: 1 - editType: 3 - User Layer 21: - name: - cost: 1 - editType: 3 - User Layer 22: - name: - cost: 1 - editType: 3 - User Layer 23: - name: - cost: 1 - editType: 3 - User Layer 24: - name: - cost: 1 - editType: 3 - User Layer 25: - name: - cost: 1 - editType: 3 - User Layer 26: - name: - cost: 1 - editType: 3 - User Layer 27: - name: - cost: 1 - editType: 3 - User Layer 28: - name: - cost: 1 - editType: 3 diff --git a/Shader Forge/ProjectSettings/NavMeshProjectSettings.asset b/Shader Forge/ProjectSettings/NavMeshProjectSettings.asset deleted file mode 100644 index 79cb3ae9..00000000 --- a/Shader Forge/ProjectSettings/NavMeshProjectSettings.asset +++ /dev/null @@ -1,133 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!126 &1 -NavMeshLayers: - m_ObjectHideFlags: 0 - Built-in Layer 0: - name: Default - cost: 1 - editType: 2 - Built-in Layer 1: - name: Not Walkable - cost: 1 - editType: 0 - Built-in Layer 2: - name: Jump - cost: 2 - editType: 2 - User Layer 0: - name: - cost: 1 - editType: 3 - User Layer 1: - name: - cost: 1 - editType: 3 - User Layer 2: - name: - cost: 1 - editType: 3 - User Layer 3: - name: - cost: 1 - editType: 3 - User Layer 4: - name: - cost: 1 - editType: 3 - User Layer 5: - name: - cost: 1 - editType: 3 - User Layer 6: - name: - cost: 1 - editType: 3 - User Layer 7: - name: - cost: 1 - editType: 3 - User Layer 8: - name: - cost: 1 - editType: 3 - User Layer 9: - name: - cost: 1 - editType: 3 - User Layer 10: - name: - cost: 1 - editType: 3 - User Layer 11: - name: - cost: 1 - editType: 3 - User Layer 12: - name: - cost: 1 - editType: 3 - User Layer 13: - name: - cost: 1 - editType: 3 - User Layer 14: - name: - cost: 1 - editType: 3 - User Layer 15: - name: - cost: 1 - editType: 3 - User Layer 16: - name: - cost: 1 - editType: 3 - User Layer 17: - name: - cost: 1 - editType: 3 - User Layer 18: - name: - cost: 1 - editType: 3 - User Layer 19: - name: - cost: 1 - editType: 3 - User Layer 20: - name: - cost: 1 - editType: 3 - User Layer 21: - name: - cost: 1 - editType: 3 - User Layer 22: - name: - cost: 1 - editType: 3 - User Layer 23: - name: - cost: 1 - editType: 3 - User Layer 24: - name: - cost: 1 - editType: 3 - User Layer 25: - name: - cost: 1 - editType: 3 - User Layer 26: - name: - cost: 1 - editType: 3 - User Layer 27: - name: - cost: 1 - editType: 3 - User Layer 28: - name: - cost: 1 - editType: 3 diff --git a/Shader Forge/ProjectSettings/NetworkManager.asset b/Shader Forge/ProjectSettings/NetworkManager.asset deleted file mode 100644 index 5dc6a831..00000000 --- a/Shader Forge/ProjectSettings/NetworkManager.asset +++ /dev/null @@ -1,8 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!149 &1 -NetworkManager: - m_ObjectHideFlags: 0 - m_DebugLevel: 0 - m_Sendrate: 15 - m_AssetToPrefab: {} diff --git a/Shader Forge/ProjectSettings/Physics2DSettings.asset b/Shader Forge/ProjectSettings/Physics2DSettings.asset deleted file mode 100644 index aaa159b8..00000000 --- a/Shader Forge/ProjectSettings/Physics2DSettings.asset +++ /dev/null @@ -1,11 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!19 &1 -Physics2DSettings: - m_ObjectHideFlags: 0 - m_Gravity: {x: 0, y: -30} - m_DefaultMaterial: {fileID: 0} - m_VelocityIterations: 8 - m_PositionIterations: 3 - m_RaycastsHitTriggers: 1 - m_LayerCollisionMatrix: fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9fffffffefffffff2fffffff3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff diff --git a/Shader Forge/ProjectSettings/ProjectSettings.asset b/Shader Forge/ProjectSettings/ProjectSettings.asset deleted file mode 100644 index 4c64d802..00000000 --- a/Shader Forge/ProjectSettings/ProjectSettings.asset +++ /dev/null @@ -1,607 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!129 &1 -PlayerSettings: - m_ObjectHideFlags: 0 - serializedVersion: 11 - productGUID: 3a8984573b6d44decadf1ac29eacc6ec - AndroidProfiler: 0 - defaultScreenOrientation: 0 - targetDevice: 2 - useOnDemandResources: 0 - accelerometerFrequency: 60 - companyName: DefaultCompany - productName: _2D v3 - defaultCursor: {fileID: 0} - cursorHotspot: {x: 0, y: 0} - m_SplashScreenBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21176471, a: 1} - m_ShowUnitySplashScreen: 1 - m_ShowUnitySplashLogo: 1 - m_SplashScreenOverlayOpacity: 1 - m_SplashScreenAnimation: 1 - m_SplashScreenLogoStyle: 1 - m_SplashScreenDrawMode: 0 - m_SplashScreenBackgroundAnimationZoom: 1 - m_SplashScreenLogoAnimationZoom: 1 - m_SplashScreenBackgroundLandscapeAspect: 1 - m_SplashScreenBackgroundPortraitAspect: 1 - m_SplashScreenBackgroundLandscapeUvs: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - m_SplashScreenBackgroundPortraitUvs: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - m_SplashScreenLogos: [] - m_SplashScreenBackgroundLandscape: {fileID: 0} - m_SplashScreenBackgroundPortrait: {fileID: 0} - m_VirtualRealitySplashScreen: {fileID: 0} - m_HolographicTrackingLossScreen: {fileID: 0} - defaultScreenWidth: 1024 - defaultScreenHeight: 768 - defaultScreenWidthWeb: 960 - defaultScreenHeightWeb: 600 - m_StereoRenderingPath: 0 - m_ActiveColorSpace: 0 - m_MTRendering: 1 - m_MobileMTRendering: 0 - m_StackTraceTypes: 010000000100000001000000010000000100000001000000 - iosShowActivityIndicatorOnLoading: -1 - androidShowActivityIndicatorOnLoading: -1 - tizenShowActivityIndicatorOnLoading: -1 - iosAppInBackgroundBehavior: 0 - displayResolutionDialog: 1 - iosAllowHTTPDownload: 1 - allowedAutorotateToPortrait: 1 - allowedAutorotateToPortraitUpsideDown: 1 - allowedAutorotateToLandscapeRight: 1 - allowedAutorotateToLandscapeLeft: 1 - useOSAutorotation: 1 - use32BitDisplayBuffer: 1 - disableDepthAndStencilBuffers: 0 - defaultIsFullScreen: 1 - defaultIsNativeResolution: 1 - runInBackground: 1 - captureSingleScreen: 0 - muteOtherAudioSources: 0 - Prepare IOS For Recording: 0 - submitAnalytics: 1 - usePlayerLog: 1 - bakeCollisionMeshes: 0 - forceSingleInstance: 0 - resizableWindow: 0 - useMacAppStoreValidation: 0 - gpuSkinning: 1 - graphicsJobs: 0 - xboxPIXTextureCapture: 0 - xboxEnableAvatar: 0 - xboxEnableKinect: 0 - xboxEnableKinectAutoTracking: 0 - xboxEnableFitness: 0 - visibleInBackground: 0 - allowFullscreenSwitch: 1 - graphicsJobMode: 0 - macFullscreenMode: 2 - d3d9FullscreenMode: 1 - d3d11FullscreenMode: 1 - xboxSpeechDB: 0 - xboxEnableHeadOrientation: 0 - xboxEnableGuest: 0 - xboxEnablePIXSampling: 0 - n3dsDisableStereoscopicView: 0 - n3dsEnableSharedListOpt: 1 - n3dsEnableVSync: 0 - ignoreAlphaClear: 0 - xboxOneResolution: 0 - xboxOneMonoLoggingLevel: 0 - xboxOneLoggingLevel: 1 - videoMemoryForVertexBuffers: 0 - psp2PowerMode: 0 - psp2AcquireBGM: 1 - wiiUTVResolution: 0 - wiiUGamePadMSAA: 1 - wiiUSupportsNunchuk: 0 - wiiUSupportsClassicController: 0 - wiiUSupportsBalanceBoard: 0 - wiiUSupportsMotionPlus: 0 - wiiUSupportsProController: 0 - wiiUAllowScreenCapture: 1 - wiiUControllerCount: 0 - m_SupportedAspectRatios: - 4:3: 1 - 5:4: 1 - 16:10: 1 - 16:9: 1 - Others: 1 - bundleVersion: 1.0 - preloadedAssets: [] - metroInputSource: 0 - m_HolographicPauseOnTrackingLoss: 1 - xboxOneDisableKinectGpuReservation: 0 - xboxOneEnable7thCore: 0 - vrSettings: - cardboard: - depthFormat: 0 - enableTransitionView: 0 - daydream: - depthFormat: 0 - useSustainedPerformanceMode: 0 - hololens: - depthFormat: 1 - protectGraphicsMemory: 0 - useHDRDisplay: 0 - applicationIdentifier: - Android: com.Company.ProductName - Standalone: unity.DefaultCompany._2D v3 - Tizen: com.Company.ProductName - iOS: com.Company.ProductName - tvOS: com.Company.ProductName - buildNumber: - iOS: 0 - AndroidBundleVersionCode: 1 - AndroidMinSdkVersion: 16 - AndroidTargetSdkVersion: 0 - AndroidPreferredInstallLocation: 1 - aotOptions: - stripEngineCode: 1 - iPhoneStrippingLevel: 0 - iPhoneScriptCallOptimization: 0 - ForceInternetPermission: 0 - ForceSDCardPermission: 0 - CreateWallpaper: 0 - APKExpansionFiles: 0 - keepLoadedShadersAlive: 0 - StripUnusedMeshComponents: 0 - VertexChannelCompressionMask: - serializedVersion: 2 - m_Bits: 238 - iPhoneSdkVersion: 988 - iOSTargetOSVersionString: 6.0 - tvOSSdkVersion: 0 - tvOSRequireExtendedGameController: 0 - tvOSTargetOSVersionString: - uIPrerenderedIcon: 0 - uIRequiresPersistentWiFi: 0 - uIRequiresFullScreen: 1 - uIStatusBarHidden: 1 - uIExitOnSuspend: 0 - uIStatusBarStyle: 0 - iPhoneSplashScreen: {fileID: 0} - iPhoneHighResSplashScreen: {fileID: 0} - iPhoneTallHighResSplashScreen: {fileID: 0} - iPhone47inSplashScreen: {fileID: 0} - iPhone55inPortraitSplashScreen: {fileID: 0} - iPhone55inLandscapeSplashScreen: {fileID: 0} - iPadPortraitSplashScreen: {fileID: 0} - iPadHighResPortraitSplashScreen: {fileID: 0} - iPadLandscapeSplashScreen: {fileID: 0} - iPadHighResLandscapeSplashScreen: {fileID: 0} - appleTVSplashScreen: {fileID: 0} - tvOSSmallIconLayers: [] - tvOSLargeIconLayers: [] - tvOSTopShelfImageLayers: [] - tvOSTopShelfImageWideLayers: [] - iOSLaunchScreenType: 0 - iOSLaunchScreenPortrait: {fileID: 0} - iOSLaunchScreenLandscape: {fileID: 0} - iOSLaunchScreenBackgroundColor: - serializedVersion: 2 - rgba: 2795137446 - iOSLaunchScreenFillPct: 100 - iOSLaunchScreenSize: 100 - iOSLaunchScreenCustomXibPath: - iOSLaunchScreeniPadType: 0 - iOSLaunchScreeniPadImage: {fileID: 0} - iOSLaunchScreeniPadBackgroundColor: - serializedVersion: 2 - rgba: 0 - iOSLaunchScreeniPadFillPct: 100 - iOSLaunchScreeniPadSize: 100 - iOSLaunchScreeniPadCustomXibPath: - iOSDeviceRequirements: [] - iOSURLSchemes: [] - iOSBackgroundModes: 0 - iOSMetalForceHardShadows: 0 - metalEditorSupport: 1 - metalAPIValidation: 1 - appleDeveloperTeamID: - iOSManualSigningProvisioningProfileID: - tvOSManualSigningProvisioningProfileID: - appleEnableAutomaticSigning: 0 - AndroidTargetDevice: 0 - AndroidSplashScreenScale: 0 - androidSplashScreen: {fileID: 0} - AndroidKeystoreName: - AndroidKeyaliasName: - AndroidTVCompatibility: 1 - AndroidIsGame: 1 - androidEnableBanner: 1 - m_AndroidBanners: - - width: 320 - height: 180 - banner: {fileID: 0} - androidGamepadSupportLevel: 0 - resolutionDialogBanner: {fileID: 0} - m_BuildTargetIcons: - - m_BuildTarget: - m_Icons: - - serializedVersion: 2 - m_Icon: {fileID: 0} - m_Width: 1 - m_Height: 1 - m_BuildTargetBatching: [] - m_BuildTargetGraphicsAPIs: [] - m_BuildTargetVRSettings: [] - openGLRequireES31: 0 - openGLRequireES31AEP: 0 - webPlayerTemplate: APPLICATION:Default - m_TemplateCustomTags: {} - wiiUTitleID: 0005000011000000 - wiiUGroupID: 00010000 - wiiUCommonSaveSize: 4096 - wiiUAccountSaveSize: 2048 - wiiUOlvAccessKey: 0 - wiiUTinCode: 0 - wiiUJoinGameId: 0 - wiiUJoinGameModeMask: 0000000000000000 - wiiUCommonBossSize: 0 - wiiUAccountBossSize: 0 - wiiUAddOnUniqueIDs: [] - wiiUMainThreadStackSize: 3072 - wiiULoaderThreadStackSize: 1024 - wiiUSystemHeapSize: 128 - wiiUTVStartupScreen: {fileID: 0} - wiiUGamePadStartupScreen: {fileID: 0} - wiiUDrcBufferDisabled: 0 - wiiUProfilerLibPath: - actionOnDotNetUnhandledException: 1 - enableInternalProfiler: 0 - logObjCUncaughtExceptions: 1 - enableCrashReportAPI: 0 - cameraUsageDescription: - locationUsageDescription: - microphoneUsageDescription: - switchNetLibKey: - switchSocketMemoryPoolSize: 6144 - switchSocketAllocatorPoolSize: 128 - switchSocketConcurrencyLimit: 14 - switchUseCPUProfiler: 0 - switchApplicationID: 0x0005000C10000001 - switchNSODependencies: - switchTitleNames_0: - switchTitleNames_1: - switchTitleNames_2: - switchTitleNames_3: - switchTitleNames_4: - switchTitleNames_5: - switchTitleNames_6: - switchTitleNames_7: - switchTitleNames_8: - switchTitleNames_9: - switchTitleNames_10: - switchTitleNames_11: - switchTitleNames_12: - switchTitleNames_13: - switchTitleNames_14: - switchPublisherNames_0: - switchPublisherNames_1: - switchPublisherNames_2: - switchPublisherNames_3: - switchPublisherNames_4: - switchPublisherNames_5: - switchPublisherNames_6: - switchPublisherNames_7: - switchPublisherNames_8: - switchPublisherNames_9: - switchPublisherNames_10: - switchPublisherNames_11: - switchPublisherNames_12: - switchPublisherNames_13: - switchPublisherNames_14: - switchIcons_0: {fileID: 0} - switchIcons_1: {fileID: 0} - switchIcons_2: {fileID: 0} - switchIcons_3: {fileID: 0} - switchIcons_4: {fileID: 0} - switchIcons_5: {fileID: 0} - switchIcons_6: {fileID: 0} - switchIcons_7: {fileID: 0} - switchIcons_8: {fileID: 0} - switchIcons_9: {fileID: 0} - switchIcons_10: {fileID: 0} - switchIcons_11: {fileID: 0} - switchIcons_12: {fileID: 0} - switchIcons_13: {fileID: 0} - switchIcons_14: {fileID: 0} - switchSmallIcons_0: {fileID: 0} - switchSmallIcons_1: {fileID: 0} - switchSmallIcons_2: {fileID: 0} - switchSmallIcons_3: {fileID: 0} - switchSmallIcons_4: {fileID: 0} - switchSmallIcons_5: {fileID: 0} - switchSmallIcons_6: {fileID: 0} - switchSmallIcons_7: {fileID: 0} - switchSmallIcons_8: {fileID: 0} - switchSmallIcons_9: {fileID: 0} - switchSmallIcons_10: {fileID: 0} - switchSmallIcons_11: {fileID: 0} - switchSmallIcons_12: {fileID: 0} - switchSmallIcons_13: {fileID: 0} - switchSmallIcons_14: {fileID: 0} - switchManualHTML: - switchAccessibleURLs: - switchLegalInformation: - switchMainThreadStackSize: 1048576 - switchPresenceGroupId: 0x0005000C10000001 - switchLogoHandling: 0 - switchReleaseVersion: 0 - switchDisplayVersion: 1.0.0 - switchStartupUserAccount: 0 - switchTouchScreenUsage: 0 - switchSupportedLanguagesMask: 0 - switchLogoType: 0 - switchApplicationErrorCodeCategory: - switchUserAccountSaveDataSize: 0 - switchUserAccountSaveDataJournalSize: 0 - switchAttribute: 0 - switchCardSpecSize: 4 - switchCardSpecClock: 25 - switchRatingsMask: 0 - switchRatingsInt_0: 0 - switchRatingsInt_1: 0 - switchRatingsInt_2: 0 - switchRatingsInt_3: 0 - switchRatingsInt_4: 0 - switchRatingsInt_5: 0 - switchRatingsInt_6: 0 - switchRatingsInt_7: 0 - switchRatingsInt_8: 0 - switchRatingsInt_9: 0 - switchRatingsInt_10: 0 - switchRatingsInt_11: 0 - switchLocalCommunicationIds_0: 0x0005000C10000001 - switchLocalCommunicationIds_1: - switchLocalCommunicationIds_2: - switchLocalCommunicationIds_3: - switchLocalCommunicationIds_4: - switchLocalCommunicationIds_5: - switchLocalCommunicationIds_6: - switchLocalCommunicationIds_7: - switchParentalControl: 0 - switchAllowsScreenshot: 1 - switchDataLossConfirmation: 0 - ps4NPAgeRating: 12 - ps4NPTitleSecret: - ps4NPTrophyPackPath: - ps4ParentalLevel: 1 - ps4ContentID: ED1633-NPXX51362_00-0000000000000000 - ps4Category: 0 - ps4MasterVersion: 01.00 - ps4AppVersion: 01.00 - ps4AppType: 0 - ps4ParamSfxPath: - ps4VideoOutPixelFormat: 0 - ps4VideoOutInitialWidth: 1920 - ps4VideoOutBaseModeInitialWidth: 1920 - ps4VideoOutReprojectionRate: 120 - ps4PronunciationXMLPath: - ps4PronunciationSIGPath: - ps4BackgroundImagePath: - ps4StartupImagePath: - ps4SaveDataImagePath: - ps4SdkOverride: - ps4BGMPath: - ps4ShareFilePath: - ps4ShareOverlayImagePath: - ps4PrivacyGuardImagePath: - ps4NPtitleDatPath: - ps4RemotePlayKeyAssignment: -1 - ps4RemotePlayKeyMappingDir: - ps4PlayTogetherPlayerCount: 0 - ps4EnterButtonAssignment: 1 - ps4ApplicationParam1: 0 - ps4ApplicationParam2: 0 - ps4ApplicationParam3: 0 - ps4ApplicationParam4: 0 - ps4DownloadDataSize: 0 - ps4GarlicHeapSize: 2048 - ps4ProGarlicHeapSize: 2560 - ps4Passcode: 1O8YFOGKjxRrJBdT3hVOfoaMeAjSWfch - ps4UseDebugIl2cppLibs: 0 - ps4pnSessions: 1 - ps4pnPresence: 1 - ps4pnFriends: 1 - ps4pnGameCustomData: 1 - playerPrefsSupport: 0 - restrictedAudioUsageRights: 0 - ps4UseResolutionFallback: 0 - ps4ReprojectionSupport: 0 - ps4UseAudio3dBackend: 0 - ps4SocialScreenEnabled: 0 - ps4ScriptOptimizationLevel: 3 - ps4Audio3dVirtualSpeakerCount: 14 - ps4attribCpuUsage: 0 - ps4PatchPkgPath: - ps4PatchLatestPkgPath: - ps4PatchChangeinfoPath: - ps4PatchDayOne: 0 - ps4attribUserManagement: 0 - ps4attribMoveSupport: 0 - ps4attrib3DSupport: 0 - ps4attribShareSupport: 0 - ps4attribExclusiveVR: 0 - ps4disableAutoHideSplash: 0 - ps4videoRecordingFeaturesUsed: 0 - ps4contentSearchFeaturesUsed: 0 - ps4attribEyeToEyeDistanceSettingVR: 0 - ps4IncludedModules: [] - monoEnv: - psp2Splashimage: {fileID: 0} - psp2NPTrophyPackPath: - psp2NPSupportGBMorGJP: 0 - psp2NPAgeRating: 12 - psp2NPTitleDatPath: - psp2NPCommsID: - psp2NPCommunicationsID: - psp2NPCommsPassphrase: - psp2NPCommsSig: - psp2ParamSfxPath: - psp2ManualPath: - psp2LiveAreaGatePath: - psp2LiveAreaBackroundPath: - psp2LiveAreaPath: - psp2LiveAreaTrialPath: - psp2PatchChangeInfoPath: - psp2PatchOriginalPackage: - psp2PackagePassword: oZYFYZ5B6kzMCk8R6BEuZMrF6cI6NX8D - psp2KeystoneFile: - psp2MemoryExpansionMode: 0 - psp2DRMType: 0 - psp2StorageType: 0 - psp2MediaCapacity: 0 - psp2DLCConfigPath: - psp2ThumbnailPath: - psp2BackgroundPath: - psp2SoundPath: - psp2TrophyCommId: - psp2TrophyPackagePath: - psp2PackagedResourcesPath: - psp2SaveDataQuota: 10240 - psp2ParentalLevel: 1 - psp2ShortTitle: Not Set - psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF - psp2Category: 0 - psp2MasterVersion: 01.00 - psp2AppVersion: 01.00 - psp2TVBootMode: 0 - psp2EnterButtonAssignment: 2 - psp2TVDisableEmu: 0 - psp2AllowTwitterDialog: 1 - psp2Upgradable: 0 - psp2HealthWarning: 0 - psp2UseLibLocation: 0 - psp2InfoBarOnStartup: 0 - psp2InfoBarColor: 0 - psp2UseDebugIl2cppLibs: 0 - psmSplashimage: {fileID: 0} - splashScreenBackgroundSourceLandscape: {fileID: 0} - splashScreenBackgroundSourcePortrait: {fileID: 0} - spritePackerPolicy: DefaultPackerPolicy - webGLMemorySize: 256 - webGLExceptionSupport: 0 - webGLNameFilesAsHashes: 0 - webGLDataCaching: 0 - webGLDebugSymbols: 0 - webGLEmscriptenArgs: - webGLModulesDirectory: - webGLTemplate: APPLICATION:Default - webGLAnalyzeBuildSize: 0 - webGLUseEmbeddedResources: 0 - webGLUseWasm: 0 - webGLCompressionFormat: 1 - scriptingDefineSymbols: {} - platformArchitecture: - iOS: 2 - scriptingBackend: - Android: 0 - Metro: 2 - Standalone: 0 - WP8: 2 - WebGL: 1 - iOS: 0 - incrementalIl2cppBuild: - iOS: 0 - additionalIl2CppArgs: - apiCompatibilityLevelPerPlatform: {} - m_RenderingPath: 3 - m_MobileRenderingPath: 1 - metroPackageName: _2D v3 - metroPackageVersion: - metroCertificatePath: - metroCertificatePassword: - metroCertificateSubject: - metroCertificateIssuer: - metroCertificateNotAfter: 0000000000000000 - metroApplicationDescription: _2D v3 - wsaImages: {} - metroTileShortName: - metroCommandLineArgsFile: - metroTileShowName: 1 - metroMediumTileShowName: 0 - metroLargeTileShowName: 0 - metroWideTileShowName: 0 - metroDefaultTileSize: 1 - metroTileForegroundText: 1 - metroTileBackgroundColor: {r: 0, g: 0, b: 0, a: 1} - metroSplashScreenBackgroundColor: {r: 0, g: 0, b: 0, a: 1} - metroSplashScreenUseBackgroundColor: 0 - platformCapabilities: {} - metroFTAName: - metroFTAFileTypes: [] - metroProtocolName: - metroCompilationOverrides: 1 - tizenProductDescription: - tizenProductURL: - tizenSigningProfileName: - tizenGPSPermissions: 0 - tizenMicrophonePermissions: 0 - tizenDeploymentTarget: - tizenDeploymentTargetType: -1 - tizenMinOSVersion: 1 - n3dsUseExtSaveData: 0 - n3dsCompressStaticMem: 1 - n3dsExtSaveDataNumber: 0x12345 - n3dsStackSize: 131072 - n3dsTargetPlatform: 2 - n3dsRegion: 7 - n3dsMediaSize: 0 - n3dsLogoStyle: 3 - n3dsTitle: GameName - n3dsProductCode: - n3dsApplicationId: 0xFF3FF - stvDeviceAddress: - stvProductDescription: - stvProductAuthor: - stvProductAuthorEmail: - stvProductLink: - stvProductCategory: 0 - XboxOneProductId: - XboxOneUpdateKey: - XboxOneSandboxId: - XboxOneContentId: - XboxOneTitleId: - XboxOneSCId: - XboxOneGameOsOverridePath: - XboxOnePackagingOverridePath: - XboxOneAppManifestOverridePath: - XboxOnePackageEncryption: 0 - XboxOnePackageUpdateGranularity: 2 - XboxOneDescription: - XboxOneLanguage: - - enus - XboxOneCapability: [] - XboxOneGameRating: {} - XboxOneIsContentPackage: 0 - XboxOneEnableGPUVariability: 0 - XboxOneSockets: {} - XboxOneSplashScreen: {fileID: 0} - XboxOneAllowedProductIds: [] - XboxOnePersistentLocalStorageSize: 0 - xboxOneScriptCompiler: 0 - vrEditorSettings: - daydream: - daydreamIconForeground: {fileID: 0} - daydreamIconBackground: {fileID: 0} - cloudServicesEnabled: {} - facebookSdkVersion: 7.9.1 - apiCompatibilityLevel: 2 - cloudProjectId: - projectName: - organizationId: - cloudEnabled: 0 - enableNewInputSystem: 0 diff --git a/Shader Forge/ProjectSettings/ProjectVersion.txt b/Shader Forge/ProjectSettings/ProjectVersion.txt deleted file mode 100644 index ca09a3da..00000000 --- a/Shader Forge/ProjectSettings/ProjectVersion.txt +++ /dev/null @@ -1 +0,0 @@ -m_EditorVersion: 5.6.0f3 diff --git a/Shader Forge/ProjectSettings/QualitySettings.asset b/Shader Forge/ProjectSettings/QualitySettings.asset deleted file mode 100644 index 63befb94..00000000 --- a/Shader Forge/ProjectSettings/QualitySettings.asset +++ /dev/null @@ -1,174 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!47 &1 -QualitySettings: - m_ObjectHideFlags: 0 - serializedVersion: 5 - m_CurrentQuality: 5 - m_QualitySettings: - - serializedVersion: 2 - name: Fastest - pixelLightCount: 0 - shadows: 0 - shadowResolution: 0 - shadowProjection: 1 - shadowCascades: 1 - shadowDistance: 15 - shadowNearPlaneOffset: 2 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - blendWeights: 1 - textureQuality: 1 - anisotropicTextures: 0 - antiAliasing: 0 - softParticles: 0 - softVegetation: 0 - realtimeReflectionProbes: 0 - billboardsFaceCameraPosition: 0 - vSyncCount: 0 - lodBias: 0.3 - maximumLODLevel: 0 - particleRaycastBudget: 4 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 4 - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: Fast - pixelLightCount: 0 - shadows: 0 - shadowResolution: 0 - shadowProjection: 1 - shadowCascades: 1 - shadowDistance: 20 - shadowNearPlaneOffset: 2 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - blendWeights: 2 - textureQuality: 0 - anisotropicTextures: 0 - antiAliasing: 0 - softParticles: 0 - softVegetation: 0 - realtimeReflectionProbes: 0 - billboardsFaceCameraPosition: 0 - vSyncCount: 0 - lodBias: 0.4 - maximumLODLevel: 0 - particleRaycastBudget: 16 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 4 - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: Simple - pixelLightCount: 1 - shadows: 1 - shadowResolution: 0 - shadowProjection: 1 - shadowCascades: 1 - shadowDistance: 20 - shadowNearPlaneOffset: 2 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - blendWeights: 2 - textureQuality: 0 - anisotropicTextures: 1 - antiAliasing: 0 - softParticles: 0 - softVegetation: 0 - realtimeReflectionProbes: 0 - billboardsFaceCameraPosition: 0 - vSyncCount: 0 - lodBias: 0.7 - maximumLODLevel: 0 - particleRaycastBudget: 64 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 4 - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: Good - pixelLightCount: 2 - shadows: 2 - shadowResolution: 1 - shadowProjection: 1 - shadowCascades: 2 - shadowDistance: 40 - shadowNearPlaneOffset: 2 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - blendWeights: 2 - textureQuality: 0 - anisotropicTextures: 1 - antiAliasing: 0 - softParticles: 0 - softVegetation: 1 - realtimeReflectionProbes: 1 - billboardsFaceCameraPosition: 1 - vSyncCount: 1 - lodBias: 1 - maximumLODLevel: 0 - particleRaycastBudget: 256 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 4 - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: Beautiful - pixelLightCount: 3 - shadows: 2 - shadowResolution: 2 - shadowProjection: 1 - shadowCascades: 2 - shadowDistance: 70 - shadowNearPlaneOffset: 2 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - blendWeights: 4 - textureQuality: 0 - anisotropicTextures: 2 - antiAliasing: 2 - softParticles: 1 - softVegetation: 1 - realtimeReflectionProbes: 1 - billboardsFaceCameraPosition: 1 - vSyncCount: 1 - lodBias: 1.5 - maximumLODLevel: 0 - particleRaycastBudget: 1024 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 4 - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: Fantastic - pixelLightCount: 4 - shadows: 2 - shadowResolution: 2 - shadowProjection: 1 - shadowCascades: 4 - shadowDistance: 150 - shadowNearPlaneOffset: 2 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - blendWeights: 4 - textureQuality: 0 - anisotropicTextures: 2 - antiAliasing: 2 - softParticles: 1 - softVegetation: 1 - realtimeReflectionProbes: 1 - billboardsFaceCameraPosition: 1 - vSyncCount: 1 - lodBias: 2 - maximumLODLevel: 0 - particleRaycastBudget: 4096 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 4 - excludedTargetPlatforms: [] - m_PerPlatformDefaultQuality: - Android: 0 - Samsung TV: 0 - Standalone: 0 - Tizen: 0 - WP8: 0 - Web: 0 - WebGL: 0 - Windows Store Apps: 0 - iPhone: 0 diff --git a/Shader Forge/ProjectSettings/TagManager.asset b/Shader Forge/ProjectSettings/TagManager.asset deleted file mode 100644 index cadfd063..00000000 --- a/Shader Forge/ProjectSettings/TagManager.asset +++ /dev/null @@ -1,67 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!78 &1 -TagManager: - serializedVersion: 2 - tags: - - ground - - Crate - - Enemy - - Wall - - Obstacle - - Bullet - - BombPickup - - ExplosionFX - - HealthBar - layers: - - Default - - TransparentFX - - Ignore Raycast - - - - Water - - UI - - - - - - Bombs - - Player - - Enemies - - Pickups - - Ground - - Lightmap Test Unity - - Lightmap Test SF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - m_SortingLayers: - - name: Default - uniqueID: 0 - locked: 0 - - name: Default - uniqueID: 3363470833 - locked: 0 - - name: Background - uniqueID: 1535931219 - locked: 0 - - name: Character - uniqueID: 2511236001 - locked: 0 - - name: Foreground - uniqueID: 1024582385 - locked: 0 - - name: UI - uniqueID: 149272721 - locked: 0 diff --git a/Shader Forge/ProjectSettings/TimeManager.asset b/Shader Forge/ProjectSettings/TimeManager.asset deleted file mode 100644 index f0e494b6..00000000 --- a/Shader Forge/ProjectSettings/TimeManager.asset +++ /dev/null @@ -1,8 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!5 &1 -TimeManager: - m_ObjectHideFlags: 0 - Fixed Timestep: .0199999996 - Maximum Allowed Timestep: .333333343 - m_TimeScale: 1 diff --git a/Shader Forge/ProjectSettings/UnityConnectSettings.asset b/Shader Forge/ProjectSettings/UnityConnectSettings.asset deleted file mode 100644 index 2943e440..00000000 --- a/Shader Forge/ProjectSettings/UnityConnectSettings.asset +++ /dev/null @@ -1,29 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!310 &1 -UnityConnectSettings: - m_ObjectHideFlags: 0 - m_Enabled: 0 - m_TestMode: 0 - m_TestEventUrl: - m_TestConfigUrl: - CrashReportingSettings: - m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes - m_Enabled: 0 - m_CaptureEditorExceptions: 1 - UnityPurchasingSettings: - m_Enabled: 0 - m_TestMode: 0 - UnityAnalyticsSettings: - m_Enabled: 0 - m_InitializeOnStartup: 1 - m_TestMode: 0 - m_TestEventUrl: - m_TestConfigUrl: - UnityAdsSettings: - m_Enabled: 0 - m_InitializeOnStartup: 1 - m_TestMode: 0 - m_EnabledPlatforms: 4294967295 - m_IosGameId: - m_AndroidGameId: diff --git a/Shader Forge/TesterManual.txt b/Shader Forge/TesterManual.txt deleted file mode 100644 index 171ef8d9..00000000 --- a/Shader Forge/TesterManual.txt +++ /dev/null @@ -1,55 +0,0 @@ -Hello, person reading this text! -Welcome to the Shader Forge Alpha, and thanks for signing up to test it! - -You hopefully want to get going instantly, but please read this document first, it's not that long! - -Report bugs and request features here: -https://shaderforge.userecho.com/ - -List of some of the currently planned nodes and features: -https://docs.google.com/spreadsheet/ccc?key=0AqHpAiSNy9eDdGRaQ2hIbHpLVWtfbURSb1VRTlF0NGc&usp=sharing - - -Important Legal stuff: ----------------------- -- This is a test version solely for testing purposes, not a free license of Shader Forge, which means: -- Don't use shaders created in Shader Forge in a public project -- Don't share the code it creates to anyone apart from the alpha/beta testers -- Don't give this test version to anyone or publish it online etc -(Note that you are of course welcome (and encouraged) to share screenshots of Shader Forge and screenshots of shaders you've created in it publicly!) - - - -Installing: ------------ -Open a Unity project -> Double click the .unitypackage file you got in your mail -Unity plugins are per-project, so open the project you want to test the Shader Forge alpha in - - - -Quick start: ------------- -Opening Shader Forge = Window -> Shader Forge - Panning = Click and drag empty space - Zooming = (Coming later) - Adding nodes = RMB + select node OR pick from right panel and place (Dragging doesn't work at the moment) - Moving nodes = Click and drag - Deleting nodes = Hover cursor over and press delete -Deleting connections = Hover cursor over and press delete - - - -A few known issues: (More here: https://shaderforge.userecho.com/ ) -------------------- -- Shaders can't receive shadows -- Vertex lighting is mostly broken -- Only a directional light and ambient light is supported -- Loads of nodes are intentionally missing, check the feature list to see what is planned. If something is missing on that list, feel free to request it! - - - -Good luck! - - -// Joachim Holmér -// webmaster@acegikmo.com \ No newline at end of file diff --git a/Shader Forge/UpgradeLog.htm b/Shader Forge/UpgradeLog.htm deleted file mode 100644 index 53d35723..00000000 Binary files a/Shader Forge/UpgradeLog.htm and /dev/null differ diff --git a/ShaderForge.Editor.asmdef b/ShaderForge.Editor.asmdef new file mode 100644 index 00000000..4359ba8d --- /dev/null +++ b/ShaderForge.Editor.asmdef @@ -0,0 +1,15 @@ +{ + "name": "ShaderForge.Editor", + "references": [], + "optionalUnityReferences": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [] +} \ No newline at end of file diff --git a/ShaderForge.Editor.asmdef.meta b/ShaderForge.Editor.asmdef.meta new file mode 100644 index 00000000..b4b71ea3 --- /dev/null +++ b/ShaderForge.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 45f5547f1d49dfd448d26415f2ffa8b6 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/package.json b/package.json new file mode 100644 index 00000000..eff82e48 --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "name": "com.shaderforge", + "displayName": "ShaderForge", + "description": "", + "version": "1.0.0", + "unity": "2018.3", + "license": "" +} diff --git a/package.json.meta b/package.json.meta new file mode 100644 index 00000000..b065f182 --- /dev/null +++ b/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e1aa085476b4c534cbf61d95c54eb2ec +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: