diff --git a/Assets/_Content/Shaders/EnkiBillal.meta b/Assets/_Content/Shaders/EnkiBilal.meta similarity index 100% rename from Assets/_Content/Shaders/EnkiBillal.meta rename to Assets/_Content/Shaders/EnkiBilal.meta diff --git a/Assets/_Content/Shaders/EnkiBillal/EnkiBiIal.shadergraph b/Assets/_Content/Shaders/EnkiBilal/EnkiBiIal.shadergraph similarity index 100% rename from Assets/_Content/Shaders/EnkiBillal/EnkiBiIal.shadergraph rename to Assets/_Content/Shaders/EnkiBilal/EnkiBiIal.shadergraph diff --git a/Assets/_Content/Shaders/EnkiBillal/EnkiBiIal.shadergraph.meta b/Assets/_Content/Shaders/EnkiBilal/EnkiBiIal.shadergraph.meta similarity index 100% rename from Assets/_Content/Shaders/EnkiBillal/EnkiBiIal.shadergraph.meta rename to Assets/_Content/Shaders/EnkiBilal/EnkiBiIal.shadergraph.meta diff --git a/Assets/_Content/Shaders/EnkiBillal/Include.meta b/Assets/_Content/Shaders/EnkiBilal/Include.meta similarity index 100% rename from Assets/_Content/Shaders/EnkiBillal/Include.meta rename to Assets/_Content/Shaders/EnkiBilal/Include.meta diff --git a/Assets/_Content/Shaders/EnkiBilal/Include/EnkiBiIal.hlsl b/Assets/_Content/Shaders/EnkiBilal/Include/EnkiBiIal.hlsl new file mode 100644 index 00000000..7150d9f9 --- /dev/null +++ b/Assets/_Content/Shaders/EnkiBilal/Include/EnkiBiIal.hlsl @@ -0,0 +1,112 @@ +#ifndef ENKI_BILAL_INCLUDED +#define ENKI_BILAL_INCLUDED + +#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" +#include "Assets/_Content/Shaders/Include/Noises.hlsl" +#include "Assets/_Content/Shaders/Include/Details.hlsl" +#include "Assets/_Content/Shaders/Include/Utilities.hlsl" +//#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/AmbientOcclusion.hlsl" + +float GetShadow(float3 PositionWS) +{ + float4 shadowCoord = TransformWorldToShadowCoord(PositionWS); + Light mainLight = GetMainLight(shadowCoord); + + float shadow = 1 - mainLight.shadowAttenuation; + +#if defined(_ADDITIONAL_LIGHTS) + uint lightsCount = GetAdditionalLightsCount(); + + [loop] + for (uint i = 0; i < lightsCount; i++) + { + Light light = GetAdditionalLight(i, PositionWS); + shadow = max(shadow, 1 - light.shadowAttenuation); + } +#endif + + return saturate(shadow); +} + +void EnkiBillal_float +( + float4 Color, + UnityTexture2D DetailTexA, + UnityTexture2D DetailTexB, + float2 ScreenUV, + float3 PositionWS, + float3 NormalWS, + float ProjectionsBlend, + float DetailIntensityA, + float DetailIntensityB, + float DetailSizeA, + float DetailSizeB, + uint FogUse, + float4 FogColor, + float FogMin, + float FogMax, + out float3 Output, + out float Alpha +) +{ + // Common + float depth = length(PositionWS - _WorldSpaceCameraPos.xyz); + + float3 pivotWS = TransformObjectToWorld(float3(0, 0, 0)); + + float3 scale = GetScale(pivotWS); + + float3 positionOS = TransformWorldToObject(PositionWS) * scale; + float3 normalOS = normalize(TransformWorldToObjectDir(NormalWS)); + + //float ao = GetScreenSpaceAmbientOcclusion(ScreenUV).directAmbientOcclusion; + + // Shadow + + float shadow = GetShadow(PositionWS); + float shadowAtten = Remap(1, 0, .6, 1, shadow); + + // Detail + + float4 detailA = SampleProjectedDetailLOD + ( + DetailTexA, + positionOS, + normalOS, + ProjectionsBlend, + DetailSizeA, + depth + + ); + + float4 detailB = SampleProjectedDetailLOD + ( + DetailTexB, + positionOS, + normalOS, + ProjectionsBlend, + DetailSizeB, + depth + + ); + + float detailMaskA = smoothstep(0, .8, detailA.a); + float detailMaskB = smoothstep(0, .8, detailB.a); + + // Fog + + // Output + + Output = Color.rgb; + Output = lerp(Output.rgb, detailA.rgb, detailMaskA * DetailIntensityA); + Output = lerp(Output.rgb, detailB.rgb, detailMaskB * DetailIntensityB); + + if (FogUse) + { + Output = lerp(Output.rgb, FogColor.rgb, smoothstep(FogMin, FogMax, depth) * FogColor.a); + } + + Alpha = Color.a; +} + +#endif \ No newline at end of file diff --git a/Assets/_Content/Shaders/EnkiBillal/Include/EnkiBiIal.hlsl.meta b/Assets/_Content/Shaders/EnkiBilal/Include/EnkiBiIal.hlsl.meta similarity index 100% rename from Assets/_Content/Shaders/EnkiBillal/Include/EnkiBiIal.hlsl.meta rename to Assets/_Content/Shaders/EnkiBilal/Include/EnkiBiIal.hlsl.meta diff --git a/Assets/_Content/Shaders/EnkiBillal/Include/Mask.hlsl b/Assets/_Content/Shaders/EnkiBilal/Include/Mask.hlsl similarity index 100% rename from Assets/_Content/Shaders/EnkiBillal/Include/Mask.hlsl rename to Assets/_Content/Shaders/EnkiBilal/Include/Mask.hlsl diff --git a/Assets/_Content/Shaders/EnkiBillal/Include/Mask.hlsl.meta b/Assets/_Content/Shaders/EnkiBilal/Include/Mask.hlsl.meta similarity index 100% rename from Assets/_Content/Shaders/EnkiBillal/Include/Mask.hlsl.meta rename to Assets/_Content/Shaders/EnkiBilal/Include/Mask.hlsl.meta diff --git a/Assets/_Content/Shaders/EnkiBillal/Include/Stripes.hlsl b/Assets/_Content/Shaders/EnkiBilal/Include/Stripes.hlsl similarity index 100% rename from Assets/_Content/Shaders/EnkiBillal/Include/Stripes.hlsl rename to Assets/_Content/Shaders/EnkiBilal/Include/Stripes.hlsl diff --git a/Assets/_Content/Shaders/EnkiBillal/Include/Stripes.hlsl.meta b/Assets/_Content/Shaders/EnkiBilal/Include/Stripes.hlsl.meta similarity index 100% rename from Assets/_Content/Shaders/EnkiBillal/Include/Stripes.hlsl.meta rename to Assets/_Content/Shaders/EnkiBilal/Include/Stripes.hlsl.meta diff --git a/Assets/_Content/Shaders/HouseOfLeaves/HouseOfLeaves.shadergraph b/Assets/_Content/Shaders/HouseOfLeaves/HouseOfLeaves.shadergraph index ede313f1..ebd6f582 100644 --- a/Assets/_Content/Shaders/HouseOfLeaves/HouseOfLeaves.shadergraph +++ b/Assets/_Content/Shaders/HouseOfLeaves/HouseOfLeaves.shadergraph @@ -3,6 +3,27 @@ "m_Type": "UnityEditor.ShaderGraph.GraphData", "m_ObjectId": "8306134297404b27b872590c6e4c13a3", "m_Properties": [ + { + "m_Id": "cdc3cdef0c5e4f8db1d7eeb5f0bfe78a" + }, + { + "m_Id": "64a227780b6749ed80043a2e9ddf861a" + }, + { + "m_Id": "34117c00de8c42fd9c1e9872d4ee3f0b" + }, + { + "m_Id": "c38d62972d3445c5bbc1c4ba14661523" + }, + { + "m_Id": "df769c4d8aee4aac94e5f2488d2b615a" + }, + { + "m_Id": "d20ea5465f04493eb988e27f4c263206" + }, + { + "m_Id": "e6b2a286cbd7489f9849aa19fb8bcce3" + }, { "m_Id": "c51005c72e18445da29975b635090e73" }, @@ -24,6 +45,12 @@ "m_CategoryData": [ { "m_Id": "f47381e9cb674f058ae243fe338a4ef4" + }, + { + "m_Id": "a81d84a7d97148689e011d34f292e1cd" + }, + { + "m_Id": "804467b62f23408bbb2137c723dee134" } ], "m_Nodes": [ @@ -62,11 +89,102 @@ }, { "m_Id": "db1d0d41074f4916b4ca90dd1c19eebc" + }, + { + "m_Id": "1266190f21144fa9a276feb4de295746" + }, + { + "m_Id": "58c6b70bbd0f436d84652d414e5caff5" + }, + { + "m_Id": "b655db0fd0fe4b429c56a9b8689df5c8" + }, + { + "m_Id": "0842ea4c4a9d4ce2b9a795d5e4cdbd74" + }, + { + "m_Id": "9d78acf4e2a64573af15af645ec21c9b" + }, + { + "m_Id": "01efdb85991b4801959a9b34fe3f9ea9" + }, + { + "m_Id": "2eed0bb0a12d43d4a7f2dfea1dcf55d3" } ], "m_GroupDatas": [], "m_StickyNoteDatas": [], "m_Edges": [ + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "01efdb85991b4801959a9b34fe3f9ea9" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "d0e4830ce4604c48b0ba6bf23e3138a5" + }, + "m_SlotId": 13 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "0842ea4c4a9d4ce2b9a795d5e4cdbd74" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "d0e4830ce4604c48b0ba6bf23e3138a5" + }, + "m_SlotId": 11 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "1266190f21144fa9a276feb4de295746" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "d0e4830ce4604c48b0ba6bf23e3138a5" + }, + "m_SlotId": 8 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "2eed0bb0a12d43d4a7f2dfea1dcf55d3" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "d0e4830ce4604c48b0ba6bf23e3138a5" + }, + "m_SlotId": 14 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "58c6b70bbd0f436d84652d414e5caff5" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "d0e4830ce4604c48b0ba6bf23e3138a5" + }, + "m_SlotId": 9 + } + }, { "m_OutputSlot": { "m_Node": { @@ -95,6 +213,20 @@ "m_SlotId": 0 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "9d78acf4e2a64573af15af645ec21c9b" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "d0e4830ce4604c48b0ba6bf23e3138a5" + }, + "m_SlotId": 12 + } + }, { "m_OutputSlot": { "m_Node": { @@ -109,6 +241,20 @@ "m_SlotId": 4 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "b655db0fd0fe4b429c56a9b8689df5c8" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "d0e4830ce4604c48b0ba6bf23e3138a5" + }, + "m_SlotId": 10 + } + }, { "m_OutputSlot": { "m_Node": { @@ -229,6 +375,78 @@ ] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "01efdb85991b4801959a9b34fe3f9ea9", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -603.0, + "y": 732.0, + "width": 105.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "e74bcb6bf2564d52945c79d8e79b793d" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "c38d62972d3445c5bbc1c4ba14661523" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "0842ea4c4a9d4ce2b9a795d5e4cdbd74", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -625.0, + "y": 664.0, + "width": 127.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "767fe50f16a64550ac19c263c9b1799e" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "34117c00de8c42fd9c1e9872d4ee3f0b" + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot", @@ -303,6 +521,76 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "0fb7e3ef99564918a4cff2d5d6de9e74", + "m_Id": 0, + "m_DisplayName": "IntensityA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [], + "m_LiteralMode": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "1266190f21144fa9a276feb4de295746", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -619.0, + "y": 562.0, + "width": 121.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "3cf7ed3113be49668b5f0a90a8dcc90d" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "e6b2a286cbd7489f9849aa19fb8bcce3" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "1375fd167daf445ca191ed9cbc557e63", + "m_Id": 8, + "m_DisplayName": "DetailTexA", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "DetailTexA", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + { "m_SGVersion": 3, "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", @@ -388,6 +676,55 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "2c930caeefdc46eb8a42c26b2ebf65ea", + "m_Id": 0, + "m_DisplayName": "DetailB", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "2eed0bb0a12d43d4a7f2dfea1dcf55d3", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -603.0, + "y": 524.0, + "width": 105.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "b851637d5d3c485b8d8d9ec0f97d3de8" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "cdc3cdef0c5e4f8db1d7eeb5f0bfe78a" + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.BlockNode", @@ -422,6 +759,79 @@ "m_SerializedDescriptor": "VertexDescription.Position" } +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "34117c00de8c42fd9c1e9872d4ee3f0b", + "m_Guid": { + "m_GuidSerialized": "9f541932-3852-4c54-a3cb-d41e5e0cbc35" + }, + "promotedFromAssetID": "", + "promotedFromCategoryName": "", + "promotedOrdering": -1, + "m_Name": "IntensityB", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "IntensityB", + "m_DefaultReferenceName": "_IntensityB", + "m_OverrideReferenceName": "_DetailIntensityA_1", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_PerRendererData": false, + "m_customAttributes": [], + "m_Value": 0.10000000149011612, + "m_FloatType": 1, + "m_LiteralFloatMode": false, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + }, + "m_SliderType": 0, + "m_SliderPower": 3.0, + "m_EnumType": 0, + "m_CSharpEnumString": "", + "m_EnumNames": [ + "Default" + ], + "m_EnumValues": [ + 0 + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "3cf7ed3113be49668b5f0a90a8dcc90d", + "m_Id": 0, + "m_DisplayName": "DetailA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "3e7748300d8c4d3189557311f2fc34e1", + "m_Id": 0, + "m_DisplayName": "SizeA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [], + "m_LiteralMode": false +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", @@ -445,6 +855,58 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "4d22dfb8658f48078f1a157d73a233b9", + "m_Id": 10, + "m_DisplayName": "DetailIntensityA", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "DetailIntensityA", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [], + "m_LiteralMode": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "58c6b70bbd0f436d84652d414e5caff5", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -619.0, + "y": 596.0, + "width": 121.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "2c930caeefdc46eb8a42c26b2ebf65ea" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "64a227780b6749ed80043a2e9ddf861a" + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.PropertyNode", @@ -531,6 +993,58 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "6476cfc84aa542b8a4a81c8d067c2dd9", + "m_Id": 13, + "m_DisplayName": "DetailSizeB", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "DetailSizeB", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [], + "m_LiteralMode": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "64a227780b6749ed80043a2e9ddf861a", + "m_Guid": { + "m_GuidSerialized": "649a5df3-3ff8-4bac-8c1f-7ec426d4e3ec" + }, + "promotedFromAssetID": "", + "promotedFromCategoryName": "", + "promotedOrdering": -1, + "m_Name": "DetailB", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "DetailB", + "m_DefaultReferenceName": "_DetailB", + "m_OverrideReferenceName": "_DetailMapA_1", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_PerRendererData": false, + "m_customAttributes": [], + "m_Value": { + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"ac9246e67e5a7074891004cac50fa17b\",\"type\":3}}", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": false, + "useTexelSize": true, + "m_Modifiable": true, + "m_DefaultType": 1 +} + { "m_SGVersion": 2, "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalUnlitSubTarget", @@ -540,6 +1054,38 @@ "m_DefaultSSAO": true } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "694d8dcce9e54103b8037604025f71a5", + "m_Id": 11, + "m_DisplayName": "DetailIntensityB", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "DetailIntensityB", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [], + "m_LiteralMode": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "767fe50f16a64550ac19c263c9b1799e", + "m_Id": 0, + "m_DisplayName": "IntensityB", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [], + "m_LiteralMode": false +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", @@ -589,6 +1135,18 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "804467b62f23408bbb2137c723dee134", + "m_Name": "Projection", + "m_ChildObjectList": [ + { + "m_Id": "cdc3cdef0c5e4f8db1d7eeb5f0bfe78a" + } + ] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.BlockNode", @@ -659,6 +1217,42 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "9d78acf4e2a64573af15af645ec21c9b", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -603.0, + "y": 698.0, + "width": 105.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "3e7748300d8c4d3189557311f2fc34e1" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "d20ea5465f04493eb988e27f4c263206" + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", @@ -839,6 +1433,33 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "a81d84a7d97148689e011d34f292e1cd", + "m_Name": "Details", + "m_ChildObjectList": [ + { + "m_Id": "e6b2a286cbd7489f9849aa19fb8bcce3" + }, + { + "m_Id": "df769c4d8aee4aac94e5f2488d2b615a" + }, + { + "m_Id": "d20ea5465f04493eb988e27f4c263206" + }, + { + "m_Id": "64a227780b6749ed80043a2e9ddf861a" + }, + { + "m_Id": "34117c00de8c42fd9c1e9872d4ee3f0b" + }, + { + "m_Id": "c38d62972d3445c5bbc1c4ba14661523" + } + ] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", @@ -947,6 +1568,92 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "b655db0fd0fe4b429c56a9b8689df5c8", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -625.0, + "y": 630.0, + "width": 127.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "0fb7e3ef99564918a4cff2d5d6de9e74" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "df769c4d8aee4aac94e5f2488d2b615a" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "b69e07250b8c44ac8b366ed35f9f3c50", + "m_Id": 14, + "m_DisplayName": "ProjectionBlend", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "ProjectionBlend", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [], + "m_LiteralMode": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "b851637d5d3c485b8d8d9ec0f97d3de8", + "m_Id": 0, + "m_DisplayName": "Blend", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [], + "m_LiteralMode": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "c07d94fbc8424731948e30c529f391bb", + "m_Id": 9, + "m_DisplayName": "DetailTexB", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "DetailTexB", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", @@ -977,6 +1684,50 @@ } } +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "c38d62972d3445c5bbc1c4ba14661523", + "m_Guid": { + "m_GuidSerialized": "29db122a-3862-4efb-9dc6-d5abdad1eaea" + }, + "promotedFromAssetID": "", + "promotedFromCategoryName": "", + "promotedOrdering": -1, + "m_Name": "SizeB", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "SizeB", + "m_DefaultReferenceName": "_SizeB", + "m_OverrideReferenceName": "_DetailSizeA_1", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_PerRendererData": false, + "m_customAttributes": [], + "m_Value": 1.0, + "m_FloatType": 0, + "m_LiteralFloatMode": false, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + }, + "m_SliderType": 0, + "m_SliderPower": 3.0, + "m_EnumType": 0, + "m_CSharpEnumString": "", + "m_EnumNames": [ + "Default" + ], + "m_EnumValues": [ + 0 + ] +} + { "m_SGVersion": 3, "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", @@ -1035,6 +1786,50 @@ "m_Labels": [] } +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "cdc3cdef0c5e4f8db1d7eeb5f0bfe78a", + "m_Guid": { + "m_GuidSerialized": "d6b34a21-cd22-4599-be08-cdfd4a59e961" + }, + "promotedFromAssetID": "", + "promotedFromCategoryName": "", + "promotedOrdering": -1, + "m_Name": "Blend", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Blend", + "m_DefaultReferenceName": "_Blend", + "m_OverrideReferenceName": "_ProjectionBlend", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": true, + "hlslDeclarationOverride": 2, + "m_Hidden": false, + "m_PerRendererData": false, + "m_customAttributes": [], + "m_Value": 0.10000000149011612, + "m_FloatType": 1, + "m_LiteralFloatMode": false, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + }, + "m_SliderType": 0, + "m_SliderPower": 3.0, + "m_EnumType": 0, + "m_CSharpEnumString": "", + "m_EnumNames": [ + "Default" + ], + "m_EnumValues": [ + 0 + ] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.PropertyNode", @@ -1119,13 +1914,16 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -435.0, - "y": 128.00001525878907, + "x": -437.00006103515627, + "y": 118.00000762939453, "width": 244.00003051757813, - "height": 221.00001525878907 + "height": 381.9999694824219 } }, "m_Slots": [ + { + "m_Id": "fff3b84c07074975bd5982ed4fbea3c1" + }, { "m_Id": "0ce507e23a9341ba8e1edf54f9b47e98" }, @@ -1148,7 +1946,25 @@ "m_Id": "47e2c0c2817748ab8cae634244370aba" }, { - "m_Id": "fff3b84c07074975bd5982ed4fbea3c1" + "m_Id": "b69e07250b8c44ac8b366ed35f9f3c50" + }, + { + "m_Id": "1375fd167daf445ca191ed9cbc557e63" + }, + { + "m_Id": "c07d94fbc8424731948e30c529f391bb" + }, + { + "m_Id": "4d22dfb8658f48078f1a157d73a233b9" + }, + { + "m_Id": "694d8dcce9e54103b8037604025f71a5" + }, + { + "m_Id": "d74bcf2d37554021933e77c9fac828d7" + }, + { + "m_Id": "6476cfc84aa542b8a4a81c8d067c2dd9" } ], "synonyms": [ @@ -1169,6 +1985,66 @@ "m_FunctionBody": "Enter function body here..." } +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "d20ea5465f04493eb988e27f4c263206", + "m_Guid": { + "m_GuidSerialized": "708dcaf1-0cc4-4d6a-9a5a-28b9453228ce" + }, + "promotedFromAssetID": "", + "promotedFromCategoryName": "", + "promotedOrdering": -1, + "m_Name": "SizeA", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "SizeA", + "m_DefaultReferenceName": "_SizeA", + "m_OverrideReferenceName": "_DetailSizeA", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_PerRendererData": false, + "m_customAttributes": [], + "m_Value": 1.0, + "m_FloatType": 0, + "m_LiteralFloatMode": false, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + }, + "m_SliderType": 0, + "m_SliderPower": 3.0, + "m_EnumType": 0, + "m_CSharpEnumString": "", + "m_EnumNames": [ + "Default" + ], + "m_EnumValues": [ + 0 + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "d74bcf2d37554021933e77c9fac828d7", + "m_Id": 12, + "m_DisplayName": "DetailSizeA", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "DetailSizeA", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [], + "m_LiteralMode": false +} + { "m_SGVersion": 3, "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", @@ -1263,6 +2139,50 @@ "m_Space": 2 } +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "df769c4d8aee4aac94e5f2488d2b615a", + "m_Guid": { + "m_GuidSerialized": "979f6643-46a2-4f07-9082-25c8a4cbfa47" + }, + "promotedFromAssetID": "", + "promotedFromCategoryName": "", + "promotedOrdering": -1, + "m_Name": "IntensityA", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "IntensityA", + "m_DefaultReferenceName": "_IntensityA", + "m_OverrideReferenceName": "_DetailIntensityA", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_PerRendererData": false, + "m_customAttributes": [], + "m_Value": 0.30000001192092898, + "m_FloatType": 1, + "m_LiteralFloatMode": false, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + }, + "m_SliderType": 0, + "m_SliderPower": 3.0, + "m_EnumType": 0, + "m_CSharpEnumString": "", + "m_EnumNames": [ + "Default" + ], + "m_EnumValues": [ + 0 + ] +} + { "m_SGVersion": 1, "m_Type": "UnityEditor.ShaderGraph.PositionNode", @@ -1300,6 +2220,58 @@ "m_PositionSource": 0 } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "e6b2a286cbd7489f9849aa19fb8bcce3", + "m_Guid": { + "m_GuidSerialized": "1a7a3efd-511b-448f-a848-548090606e7d" + }, + "promotedFromAssetID": "", + "promotedFromCategoryName": "", + "promotedOrdering": -1, + "m_Name": "DetailA", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "DetailA", + "m_DefaultReferenceName": "_DetailA", + "m_OverrideReferenceName": "_DetailMapA", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_PerRendererData": false, + "m_customAttributes": [], + "m_Value": { + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"ac9246e67e5a7074891004cac50fa17b\",\"type\":3}}", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": false, + "useTexelSize": true, + "m_Modifiable": true, + "m_DefaultType": 1 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "e74bcb6bf2564d52945c79d8e79b793d", + "m_Id": 0, + "m_DisplayName": "SizeB", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [], + "m_LiteralMode": false +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.BlockNode", diff --git a/Assets/_Content/Shaders/HouseOfLeaves/Include/HouseOfLeaves.hlsl b/Assets/_Content/Shaders/HouseOfLeaves/Include/HouseOfLeaves.hlsl index 9cb9741a..0fc62b76 100644 --- a/Assets/_Content/Shaders/HouseOfLeaves/Include/HouseOfLeaves.hlsl +++ b/Assets/_Content/Shaders/HouseOfLeaves/Include/HouseOfLeaves.hlsl @@ -2,6 +2,8 @@ #define HOUSE_OF_LEAVES_INCLUDED #include "Assets/_Content/Shaders/Include/Noises.hlsl" +#include "Assets/_Content/Shaders/Include/Details.hlsl" +#include "Assets/_Content/Shaders/Include/Utilities.hlsl" float Hash(float n) { @@ -105,7 +107,6 @@ void Sand_float sandMask *= sandDensity * .7 + .3; // Output - Position = PositionWS; Position.y += sandMask; @@ -130,6 +131,13 @@ void HouseOfLeaves_float float4 ColorE, float3 PositionWS, float3 NormalWS, + float ProjectionsBlend, + UnityTexture2D DetailTexA, + UnityTexture2D DetailTexB, + float DetailIntensityA, + float DetailIntensityB, + float DetailSizeA, + float DetailSizeB, out float3 Output ) { @@ -195,7 +203,36 @@ void HouseOfLeaves_float bandFrac ); + // Detail + + float4 detailA = SampleProjectedDetailLOD + ( + DetailTexA, + PositionWS, + NormalWS, + ProjectionsBlend, + DetailSizeA, + depth + + ); + + float4 detailB = SampleProjectedDetailLOD + ( + DetailTexB, + PositionWS, + NormalWS, + ProjectionsBlend, + DetailSizeB, + depth + + ); + + float detailMaskA = smoothstep(0, .8, detailA.a); + float detailMaskB = smoothstep(0, .8, detailB.a); + Output = col; + Output = lerp(Output.rgb, detailA.rgb, detailMaskA * DetailIntensityA); + Output = lerp(Output.rgb, detailB.rgb, detailMaskB * DetailIntensityB); } #endif \ No newline at end of file diff --git a/Assets/_Content/Shaders/EnkiBillal/Include/EnkiBiIal.hlsl b/Assets/_Content/Shaders/Include/Details.hlsl similarity index 58% rename from Assets/_Content/Shaders/EnkiBillal/Include/EnkiBiIal.hlsl rename to Assets/_Content/Shaders/Include/Details.hlsl index 0d811d8a..a48f466e 100644 --- a/Assets/_Content/Shaders/EnkiBillal/Include/EnkiBiIal.hlsl +++ b/Assets/_Content/Shaders/Include/Details.hlsl @@ -1,55 +1,7 @@ -#ifndef ENKI_BILAL_INCLUDED -#define ENKI_BILAL_INCLUDED +#ifndef DETAILS_HLSL +#define DETAILS_HLSL -#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" -#include "Assets/_Content/Shaders/Include/Noises.hlsl" -#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/AmbientOcclusion.hlsl" - -float2 RotateUV(float2 UV, float2 Pivot, float Angle) -{ - float s = sin(Angle); - float c = cos(Angle); - - UV -= Pivot; - - float2 rotated = float2( - UV.x * c - UV.y * s, - UV.x * s + UV.y * c - ); - - return rotated + Pivot; -} - -float3 GetScale(float3 PivotWS) -{ - return float3 - ( - length(TransformObjectToWorld(float3(1, 0, 0)) - PivotWS), - length(TransformObjectToWorld(float3(0, 1, 0)) - PivotWS), - length(TransformObjectToWorld(float3(0, 0, 1)) - PivotWS) - ); -} - -float GetShadow(float3 PositionWS) -{ - float4 shadowCoord = TransformWorldToShadowCoord(PositionWS); - Light mainLight = GetMainLight(shadowCoord); - - float shadow = 1 - mainLight.shadowAttenuation; - -#if defined(_ADDITIONAL_LIGHTS) - uint lightsCount = GetAdditionalLightsCount(); - - [loop] - for (uint i = 0; i < lightsCount; i++) - { - Light light = GetAdditionalLight(i, PositionWS); - shadow = max(shadow, 1 - light.shadowAttenuation); - } -#endif - - return saturate(shadow); -} +#include "Assets/_Content/Shaders/Include/Utilities.hlsl" void GetDetailLOD ( @@ -195,6 +147,7 @@ ProjectionData GetProjections return data; } + float4 SampleProjectedDetailLOD ( UnityTexture2D DetailTex, @@ -258,85 +211,4 @@ float4 SampleProjectedDetailLOD return detail / max(totalMask, 1e-5); } -void EnkiBillal_float -( - float4 Color, - UnityTexture2D DetailTexA, - UnityTexture2D DetailTexB, - float2 ScreenUV, - float3 PositionWS, - float3 NormalWS, - float ProjectionsBlend, - float DetailIntensityA, - float DetailIntensityB, - float DetailSizeA, - float DetailSizeB, - uint FogUse, - float4 FogColor, - float FogMin, - float FogMax, - out float3 Output, - out float Alpha -) -{ - // Common - float depth = length(PositionWS - _WorldSpaceCameraPos.xyz); - - float3 pivotWS = TransformObjectToWorld(float3(0, 0, 0)); - - float3 scale = GetScale(pivotWS); - - float3 positionOS = TransformWorldToObject(PositionWS) * scale; - float3 normalOS = normalize(TransformWorldToObjectDir(NormalWS)); - - //float ao = GetScreenSpaceAmbientOcclusion(ScreenUV).directAmbientOcclusion; - - // Shadow - - float shadow = GetShadow(PositionWS); - float shadowAtten = Remap(1, 0, .6, 1, shadow); - - // Detail - - float4 detailA = SampleProjectedDetailLOD - ( - DetailTexA, - positionOS, - normalOS, - ProjectionsBlend, - DetailSizeA, - depth - - ); - - float4 detailB = SampleProjectedDetailLOD - ( - DetailTexB, - positionOS, - normalOS, - ProjectionsBlend, - DetailSizeB, - depth - - ); - - float detailMaskA = smoothstep(0, .8, detailA.a); - float detailMaskB = smoothstep(0, .8, detailB.a); - - // Fog - - // Output - - Output = Color.rgb; - Output = lerp(Output.rgb, detailA.rgb, detailMaskA * DetailIntensityA); - Output = lerp(Output.rgb, detailB.rgb, detailMaskB * DetailIntensityB); - - if (FogUse) - { - Output = lerp(Output.rgb, FogColor.rgb, smoothstep(FogMin, FogMax, depth) * FogColor.a); - } - - Alpha = Color.a; -} - -#endif \ No newline at end of file +#endif diff --git a/Assets/_Content/Shaders/Include/Details.hlsl.meta b/Assets/_Content/Shaders/Include/Details.hlsl.meta new file mode 100644 index 00000000..750dddb8 --- /dev/null +++ b/Assets/_Content/Shaders/Include/Details.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cd2ecc5897b2b6d4aa8221fe1a514dff +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_Content/Shaders/Include/Utilities.hlsl b/Assets/_Content/Shaders/Include/Utilities.hlsl new file mode 100644 index 00000000..f3850682 --- /dev/null +++ b/Assets/_Content/Shaders/Include/Utilities.hlsl @@ -0,0 +1,29 @@ +#ifndef UTILITIES_HLSL +#define UTILITIES_HLSL + +float2 RotateUV(float2 UV, float2 Pivot, float Angle) +{ + float s = sin(Angle); + float c = cos(Angle); + + UV -= Pivot; + + float2 rotated = float2( + UV.x * c - UV.y * s, + UV.x * s + UV.y * c + ); + + return rotated + Pivot; +} + +float3 GetScale(float3 PivotWS) +{ + return float3 + ( + length(TransformObjectToWorld(float3(1, 0, 0)) - PivotWS), + length(TransformObjectToWorld(float3(0, 1, 0)) - PivotWS), + length(TransformObjectToWorld(float3(0, 0, 1)) - PivotWS) + ); +} + +#endif \ No newline at end of file diff --git a/Assets/_Content/Shaders/Include/Utilities.hlsl.meta b/Assets/_Content/Shaders/Include/Utilities.hlsl.meta new file mode 100644 index 00000000..e77a812f --- /dev/null +++ b/Assets/_Content/Shaders/Include/Utilities.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: dffae08c547f6154c9741b4f205a314a +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: