├── .gitignore ├── Assets ├── SimplestarGame.meta └── SimplestarGame │ ├── SimpleURPToonLitOutlineExample.meta │ └── SimpleURPToonLitOutlineExample │ ├── Resources.meta │ ├── Resources │ ├── SimpleURPToonLitOutlineExample.meta │ ├── SimpleURPToonLitOutlineExample │ │ ├── LICENSE │ │ ├── LICENSE.meta │ │ ├── README.md │ │ ├── README.md.meta │ │ ├── SimpleURPToonLitOutlineExample.shader │ │ ├── SimpleURPToonLitOutlineExample.shader.meta │ │ ├── SimpleURPToonLitOutlineExample_LightingEquation.hlsl │ │ ├── SimpleURPToonLitOutlineExample_LightingEquation.hlsl.meta │ │ ├── SimpleURPToonLitOutlineExample_Shared.hlsl │ │ └── SimpleURPToonLitOutlineExample_Shared.hlsl.meta │ ├── SimpleURPTransparent.meta │ ├── SimpleURPTransparent │ │ ├── SimpleURPTransparent.mat │ │ ├── SimpleURPTransparent.mat.meta │ │ ├── SimpleURPTransparent.shadergraph │ │ └── SimpleURPTransparent.shadergraph.meta │ ├── Unity-Technologies.meta │ └── Unity-Technologies │ │ ├── ShaderGraph-Custom-Lighting.meta │ │ └── ShaderGraph-Custom-Lighting │ │ ├── Includes.meta │ │ ├── Includes │ │ ├── CustomLighting.hlsl │ │ └── CustomLighting.hlsl.meta │ │ ├── Sub Graphs.meta │ │ └── Sub Graphs │ │ ├── Calculate Additional Lights.shadersubgraph │ │ ├── Calculate Additional Lights.shadersubgraph.meta │ │ ├── Calculate Lighting.shadersubgraph │ │ ├── Calculate Lighting.shadersubgraph.meta │ │ ├── Calculate Main Light.shadersubgraph │ │ ├── Calculate Main Light.shadersubgraph.meta │ │ ├── Direct Specular.shadersubgraph │ │ ├── Direct Specular.shadersubgraph.meta │ │ ├── Get Main Light.shadersubgraph │ │ └── Get Main Light.shadersubgraph.meta │ ├── Scripts.meta │ └── Scripts │ ├── MaterialFactory.cs │ └── MaterialFactory.cs.meta ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Uu]ser[Ss]ettings/ 12 | /[Pp]ackages/ 13 | /[Pp]rojectSettings/ 14 | 15 | # MemoryCaptures can get excessive in size. 16 | # They also could contain extremely sensitive data 17 | /[Mm]emoryCaptures/ 18 | 19 | # Recordings can get excessive in size 20 | /[Rr]ecordings/ 21 | 22 | # Uncomment this line if you wish to ignore the asset store tools plugin 23 | # /[Aa]ssets/AssetStoreTools* 24 | 25 | # Autogenerated Jetbrains Rider plugin 26 | /[Aa]ssets/Plugins/Editor/JetBrains* 27 | 28 | # Visual Studio cache directory 29 | .vs/ 30 | 31 | # Gradle cache directory 32 | .gradle/ 33 | 34 | # Autogenerated VS/MD/Consulo solution and project files 35 | ExportedObj/ 36 | .consulo/ 37 | *.csproj 38 | *.unityproj 39 | *.sln 40 | *.suo 41 | *.tmp 42 | *.user 43 | *.userprefs 44 | *.pidb 45 | *.booproj 46 | *.svd 47 | *.pdb 48 | *.mdb 49 | *.opendb 50 | *.VC.db 51 | *.vsconfig 52 | 53 | # Unity3D generated meta files 54 | *.pidb.meta 55 | *.pdb.meta 56 | *.mdb.meta 57 | 58 | # Unity3D generated file on crash reports 59 | sysinfo.txt 60 | 61 | # Builds 62 | *.apk 63 | *.aab 64 | *.unitypackage 65 | *.app 66 | 67 | # Crashlytics generated file 68 | crashlytics-build.properties 69 | 70 | # Packed Addressables 71 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* 72 | 73 | # Temporary auto-generated Android Assets 74 | /[Aa]ssets/[Ss]treamingAssets/aa.meta 75 | /[Aa]ssets/[Ss]treamingAssets/aa/* -------------------------------------------------------------------------------- /Assets/SimplestarGame.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 79203bf4f7fd95b4a94b7831e327d3df 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e542a8bf17920ff42946d77b008aaa79 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 530eb760071262742b1e000e93695528 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/SimpleURPToonLitOutlineExample.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 47440e06c53d3fc4f9986921e4af081a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/SimpleURPToonLitOutlineExample/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 ColinLeung-NiloCat 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/SimpleURPToonLitOutlineExample/LICENSE.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6515dad3443d63f4dbff8d79ab382fbe 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/SimpleURPToonLitOutlineExample/README.md: -------------------------------------------------------------------------------- 1 | # Unity URP Simplified Toon Lit Shader Example (for you to learn writing custom lit shader in URP) 2 | 3 | This repository is NOT the full version shader, the full version shader is still WIP and not yet released. 4 | This repository is only for tutorial purpose, which only contains a very simple and short shader example. 5 | 6 | ## What is included in this "simplified version" toon lit shader repository? 7 | 8 | This repository contains a very simple toon lit shader example, to help people writing their first custom toon lit shader in URP. 9 | 10 | Because this example toon lit shader aims to help people learning shader writing in URP, it is an extremely simplified version of the full version one. This repository only contains ~10% of the full version shader, which only contains the most useful & easy to understand sections, to make sure everyone can understand the shader code easily. 11 | 12 | It is actually a "How to write your first custom lit shader in URP" example, instead of a good looking toon lit shader example (lots of toon lit tricks are not included in this example shader, for tutorial reason). 13 | 14 | ## Why creating this "simplified version" toon lit shader? 15 | 16 | Lots of my shader friends are looking for a toon lit example shader in URP (not Shader Graph), I want them to switch to URP with me (instead of still staying in built-in RP), so I decided to provide a simple enough URP toon lit shader example. 17 | 18 | ## How to try this simplified toon lit example shader in my URP project? 19 | 20 | 1. Clone all .shader & .hlsl files into your URP project. 21 | 2. Put these files inside the same folder. 22 | 3. Change your character's material's shader to "SimpleURPToonLitExample(With Outline)" 23 | 4. make sure atleast \_BaseMap(albedo) is assigned 24 | 5. setup DONE, you can now test your character with light probe/directional light/point light/spot light 25 | 6. edit the material properties to see how the render result changes 26 | 7. Most important: open these shader files, spend some time reading it, you will understand how to write custom lit shader in URP very quickly 27 | 8. Most important: open "SimpleURPToonLitOutlineExample_LightingEquation.hlsl", edit it, experiment with your own toon lighting equation ideas, which is the key part of toon lit shader! 28 | 29 | ## What is NOT included in this simplified example shader? 30 | 31 | For simplicity reason, I removed most of the features from the Full version shader (deleted 90% of the original shader), else this example shader will be way too complex for reading & learning. The removed features are: 32 | 33 | - face sphere proxy normal & direction proxy normal (fixing face ugly normals, very important) 34 | - smooth outline normal auto baking (fixing ugly outlines, very important) 35 | - constant outline fix for fov and distance to camera (outline looks correct in any situation, very important) 36 | - tricks to remove unwanted hair shadow casted on face (to keep face looks clean, very important) 37 | - tricks to render eye over hair 38 | - hair "angel ring" reflection 39 | - sharp rim light 40 | - PBR specular lighting (GGX) 41 | - HSV control shadow & outline color 42 | - 2D mouth renderer 43 | - stencil local hair shadow on face 44 | - physics and wind 45 | 46 | - almost all the extra texture input options like AO, specular, normal map... 47 | - LOTS of sliders to control lighting, final color & outline 48 | - \*\*\*just too much for me to write all removed feature here, the full version shader is a totally different level product 49 | 50 | ## When will the Full version toon lit shader release? 51 | 52 | We don't have ETA now, we are still working on it, here are some videos about the Full version toon lit shader: 53 | 54 | - https://youtu.be/uVI_QOioER4 55 | - https://youtu.be/YtAiCHBvZr0 56 | - https://youtu.be/QWB060rVjFI 57 | - https://youtu.be/URVgKT5c3PM 58 | - https://youtu.be/6Gx0LxByfWk 59 | - https://youtu.be/IP293mAmBCk 60 | - https://youtu.be/n_bFQ9GNhcM 61 | - https://youtu.be/HmuaWpL5Pi8 62 | - https://youtu.be/tNnqIP4NdV8 (current) 63 | - https://youtu.be/ZfSZOHTBypc (current) 64 | - https://youtu.be/cebGl_MaWnI (current) 65 | - https://youtu.be/Ty4DXLFqqDo (current) 66 | - https://youtu.be/EgxiWPk-vaE (current) 67 | - https://youtu.be/gcUCTLF5hwE (current) 68 | 69 | ## How to get a test character model? 70 | 71 | The easiest way to get a character model is by downloading Unity-Chan in the assetstore. 72 | 73 | Also, here are some websites that can download models(If the creator allows it) 74 | 75 | - https://3d.nicovideo.jp/ 76 | - https://hub.vroid.com/ 77 | 78 | if you downloaded a .pmx file, use this to convert it to .fbx & prefab directly inside unity 79 | 80 | MMD4Mecanim (Beta) 81 | http://stereoarts.jp/ 82 | 83 | if you downloaded a .vrm file, use this to convert it to .fbx & prefab directly inside unity 84 | 85 | UniVRM 86 | https://github.com/vrm-c/UniVRM 87 | 88 | ## Editor environment requirement 89 | 90 | - URP 7.2.1 or above 91 | - Unity 2019.3 or above 92 | 93 | --- 94 | 95 | ## More old screenshots from the Full version shader(not yet released): 96 | 97 | https://youtu.be/tNnqIP4NdV8 98 | 99 | --- 100 | 101 | Apply our shader to another model (2020-2 early version screen shots) 102 | https://youtu.be/uVI_QOioER4 103 | 104 | https://youtu.be/IP293mAmBCk 105 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/SimpleURPToonLitOutlineExample/README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4ac8fd140c2e4754d98dae1b7eaa916d 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/SimpleURPToonLitOutlineExample/SimpleURPToonLitOutlineExample.shader: -------------------------------------------------------------------------------- 1 | //https://github.com/ColinLeung-NiloCat/UnityURPToonLitShaderExample 2 | 3 | /* 4 | This shader is a simple example showing you how to write your first URP toon lit shader with "minimum" shader code. 5 | You can use this shader as a starting point, add/edit code to develop your own custom toon lit shader for URP. 6 | 7 | *Usually, just by editing "SimpleURPToonLitOutlineExample_LightingEquation.hlsl" alone can control most of the visual result. 8 | 9 | This shader includes 4 passes: 10 | 0.SurfaceColor pass (this pass will always render to the color buffer) 11 | 1.Outline pass (this pass will always render to the color buffer) 12 | 2.ShadowCaster pass (only for URP's shadow mapping, this pass won't render at all if your project don't use shadow mapping) 13 | 3.DepthOnly pass (only for URP's depth texture rendering, this pass won't render at all if your project don't use depth texture) 14 | 15 | *because most of the time, you use a toon lit shader for characters, so all lightmap & instancing related code are removed for simplicity. 16 | 17 | *In this shader, we choose static uniform branching over "shader_feature & multi_compile" for our togglable feature like "_UseEmission", because: 18 | - we want to avoid this shader's build time takes too long (2^n) 19 | - we want to avoid rendering spike when a new shader variant was seen by the camera first time (create GPU program) 20 | - we want to avoid increasing ShaderVarientCollection's complexity 21 | - we want to avoid shader size becomes too large easily (2^n) 22 | - we want to avoid breaking SRP batcher's batching because it is batched per shader variant, not per shader 23 | - all modern GPU(include newer mobile devices) can handle static uniform branching with "almost" no performance cost 24 | */ 25 | Shader "SimpleURPToonLitOutlineExample" 26 | { 27 | Properties 28 | { 29 | // all texture properties will follow URP Lit shader's naming convention 30 | // so switching your URP lit material's shader to this toon lit shader will preserve most of the original properties value if defined here 31 | 32 | // URP Lit shader's naming convention: 33 | // https://gist.github.com/phi-lira/225cd7c5e8545be602dca4eb5ed111ba#file-universalpipelinetemplateshader-shader 34 | 35 | [Header(Base Color)] 36 | [MainColor]_BaseColor("_BaseColor", Color) = (1,1,1,1) 37 | [MainTexture]_BaseMap("_BaseMap (albedo)", 2D) = "white" {} 38 | [MainTexture]_MainTex("_MainTex (dummy)", 2D) = "white" {} 39 | [Header(Shade Color)] 40 | [MainColor]_ShadeColor("_ShadeColor", Color) = (0.1,0.1,0.1,1) 41 | [MainTexture]_ShadeMap("_ShadeMap (albedo)", 2D) = "white" {} 42 | 43 | [Header(Alpha)] 44 | [Toggle]_UseAlphaClipping("_UseAlphaClipping", Float) = 1 45 | _Cutoff("_Cutoff (Alpha Cutoff)", Range(0.0, 1.0)) = 0.1 46 | _VColBlendMode("_VColBlendMode, ", Range(0,1)) = 0 47 | 48 | [Header(Lighting)] 49 | _IndirectLightConstColor("_IndirectLightConstColor", Color) = (0.5,0.5,0.5,1) 50 | _IndirectLightMultiplier("_IndirectLightMultiplier", Range(0,1)) = 0.1 51 | _DirectLightMultiplier("_DirectLightMultiplier", Range(0,1)) = 1.0 52 | _CelShadeMidPoint("_CelShadeMidPoint", Range(-1,1)) = 0.3 53 | _CelShadeSoftness("_CelShadeSoftness", Range(0,1)) = 0.1 54 | 55 | [Header(Shadow mapping)] 56 | _ReceiveShadowMappingAmount("_ReceiveShadowMappingAmount", Range(0,1)) = 0.5 57 | 58 | [Header(Emission)] 59 | [Toggle]_UseEmission("_UseEmission (on/off completely)", Float) = 0 60 | [HDR] _EmissionColor("_EmissionColor", Color) = (0,0,0) 61 | _EmissionMap("_EmissionMap", 2D) = "white" {} 62 | _EmissionMapChannelMask("_EmissionMapChannelMask", Vector) = (1,1,1,1) 63 | 64 | [Header(Outline)] 65 | _OutlineWidth("_OutlineWidth (Object Space)", Range(0, 0.1)) = 0.0 66 | _OutlineColor("_OutlineColor", Color) = (0.3,0.3,0.3,1) 67 | 68 | [Header(Culling)] 69 | [KeywordEnum(None, Front, Back)] _Cull("Culling", Int) = 0 70 | } 71 | SubShader 72 | { 73 | Tags 74 | { 75 | // With SRP we introduced a new "RenderPipeline" tag in Subshader. This allows you to create shaders 76 | // that can match multiple render pipelines. If a RenderPipeline tag is not set it will match 77 | // any render pipeline. In case you want your subshader to only run in URP, set the tag to 78 | // "UniversalRenderPipeline" 79 | "RenderPipeline" = "UniversalPipeline" 80 | } 81 | 82 | // ------------------------------------------------------------------ 83 | // Forward pass. Shades GI, emission, fog and all lights in a single pass. 84 | // Compared to Builtin pipeline forward renderer, URP forward renderer will 85 | // render a scene with multiple lights with less drawcalls and less overdraw. 86 | Pass 87 | { 88 | Name "SurfaceColor" 89 | Tags 90 | { 91 | // "Lightmode" tag must be "UniversalForward" or "UniversalForwardOnly", in order to render objects in URP. 92 | "LightMode" = "UniversalForwardOnly" 93 | } 94 | Cull[_Cull] 95 | HLSLPROGRAM 96 | 97 | // ------------------------------------- 98 | // Universal Render Pipeline keywords 99 | // When doing custom shaders you most often want to copy and paste these #pragmas 100 | // These multi_compile variants are stripped from the build depending on: 101 | // 1) Settings in the URP Asset assigned in the GraphicsSettings at build time 102 | // e.g If you disabled AdditionalLights in the asset then all _ADDITIONA_LIGHTS variants 103 | // will be stripped from build 104 | // 2) Invalid combinations are stripped. e.g variants with _MAIN_LIGHT_SHADOWS_CASCADE 105 | // but not _MAIN_LIGHT_SHADOWS are invalid and therefore stripped. 106 | #pragma multi_compile _ _MAIN_LIGHT_SHADOWS 107 | #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE 108 | #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS 109 | #pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS 110 | #pragma multi_compile _ _SHADOWS_SOFT 111 | // ------------------------------------- 112 | // Unity defined keywords 113 | #pragma multi_compile_fog 114 | // ------------------------------------- 115 | 116 | //all shader logic written inside this .hlsl 117 | #include "SimpleURPToonLitOutlineExample_Shared.hlsl" 118 | 119 | #pragma vertex BaseColorPassVertex 120 | #pragma fragment BaseColorPassFragment 121 | 122 | Varyings BaseColorPassVertex(Attributes input) 123 | { 124 | VertexShaderWorkSetting setting = GetDefaultVertexShaderWorkSetting(); 125 | 126 | //regular pass 127 | //so no change to setting 128 | 129 | return VertexShaderWork(input, setting); 130 | } 131 | 132 | half4 BaseColorPassFragment(Varyings input) : SV_TARGET 133 | { 134 | // set 2nd param "isOutline" to false because this pass is not an outline pass 135 | return ShadeFinalColor(input, false); 136 | } 137 | 138 | ENDHLSL 139 | } 140 | 141 | // ------------------------------------------------------------------ 142 | // Outline pass. Similar to "SurfaceColor" pass, but vertex position are pushed out a bit base on normal direction, also color is darker 143 | Pass 144 | { 145 | Name "Outline" 146 | Tags 147 | { 148 | //"LightMode" = "UniversalForward" // IMPORTANT: don't write this line for any custom +pass! else this outline pass will not be rendered in URP! 149 | } 150 | Cull Front // Cull Front is a must for extra pass outline method 151 | 152 | HLSLPROGRAM 153 | 154 | //copy from the first pass 155 | // ------------------------------------- 156 | #pragma multi_compile _ _MAIN_LIGHT_SHADOWS 157 | #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE 158 | #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS 159 | #pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS 160 | #pragma multi_compile _ _SHADOWS_SOFT 161 | // ------------------------------------- 162 | #pragma multi_compile_fog 163 | // ------------------------------------- 164 | 165 | #include "SimpleURPToonLitOutlineExample_Shared.hlsl" 166 | 167 | #pragma vertex OutlinePassVertex 168 | #pragma fragment OutlinePassFragment 169 | 170 | Varyings OutlinePassVertex(Attributes input) 171 | { 172 | VertexShaderWorkSetting setting = GetDefaultVertexShaderWorkSetting(); 173 | 174 | // set param "isOutline" to true because this pass is an Outline pass 175 | // setting to true = push vertex out a bit base on normal direction 176 | setting.isOutline = true; 177 | 178 | return VertexShaderWork(input, setting); 179 | } 180 | 181 | half4 OutlinePassFragment(Varyings input) : SV_TARGET 182 | { 183 | // set 2nd param "isOutline" to true because this pass is an Outline pass 184 | return ShadeFinalColor(input, true); 185 | } 186 | 187 | ENDHLSL 188 | } 189 | 190 | 191 | // Used for rendering URP's shadowmaps 192 | Pass 193 | { 194 | Name "ShadowCaster" 195 | Tags{"LightMode" = "ShadowCaster"} 196 | //we don't care about color, we just write to depth 197 | ColorMask 0 198 | 199 | HLSLPROGRAM 200 | 201 | #pragma vertex ShadowCasterPassVertex 202 | #pragma fragment ShadowCasterPassFragment 203 | 204 | #include "SimpleURPToonLitOutlineExample_Shared.hlsl" 205 | 206 | Varyings ShadowCasterPassVertex(Attributes input) 207 | { 208 | VertexShaderWorkSetting setting = GetDefaultVertexShaderWorkSetting(); 209 | 210 | setting.isOutline = false; //(you can delete this line, this line is just a note) the correct value is false here, else self shadow is not correct 211 | setting.applyShadowBiasFixToHClipPos = true;//important for shadow caster pass, else shadow artifact will appear 212 | 213 | return VertexShaderWork(input, setting); 214 | } 215 | 216 | half4 ShadowCasterPassFragment(Varyings input) : SV_TARGET 217 | { 218 | return BaseColorAlphaClipTest(input); 219 | } 220 | 221 | ENDHLSL 222 | } 223 | 224 | // Used for depth prepass 225 | // If depth texture is needed, we need to perform a depth prepass for this shader. 226 | Pass 227 | { 228 | Name "DepthOnly" 229 | Tags{"LightMode" = "DepthOnly"} 230 | Cull[_Cull] 231 | //we don't care about color, we just write to depth 232 | ColorMask 0 233 | 234 | HLSLPROGRAM 235 | #pragma vertex DepthOnlyPassVertex 236 | #pragma fragment DepthOnlyPassFragment 237 | 238 | #include "SimpleURPToonLitOutlineExample_Shared.hlsl" 239 | Varyings DepthOnlyPassVertex(Attributes input) 240 | { 241 | VertexShaderWorkSetting setting = GetDefaultVertexShaderWorkSetting(); 242 | 243 | // set param "isOutline" to ture because outline should affect depth (e.g. handle depth of field's correctly at outline area) 244 | // setting "isOutline" to true = push vertex out a bit according to normal direction 245 | setting.isOutline = true; 246 | 247 | return VertexShaderWork(input, setting); 248 | } 249 | 250 | half4 DepthOnlyPassFragment(Varyings input) : SV_TARGET 251 | { 252 | return BaseColorAlphaClipTest(input); 253 | } 254 | 255 | ENDHLSL 256 | } 257 | } 258 | } 259 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/SimpleURPToonLitOutlineExample/SimpleURPToonLitOutlineExample.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e2c41f2ba6a3f334d894aeac1b04af52 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/SimpleURPToonLitOutlineExample/SimpleURPToonLitOutlineExample_LightingEquation.hlsl: -------------------------------------------------------------------------------- 1 | //https://github.com/ColinLeung-NiloCat/UnityURPToonLitShaderExample 2 | 3 | //This file is intented for you to edit and experiment with different lighting equation. 4 | //Add or edit whatever code you want here 5 | 6 | // #ifndef XXX + #define XXX + #endif is a safe guard best practice in almost every .hlsl, 7 | // doing this can make sure your .hlsl's user can include this .hlsl anywhere anytime without producing any multi include conflict 8 | #ifndef SimpleURPToonLitOutlineExample_LightingEquation_Include 9 | #define SimpleURPToonLitOutlineExample_LightingEquation_Include 10 | 11 | half3 ShadeGIDefaultMethod(SurfaceData2 surfaceData, LightingData2 lightingData) 12 | { 13 | // hide 3D feeling by ignore all detail SH 14 | // SH 1 (only use this) 15 | // SH 234 (ignored) 16 | // SH 56789 (ignored) 17 | // we just want to tint some average envi color only 18 | half3 averageSH = SampleSH(0); 19 | 20 | return surfaceData.albedo * (_IndirectLightConstColor + averageSH * _IndirectLightMultiplier); 21 | } 22 | 23 | // Most important part: lighting equation, edit it according to your needs, write whatever you want here, be creative! 24 | // this function will be used by all direct lights (directional/point/spot) 25 | half3 ShadeSingleLightDefaultMethod(SurfaceData2 surfaceData, LightingData2 lightingData, Light light) 26 | { 27 | half3 N = lightingData.normalWS; 28 | half3 L = light.direction; 29 | half3 V = lightingData.viewDirectionWS; 30 | half3 H = normalize(L+V); 31 | 32 | half NoL = dot(N,L); 33 | 34 | half lightAttenuation = 1; 35 | 36 | // light's shadow map. If you prefer hard shadow, you can smoothstep() light.shadowAttenuation to make it sharp. 37 | lightAttenuation *= lerp(1,light.shadowAttenuation,_ReceiveShadowMappingAmount); 38 | 39 | // light's distance & angle fade for point light & spot light (see GetAdditionalPerObjectLight() in Lighting.hlsl) 40 | // Lighting.hlsl -> https://github.com/Unity-Technologies/Graphics/blob/master/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl 41 | lightAttenuation *= min(2,light.distanceAttenuation); //max intensity = 2, prevent over bright if light too close, can expose this float to editor if you wish to 42 | 43 | // N dot L 44 | // simplest 1 line cel shade, you can always replace this line by your own better method ! 45 | lightAttenuation *= smoothstep(_CelShadeMidPoint-_CelShadeSoftness,_CelShadeMidPoint+_CelShadeSoftness, NoL); 46 | 47 | // don't want direct lighting becomes too bright for toon lit characters? set this value to a lower value 48 | lightAttenuation *= _DirectLightMultiplier; 49 | 50 | return surfaceData.albedo * light.color * lightAttenuation; 51 | } 52 | 53 | half3 CompositeAllLightResultsDefaultMethod(half3 indirectResult, half3 mainLightResult, half3 additionalLightSumResult, half3 emissionResult) 54 | { 55 | return indirectResult + mainLightResult + additionalLightSumResult + emissionResult; //simply add them all together, but you can write anything here 56 | } 57 | 58 | //////////////////////////////////////////////////////////////////////////////////////////////////////////// 59 | // Implement your own lighting equation here! 60 | //////////////////////////////////////////////////////////////////////////////////////////////////////////// 61 | 62 | half3 ShadeGIYourMethod(SurfaceData2 surfaceData, LightingData2 lightingData, Light light) 63 | { 64 | // return 0; //write your own equation here ! (see ShadeGIDefaultMethod(...)) 65 | // hide 3D feeling by ignore all detail SH 66 | // SH 1 (only use this) 67 | // SH 234 (ignored) 68 | // SH 56789 (ignored) 69 | // we just want to tint some average envi color only 70 | half3 averageSH = SampleSH(0); 71 | 72 | return surfaceData.shade * (_IndirectLightConstColor + averageSH * _IndirectLightMultiplier); 73 | } 74 | half3 ShadeMainLightYourMethod(SurfaceData2 surfaceData, LightingData2 lightingData, Light light) 75 | { 76 | // return 0; //write your own equation here ! (see ShadeSingleLightDefaultMethod(...)) 77 | half3 N = lightingData.normalWS; 78 | half3 L = light.direction; 79 | half3 V = lightingData.viewDirectionWS; 80 | half3 H = normalize(L + V); 81 | 82 | half NoL = dot(N, L); 83 | 84 | half lightAttenuation = 1; 85 | 86 | // light's shadow map. If you prefer hard shadow, you can smoothstep() light.shadowAttenuation to make it sharp. 87 | lightAttenuation *= lerp(1, light.shadowAttenuation, _ReceiveShadowMappingAmount); 88 | // light's distance & angle fade for point light & spot light (see GetAdditionalPerObjectLight() in Lighting.hlsl) 89 | // Lighting.hlsl -> https://github.com/Unity-Technologies/Graphics/blob/master/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl 90 | lightAttenuation *= min(2, light.distanceAttenuation); //max intensity = 2, prevent over bright if light too close, can expose this float to editor if you wish to 91 | 92 | // N dot L 93 | // simplest 1 line cel shade, you can always replace this line by your own better method ! 94 | lightAttenuation *= smoothstep(_CelShadeMidPoint - _CelShadeSoftness, _CelShadeMidPoint + _CelShadeSoftness, NoL); 95 | 96 | // don't want direct lighting becomes too bright for toon lit characters? set this value to a lower value 97 | lightAttenuation *= _DirectLightMultiplier; 98 | 99 | return light.color * lerp(surfaceData.shade, surfaceData.albedo, lightAttenuation); 100 | } 101 | half3 ShadeAllAdditionalLightsYourMethod(SurfaceData2 surfaceData, LightingData2 lightingData, Light light) 102 | { 103 | // return 0; //write your own equation here ! (see ShadeSingleLightDefaultMethod(...)) 104 | return ShadeSingleLightDefaultMethod(surfaceData, lightingData, light); 105 | } 106 | half3 CompositeAllLightResultsYourMethod(half3 indirectResult, half3 mainLightResult, half3 additionalLightSumResult, half3 emissionResult) 107 | { 108 | // return 0; //write your own equation here ! (see CompositeAllLightResultsDefaultMethod(...)) 109 | return indirectResult + mainLightResult + additionalLightSumResult + emissionResult; //simply add them all together, but you can write anything here 110 | } 111 | 112 | //////////////////////////////////////////////////////////////////////////////////////////////////////////// 113 | // Once you have implemented a equation in the above section, switch to using your own lighting equation in below section! 114 | //////////////////////////////////////////////////////////////////////////////////////////////////////////// 115 | 116 | // We split lighting into: 117 | //- indirect 118 | //- main light 119 | //- additional light (point light/spot light) 120 | // for a more isolated lighting control, just in case you need a separate equation for main light & additional light, you can do it easily here 121 | 122 | half3 ShadeGI(SurfaceData2 surfaceData, LightingData2 lightingData, Light light) 123 | { 124 | //you can switch to ShadeGIYourMethod(...) ! 125 | return ShadeGIYourMethod(surfaceData, lightingData, light); 126 | // return ShadeGIDefaultMethod(surfaceData, lightingData); 127 | } 128 | half3 ShadeMainLight(SurfaceData2 surfaceData, LightingData2 lightingData, Light light) 129 | { 130 | //you can switch to ShadeMainLightYourMethod(...) ! 131 | return ShadeMainLightYourMethod(surfaceData, lightingData, light); 132 | // return ShadeSingleLightDefaultMethod(surfaceData, lightingData, light); 133 | } 134 | half3 ShadeAdditionalLight(SurfaceData2 surfaceData, LightingData2 lightingData, Light light) 135 | { 136 | //you can switch to ShadeAllAdditionalLightsYourMethod(...) ! 137 | return ShadeAllAdditionalLightsYourMethod(surfaceData, lightingData, light); 138 | // return ShadeSingleLightDefaultMethod(surfaceData, lightingData, light); 139 | } 140 | half3 CompositeAllLightResults(half3 indirectResult, half3 mainLightResult, half3 additionalLightSumResult, half3 emissionResult) 141 | { 142 | //you can switch to CompositeAllLightResultsYourMethod(...) ! 143 | return CompositeAllLightResultsYourMethod(indirectResult, mainLightResult, additionalLightSumResult, emissionResult); 144 | // return CompositeAllLightResultsDefaultMethod(indirectResult,mainLightResult,additionalLightSumResult,emissionResult); 145 | } 146 | 147 | #endif 148 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/SimpleURPToonLitOutlineExample/SimpleURPToonLitOutlineExample_LightingEquation.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 001ff62c12b3a8a43a23d1f84a1711f2 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/SimpleURPToonLitOutlineExample/SimpleURPToonLitOutlineExample_Shared.hlsl: -------------------------------------------------------------------------------- 1 | //https://github.com/ColinLeung-NiloCat/UnityURPToonLitShaderExample 2 | 3 | // #ifndef XXX + #define XXX + #endif is a safe guard best practice in almost every .hlsl, 4 | // doing this can make sure your .hlsl's user can include this .hlsl anywhere anytime without producing any multi include conflict 5 | #ifndef SimpleURPToonLitOutlineExample_Shared_Include 6 | #define SimpleURPToonLitOutlineExample_Shared_Include 7 | 8 | #ifndef _MAIN_LIGHT_SHADOWS 9 | #define _MAIN_LIGHT_SHADOWS 10 | #endif 11 | 12 | #ifndef _ADDITIONAL_LIGHTS 13 | #define _ADDITIONAL_LIGHTS 14 | #endif 15 | 16 | // We don't have "UnityCG.cginc" in SRP/URP's package anymore, so: 17 | // Including the following two function is enough for shading with Universal Pipeline. Everything is included in them. 18 | // Core.hlsl will include SRP shader library, all constant buffers not related to materials (perobject, percamera, perframe). 19 | // It also includes matrix/space conversion functions and fog. 20 | // Lighting.hlsl will include the light functions/data to abstract light constants. You should use GetMainLight and GetLight functions 21 | // that initialize Light struct. Lighting.hlsl also include GI, Light BDRF functions. It also includes Shadows. 22 | 23 | // Required by all Universal Render Pipeline shaders. 24 | // It will include Unity built-in shader variables (except the lighting variables) 25 | // (https://docs.unity3d.com/Manual/SL-UnityShaderVariables.html 26 | // It will also include many utilitary functions. 27 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" 28 | 29 | // Include this if you are doing a lit shader. This includes lighting shader variables, 30 | // lighting and shadow functions 31 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" 32 | 33 | // Material shader variables are not defined in SRP or URP shader library. 34 | // This means _BaseColor, _BaseMap, _BaseMap_ST, and all variables in the Properties section of a shader 35 | // must be defined by the shader itself. If you define all those properties in CBUFFER named 36 | // UnityPerMaterial, SRP can cache the material properties between frames and reduce significantly the cost 37 | // of each drawcall. 38 | // In this case, although URP's LitInput.hlsl contains the CBUFFER for the material 39 | // properties defined above. As one can see this is not part of the ShaderLibrary, it specific to the 40 | // URP Lit shader. 41 | // So we are not going to use LitInput.hlsl, we will implement everything by ourself. 42 | //#include "Packages/com.unity.render-pipelines.universal/Shaders/LitInput.hlsl" 43 | 44 | //note: 45 | //subfix OS means object space (e.g. positionOS = position object space) 46 | //subfix WS means world space (e.g. positionWS = position world space) 47 | 48 | // all pass will share this Attributes struct 49 | struct Attributes 50 | { 51 | float3 positionOS : POSITION; 52 | half3 normalOS : NORMAL; 53 | half4 tangentOS : TANGENT; 54 | float2 uv : TEXCOORD0; 55 | //uint instanceId : SV_InstanceID; 56 | UNITY_VERTEX_INPUT_INSTANCE_ID 57 | }; 58 | 59 | // all pass will share this Varyings struct 60 | struct Varyings 61 | { 62 | float2 uv : TEXCOORD0; 63 | float4 positionWSAndFogFactor : TEXCOORD2; // xyz: positionWS, w: vertex fog factor 64 | half3 normalWS : TEXCOORD3; 65 | 66 | #ifdef _MAIN_LIGHT_SHADOWS 67 | float4 shadowCoord : TEXCOORD6; // compute shadow coord per-vertex for the main light 68 | #endif 69 | float4 positionCS : SV_POSITION; 70 | UNITY_VERTEX_OUTPUT_STEREO 71 | }; 72 | 73 | /////////////////////////////////////////////////////////////////////////////////////// 74 | // CBUFFER and Uniforms 75 | // (you should put all uniforms of all passes inside this single UnityPerMaterial CBUFFER! else SRP batching is not possible!) 76 | /////////////////////////////////////////////////////////////////////////////////////// 77 | 78 | // all sampler2D don't need to put inside CBUFFER 79 | sampler2D _BaseMap; 80 | sampler2D _ShadeMap; 81 | sampler2D _EmissionMap; 82 | 83 | // put all your uniforms(usually things inside properties{} at the start of .shader file) inside this CBUFFER, in order to make SRP batcher compatible 84 | CBUFFER_START(UnityPerMaterial) 85 | 86 | // base color 87 | float4 _BaseMap_ST; 88 | half4 _BaseColor; 89 | float4 _ShadeMap_ST; 90 | half4 _ShadeColor; 91 | 92 | // alpha 93 | float _UseAlphaClipping; 94 | half _Cutoff; 95 | 96 | //lighting 97 | half3 _IndirectLightConstColor; 98 | half _IndirectLightMultiplier; 99 | half _DirectLightMultiplier; 100 | half _CelShadeMidPoint; 101 | half _CelShadeSoftness; 102 | 103 | // shadow mapping 104 | half _ReceiveShadowMappingAmount; 105 | 106 | //emission 107 | float _UseEmission; 108 | half3 _EmissionColor; 109 | half3 _EmissionMapChannelMask; 110 | 111 | // outline 112 | float _OutlineWidth; 113 | half3 _OutlineColor; 114 | 115 | CBUFFER_END 116 | 117 | //a special uniform for applyShadowBiasFixToHClipPos() only, it is not a per material uniform, 118 | //so it is fine to write it outside our UnityPerMaterial CBUFFER 119 | half3 _LightDirection; 120 | 121 | struct SurfaceData2 122 | { 123 | half3 albedo; 124 | half3 shade; 125 | half alpha; 126 | half3 emission; 127 | }; 128 | struct LightingData2 129 | { 130 | half3 normalWS; 131 | float3 positionWS; 132 | half3 viewDirectionWS; 133 | float4 shadowCoord; 134 | }; 135 | 136 | /////////////////////////////////////////////////////////////////////////////////////// 137 | // compile time const helper functions for .shader file 138 | /////////////////////////////////////////////////////////////////////////////////////// 139 | 140 | struct VertexShaderWorkSetting 141 | { 142 | bool isOutline; 143 | bool applyShadowBiasFixToHClipPos; 144 | }; 145 | VertexShaderWorkSetting GetDefaultVertexShaderWorkSetting() 146 | { 147 | VertexShaderWorkSetting output; 148 | output.isOutline = false; 149 | output.applyShadowBiasFixToHClipPos = false; 150 | return output; 151 | } 152 | 153 | /////////////////////////////////////////////////////////////////////////////////////// 154 | // vertex shared functions 155 | /////////////////////////////////////////////////////////////////////////////////////// 156 | 157 | float3 TransformPositionOSToOutlinePositionOS(Attributes input) 158 | { 159 | float3 outlineNormalOSUnitVector = normalize(input.normalOS); //normalize, just in case model's data is incorrect 160 | return input.positionOS + outlineNormalOSUnitVector * _OutlineWidth; //you can replace it to your own method! 161 | } 162 | 163 | // if param "isOutline" is false = do regular MVP transform 164 | // if param "isOutline" is ture = do regular MVP transform + push vertex out a bit according to normal direction 165 | Varyings VertexShaderWork(Attributes input, VertexShaderWorkSetting setting) 166 | { 167 | Varyings output; 168 | 169 | UNITY_SETUP_INSTANCE_ID(input); 170 | // UNITY_INITIALIZE_OUTPUT(Varyings, output); 171 | output.uv = float2(0, 0); 172 | output.normalWS = float3(0, 0, 0); 173 | output.positionWSAndFogFactor = float4(0, 0, 0, 0); 174 | #ifdef _MAIN_LIGHT_SHADOWS 175 | output.shadowCoord = float4(0, 0, 0, 0); 176 | #endif 177 | output.positionCS = float4(0, 0, 0, 0); 178 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); 179 | 180 | // bool isOutline should be always a compile time constant, so using if() here has no performance cost 181 | if(setting.isOutline) 182 | { 183 | input.positionOS = TransformPositionOSToOutlinePositionOS(input); 184 | } 185 | 186 | // VertexPositionInputs contains position in multiple spaces (world, view, homogeneous clip space) 187 | // Our compiler will strip all unused references (say you don't use view space). 188 | // Therefore there is more flexibility at no additional cost with this struct. 189 | VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS); 190 | 191 | // Similar to VertexPositionInputs, VertexNormalInputs will contain normal, tangent and bitangent 192 | // in world space. If not used it will be stripped. 193 | VertexNormalInputs vertexNormalInput = GetVertexNormalInputs(input.normalOS, input.tangentOS); 194 | 195 | // Computes fog factor per-vertex. 196 | float fogFactor = ComputeFogFactor(vertexInput.positionCS.z); 197 | 198 | // TRANSFORM_TEX is the same as the old shader library. 199 | output.uv = TRANSFORM_TEX(input.uv,_BaseMap); 200 | 201 | // packing posWS.xyz & fog into a vector4 202 | output.positionWSAndFogFactor = float4(vertexInput.positionWS, fogFactor); 203 | output.normalWS = vertexNormalInput.normalWS; 204 | 205 | #ifdef _MAIN_LIGHT_SHADOWS 206 | // shadow coord for the light is computed in vertex. 207 | // After URP 7.21, URP will always resolve shadows in light space, no more screen space resolve. 208 | // In this case shadowCoord will be the vertex position in light space. 209 | output.shadowCoord = GetShadowCoord(vertexInput); 210 | #endif 211 | 212 | // Here comes the flexibility of the input structs. 213 | // We just use the homogeneous clip position from the vertex input 214 | output.positionCS = vertexInput.positionCS; 215 | 216 | // ShadowCaster pass needs special process to clipPos, else shadow artifact will appear 217 | //-------------------------------------------------------------------------------------- 218 | // bool applyShadowBiasFixToHClipPos should be always a compile time constant, so using if() here has no performance cost 219 | if(setting.applyShadowBiasFixToHClipPos) 220 | { 221 | //see GetShadowPositionHClip() in URP/Shaders/ShadowCasterPass.hlsl 222 | float3 positionWS = vertexInput.positionWS; 223 | float3 normalWS = vertexNormalInput.normalWS; 224 | float4 positionCS = TransformWorldToHClip(ApplyShadowBias(positionWS - max(0, input.positionOS.y) * _LightDirection, normalWS, _LightDirection)); 225 | 226 | #if UNITY_REVERSED_Z 227 | positionCS.z = min(positionCS.z, positionCS.w * UNITY_NEAR_CLIP_VALUE); 228 | #else 229 | positionCS.z = max(positionCS.z, positionCS.w * UNITY_NEAR_CLIP_VALUE); 230 | #endif 231 | output.positionCS = positionCS; 232 | } 233 | //-------------------------------------------------------------------------------------- 234 | 235 | return output; 236 | } 237 | 238 | /////////////////////////////////////////////////////////////////////////////////////// 239 | // fragment shared functions (Step1: prepare data for lighting) 240 | /////////////////////////////////////////////////////////////////////////////////////// 241 | half4 GetFinalBaseColor(Varyings input) 242 | { 243 | return tex2D(_BaseMap, input.uv) * _BaseColor; 244 | } 245 | half4 GetFinalShadeColor(Varyings input) 246 | { 247 | return tex2D(_ShadeMap, input.uv) * _ShadeColor; 248 | } 249 | half3 GetFinalEmissionColor(Varyings input) 250 | { 251 | if(_UseEmission) 252 | { 253 | return tex2D(_EmissionMap, input.uv).rgb * _EmissionColor.rgb * _EmissionMapChannelMask; 254 | } 255 | 256 | return 0; 257 | } 258 | void DoClipTestToTargetAlphaValue(half alpha) 259 | { 260 | if(_UseAlphaClipping) 261 | { 262 | clip(alpha - _Cutoff); 263 | } 264 | } 265 | SurfaceData2 InitializeSurfaceData(Varyings input) 266 | { 267 | SurfaceData2 output; 268 | 269 | // albedo & alpha 270 | float4 baseColorFinal = GetFinalBaseColor(input); 271 | float4 shadeColorFinal = GetFinalShadeColor(input); 272 | output.albedo = baseColorFinal.rgb; 273 | output.shade = shadeColorFinal.rgb; 274 | output.alpha = baseColorFinal.a; 275 | DoClipTestToTargetAlphaValue(output.alpha);//early exit if possible 276 | 277 | //emission 278 | output.emission = GetFinalEmissionColor(input); 279 | 280 | return output; 281 | } 282 | 283 | /////////////////////////////////////////////////////////////////////////////////////// 284 | // fragment shared functions (Step2: calculate lighting & final color) 285 | /////////////////////////////////////////////////////////////////////////////////////// 286 | 287 | //all lighting equation written inside this .hlsl, 288 | //just by editing this .hlsl can control most of the visual result. 289 | #include "SimpleURPToonLitOutlineExample_LightingEquation.hlsl" 290 | 291 | // this function contains no lighting logic, it just pass lighting results data around 292 | half3 ShadeAllLights(SurfaceData2 surfaceData, LightingData2 lightingData) 293 | { 294 | ////////////////////////////////////////////////////////////////////////////////// 295 | // Light struct is provided by URP to abstract light shader variables. 296 | // It contains light's 297 | // - direction 298 | // - color 299 | // - distanceAttenuation 300 | // - shadowAttenuation 301 | // 302 | // URP take different shading approaches depending on light and platform. 303 | // You should never reference light shader variables in your shader, instead use the 304 | // -GetMainLight() 305 | // -GetLight() 306 | // funcitons to fill this Light struct. 307 | ////////////////////////////////////////////////////////////////////////////////// 308 | 309 | //============================================================================================== 310 | // Main light is the brightest directional light. 311 | // It is shaded outside the light loop and it has a specific set of variables and shading path 312 | // so we can be as fast as possible in the case when there's only a single directional light 313 | // You can pass optionally a shadowCoord (computed per-vertex). If so, shadowAttenuation will be 314 | // computed. 315 | Light mainLight; 316 | #ifdef _MAIN_LIGHT_SHADOWS 317 | mainLight = GetMainLight(lightingData.shadowCoord); 318 | #else 319 | mainLight = GetMainLight(); 320 | #endif 321 | 322 | // Indirect lighting 323 | half3 indirectResult = ShadeGI(surfaceData, lightingData, mainLight); 324 | 325 | 326 | // Main light 327 | half3 mainLightResult = ShadeMainLight(surfaceData, lightingData, mainLight); 328 | 329 | //============================================================================================== 330 | // All additional lights 331 | 332 | half3 additionalLightSumResult = 0; 333 | 334 | #ifdef _ADDITIONAL_LIGHTS 335 | // Returns the amount of lights affecting the object being renderer. 336 | // These lights are culled per-object in the forward renderer of URP. 337 | int additionalLightsCount = GetAdditionalLightsCount(); 338 | for (int i = 0; i < additionalLightsCount; ++i) 339 | { 340 | // Similar to GetMainLight(), but it takes a for-loop index. This figures out the 341 | // per-object light index and samples the light buffer accordingly to initialized the 342 | // Light struct. If _ADDITIONAL_LIGHT_SHADOWS is defined it will also compute shadows. 343 | Light light = GetAdditionalLight(i, lightingData.positionWS); 344 | 345 | // Different functions used to shade the additional light. 346 | additionalLightSumResult += ShadeAdditionalLight(surfaceData, lightingData, light); 347 | } 348 | #endif 349 | //============================================================================================== 350 | // emission 351 | half3 emissionResult = surfaceData.emission; 352 | 353 | return CompositeAllLightResults(indirectResult, mainLightResult, additionalLightSumResult, emissionResult); 354 | } 355 | 356 | half3 ConvertSurfaceColorToOutlineColor(half3 originalSurfaceColor) 357 | { 358 | return originalSurfaceColor * _OutlineColor; 359 | } 360 | 361 | //only the .shader file will call this function 362 | half4 ShadeFinalColor(Varyings input, bool isOutline) 363 | { 364 | ////////////////////////////////////////////////////////////////////////////////////////// 365 | //first prepare all data for lighting function 366 | ////////////////////////////////////////////////////////////////////////////////////////// 367 | 368 | //SurfaceData: 369 | SurfaceData2 surfaceData = InitializeSurfaceData(input); 370 | 371 | //LightingData2: 372 | LightingData2 lightingData; 373 | lightingData.positionWS = input.positionWSAndFogFactor.xyz; 374 | lightingData.viewDirectionWS = SafeNormalize(GetCameraPositionWS() - lightingData.positionWS); 375 | lightingData.normalWS = input.normalWS; 376 | 377 | #ifdef _MAIN_LIGHT_SHADOWS 378 | lightingData.shadowCoord = input.shadowCoord; 379 | half shadowAttenutation = MainLightRealtimeShadow(input.shadowCoord); 380 | #endif 381 | 382 | ////////////////////////////////////////////////////////////////////////////////////////// 383 | // lighting calculation START 384 | ////////////////////////////////////////////////////////////////////////////////////////// 385 | 386 | half3 color = ShadeAllLights(surfaceData, lightingData); 387 | 388 | ////////////////////////////////////////////////////////////////////////////////////////// 389 | // lighting calculation END 390 | ////////////////////////////////////////////////////////////////////////////////////////// 391 | 392 | // outline (isOutline should be a compile time const, so no performance cost here) 393 | if(isOutline) 394 | { 395 | color = ConvertSurfaceColorToOutlineColor(color); 396 | } 397 | 398 | #ifdef _MAIN_LIGHT_SHADOWS 399 | color = lerp(color, _IndirectLightConstColor * _IndirectLightMultiplier * surfaceData.shade, (1.0 - shadowAttenutation) * _ReceiveShadowMappingAmount); 400 | #endif 401 | 402 | // fog 403 | half fogFactor = input.positionWSAndFogFactor.w; 404 | // Mix the pixel color with fogColor. You can optionaly use MixFogColor to override the fogColor 405 | // with a custom one. 406 | color = MixFog(color, fogFactor); 407 | 408 | return half4(color,1); 409 | } 410 | 411 | ////////////////////////////////////////////////////////////////////////////////////////// 412 | // fragment shared functions (for ShadowCaster pass & DepthOnly pass to use only) 413 | ////////////////////////////////////////////////////////////////////////////////////////// 414 | half4 BaseColorAlphaClipTest(Varyings input) 415 | { 416 | DoClipTestToTargetAlphaValue(GetFinalBaseColor(input).a); 417 | return 0; 418 | } 419 | 420 | #endif 421 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/SimpleURPToonLitOutlineExample/SimpleURPToonLitOutlineExample_Shared.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 023a9b284aa522a49b5bf835fe723fe9 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/SimpleURPTransparent.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff0ef68b0bbd2c140bb7d0becf3481e7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/SimpleURPTransparent/SimpleURPTransparent.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &-2807135940434586340 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 11 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | version: 5 16 | --- !u!21 &2100000 17 | Material: 18 | serializedVersion: 6 19 | m_ObjectHideFlags: 0 20 | m_CorrespondingSourceObject: {fileID: 0} 21 | m_PrefabInstance: {fileID: 0} 22 | m_PrefabAsset: {fileID: 0} 23 | m_Name: SimpleURPTransparent 24 | m_Shader: {fileID: -6465566751694194690, guid: 15a8ee747e72a634cbb5118884aa467b, type: 3} 25 | m_ShaderKeywords: 26 | m_LightmapFlags: 2 27 | m_EnableInstancingVariants: 0 28 | m_DoubleSidedGI: 0 29 | m_CustomRenderQueue: -1 30 | stringTagMap: {} 31 | disabledShaderPasses: [] 32 | m_SavedProperties: 33 | serializedVersion: 3 34 | m_TexEnvs: 35 | - unity_Lightmaps: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - unity_LightmapsInd: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - unity_ShadowMasks: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | m_Ints: [] 48 | m_Floats: 49 | - _QueueControl: 0 50 | - _QueueOffset: 0 51 | m_Colors: [] 52 | m_BuildTextureStacks: [] 53 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/SimpleURPTransparent/SimpleURPTransparent.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ab0adccedbd51384fb46fe0942eccd72 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/SimpleURPTransparent/SimpleURPTransparent.shadergraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15a8ee747e72a634cbb5118884aa467b 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} 11 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/Unity-Technologies.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87b44528492514245afc9dc3dda013d7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/Unity-Technologies/ShaderGraph-Custom-Lighting.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f8eaf184c0a262949a715aa0dd227f35 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/Unity-Technologies/ShaderGraph-Custom-Lighting/Includes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a1c21db9cef8f0d4d97d5a84dc739d13 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/Unity-Technologies/ShaderGraph-Custom-Lighting/Includes/CustomLighting.hlsl: -------------------------------------------------------------------------------- 1 | #ifndef CUSTOM_LIGHTING_INCLUDED 2 | #define CUSTOM_LIGHTING_INCLUDED 3 | 4 | void MainLight_float(float3 WorldPos, out float3 Direction, out float3 Color, out float DistanceAtten, out float ShadowAtten) 5 | { 6 | #if defined(SHADERGRAPH_PREVIEW) 7 | Direction = float3(0.5, 0.5, 0); 8 | Color = 1; 9 | DistanceAtten = 1; 10 | ShadowAtten = 1; 11 | #else 12 | #if SHADOWS_SCREEN 13 | float4 clipPos = TransformWorldToHClip(WorldPos); 14 | float4 shadowCoord = ComputeScreenPos(clipPos); 15 | #else 16 | float4 shadowCoord = TransformWorldToShadowCoord(WorldPos); 17 | #endif 18 | Light mainLight = GetMainLight(shadowCoord); 19 | Direction = mainLight.direction; 20 | Color = mainLight.color; 21 | DistanceAtten = mainLight.distanceAttenuation; 22 | ShadowAtten = mainLight.shadowAttenuation; 23 | #endif 24 | } 25 | 26 | void MainLight_half(float3 WorldPos, out half3 Direction, out half3 Color, out half DistanceAtten, out half ShadowAtten) 27 | { 28 | #if defined(SHADERGRAPH_PREVIEW) 29 | Direction = half3(0.5, 0.5, 0); 30 | Color = 1; 31 | DistanceAtten = 1; 32 | ShadowAtten = 1; 33 | #else 34 | #if SHADOWS_SCREEN 35 | half4 clipPos = TransformWorldToHClip(WorldPos); 36 | half4 shadowCoord = ComputeScreenPos(clipPos); 37 | #else 38 | half4 shadowCoord = TransformWorldToShadowCoord(WorldPos); 39 | #endif 40 | Light mainLight = GetMainLight(shadowCoord); 41 | Direction = mainLight.direction; 42 | Color = mainLight.color; 43 | DistanceAtten = mainLight.distanceAttenuation; 44 | ShadowAtten = mainLight.shadowAttenuation; 45 | #endif 46 | } 47 | 48 | void DirectSpecular_float(float3 Specular, float Smoothness, float3 Direction, float3 Color, float3 WorldNormal, float3 WorldView, out float3 Out) 49 | { 50 | #if defined(SHADERGRAPH_PREVIEW) 51 | Out = 0; 52 | #else 53 | Smoothness = exp2(10 * Smoothness + 1); 54 | WorldNormal = normalize(WorldNormal); 55 | WorldView = SafeNormalize(WorldView); 56 | Out = LightingSpecular(Color, Direction, WorldNormal, WorldView, float4(Specular, 0), Smoothness); 57 | #endif 58 | } 59 | 60 | void DirectSpecular_half(half3 Specular, half Smoothness, half3 Direction, half3 Color, half3 WorldNormal, half3 WorldView, out half3 Out) 61 | { 62 | #if defined(SHADERGRAPH_PREVIEW) 63 | Out = 0; 64 | #else 65 | Smoothness = exp2(10 * Smoothness + 1); 66 | WorldNormal = normalize(WorldNormal); 67 | WorldView = SafeNormalize(WorldView); 68 | Out = LightingSpecular(Color, Direction, WorldNormal, WorldView,half4(Specular, 0), Smoothness); 69 | #endif 70 | } 71 | 72 | void AdditionalLights_float(float3 SpecColor, float Smoothness, float3 WorldPosition, float3 WorldNormal, float3 WorldView, out float3 Diffuse, out float3 Specular) 73 | { 74 | float3 diffuseColor = 0; 75 | float3 specularColor = 0; 76 | 77 | #ifndef SHADERGRAPH_PREVIEW 78 | Smoothness = exp2(10 * Smoothness + 1); 79 | WorldNormal = normalize(WorldNormal); 80 | WorldView = SafeNormalize(WorldView); 81 | int pixelLightCount = GetAdditionalLightsCount(); 82 | for (int i = 0; i < pixelLightCount; ++i) 83 | { 84 | Light light = GetAdditionalLight(i, WorldPosition); 85 | half3 attenuatedLightColor = light.color * (light.distanceAttenuation * light.shadowAttenuation); 86 | diffuseColor += LightingLambert(attenuatedLightColor, light.direction, WorldNormal); 87 | specularColor += LightingSpecular(attenuatedLightColor, light.direction, WorldNormal, WorldView, float4(SpecColor, 0), Smoothness); 88 | } 89 | #endif 90 | 91 | Diffuse = diffuseColor; 92 | Specular = specularColor; 93 | } 94 | 95 | void AdditionalLights_half(half3 SpecColor, half Smoothness, half3 WorldPosition, half3 WorldNormal, half3 WorldView, out half3 Diffuse, out half3 Specular) 96 | { 97 | half3 diffuseColor = 0; 98 | half3 specularColor = 0; 99 | 100 | #ifndef SHADERGRAPH_PREVIEW 101 | Smoothness = exp2(10 * Smoothness + 1); 102 | WorldNormal = normalize(WorldNormal); 103 | WorldView = SafeNormalize(WorldView); 104 | int pixelLightCount = GetAdditionalLightsCount(); 105 | for (int i = 0; i < pixelLightCount; ++i) 106 | { 107 | Light light = GetAdditionalLight(i, WorldPosition); 108 | half3 attenuatedLightColor = light.color * (light.distanceAttenuation * light.shadowAttenuation); 109 | diffuseColor += LightingLambert(attenuatedLightColor, light.direction, WorldNormal); 110 | specularColor += LightingSpecular(attenuatedLightColor, light.direction, WorldNormal, WorldView, half4(SpecColor, 0), Smoothness); 111 | } 112 | #endif 113 | 114 | Diffuse = diffuseColor; 115 | Specular = specularColor; 116 | } 117 | 118 | #endif 119 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/Unity-Technologies/ShaderGraph-Custom-Lighting/Includes/CustomLighting.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c5e7971c65b3c14faad0c1c55c952ab 3 | timeCreated: 1488965025 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/Unity-Technologies/ShaderGraph-Custom-Lighting/Sub Graphs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a5c6142bc28e5ba41bbe56d6d3941754 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/Unity-Technologies/ShaderGraph-Custom-Lighting/Sub Graphs/Calculate Additional Lights.shadersubgraph: -------------------------------------------------------------------------------- 1 | { 2 | "m_SerializedProperties": [ 3 | { 4 | "typeInfo": { 5 | "fullName": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty" 6 | }, 7 | "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"0f4b0df5-f8fc-40a9-90e2-ac3086245fbc\"\n },\n \"m_Name\": \"SpecColor\",\n \"m_DefaultReferenceName\": \"Color_EE85B5ED\",\n \"m_OverrideReferenceName\": \"\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_GPUInstanced\": false,\n \"m_Hidden\": false,\n \"m_Value\": {\n \"r\": 0.0,\n \"g\": 0.0,\n \"b\": 0.0,\n \"a\": 0.0\n },\n \"m_ColorMode\": 0\n}" 8 | }, 9 | { 10 | "typeInfo": { 11 | "fullName": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty" 12 | }, 13 | "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"20899b15-df51-48e2-9454-9a07709e1e6d\"\n },\n \"m_Name\": \"Smoothness\",\n \"m_DefaultReferenceName\": \"Vector1_B1513F4D\",\n \"m_OverrideReferenceName\": \"\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_GPUInstanced\": false,\n \"m_Hidden\": false,\n \"m_Value\": 0.0,\n \"m_FloatType\": 0,\n \"m_RangeValues\": {\n \"x\": 0.0,\n \"y\": 1.0\n }\n}" 14 | } 15 | ], 16 | "m_SerializedKeywords": [], 17 | "m_SerializableNodes": [ 18 | { 19 | "typeInfo": { 20 | "fullName": "UnityEditor.ShaderGraph.SubGraphOutputNode" 21 | }, 22 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"3f76e05a-317e-42a3-ab3f-86b5eab5935e\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Output\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -5.0,\n \"y\": -140.0,\n \"width\": 100.0,\n \"height\": 101.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Diffuse\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Diffuse\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Specular\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Specular\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" 23 | }, 24 | { 25 | "typeInfo": { 26 | "fullName": "UnityEditor.ShaderGraph.CustomFunctionNode" 27 | }, 28 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"5de14a8c-44a4-406a-942f-3930d2733d6c\",\n \"m_GroupGuidSerialized\": \"46fae345-dcb9-4a4e-a593-b79c5e8ca155\",\n \"m_Name\": \"Custom Function\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -412.0,\n \"y\": -140.0,\n \"width\": 0.0,\n \"height\": 0.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"SpecColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"SpecColor\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"WorldPosition\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"WorldPosition\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"WorldNormal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"WorldNormal\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"WorldView\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"WorldView\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Diffuse\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Diffuse\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"Specular\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Specular\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 2,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SourceType\": 0,\n \"m_FunctionName\": \"AdditionalLights\",\n \"m_FunctionSource\": \"1c5e7971c65b3c14faad0c1c55c952ab\",\n \"m_FunctionBody\": \"Enter function body here...\"\n}" 29 | }, 30 | { 31 | "typeInfo": { 32 | "fullName": "UnityEditor.ShaderGraph.PositionNode" 33 | }, 34 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"60fd2b5c-62b4-45d7-b04f-aff075a5f4f9\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Position\",\n \"m_NodeVersion\": 1,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -829.0,\n \"y\": -92.0,\n \"width\": 198.0,\n \"height\": 130.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 1,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_Space\": 2\n}" 35 | }, 36 | { 37 | "typeInfo": { 38 | "fullName": "UnityEditor.ShaderGraph.NormalVectorNode" 39 | }, 40 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"e4bddb64-d27b-4d32-9a66-9f38937fd399\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Normal Vector\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -829.0,\n \"y\": 41.0,\n \"width\": 198.0,\n \"height\": 130.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_Space\": 2\n}" 41 | }, 42 | { 43 | "typeInfo": { 44 | "fullName": "UnityEditor.ShaderGraph.ViewDirectionNode" 45 | }, 46 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"e4c76388-3c21-40ba-acdd-92f240d4a41b\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"View Direction\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -828.0,\n \"y\": 175.0,\n \"width\": 198.0,\n \"height\": 130.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_Space\": 2\n}" 47 | }, 48 | { 49 | "typeInfo": { 50 | "fullName": "UnityEditor.ShaderGraph.PropertyNode" 51 | }, 52 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"9b2cfc02-b167-43ab-85a6-e098c3a56c3a\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -615.0,\n \"y\": -118.0,\n \"width\": 123.0,\n \"height\": 34.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"SpecColor\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"0f4b0df5-f8fc-40a9-90e2-ac3086245fbc\"\n}" 53 | }, 54 | { 55 | "typeInfo": { 56 | "fullName": "UnityEditor.ShaderGraph.PropertyNode" 57 | }, 58 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"fef50d9a-3b53-4fe9-b2f6-77c8c109889a\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -623.0,\n \"y\": -80.0,\n \"width\": 112.0,\n \"height\": 34.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"20899b15-df51-48e2-9454-9a07709e1e6d\"\n}" 59 | } 60 | ], 61 | "m_Groups": [ 62 | { 63 | "m_GuidSerialized": "46fae345-dcb9-4a4e-a593-b79c5e8ca155", 64 | "m_Title": "Additional Lights", 65 | "m_Position": { 66 | "x": 10.0, 67 | "y": 10.0 68 | } 69 | } 70 | ], 71 | "m_StickyNotes": [], 72 | "m_SerializableEdges": [ 73 | { 74 | "typeInfo": { 75 | "fullName": "UnityEditor.Graphing.Edge" 76 | }, 77 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 5,\n \"m_NodeGUIDSerialized\": \"5de14a8c-44a4-406a-942f-3930d2733d6c\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"3f76e05a-317e-42a3-ab3f-86b5eab5935e\"\n }\n}" 78 | }, 79 | { 80 | "typeInfo": { 81 | "fullName": "UnityEditor.Graphing.Edge" 82 | }, 83 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 6,\n \"m_NodeGUIDSerialized\": \"5de14a8c-44a4-406a-942f-3930d2733d6c\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"3f76e05a-317e-42a3-ab3f-86b5eab5935e\"\n }\n}" 84 | }, 85 | { 86 | "typeInfo": { 87 | "fullName": "UnityEditor.Graphing.Edge" 88 | }, 89 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"60fd2b5c-62b4-45d7-b04f-aff075a5f4f9\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"5de14a8c-44a4-406a-942f-3930d2733d6c\"\n }\n}" 90 | }, 91 | { 92 | "typeInfo": { 93 | "fullName": "UnityEditor.Graphing.Edge" 94 | }, 95 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"e4bddb64-d27b-4d32-9a66-9f38937fd399\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 3,\n \"m_NodeGUIDSerialized\": \"5de14a8c-44a4-406a-942f-3930d2733d6c\"\n }\n}" 96 | }, 97 | { 98 | "typeInfo": { 99 | "fullName": "UnityEditor.Graphing.Edge" 100 | }, 101 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"e4c76388-3c21-40ba-acdd-92f240d4a41b\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 4,\n \"m_NodeGUIDSerialized\": \"5de14a8c-44a4-406a-942f-3930d2733d6c\"\n }\n}" 102 | }, 103 | { 104 | "typeInfo": { 105 | "fullName": "UnityEditor.Graphing.Edge" 106 | }, 107 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"9b2cfc02-b167-43ab-85a6-e098c3a56c3a\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"5de14a8c-44a4-406a-942f-3930d2733d6c\"\n }\n}" 108 | }, 109 | { 110 | "typeInfo": { 111 | "fullName": "UnityEditor.Graphing.Edge" 112 | }, 113 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"fef50d9a-3b53-4fe9-b2f6-77c8c109889a\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"5de14a8c-44a4-406a-942f-3930d2733d6c\"\n }\n}" 114 | } 115 | ], 116 | "m_PreviewData": { 117 | "serializedMesh": { 118 | "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", 119 | "m_Guid": "" 120 | } 121 | }, 122 | "m_Path": "Sub Graphs", 123 | "m_ConcretePrecision": 1, 124 | "m_ActiveOutputNodeGuidSerialized": "" 125 | } -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/Unity-Technologies/ShaderGraph-Custom-Lighting/Sub Graphs/Calculate Additional Lights.shadersubgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8578e370a0c1d0145a8a7724eaf3658b 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3} 11 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/Unity-Technologies/ShaderGraph-Custom-Lighting/Sub Graphs/Calculate Lighting.shadersubgraph: -------------------------------------------------------------------------------- 1 | { 2 | "m_SerializedProperties": [ 3 | { 4 | "typeInfo": { 5 | "fullName": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty" 6 | }, 7 | "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"e5a22203-cb4a-455e-8536-0eec1ef7c2ba\"\n },\n \"m_Name\": \"Specular\",\n \"m_DefaultReferenceName\": \"Color_F3D622DA\",\n \"m_OverrideReferenceName\": \"\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_GPUInstanced\": false,\n \"m_Hidden\": false,\n \"m_Value\": {\n \"r\": 1.0,\n \"g\": 1.0,\n \"b\": 1.0,\n \"a\": 0.0\n },\n \"m_ColorMode\": 0\n}" 8 | }, 9 | { 10 | "typeInfo": { 11 | "fullName": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty" 12 | }, 13 | "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"f1711bbe-6d38-457d-aaf2-eee225997055\"\n },\n \"m_Name\": \"Smoothness\",\n \"m_DefaultReferenceName\": \"Vector1_D271B9C0\",\n \"m_OverrideReferenceName\": \"\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_GPUInstanced\": false,\n \"m_Hidden\": false,\n \"m_Value\": 0.5,\n \"m_FloatType\": 0,\n \"m_RangeValues\": {\n \"x\": 0.0,\n \"y\": 1.0\n }\n}" 14 | } 15 | ], 16 | "m_SerializedKeywords": [], 17 | "m_SerializableNodes": [ 18 | { 19 | "typeInfo": { 20 | "fullName": "UnityEditor.ShaderGraph.SubGraphOutputNode" 21 | }, 22 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"73fcd87b-7b94-4308-ab06-333d20acc6d8\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Output\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 316.0,\n \"y\": -88.0,\n \"width\": 100.0,\n \"height\": 101.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Diffuse\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Diffuse\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Specular\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Specular\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" 23 | }, 24 | { 25 | "typeInfo": { 26 | "fullName": "UnityEditor.ShaderGraph.AddNode" 27 | }, 28 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"bd543860-1642-4647-a049-bd6764e1aca2\",\n \"m_GroupGuidSerialized\": \"87410bee-d77f-41d8-8365-0f8377df127c\",\n \"m_Name\": \"Add\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -4.000026702880859,\n \"y\": 122.00003051757813,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" 29 | }, 30 | { 31 | "typeInfo": { 32 | "fullName": "UnityEditor.ShaderGraph.AddNode" 33 | }, 34 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"10cccc81-0cf4-40c7-bb31-3cc27f73abeb\",\n \"m_GroupGuidSerialized\": \"9000c2a1-0f09-43ab-8e88-9f85dd468c14\",\n \"m_Name\": \"Add\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -4.000030517578125,\n \"y\": -273.0000305175781,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" 35 | }, 36 | { 37 | "typeInfo": { 38 | "fullName": "UnityEditor.ShaderGraph.SubGraphNode" 39 | }, 40 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"82a71731-592b-4756-924c-6a1d27a2a747\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Calculate Additional Lights\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -403.0000915527344,\n \"y\": 122.00003051757813,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1538739680,\\n \\\"m_DisplayName\\\": \\\"SpecColor\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color_EE85B5ED\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1708708762,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vector1_B1513F4D\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Diffuse\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Diffuse\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Specular\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Specular\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializedSubGraph\": \"{\\n \\\"subGraph\\\": {\\n \\\"fileID\\\": -5475051401550479605,\\n \\\"guid\\\": \\\"8578e370a0c1d0145a8a7724eaf3658b\\\",\\n \\\"type\\\": 3\\n }\\n}\",\n \"m_PropertyGuids\": [\n \"0f4b0df5-f8fc-40a9-90e2-ac3086245fbc\",\n \"20899b15-df51-48e2-9454-9a07709e1e6d\"\n ],\n \"m_PropertyIds\": [\n 1538739680,\n 1708708762\n ]\n}" 41 | }, 42 | { 43 | "typeInfo": { 44 | "fullName": "UnityEditor.ShaderGraph.SubGraphNode" 45 | }, 46 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"0c767105-8454-4c7f-acbf-3c8ca441803c\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Calculate Main Light\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -401.0000305175781,\n \"y\": -273.0000305175781,\n \"width\": 0.0,\n \"height\": 0.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1988475081,\\n \\\"m_DisplayName\\\": \\\"Specular\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color_43AD6CD2\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 1.0,\\n \\\"y\\\": 1.0,\\n \\\"z\\\": 1.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1747703644,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vector1_356A410D\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Diffuse\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Diffuse\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Specular\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Specular\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializedSubGraph\": \"{\\n \\\"subGraph\\\": {\\n \\\"fileID\\\": -5475051401550479605,\\n \\\"guid\\\": \\\"39b1287c70bb7dd4e87fae9a576f53d9\\\",\\n \\\"type\\\": 3\\n }\\n}\",\n \"m_PropertyGuids\": [\n \"5b2ef790-62ab-4f00-bb33-4f785b326959\",\n \"a563935c-1f48-44a6-bc4e-d2568d9ca1a6\"\n ],\n \"m_PropertyIds\": [\n 1988475081,\n 1747703644\n ]\n}" 47 | }, 48 | { 49 | "typeInfo": { 50 | "fullName": "UnityEditor.ShaderGraph.PropertyNode" 51 | }, 52 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"e95987cb-2d46-4a56-9b31-d9755167e9f3\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -706.0,\n \"y\": -6.0,\n \"width\": 133.0,\n \"height\": 34.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"f1711bbe-6d38-457d-aaf2-eee225997055\"\n}" 53 | }, 54 | { 55 | "typeInfo": { 56 | "fullName": "UnityEditor.ShaderGraph.PropertyNode" 57 | }, 58 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"e5c9f0a6-ac44-4fde-b095-8d4ab5ebc429\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -690.0,\n \"y\": -38.0,\n \"width\": 116.0,\n \"height\": 34.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Specular\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"e5a22203-cb4a-455e-8536-0eec1ef7c2ba\"\n}" 59 | } 60 | ], 61 | "m_Groups": [ 62 | { 63 | "m_GuidSerialized": "9000c2a1-0f09-43ab-8e88-9f85dd468c14", 64 | "m_Title": "Final Diffuse", 65 | "m_Position": { 66 | "x": 10.0, 67 | "y": 10.0 68 | } 69 | }, 70 | { 71 | "m_GuidSerialized": "87410bee-d77f-41d8-8365-0f8377df127c", 72 | "m_Title": "Final Specular", 73 | "m_Position": { 74 | "x": 10.0, 75 | "y": 10.0 76 | } 77 | } 78 | ], 79 | "m_StickyNotes": [], 80 | "m_SerializableEdges": [ 81 | { 82 | "typeInfo": { 83 | "fullName": "UnityEditor.Graphing.Edge" 84 | }, 85 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"0c767105-8454-4c7f-acbf-3c8ca441803c\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"bd543860-1642-4647-a049-bd6764e1aca2\"\n }\n}" 86 | }, 87 | { 88 | "typeInfo": { 89 | "fullName": "UnityEditor.Graphing.Edge" 90 | }, 91 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"82a71731-592b-4756-924c-6a1d27a2a747\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"bd543860-1642-4647-a049-bd6764e1aca2\"\n }\n}" 92 | }, 93 | { 94 | "typeInfo": { 95 | "fullName": "UnityEditor.Graphing.Edge" 96 | }, 97 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"0c767105-8454-4c7f-acbf-3c8ca441803c\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"10cccc81-0cf4-40c7-bb31-3cc27f73abeb\"\n }\n}" 98 | }, 99 | { 100 | "typeInfo": { 101 | "fullName": "UnityEditor.Graphing.Edge" 102 | }, 103 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"82a71731-592b-4756-924c-6a1d27a2a747\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"10cccc81-0cf4-40c7-bb31-3cc27f73abeb\"\n }\n}" 104 | }, 105 | { 106 | "typeInfo": { 107 | "fullName": "UnityEditor.Graphing.Edge" 108 | }, 109 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"e95987cb-2d46-4a56-9b31-d9755167e9f3\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1708708762,\n \"m_NodeGUIDSerialized\": \"82a71731-592b-4756-924c-6a1d27a2a747\"\n }\n}" 110 | }, 111 | { 112 | "typeInfo": { 113 | "fullName": "UnityEditor.Graphing.Edge" 114 | }, 115 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"e95987cb-2d46-4a56-9b31-d9755167e9f3\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1747703644,\n \"m_NodeGUIDSerialized\": \"0c767105-8454-4c7f-acbf-3c8ca441803c\"\n }\n}" 116 | }, 117 | { 118 | "typeInfo": { 119 | "fullName": "UnityEditor.Graphing.Edge" 120 | }, 121 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"10cccc81-0cf4-40c7-bb31-3cc27f73abeb\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"73fcd87b-7b94-4308-ab06-333d20acc6d8\"\n }\n}" 122 | }, 123 | { 124 | "typeInfo": { 125 | "fullName": "UnityEditor.Graphing.Edge" 126 | }, 127 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"bd543860-1642-4647-a049-bd6764e1aca2\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"73fcd87b-7b94-4308-ab06-333d20acc6d8\"\n }\n}" 128 | }, 129 | { 130 | "typeInfo": { 131 | "fullName": "UnityEditor.Graphing.Edge" 132 | }, 133 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"e5c9f0a6-ac44-4fde-b095-8d4ab5ebc429\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1988475081,\n \"m_NodeGUIDSerialized\": \"0c767105-8454-4c7f-acbf-3c8ca441803c\"\n }\n}" 134 | }, 135 | { 136 | "typeInfo": { 137 | "fullName": "UnityEditor.Graphing.Edge" 138 | }, 139 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"e5c9f0a6-ac44-4fde-b095-8d4ab5ebc429\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1538739680,\n \"m_NodeGUIDSerialized\": \"82a71731-592b-4756-924c-6a1d27a2a747\"\n }\n}" 140 | } 141 | ], 142 | "m_PreviewData": { 143 | "serializedMesh": { 144 | "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", 145 | "m_Guid": "" 146 | } 147 | }, 148 | "m_Path": "Sub Graphs", 149 | "m_ConcretePrecision": 1, 150 | "m_ActiveOutputNodeGuidSerialized": "" 151 | } -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/Unity-Technologies/ShaderGraph-Custom-Lighting/Sub Graphs/Calculate Lighting.shadersubgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22889f65f15d7fd41bcede954958ebe0 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3} 11 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/Unity-Technologies/ShaderGraph-Custom-Lighting/Sub Graphs/Calculate Main Light.shadersubgraph: -------------------------------------------------------------------------------- 1 | { 2 | "m_SerializedProperties": [ 3 | { 4 | "typeInfo": { 5 | "fullName": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty" 6 | }, 7 | "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"5b2ef790-62ab-4f00-bb33-4f785b326959\"\n },\n \"m_Name\": \"Specular\",\n \"m_DefaultReferenceName\": \"Color_43AD6CD2\",\n \"m_OverrideReferenceName\": \"\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_GPUInstanced\": false,\n \"m_Hidden\": false,\n \"m_Value\": {\n \"r\": 1.0,\n \"g\": 1.0,\n \"b\": 1.0,\n \"a\": 0.0\n },\n \"m_ColorMode\": 0\n}" 8 | }, 9 | { 10 | "typeInfo": { 11 | "fullName": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty" 12 | }, 13 | "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"a563935c-1f48-44a6-bc4e-d2568d9ca1a6\"\n },\n \"m_Name\": \"Smoothness\",\n \"m_DefaultReferenceName\": \"Vector1_356A410D\",\n \"m_OverrideReferenceName\": \"\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_GPUInstanced\": false,\n \"m_Hidden\": false,\n \"m_Value\": 0.5,\n \"m_FloatType\": 0,\n \"m_RangeValues\": {\n \"x\": 0.0,\n \"y\": 1.0\n }\n}" 14 | } 15 | ], 16 | "m_SerializedKeywords": [], 17 | "m_SerializableNodes": [ 18 | { 19 | "typeInfo": { 20 | "fullName": "UnityEditor.ShaderGraph.SubGraphOutputNode" 21 | }, 22 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"5f151470-035a-4d60-a7c6-b1bde1a1df99\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Output\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 682.0,\n \"y\": -97.0,\n \"width\": 100.0,\n \"height\": 101.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Diffuse\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Diffuse\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Specular\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Specular\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" 23 | }, 24 | { 25 | "typeInfo": { 26 | "fullName": "UnityEditor.ShaderGraph.NormalVectorNode" 27 | }, 28 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"9e689efa-8b3f-493c-af2f-33769f06ddd3\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Normal Vector\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -658.0,\n \"y\": -398.9999694824219,\n \"width\": 208.0,\n \"height\": 314.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_Space\": 2\n}" 29 | }, 30 | { 31 | "typeInfo": { 32 | "fullName": "UnityEditor.ShaderGraph.DotProductNode" 33 | }, 34 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"5c63e656-3266-49b6-b4e1-ec48d145c3bb\",\n \"m_GroupGuidSerialized\": \"487ef06e-8c3f-4277-92d0-46982b2743db\",\n \"m_Name\": \"Dot Product\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -386.0,\n \"y\": -399.0,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 1.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" 35 | }, 36 | { 37 | "typeInfo": { 38 | "fullName": "UnityEditor.ShaderGraph.SaturateNode" 39 | }, 40 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"9dba462e-9ba8-44dc-a346-eb5a9c619298\",\n \"m_GroupGuidSerialized\": \"487ef06e-8c3f-4277-92d0-46982b2743db\",\n \"m_Name\": \"Saturate\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -156.0,\n \"y\": -399.0,\n \"width\": 208.0,\n \"height\": 278.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" 41 | }, 42 | { 43 | "typeInfo": { 44 | "fullName": "UnityEditor.ShaderGraph.MultiplyNode" 45 | }, 46 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"c71991f0-abc4-48a4-b9c6-c23f75d1da58\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 387.0,\n \"y\": -231.0,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 2.0,\\n \\\"e01\\\": 2.0,\\n \\\"e02\\\": 2.0,\\n \\\"e03\\\": 2.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" 47 | }, 48 | { 49 | "typeInfo": { 50 | "fullName": "UnityEditor.ShaderGraph.SubGraphNode" 51 | }, 52 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"c8f5245c-4ea4-4036-9478-7c718bcae2c5\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Get Main Light\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -655.0,\n \"y\": -18.999969482421876,\n \"width\": 208.0,\n \"height\": 350.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Direction\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Direction\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"DistanceAtten\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"DistanceAtten\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"ShadowAtten\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"ShadowAtten\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializedSubGraph\": \"{\\n \\\"subGraph\\\": {\\n \\\"fileID\\\": -5475051401550479605,\\n \\\"guid\\\": \\\"52012c17518825a429793d26daee4a8c\\\",\\n \\\"type\\\": 3\\n }\\n}\",\n \"m_PropertyGuids\": [],\n \"m_PropertyIds\": []\n}" 53 | }, 54 | { 55 | "typeInfo": { 56 | "fullName": "UnityEditor.ShaderGraph.MultiplyNode" 57 | }, 58 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"4968cc0b-bb6d-451a-becb-7ded134e830e\",\n \"m_GroupGuidSerialized\": \"66e81944-a5c5-454c-8d5f-605d3fa8e585\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -383.0,\n \"y\": 29.000030517578126,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 2.0,\\n \\\"e01\\\": 2.0,\\n \\\"e02\\\": 2.0,\\n \\\"e03\\\": 2.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" 59 | }, 60 | { 61 | "typeInfo": { 62 | "fullName": "UnityEditor.ShaderGraph.MultiplyNode" 63 | }, 64 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"08aeee61-19ac-4b22-9e9c-87a3bbb81523\",\n \"m_GroupGuidSerialized\": \"66e81944-a5c5-454c-8d5f-605d3fa8e585\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -153.0,\n \"y\": 5.000030517578125,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 2.0,\\n \\\"e01\\\": 2.0,\\n \\\"e02\\\": 2.0,\\n \\\"e03\\\": 2.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" 65 | }, 66 | { 67 | "typeInfo": { 68 | "fullName": "UnityEditor.ShaderGraph.PreviewNode" 69 | }, 70 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"0c87f679-e75f-4cef-8bf2-66deca7ea9bb\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Preview\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 101.99998474121094,\n \"y\": 131.0,\n \"width\": 125.0,\n \"height\": 94.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_Width\": 208.0,\n \"m_Height\": 208.0\n}" 71 | }, 72 | { 73 | "typeInfo": { 74 | "fullName": "UnityEditor.ShaderGraph.SubGraphNode" 75 | }, 76 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"18b1b4a9-9d57-4d05-9127-4495c78ca3ee\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Direct Specular\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 387.0,\n \"y\": 83.0,\n \"width\": 208.0,\n \"height\": 350.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1389416329,\\n \\\"m_DisplayName\\\": \\\"Specular\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color_983329E6\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 1.0,\\n \\\"y\\\": 1.0,\\n \\\"z\\\": 1.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": -2028872793,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vector1_B5019124\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": -423164532,\\n \\\"m_DisplayName\\\": \\\"Direction\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vector3_CC4B8202\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": -1034211569,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color_7E2AEDE7\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 1.0,\\n \\\"y\\\": 1.0,\\n \\\"z\\\": 1.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializedSubGraph\": \"{\\n \\\"subGraph\\\": {\\n \\\"fileID\\\": -5475051401550479605,\\n \\\"guid\\\": \\\"a9cf43e29a492634eb6636b1384dd6c3\\\",\\n \\\"type\\\": 3\\n }\\n}\",\n \"m_PropertyGuids\": [\n \"eb018554-8dd1-4a42-b490-345cd6be6d9f\",\n \"18e79ea4-27f6-4537-9e90-b8be62f43f34\",\n \"13c84342-ee0f-463f-a5e5-1b0f260e5cf1\",\n \"a25f64e1-6904-4b9f-b94b-09ba7644c971\"\n ],\n \"m_PropertyIds\": [\n 1389416329,\n -2028872793,\n -423164532,\n -1034211569\n ]\n}" 77 | }, 78 | { 79 | "typeInfo": { 80 | "fullName": "UnityEditor.ShaderGraph.PropertyNode" 81 | }, 82 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"4935a290-8899-4785-b5fa-d35a2e7c3896\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 246.0,\n \"y\": 110.0,\n \"width\": 116.0,\n \"height\": 34.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Specular\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"5b2ef790-62ab-4f00-bb33-4f785b326959\"\n}" 83 | }, 84 | { 85 | "typeInfo": { 86 | "fullName": "UnityEditor.ShaderGraph.PropertyNode" 87 | }, 88 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"af2f30d5-36c5-46c8-bf5e-3d551b7c8a66\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 229.0,\n \"y\": 147.0,\n \"width\": 133.0,\n \"height\": 34.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"a563935c-1f48-44a6-bc4e-d2568d9ca1a6\"\n}" 89 | } 90 | ], 91 | "m_Groups": [ 92 | { 93 | "m_GuidSerialized": "66e81944-a5c5-454c-8d5f-605d3fa8e585", 94 | "m_Title": "Attenuation", 95 | "m_Position": { 96 | "x": 10.0, 97 | "y": 10.0 98 | } 99 | }, 100 | { 101 | "m_GuidSerialized": "487ef06e-8c3f-4277-92d0-46982b2743db", 102 | "m_Title": "NdotL", 103 | "m_Position": { 104 | "x": 10.0, 105 | "y": 10.0 106 | } 107 | } 108 | ], 109 | "m_StickyNotes": [], 110 | "m_SerializableEdges": [ 111 | { 112 | "typeInfo": { 113 | "fullName": "UnityEditor.Graphing.Edge" 114 | }, 115 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"9e689efa-8b3f-493c-af2f-33769f06ddd3\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"5c63e656-3266-49b6-b4e1-ec48d145c3bb\"\n }\n}" 116 | }, 117 | { 118 | "typeInfo": { 119 | "fullName": "UnityEditor.Graphing.Edge" 120 | }, 121 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"c8f5245c-4ea4-4036-9478-7c718bcae2c5\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"5c63e656-3266-49b6-b4e1-ec48d145c3bb\"\n }\n}" 122 | }, 123 | { 124 | "typeInfo": { 125 | "fullName": "UnityEditor.Graphing.Edge" 126 | }, 127 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"5c63e656-3266-49b6-b4e1-ec48d145c3bb\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"9dba462e-9ba8-44dc-a346-eb5a9c619298\"\n }\n}" 128 | }, 129 | { 130 | "typeInfo": { 131 | "fullName": "UnityEditor.Graphing.Edge" 132 | }, 133 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"9dba462e-9ba8-44dc-a346-eb5a9c619298\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"c71991f0-abc4-48a4-b9c6-c23f75d1da58\"\n }\n}" 134 | }, 135 | { 136 | "typeInfo": { 137 | "fullName": "UnityEditor.Graphing.Edge" 138 | }, 139 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"08aeee61-19ac-4b22-9e9c-87a3bbb81523\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"c71991f0-abc4-48a4-b9c6-c23f75d1da58\"\n }\n}" 140 | }, 141 | { 142 | "typeInfo": { 143 | "fullName": "UnityEditor.Graphing.Edge" 144 | }, 145 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"c8f5245c-4ea4-4036-9478-7c718bcae2c5\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"0c87f679-e75f-4cef-8bf2-66deca7ea9bb\"\n }\n}" 146 | }, 147 | { 148 | "typeInfo": { 149 | "fullName": "UnityEditor.Graphing.Edge" 150 | }, 151 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"c8f5245c-4ea4-4036-9478-7c718bcae2c5\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"08aeee61-19ac-4b22-9e9c-87a3bbb81523\"\n }\n}" 152 | }, 153 | { 154 | "typeInfo": { 155 | "fullName": "UnityEditor.Graphing.Edge" 156 | }, 157 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 3,\n \"m_NodeGUIDSerialized\": \"c8f5245c-4ea4-4036-9478-7c718bcae2c5\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"4968cc0b-bb6d-451a-becb-7ded134e830e\"\n }\n}" 158 | }, 159 | { 160 | "typeInfo": { 161 | "fullName": "UnityEditor.Graphing.Edge" 162 | }, 163 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 4,\n \"m_NodeGUIDSerialized\": \"c8f5245c-4ea4-4036-9478-7c718bcae2c5\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"4968cc0b-bb6d-451a-becb-7ded134e830e\"\n }\n}" 164 | }, 165 | { 166 | "typeInfo": { 167 | "fullName": "UnityEditor.Graphing.Edge" 168 | }, 169 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"4968cc0b-bb6d-451a-becb-7ded134e830e\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"08aeee61-19ac-4b22-9e9c-87a3bbb81523\"\n }\n}" 170 | }, 171 | { 172 | "typeInfo": { 173 | "fullName": "UnityEditor.Graphing.Edge" 174 | }, 175 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"08aeee61-19ac-4b22-9e9c-87a3bbb81523\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": -1034211569,\n \"m_NodeGUIDSerialized\": \"18b1b4a9-9d57-4d05-9127-4495c78ca3ee\"\n }\n}" 176 | }, 177 | { 178 | "typeInfo": { 179 | "fullName": "UnityEditor.Graphing.Edge" 180 | }, 181 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"0c87f679-e75f-4cef-8bf2-66deca7ea9bb\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": -423164532,\n \"m_NodeGUIDSerialized\": \"18b1b4a9-9d57-4d05-9127-4495c78ca3ee\"\n }\n}" 182 | }, 183 | { 184 | "typeInfo": { 185 | "fullName": "UnityEditor.Graphing.Edge" 186 | }, 187 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"af2f30d5-36c5-46c8-bf5e-3d551b7c8a66\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": -2028872793,\n \"m_NodeGUIDSerialized\": \"18b1b4a9-9d57-4d05-9127-4495c78ca3ee\"\n }\n}" 188 | }, 189 | { 190 | "typeInfo": { 191 | "fullName": "UnityEditor.Graphing.Edge" 192 | }, 193 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"4935a290-8899-4785-b5fa-d35a2e7c3896\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1389416329,\n \"m_NodeGUIDSerialized\": \"18b1b4a9-9d57-4d05-9127-4495c78ca3ee\"\n }\n}" 194 | }, 195 | { 196 | "typeInfo": { 197 | "fullName": "UnityEditor.Graphing.Edge" 198 | }, 199 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"18b1b4a9-9d57-4d05-9127-4495c78ca3ee\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"5f151470-035a-4d60-a7c6-b1bde1a1df99\"\n }\n}" 200 | }, 201 | { 202 | "typeInfo": { 203 | "fullName": "UnityEditor.Graphing.Edge" 204 | }, 205 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"c71991f0-abc4-48a4-b9c6-c23f75d1da58\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"5f151470-035a-4d60-a7c6-b1bde1a1df99\"\n }\n}" 206 | } 207 | ], 208 | "m_PreviewData": { 209 | "serializedMesh": { 210 | "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", 211 | "m_Guid": "" 212 | } 213 | }, 214 | "m_Path": "Sub Graphs", 215 | "m_ConcretePrecision": 1, 216 | "m_ActiveOutputNodeGuidSerialized": "" 217 | } -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/Unity-Technologies/ShaderGraph-Custom-Lighting/Sub Graphs/Calculate Main Light.shadersubgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39b1287c70bb7dd4e87fae9a576f53d9 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3} 11 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/Unity-Technologies/ShaderGraph-Custom-Lighting/Sub Graphs/Direct Specular.shadersubgraph: -------------------------------------------------------------------------------- 1 | { 2 | "m_SerializedProperties": [ 3 | { 4 | "typeInfo": { 5 | "fullName": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty" 6 | }, 7 | "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"eb018554-8dd1-4a42-b490-345cd6be6d9f\"\n },\n \"m_Name\": \"Specular\",\n \"m_DefaultReferenceName\": \"Color_983329E6\",\n \"m_OverrideReferenceName\": \"\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_GPUInstanced\": false,\n \"m_Hidden\": false,\n \"m_Value\": {\n \"r\": 1.0,\n \"g\": 1.0,\n \"b\": 1.0,\n \"a\": 0.0\n },\n \"m_ColorMode\": 0\n}" 8 | }, 9 | { 10 | "typeInfo": { 11 | "fullName": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty" 12 | }, 13 | "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"18e79ea4-27f6-4537-9e90-b8be62f43f34\"\n },\n \"m_Name\": \"Smoothness\",\n \"m_DefaultReferenceName\": \"Vector1_B5019124\",\n \"m_OverrideReferenceName\": \"\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_GPUInstanced\": false,\n \"m_Hidden\": false,\n \"m_Value\": 0.5,\n \"m_FloatType\": 0,\n \"m_RangeValues\": {\n \"x\": 0.0,\n \"y\": 1.0\n }\n}" 14 | }, 15 | { 16 | "typeInfo": { 17 | "fullName": "UnityEditor.ShaderGraph.Internal.Vector3ShaderProperty" 18 | }, 19 | "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"13c84342-ee0f-463f-a5e5-1b0f260e5cf1\"\n },\n \"m_Name\": \"Direction\",\n \"m_DefaultReferenceName\": \"Vector3_CC4B8202\",\n \"m_OverrideReferenceName\": \"\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_GPUInstanced\": false,\n \"m_Hidden\": false,\n \"m_Value\": {\n \"x\": 0.0,\n \"y\": 0.0,\n \"z\": 0.0,\n \"w\": 0.0\n }\n}" 20 | }, 21 | { 22 | "typeInfo": { 23 | "fullName": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty" 24 | }, 25 | "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"a25f64e1-6904-4b9f-b94b-09ba7644c971\"\n },\n \"m_Name\": \"Color\",\n \"m_DefaultReferenceName\": \"Color_7E2AEDE7\",\n \"m_OverrideReferenceName\": \"\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_GPUInstanced\": false,\n \"m_Hidden\": false,\n \"m_Value\": {\n \"r\": 1.0,\n \"g\": 1.0,\n \"b\": 1.0,\n \"a\": 0.0\n },\n \"m_ColorMode\": 0\n}" 26 | } 27 | ], 28 | "m_SerializedKeywords": [], 29 | "m_SerializableNodes": [ 30 | { 31 | "typeInfo": { 32 | "fullName": "UnityEditor.ShaderGraph.SubGraphOutputNode" 33 | }, 34 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"9b492e30-82bd-4a2a-ade6-3b3b6f391c84\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Output\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 382.0,\n \"y\": -15.0,\n \"width\": 100.0,\n \"height\": 77.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" 35 | }, 36 | { 37 | "typeInfo": { 38 | "fullName": "UnityEditor.ShaderGraph.CustomFunctionNode" 39 | }, 40 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"e818c407-7c4f-4377-a4bb-b0e4732f9dd0\",\n \"m_GroupGuidSerialized\": \"b2978064-eb47-41df-8e9d-dac2eb8d5fb2\",\n \"m_Name\": \"Custom Function\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -340.0,\n \"y\": -12.0,\n \"width\": 208.0,\n \"height\": 398.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Specular\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Specular\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Direction\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Direction\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"WorldNormal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"WorldNormal\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"WorldView\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"WorldView\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SourceType\": 0,\n \"m_FunctionName\": \"DirectSpecular\",\n \"m_FunctionSource\": \"1c5e7971c65b3c14faad0c1c55c952ab\",\n \"m_FunctionBody\": \"Enter function body here...\"\n}" 41 | }, 42 | { 43 | "typeInfo": { 44 | "fullName": "UnityEditor.ShaderGraph.PropertyNode" 45 | }, 46 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"24c6ac0f-d0f7-4d3a-9353-e56e8a16822b\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -509.0,\n \"y\": -9.0,\n \"width\": 116.0,\n \"height\": 34.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Specular\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"eb018554-8dd1-4a42-b490-345cd6be6d9f\"\n}" 47 | }, 48 | { 49 | "typeInfo": { 50 | "fullName": "UnityEditor.ShaderGraph.PropertyNode" 51 | }, 52 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"2a0e75e2-6571-4e93-8410-16ccba2fbb2d\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -523.0,\n \"y\": 27.0,\n \"width\": 133.0,\n \"height\": 34.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"18e79ea4-27f6-4537-9e90-b8be62f43f34\"\n}" 53 | }, 54 | { 55 | "typeInfo": { 56 | "fullName": "UnityEditor.ShaderGraph.PropertyNode" 57 | }, 58 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"927fa6e9-2708-48f1-9319-772846842448\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -510.0,\n \"y\": 64.0,\n \"width\": 119.0,\n \"height\": 34.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Direction\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"13c84342-ee0f-463f-a5e5-1b0f260e5cf1\"\n}" 59 | }, 60 | { 61 | "typeInfo": { 62 | "fullName": "UnityEditor.ShaderGraph.PropertyNode" 63 | }, 64 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"098cd40a-5d5d-4c0d-9322-51aedeedb3bb\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -492.0,\n \"y\": 100.0,\n \"width\": 100.0,\n \"height\": 34.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"a25f64e1-6904-4b9f-b94b-09ba7644c971\"\n}" 65 | }, 66 | { 67 | "typeInfo": { 68 | "fullName": "UnityEditor.ShaderGraph.NormalVectorNode" 69 | }, 70 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"5d703b6e-c6a4-4670-afda-5a7959252933\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Normal Vector\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -851.0,\n \"y\": 85.0,\n \"width\": 208.0,\n \"height\": 314.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_Space\": 2\n}" 71 | }, 72 | { 73 | "typeInfo": { 74 | "fullName": "UnityEditor.ShaderGraph.ViewDirectionNode" 75 | }, 76 | "JSONnodeData": "{\n \"m_GuidSerialized\": \"52f52987-af67-4740-898a-ee56d709a207\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"View Direction\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -634.0,\n \"y\": 155.0,\n \"width\": 208.0,\n \"height\": 314.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_Space\": 2\n}" 77 | } 78 | ], 79 | "m_Groups": [ 80 | { 81 | "m_GuidSerialized": "b2978064-eb47-41df-8e9d-dac2eb8d5fb2", 82 | "m_Title": "Direct Specular", 83 | "m_Position": { 84 | "x": -365.0, 85 | "y": -74.0 86 | } 87 | } 88 | ], 89 | "m_StickyNotes": [], 90 | "m_SerializableEdges": [ 91 | { 92 | "typeInfo": { 93 | "fullName": "UnityEditor.Graphing.Edge" 94 | }, 95 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 6,\n \"m_NodeGUIDSerialized\": \"e818c407-7c4f-4377-a4bb-b0e4732f9dd0\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"9b492e30-82bd-4a2a-ade6-3b3b6f391c84\"\n }\n}" 96 | }, 97 | { 98 | "typeInfo": { 99 | "fullName": "UnityEditor.Graphing.Edge" 100 | }, 101 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"24c6ac0f-d0f7-4d3a-9353-e56e8a16822b\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"e818c407-7c4f-4377-a4bb-b0e4732f9dd0\"\n }\n}" 102 | }, 103 | { 104 | "typeInfo": { 105 | "fullName": "UnityEditor.Graphing.Edge" 106 | }, 107 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"2a0e75e2-6571-4e93-8410-16ccba2fbb2d\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"e818c407-7c4f-4377-a4bb-b0e4732f9dd0\"\n }\n}" 108 | }, 109 | { 110 | "typeInfo": { 111 | "fullName": "UnityEditor.Graphing.Edge" 112 | }, 113 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"927fa6e9-2708-48f1-9319-772846842448\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"e818c407-7c4f-4377-a4bb-b0e4732f9dd0\"\n }\n}" 114 | }, 115 | { 116 | "typeInfo": { 117 | "fullName": "UnityEditor.Graphing.Edge" 118 | }, 119 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"098cd40a-5d5d-4c0d-9322-51aedeedb3bb\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 3,\n \"m_NodeGUIDSerialized\": \"e818c407-7c4f-4377-a4bb-b0e4732f9dd0\"\n }\n}" 120 | }, 121 | { 122 | "typeInfo": { 123 | "fullName": "UnityEditor.Graphing.Edge" 124 | }, 125 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"52f52987-af67-4740-898a-ee56d709a207\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 5,\n \"m_NodeGUIDSerialized\": \"e818c407-7c4f-4377-a4bb-b0e4732f9dd0\"\n }\n}" 126 | }, 127 | { 128 | "typeInfo": { 129 | "fullName": "UnityEditor.Graphing.Edge" 130 | }, 131 | "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"5d703b6e-c6a4-4670-afda-5a7959252933\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 4,\n \"m_NodeGUIDSerialized\": \"e818c407-7c4f-4377-a4bb-b0e4732f9dd0\"\n }\n}" 132 | } 133 | ], 134 | "m_PreviewData": { 135 | "serializedMesh": { 136 | "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", 137 | "m_Guid": "" 138 | } 139 | }, 140 | "m_Path": "Sub Graphs", 141 | "m_ConcretePrecision": 1, 142 | "m_ActiveOutputNodeGuidSerialized": "" 143 | } -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/Unity-Technologies/ShaderGraph-Custom-Lighting/Sub Graphs/Direct Specular.shadersubgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a9cf43e29a492634eb6636b1384dd6c3 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3} 11 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/Unity-Technologies/ShaderGraph-Custom-Lighting/Sub Graphs/Get Main Light.shadersubgraph: -------------------------------------------------------------------------------- 1 | { 2 | "m_SGVersion": 2, 3 | "m_Type": "UnityEditor.ShaderGraph.GraphData", 4 | "m_ObjectId": "99f98e262a384f51b021550b987012ec", 5 | "m_Properties": [], 6 | "m_Keywords": [], 7 | "m_Nodes": [ 8 | { 9 | "m_Id": "de2be4080abf508eb98e53c8ddab5681" 10 | }, 11 | { 12 | "m_Id": "3dcb934e488f10839aad9e787e60e26d" 13 | }, 14 | { 15 | "m_Id": "9eb06b49af4c93809d5676f240b28179" 16 | } 17 | ], 18 | "m_GroupDatas": [ 19 | { 20 | "m_Id": "4eb9a563ecdb4ff1b75dd1e1e6134e11" 21 | } 22 | ], 23 | "m_StickyNoteDatas": [], 24 | "m_Edges": [ 25 | { 26 | "m_OutputSlot": { 27 | "m_Node": { 28 | "m_Id": "3dcb934e488f10839aad9e787e60e26d" 29 | }, 30 | "m_SlotId": 0 31 | }, 32 | "m_InputSlot": { 33 | "m_Node": { 34 | "m_Id": "de2be4080abf508eb98e53c8ddab5681" 35 | }, 36 | "m_SlotId": 1 37 | } 38 | }, 39 | { 40 | "m_OutputSlot": { 41 | "m_Node": { 42 | "m_Id": "3dcb934e488f10839aad9e787e60e26d" 43 | }, 44 | "m_SlotId": 1 45 | }, 46 | "m_InputSlot": { 47 | "m_Node": { 48 | "m_Id": "de2be4080abf508eb98e53c8ddab5681" 49 | }, 50 | "m_SlotId": 2 51 | } 52 | }, 53 | { 54 | "m_OutputSlot": { 55 | "m_Node": { 56 | "m_Id": "3dcb934e488f10839aad9e787e60e26d" 57 | }, 58 | "m_SlotId": 3 59 | }, 60 | "m_InputSlot": { 61 | "m_Node": { 62 | "m_Id": "de2be4080abf508eb98e53c8ddab5681" 63 | }, 64 | "m_SlotId": 3 65 | } 66 | }, 67 | { 68 | "m_OutputSlot": { 69 | "m_Node": { 70 | "m_Id": "3dcb934e488f10839aad9e787e60e26d" 71 | }, 72 | "m_SlotId": 4 73 | }, 74 | "m_InputSlot": { 75 | "m_Node": { 76 | "m_Id": "de2be4080abf508eb98e53c8ddab5681" 77 | }, 78 | "m_SlotId": 4 79 | } 80 | }, 81 | { 82 | "m_OutputSlot": { 83 | "m_Node": { 84 | "m_Id": "9eb06b49af4c93809d5676f240b28179" 85 | }, 86 | "m_SlotId": 0 87 | }, 88 | "m_InputSlot": { 89 | "m_Node": { 90 | "m_Id": "3dcb934e488f10839aad9e787e60e26d" 91 | }, 92 | "m_SlotId": 2 93 | } 94 | } 95 | ], 96 | "m_VertexContext": { 97 | "m_Position": { 98 | "x": 276.0, 99 | "y": -140.0 100 | }, 101 | "m_Blocks": [] 102 | }, 103 | "m_FragmentContext": { 104 | "m_Position": { 105 | "x": 276.0, 106 | "y": 60.0 107 | }, 108 | "m_Blocks": [] 109 | }, 110 | "m_PreviewData": { 111 | "serializedMesh": { 112 | "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", 113 | "m_Guid": "" 114 | } 115 | }, 116 | "m_Path": "Sub Graphs", 117 | "m_ConcretePrecision": 1, 118 | "m_PreviewMode": 2, 119 | "m_OutputNode": { 120 | "m_Id": "de2be4080abf508eb98e53c8ddab5681" 121 | }, 122 | "m_ActiveTargets": [] 123 | } 124 | 125 | { 126 | "m_SGVersion": 0, 127 | "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", 128 | "m_ObjectId": "14f7960f0d3a1c82a6e2eef42751916a", 129 | "m_Id": 1, 130 | "m_DisplayName": "Direction", 131 | "m_SlotType": 0, 132 | "m_Hidden": false, 133 | "m_ShaderOutputName": "Direction", 134 | "m_StageCapability": 3, 135 | "m_Value": { 136 | "x": 0.0, 137 | "y": 0.0, 138 | "z": 0.0 139 | }, 140 | "m_DefaultValue": { 141 | "x": 0.0, 142 | "y": 0.0, 143 | "z": 0.0 144 | }, 145 | "m_Labels": [ 146 | "X", 147 | "Y", 148 | "Z" 149 | ] 150 | } 151 | 152 | { 153 | "m_SGVersion": 0, 154 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 155 | "m_ObjectId": "2aa2de517306ed838cf5ab2fd2d9e92c", 156 | "m_Id": 3, 157 | "m_DisplayName": "DistanceAtten", 158 | "m_SlotType": 1, 159 | "m_Hidden": false, 160 | "m_ShaderOutputName": "DistanceAtten", 161 | "m_StageCapability": 3, 162 | "m_Value": 0.0, 163 | "m_DefaultValue": 0.0, 164 | "m_Labels": [ 165 | "X" 166 | ] 167 | } 168 | 169 | { 170 | "m_SGVersion": 0, 171 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 172 | "m_ObjectId": "33167bff73eaa68189571db3d8b2d33f", 173 | "m_Id": 3, 174 | "m_DisplayName": "DistanceAtten", 175 | "m_SlotType": 0, 176 | "m_Hidden": false, 177 | "m_ShaderOutputName": "DistanceAtten", 178 | "m_StageCapability": 3, 179 | "m_Value": 0.0, 180 | "m_DefaultValue": 0.0, 181 | "m_Labels": [ 182 | "X" 183 | ] 184 | } 185 | 186 | { 187 | "m_SGVersion": 0, 188 | "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", 189 | "m_ObjectId": "3aa48383bd901d8da40759b6b3fa348b", 190 | "m_Id": 2, 191 | "m_DisplayName": "Color", 192 | "m_SlotType": 0, 193 | "m_Hidden": false, 194 | "m_ShaderOutputName": "Color", 195 | "m_StageCapability": 3, 196 | "m_Value": { 197 | "x": 0.0, 198 | "y": 0.0, 199 | "z": 0.0 200 | }, 201 | "m_DefaultValue": { 202 | "x": 0.0, 203 | "y": 0.0, 204 | "z": 0.0 205 | }, 206 | "m_Labels": [ 207 | "X", 208 | "Y", 209 | "Z" 210 | ] 211 | } 212 | 213 | { 214 | "m_SGVersion": 1, 215 | "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", 216 | "m_ObjectId": "3dcb934e488f10839aad9e787e60e26d", 217 | "m_Group": { 218 | "m_Id": "4eb9a563ecdb4ff1b75dd1e1e6134e11" 219 | }, 220 | "m_Name": "MainLight (Custom Function)", 221 | "m_DrawState": { 222 | "m_Expanded": true, 223 | "m_Position": { 224 | "serializedVersion": "2", 225 | "x": 23.0, 226 | "y": -139.75, 227 | "width": 208.0, 228 | "height": 245.0 229 | } 230 | }, 231 | "m_Slots": [ 232 | { 233 | "m_Id": "68b53013a1e42b84bae32af541fb3952" 234 | }, 235 | { 236 | "m_Id": "bb8119426b121580b840cdd27f7fe6bc" 237 | }, 238 | { 239 | "m_Id": "2aa2de517306ed838cf5ab2fd2d9e92c" 240 | }, 241 | { 242 | "m_Id": "61e689b35b577f8b806b608bd60de5d3" 243 | }, 244 | { 245 | "m_Id": "cccd9348d167278bbd87992778909988" 246 | } 247 | ], 248 | "synonyms": [], 249 | "m_Precision": 2, 250 | "m_PreviewExpanded": true, 251 | "m_PreviewMode": 0, 252 | "m_CustomColors": { 253 | "m_SerializableColors": [] 254 | }, 255 | "m_SourceType": 0, 256 | "m_FunctionName": "MainLight", 257 | "m_FunctionSource": "1c5e7971c65b3c14faad0c1c55c952ab", 258 | "m_FunctionBody": "#if SHADERGRAPH_PREVIEW\n\tDirection = float3(0.5, 0.5, 0);\n\tColor = 1;\n#else\n\tLight light = GetMainLight();\n\tDirection = light.direction;\n\tColor = light.color;\n#endif\n" 259 | } 260 | 261 | { 262 | "m_SGVersion": 0, 263 | "m_Type": "UnityEditor.ShaderGraph.GroupData", 264 | "m_ObjectId": "4eb9a563ecdb4ff1b75dd1e1e6134e11", 265 | "m_Title": "Get Main Light", 266 | "m_Position": { 267 | "x": 10.0, 268 | "y": 10.0 269 | } 270 | } 271 | 272 | { 273 | "m_SGVersion": 0, 274 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 275 | "m_ObjectId": "61e689b35b577f8b806b608bd60de5d3", 276 | "m_Id": 4, 277 | "m_DisplayName": "ShadowAtten", 278 | "m_SlotType": 1, 279 | "m_Hidden": false, 280 | "m_ShaderOutputName": "ShadowAtten", 281 | "m_StageCapability": 3, 282 | "m_Value": 0.0, 283 | "m_DefaultValue": 0.0, 284 | "m_Labels": [ 285 | "X" 286 | ] 287 | } 288 | 289 | { 290 | "m_SGVersion": 0, 291 | "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", 292 | "m_ObjectId": "68b53013a1e42b84bae32af541fb3952", 293 | "m_Id": 0, 294 | "m_DisplayName": "Direction", 295 | "m_SlotType": 1, 296 | "m_Hidden": false, 297 | "m_ShaderOutputName": "Direction", 298 | "m_StageCapability": 3, 299 | "m_Value": { 300 | "x": 0.0, 301 | "y": 0.0, 302 | "z": 0.0 303 | }, 304 | "m_DefaultValue": { 305 | "x": 0.0, 306 | "y": 0.0, 307 | "z": 0.0 308 | }, 309 | "m_Labels": [ 310 | "X", 311 | "Y", 312 | "Z" 313 | ] 314 | } 315 | 316 | { 317 | "m_SGVersion": 0, 318 | "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", 319 | "m_ObjectId": "8ba2467f9413e080abd98c02be127a5f", 320 | "m_Id": 4, 321 | "m_DisplayName": "ShadowAtten", 322 | "m_SlotType": 0, 323 | "m_Hidden": false, 324 | "m_ShaderOutputName": "ShadowAtten", 325 | "m_StageCapability": 3, 326 | "m_Value": 0.0, 327 | "m_DefaultValue": 0.0, 328 | "m_Labels": [ 329 | "X" 330 | ] 331 | } 332 | 333 | { 334 | "m_SGVersion": 1, 335 | "m_Type": "UnityEditor.ShaderGraph.PositionNode", 336 | "m_ObjectId": "9eb06b49af4c93809d5676f240b28179", 337 | "m_Group": { 338 | "m_Id": "" 339 | }, 340 | "m_Name": "Position", 341 | "m_DrawState": { 342 | "m_Expanded": true, 343 | "m_Position": { 344 | "serializedVersion": "2", 345 | "x": -227.0, 346 | "y": -140.0, 347 | "width": 208.0, 348 | "height": 314.0 349 | } 350 | }, 351 | "m_Slots": [ 352 | { 353 | "m_Id": "ef7ed541142c0f8d86654fcdc82028fc" 354 | } 355 | ], 356 | "synonyms": [], 357 | "m_Precision": 1, 358 | "m_PreviewExpanded": true, 359 | "m_PreviewMode": 2, 360 | "m_CustomColors": { 361 | "m_SerializableColors": [] 362 | }, 363 | "m_Space": 4 364 | } 365 | 366 | { 367 | "m_SGVersion": 0, 368 | "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", 369 | "m_ObjectId": "bb8119426b121580b840cdd27f7fe6bc", 370 | "m_Id": 1, 371 | "m_DisplayName": "Color", 372 | "m_SlotType": 1, 373 | "m_Hidden": false, 374 | "m_ShaderOutputName": "Color", 375 | "m_StageCapability": 3, 376 | "m_Value": { 377 | "x": 0.0, 378 | "y": 0.0, 379 | "z": 0.0 380 | }, 381 | "m_DefaultValue": { 382 | "x": 0.0, 383 | "y": 0.0, 384 | "z": 0.0 385 | }, 386 | "m_Labels": [ 387 | "X", 388 | "Y", 389 | "Z" 390 | ] 391 | } 392 | 393 | { 394 | "m_SGVersion": 0, 395 | "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", 396 | "m_ObjectId": "cccd9348d167278bbd87992778909988", 397 | "m_Id": 2, 398 | "m_DisplayName": "WorldPos", 399 | "m_SlotType": 0, 400 | "m_Hidden": false, 401 | "m_ShaderOutputName": "WorldPos", 402 | "m_StageCapability": 3, 403 | "m_Value": { 404 | "x": 0.0, 405 | "y": 0.0, 406 | "z": 0.0 407 | }, 408 | "m_DefaultValue": { 409 | "x": 0.0, 410 | "y": 0.0, 411 | "z": 0.0 412 | }, 413 | "m_Labels": [ 414 | "X", 415 | "Y", 416 | "Z" 417 | ] 418 | } 419 | 420 | { 421 | "m_SGVersion": 0, 422 | "m_Type": "UnityEditor.ShaderGraph.SubGraphOutputNode", 423 | "m_ObjectId": "de2be4080abf508eb98e53c8ddab5681", 424 | "m_Group": { 425 | "m_Id": "" 426 | }, 427 | "m_Name": "Output", 428 | "m_DrawState": { 429 | "m_Expanded": true, 430 | "m_Position": { 431 | "serializedVersion": "2", 432 | "x": 276.0, 433 | "y": -140.0, 434 | "width": 122.0, 435 | "height": 149.0 436 | } 437 | }, 438 | "m_Slots": [ 439 | { 440 | "m_Id": "14f7960f0d3a1c82a6e2eef42751916a" 441 | }, 442 | { 443 | "m_Id": "3aa48383bd901d8da40759b6b3fa348b" 444 | }, 445 | { 446 | "m_Id": "33167bff73eaa68189571db3d8b2d33f" 447 | }, 448 | { 449 | "m_Id": "8ba2467f9413e080abd98c02be127a5f" 450 | } 451 | ], 452 | "synonyms": [], 453 | "m_Precision": 0, 454 | "m_PreviewExpanded": true, 455 | "m_PreviewMode": 0, 456 | "m_CustomColors": { 457 | "m_SerializableColors": [] 458 | }, 459 | "IsFirstSlotValid": true 460 | } 461 | 462 | { 463 | "m_SGVersion": 0, 464 | "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", 465 | "m_ObjectId": "ef7ed541142c0f8d86654fcdc82028fc", 466 | "m_Id": 0, 467 | "m_DisplayName": "Out", 468 | "m_SlotType": 1, 469 | "m_Hidden": false, 470 | "m_ShaderOutputName": "Out", 471 | "m_StageCapability": 3, 472 | "m_Value": { 473 | "x": 0.0, 474 | "y": 0.0, 475 | "z": 0.0 476 | }, 477 | "m_DefaultValue": { 478 | "x": 0.0, 479 | "y": 0.0, 480 | "z": 0.0 481 | }, 482 | "m_Labels": [ 483 | "X", 484 | "Y", 485 | "Z" 486 | ] 487 | } 488 | 489 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Resources/Unity-Technologies/ShaderGraph-Custom-Lighting/Sub Graphs/Get Main Light.shadersubgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 52012c17518825a429793d26daee4a8c 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3} 11 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a295e93a8625b1943851d89e82bca47e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Scripts/MaterialFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using UnityEngine; 6 | 7 | 8 | namespace VRMShaders 9 | { 10 | public delegate Task GetTextureAsyncFunc(TextureDescriptor texDesc, IAwaitCaller awaitCaller); 11 | 12 | public class MaterialFactory : IResponsibilityForDestroyObjects 13 | { 14 | private readonly IReadOnlyDictionary m_externalMap; 15 | 16 | public MaterialFactory(IReadOnlyDictionary externalMaterialMap) 17 | { 18 | m_externalMap = externalMaterialMap; 19 | } 20 | 21 | public struct MaterialLoadInfo 22 | { 23 | public SubAssetKey Key; 24 | public readonly Material Asset; 25 | public readonly bool UseExternal; 26 | 27 | public bool IsSubAsset => !UseExternal; 28 | 29 | public MaterialLoadInfo(SubAssetKey key, Material asset, bool useExternal) 30 | { 31 | Key = key; 32 | Asset = asset; 33 | UseExternal = useExternal; 34 | } 35 | } 36 | 37 | List m_materials = new List(); 38 | public IReadOnlyList Materials => m_materials; 39 | void Remove(Material material) 40 | { 41 | var index = m_materials.FindIndex(x => x.Asset == material); 42 | if (index >= 0) 43 | { 44 | m_materials.RemoveAt(index); 45 | 46 | } 47 | } 48 | 49 | public void Dispose() 50 | { 51 | foreach (var x in m_materials) 52 | { 53 | if (!x.UseExternal) 54 | { 55 | // 外部の '.asset' からロードしていない 56 | UnityObjectDestroyer.DestroyRuntimeOrEditor(x.Asset); 57 | } 58 | } 59 | } 60 | 61 | /// 62 | /// 所有権(Dispose権)を移譲する 63 | /// 64 | /// 所有権を移動する関数。 65 | /// 66 | /// * 所有権が移動する。return true => ImporterContext.Dispose の対象から外れる 67 | /// * 所有権が移動しない。return false => Importer.Context.Dispose でDestroyされる 68 | /// 69 | /// 70 | /// 71 | public void TransferOwnership(TakeResponsibilityForDestroyObjectFunc take) 72 | { 73 | foreach (var x in m_materials.ToArray()) 74 | { 75 | if (!x.UseExternal) 76 | { 77 | // 外部の '.asset' からロードしていない 78 | take(x.Key, x.Asset); 79 | m_materials.Remove(x); 80 | } 81 | } 82 | } 83 | 84 | public Material GetMaterial(int index) 85 | { 86 | if (index < 0) return null; 87 | if (index >= m_materials.Count) return null; 88 | return m_materials[index].Asset; 89 | } 90 | 91 | public async Task LoadAsync(MaterialDescriptor matDesc, GetTextureAsyncFunc getTexture, IAwaitCaller awaitCaller) 92 | { 93 | if (m_externalMap.TryGetValue(matDesc.SubAssetKey, out Material material)) 94 | { 95 | m_materials.Add(new MaterialLoadInfo(matDesc.SubAssetKey, material, true)); 96 | return material; 97 | } 98 | 99 | if (getTexture == null) 100 | { 101 | getTexture = (x, y) => Task.FromResult(null); 102 | } 103 | 104 | if (matDesc.Shader == null) 105 | { 106 | throw new ArgumentNullException(nameof(matDesc.Shader)); 107 | } 108 | 109 | bool hasShadeMap = false; 110 | bool useEmission = false; 111 | Texture baseMap = null; 112 | Dictionary textures = new Dictionary(); 113 | foreach (var kv in matDesc.TextureSlots) 114 | { 115 | var texture = await getTexture(kv.Value, awaitCaller); 116 | if (texture != null) 117 | { 118 | if (this.TryGetMaterialParamKey(kv.Key, out string key, out float scale)) 119 | { 120 | if ("_BaseMap" == key) 121 | { 122 | baseMap = texture; 123 | } 124 | if ("_ShadeMap" == key) 125 | { 126 | hasShadeMap = true; 127 | } 128 | if ("_EmissionMap" == key) 129 | { 130 | useEmission = true; 131 | } 132 | textures[key] = texture; 133 | } 134 | else 135 | { 136 | MonoBehaviour.Destroy(texture); 137 | } 138 | } 139 | else 140 | { 141 | if (this.TryGetMaterialParamKey(kv.Key, out string key, out float scale)) 142 | { 143 | if ("_EmissionMap" == key) 144 | { 145 | useEmission = true; 146 | } 147 | } 148 | } 149 | } 150 | 151 | // Set URP Shader Name 152 | var shaderName = "SimpleURPToonLitOutlineExample"; 153 | if (matDesc.RenderQueue.HasValue) 154 | { 155 | if (!useEmission && (int)UnityEngine.Rendering.RenderQueue.Transparent <= matDesc.RenderQueue.Value) 156 | { 157 | shaderName = "Shader Graphs/SimpleURPTransparent"; 158 | } 159 | } 160 | 161 | var shader = Shader.Find(shaderName); 162 | if (shader == null) 163 | { 164 | throw new Exception($"shader: {shaderName} not found"); 165 | } 166 | material = new Material(shader); 167 | material.name = matDesc.SubAssetKey.Name; 168 | foreach (var keyValue in textures) 169 | { 170 | material.SetTexture(keyValue.Key, keyValue.Value); 171 | } 172 | 173 | foreach (var kv in matDesc.Vectors) 174 | { 175 | if (this.TryGetMaterialParamKey(kv.Key, out string key, out float scale)) 176 | { 177 | if (matDesc.TextureSlots.ContainsKey(kv.Key)) 178 | { 179 | // texture offset & scale 180 | material.SetTextureOffset(key, new Vector2(kv.Value[0] * scale, kv.Value[1] * scale)); 181 | material.SetTextureScale(key, new Vector2(kv.Value[2] * scale, kv.Value[3] * scale)); 182 | } 183 | else 184 | { 185 | // vector4 186 | var v = new Vector4(kv.Value[0] * scale, kv.Value[1] * scale, kv.Value[2] * scale, kv.Value[3] * scale); 187 | material.SetVector(key, v); 188 | } 189 | } 190 | } 191 | 192 | bool useOutline = false; 193 | foreach (var kv in matDesc.FloatValues) 194 | { 195 | if (this.TryGetMaterialParamKey(kv.Key, out string key, out float scale)) 196 | { 197 | if ("_OutlineWidthMode" == key) 198 | { 199 | useOutline = 0.0f != kv.Value; 200 | } 201 | material.SetFloat(key, kv.Value * scale); 202 | } 203 | } 204 | 205 | if (useEmission) 206 | { 207 | material.SetFloat("_UseEmission", 1); 208 | } 209 | if (!useOutline) 210 | { 211 | material.SetFloat("_OutlineWidth", 0.0001f); 212 | } 213 | 214 | if (!hasShadeMap && null != baseMap) 215 | { 216 | material.SetTexture("_ShadeMap", baseMap); 217 | } 218 | 219 | foreach (var kv in matDesc.Colors) 220 | { 221 | if (this.TryGetMaterialParamKey(kv.Key, out string key, out float scale)) 222 | { 223 | var color = kv.Value * scale; 224 | material.SetColor(key, color); 225 | if ("_BaseColor" == key && !hasShadeMap) 226 | { 227 | material.SetColor("_ShadeColor", new Color(Mathf.Clamp(color[0] - 0.1f, 0, 1f), Mathf.Clamp(color[1] - 0.2f, 0, 1f), Mathf.Clamp(color[2] - 0.2f, 0, 1f), color[3])); 228 | } 229 | } 230 | } 231 | 232 | if (matDesc.RenderQueue.HasValue) 233 | { 234 | material.renderQueue = matDesc.RenderQueue.Value; 235 | } 236 | 237 | m_materials.Add(new MaterialLoadInfo(matDesc.SubAssetKey, material, false)); 238 | 239 | return material; 240 | } 241 | 242 | public static void SetTextureOffsetAndScale(Material material, string propertyName, Vector2 offset, Vector2 scale) 243 | { 244 | material.SetTextureOffset(propertyName, offset); 245 | material.SetTextureScale(propertyName, scale); 246 | } 247 | 248 | /// 249 | /// Toon表現用マテリアルにマッチするパラメータキーへの変換 250 | /// 251 | /// 入力のキー 252 | /// 変換後のキー 253 | /// 値の倍率 254 | /// 変換可能 255 | bool TryGetMaterialParamKey(string keyIn, out string keyOut, out float scaleValue) 256 | { 257 | keyOut = keyIn; 258 | scaleValue = 1.0f; 259 | bool validKey = true; 260 | switch (keyIn) 261 | { 262 | case "_Color": 263 | keyOut = "_BaseColor"; 264 | break; 265 | case "_MainTex": 266 | keyOut = "_BaseMap"; 267 | break; 268 | case "_ShadeColor": 269 | keyOut = "_ShadeColor"; 270 | break; 271 | case "_ShadeTexture": 272 | keyOut = "_ShadeMap"; 273 | break; 274 | case "_ShadeTex": 275 | keyOut = "_ShadeMap"; 276 | break; 277 | case "_EmissionColor": 278 | keyOut = "_EmissionColor"; 279 | break; 280 | case "_EmissionMap": 281 | keyOut = "_EmissionMap"; 282 | break; 283 | case "_OutlineColor": 284 | keyOut = "_OutlineColor"; 285 | break; 286 | case "_OutlineWidth": 287 | keyOut = "_OutlineWidth"; 288 | scaleValue = 0.005f; 289 | break; 290 | case "_OutlineWidthMode": 291 | keyOut = "_OutlineWidthMode"; 292 | break; 293 | case "_CutOff": 294 | keyOut = "_Cutoff"; 295 | break; 296 | case "_CullMode": 297 | keyOut = "_Cull"; 298 | break; 299 | default: 300 | validKey = false; 301 | break; 302 | } 303 | return validKey; 304 | } 305 | } 306 | } 307 | -------------------------------------------------------------------------------- /Assets/SimplestarGame/SimpleURPToonLitOutlineExample/Scripts/MaterialFactory.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b260cb46a0f0bae4fa9a4ac5daa91f66 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 simplestar-game 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SimpleURPToonLitOutlineExample 2 | ![image](https://user-images.githubusercontent.com/20289559/151178653-4e27ddb3-24cb-4ecf-b207-35709d203b23.png) 3 | Test VRM from https://codealdnoah.booth.pm/ 4 | 5 | ![castAndRecieveShadow](https://user-images.githubusercontent.com/20289559/164125018-c7bc1ab7-97ba-4a91-9c14-842da64de09b.jpg) 6 | Cast and recieve shadows 7 | 8 | 9 | 10 | ## What is this ? 11 | Unity URP (Universal Render Pipeline) Toon Lit Shader for UniVRM Runtime Load. 12 | 13 | ## Environment 14 | Unity 2021.3.0f1 with URP or later. 15 | 16 | ## How to use 17 | 18 | 1. [Download](../../releases) .unitypackage. 19 | 2. Import the .unitypackage with [UniVRM](https://github.com/vrm-c/UniVRM). 20 | 3. Replace "\Assets\VRMShaders\GLTF\IO\Runtime\Material\Importer\MaterialFactory.cs"(UniVRM) with "\Assets\SimplestarGame\SimpleURPToonLitOutlineExample\Scripts\MaterialFactory.cs"(This Package). 21 | 22 | ## Base Code 23 | The base shader code is [Unity URP Simplified Toon Lit Shader Example (for you to learn writing custom lit shader in URP)](https://github.com/ColinLeung-NiloCat/UnityURPToonLitShaderExample) 24 | 25 | ## Unity-Technologies Custom Lighting Shader Graph 26 | This package uses [ShaderGraph-Custom-Lighting](https://github.com/Unity-Technologies/ShaderGraph-Custom-Lighting) 27 | --------------------------------------------------------------------------------