4431 lines
232 KiB
GLSL
4431 lines
232 KiB
GLSL
Shader "Shader Graphs/zyn_shd_multifeature_00_GroundVFX"
|
||
{
|
||
Properties
|
||
{
|
||
[MainTexture][NoScaleOffset]_Main_Texture("Main Texture", 2D) = "white" {}
|
||
_Depth_Fade_Factor("Depth Fade Factor", Range(0, 3)) = 0
|
||
[NoScaleOffset]_Dissolve_Texture("Dissolve Texture", 2D) = "white" {}
|
||
[ToggleUI]_Distort("Distort?", Float) = 0
|
||
[NoScaleOffset]_Distortion_Noise("Distortion Noise", 2D) = "white" {}
|
||
[ToggleUI]_Vertex_Offset("Vertex Offset?", Float) = 0
|
||
[NoScaleOffset]_Color_Mask("Color Mask", 2D) = "white" {}
|
||
_Hue_shift("Hue shift", Color) = (1, 1, 1, 1)
|
||
[HideInInspector]_CastShadows("_CastShadows", Float) = 1
|
||
[HideInInspector]_Surface("_Surface", Float) = 1
|
||
[HideInInspector]_Blend("_Blend", Float) = 0
|
||
[HideInInspector]_AlphaClip("_AlphaClip", Float) = 0
|
||
[HideInInspector]_SrcBlend("_SrcBlend", Float) = 1
|
||
[HideInInspector]_DstBlend("_DstBlend", Float) = 0
|
||
[HideInInspector]_SrcBlendAlpha("_SrcBlendAlpha", Float) = 1
|
||
[HideInInspector]_DstBlendAlpha("_DstBlendAlpha", Float) = 0
|
||
[HideInInspector][ToggleUI]_ZWrite("_ZWrite", Float) = 0
|
||
[HideInInspector]_ZWriteControl("_ZWriteControl", Float) = 0
|
||
[HideInInspector]_ZTest("_ZTest", Float) = 4
|
||
[HideInInspector]_Cull("_Cull", Float) = 2
|
||
[HideInInspector]_AlphaToMask("_AlphaToMask", Float) = 0
|
||
[HideInInspector]_QueueOffset("_QueueOffset", Float) = 0
|
||
[HideInInspector]_QueueControl("_QueueControl", Float) = -1
|
||
[HideInInspector][NoScaleOffset]unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
|
||
[HideInInspector][NoScaleOffset]unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
|
||
[HideInInspector][NoScaleOffset]unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
|
||
}
|
||
SubShader
|
||
{
|
||
Tags
|
||
{
|
||
"RenderPipeline"="UniversalPipeline"
|
||
"RenderType"="Transparent"
|
||
"UniversalMaterialType" = "Unlit"
|
||
"Queue"="Transparent"
|
||
"DisableBatching"="False"
|
||
"ShaderGraphShader"="true"
|
||
"ShaderGraphTargetId"="UniversalUnlitSubTarget"
|
||
}
|
||
Pass
|
||
{
|
||
Name "Universal Forward"
|
||
Tags
|
||
{
|
||
// LightMode: <None>
|
||
}
|
||
|
||
// Render State
|
||
Cull [_Cull]
|
||
Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha]
|
||
ZTest Always
|
||
ZWrite [_ZWrite]
|
||
AlphaToMask [_AlphaToMask]
|
||
|
||
// [GroundVFX] 캐릭터(Stencil bit0=1) 위에 안 그려지도록
|
||
Stencil
|
||
{
|
||
Ref 1
|
||
ReadMask 1
|
||
Comp NotEqual
|
||
Pass Keep
|
||
}
|
||
|
||
// Debug
|
||
// <None>
|
||
|
||
// --------------------------------------------------
|
||
// Pass
|
||
|
||
HLSLPROGRAM
|
||
|
||
// Pragmas
|
||
#pragma target 2.0
|
||
#pragma multi_compile_instancing
|
||
#pragma instancing_options renderinglayer
|
||
#pragma vertex vert
|
||
#pragma fragment frag
|
||
|
||
// Keywords
|
||
#pragma multi_compile _ LIGHTMAP_ON
|
||
#pragma multi_compile _ DIRLIGHTMAP_COMBINED
|
||
#pragma multi_compile _ USE_LEGACY_LIGHTMAPS
|
||
#pragma multi_compile _ LIGHTMAP_BICUBIC_SAMPLING
|
||
#pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
|
||
#pragma multi_compile_fragment _ DEBUG_DISPLAY
|
||
#pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION
|
||
#pragma shader_feature_fragment _ _SURFACE_TYPE_TRANSPARENT
|
||
#pragma shader_feature_local_fragment _ _ALPHAPREMULTIPLY_ON
|
||
#pragma shader_feature_local_fragment _ _ALPHAMODULATE_ON
|
||
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
|
||
// GraphKeywords: <None>
|
||
|
||
// Defines
|
||
|
||
#define ATTRIBUTES_NEED_NORMAL
|
||
#define ATTRIBUTES_NEED_TANGENT
|
||
#define ATTRIBUTES_NEED_TEXCOORD0
|
||
#define ATTRIBUTES_NEED_TEXCOORD1
|
||
#define ATTRIBUTES_NEED_TEXCOORD2
|
||
#define ATTRIBUTES_NEED_COLOR
|
||
#define GRAPH_VERTEX_USES_TIME_PARAMETERS_INPUT
|
||
#define FEATURES_GRAPH_VERTEX_NORMAL_OUTPUT
|
||
#define FEATURES_GRAPH_VERTEX_TANGENT_OUTPUT
|
||
#define VARYINGS_NEED_POSITION_WS
|
||
#define VARYINGS_NEED_NORMAL_WS
|
||
#define VARYINGS_NEED_TEXCOORD0
|
||
#define VARYINGS_NEED_TEXCOORD1
|
||
#define VARYINGS_NEED_TEXCOORD2
|
||
#define VARYINGS_NEED_COLOR
|
||
#define FEATURES_GRAPH_VERTEX
|
||
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
|
||
#define SHADERPASS SHADERPASS_UNLIT
|
||
#define _FOG_FRAGMENT 1
|
||
#define UNLIT_DEFAULT_DECAL_BLENDING 1
|
||
#define UNLIT_DEFAULT_SSAO 1
|
||
#define REQUIRE_DEPTH_TEXTURE
|
||
#define REQUIRE_OPAQUE_TEXTURE
|
||
|
||
|
||
// custom interpolator pre-include
|
||
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
|
||
|
||
// Includes
|
||
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
|
||
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Fog.hlsl"
|
||
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||
|
||
// --------------------------------------------------
|
||
// Structs and Packing
|
||
|
||
// custom interpolators pre packing
|
||
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
|
||
|
||
struct Attributes
|
||
{
|
||
float3 positionOS : POSITION;
|
||
float3 normalOS : NORMAL;
|
||
float4 tangentOS : TANGENT;
|
||
float4 uv0 : TEXCOORD0;
|
||
float4 uv1 : TEXCOORD1;
|
||
float4 uv2 : TEXCOORD2;
|
||
float4 color : COLOR;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(ATTRIBUTES_NEED_INSTANCEID)
|
||
uint instanceID : INSTANCEID_SEMANTIC;
|
||
#endif
|
||
};
|
||
struct Varyings
|
||
{
|
||
float4 positionCS : SV_POSITION;
|
||
float3 positionWS;
|
||
float3 normalWS;
|
||
float4 texCoord0;
|
||
float4 texCoord1;
|
||
float4 texCoord2;
|
||
float4 color;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
uint instanceID : CUSTOM_INSTANCE_ID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
|
||
#endif
|
||
};
|
||
struct SurfaceDescriptionInputs
|
||
{
|
||
float3 WorldSpacePosition;
|
||
float4 ScreenPosition;
|
||
float2 NDCPosition;
|
||
float2 PixelPosition;
|
||
float4 uv0;
|
||
float4 uv1;
|
||
float4 uv2;
|
||
float4 VertexColor;
|
||
float3 TimeParameters;
|
||
};
|
||
struct VertexDescriptionInputs
|
||
{
|
||
float3 ObjectSpaceNormal;
|
||
float3 WorldSpaceNormal;
|
||
float3 ObjectSpaceTangent;
|
||
float3 ObjectSpacePosition;
|
||
float4 uv1;
|
||
float3 TimeParameters;
|
||
};
|
||
struct PackedVaryings
|
||
{
|
||
float4 positionCS : SV_POSITION;
|
||
float4 texCoord0 : INTERP0;
|
||
float4 texCoord1 : INTERP1;
|
||
float4 texCoord2 : INTERP2;
|
||
float4 color : INTERP3;
|
||
float3 positionWS : INTERP4;
|
||
float3 normalWS : INTERP5;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
uint instanceID : CUSTOM_INSTANCE_ID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
|
||
#endif
|
||
};
|
||
|
||
PackedVaryings PackVaryings (Varyings input)
|
||
{
|
||
PackedVaryings output;
|
||
ZERO_INITIALIZE(PackedVaryings, output);
|
||
output.positionCS = input.positionCS;
|
||
output.texCoord0.xyzw = input.texCoord0;
|
||
output.texCoord1.xyzw = input.texCoord1;
|
||
output.texCoord2.xyzw = input.texCoord2;
|
||
output.color.xyzw = input.color;
|
||
output.positionWS.xyz = input.positionWS;
|
||
output.normalWS.xyz = input.normalWS;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
output.instanceID = input.instanceID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
output.cullFace = input.cullFace;
|
||
#endif
|
||
return output;
|
||
}
|
||
|
||
Varyings UnpackVaryings (PackedVaryings input)
|
||
{
|
||
Varyings output;
|
||
output.positionCS = input.positionCS;
|
||
output.texCoord0 = input.texCoord0.xyzw;
|
||
output.texCoord1 = input.texCoord1.xyzw;
|
||
output.texCoord2 = input.texCoord2.xyzw;
|
||
output.color = input.color.xyzw;
|
||
output.positionWS = input.positionWS.xyz;
|
||
output.normalWS = input.normalWS.xyz;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
output.instanceID = input.instanceID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
output.cullFace = input.cullFace;
|
||
#endif
|
||
return output;
|
||
}
|
||
|
||
|
||
// --------------------------------------------------
|
||
// Graph
|
||
|
||
// Graph Properties
|
||
CBUFFER_START(UnityPerMaterial)
|
||
float4 _Main_Texture_TexelSize;
|
||
float4 _Dissolve_Texture_TexelSize;
|
||
float _Depth_Fade_Factor;
|
||
float _Distort;
|
||
float _Vertex_Offset;
|
||
float4 _Distortion_Noise_TexelSize;
|
||
float4 _Color_Mask_TexelSize;
|
||
float4 _Hue_shift;
|
||
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
||
CBUFFER_END
|
||
|
||
|
||
// Object and Global properties
|
||
SAMPLER(SamplerState_Linear_Repeat);
|
||
TEXTURE2D(_Main_Texture);
|
||
SAMPLER(sampler_Main_Texture);
|
||
TEXTURE2D(_Dissolve_Texture);
|
||
SAMPLER(sampler_Dissolve_Texture);
|
||
TEXTURE2D(_Distortion_Noise);
|
||
SAMPLER(sampler_Distortion_Noise);
|
||
TEXTURE2D(_Color_Mask);
|
||
SAMPLER(sampler_Color_Mask);
|
||
|
||
// Graph Includes
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl"
|
||
|
||
// -- Property used by ScenePickingPass
|
||
#ifdef SCENEPICKINGPASS
|
||
float4 _SelectionID;
|
||
#endif
|
||
|
||
// -- Properties used by SceneSelectionPass
|
||
#ifdef SCENESELECTIONPASS
|
||
int _ObjectId;
|
||
int _PassValue;
|
||
#endif
|
||
|
||
// Graph Functions
|
||
|
||
void Unity_Multiply_float_float(float A, float B, out float Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
float Unity_SimpleNoise_ValueNoise_Deterministic_float (float2 uv)
|
||
{
|
||
float2 i = floor(uv);
|
||
float2 f = frac(uv);
|
||
f = f * f * (3.0 - 2.0 * f);
|
||
uv = abs(frac(uv) - 0.5);
|
||
float2 c0 = i + float2(0.0, 0.0);
|
||
float2 c1 = i + float2(1.0, 0.0);
|
||
float2 c2 = i + float2(0.0, 1.0);
|
||
float2 c3 = i + float2(1.0, 1.0);
|
||
float r0; Hash_Tchou_2_1_float(c0, r0);
|
||
float r1; Hash_Tchou_2_1_float(c1, r1);
|
||
float r2; Hash_Tchou_2_1_float(c2, r2);
|
||
float r3; Hash_Tchou_2_1_float(c3, r3);
|
||
float bottomOfGrid = lerp(r0, r1, f.x);
|
||
float topOfGrid = lerp(r2, r3, f.x);
|
||
float t = lerp(bottomOfGrid, topOfGrid, f.y);
|
||
return t;
|
||
}
|
||
|
||
void Unity_SimpleNoise_Deterministic_float(float2 UV, float Scale, out float Out)
|
||
{
|
||
float freq, amp;
|
||
Out = 0.0f;
|
||
freq = pow(2.0, float(0));
|
||
amp = pow(0.5, float(3-0));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
freq = pow(2.0, float(1));
|
||
amp = pow(0.5, float(3-1));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
freq = pow(2.0, float(2));
|
||
amp = pow(0.5, float(3-2));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
}
|
||
|
||
void Unity_Multiply_float3_float3(float3 A, float3 B, out float3 Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
void Unity_Add_float3(float3 A, float3 B, out float3 Out)
|
||
{
|
||
Out = A + B;
|
||
}
|
||
|
||
void Unity_Branch_float3(float Predicate, float3 True, float3 False, out float3 Out)
|
||
{
|
||
Out = Predicate ? True : False;
|
||
}
|
||
|
||
void Unity_Twirl_float(float2 UV, float2 Center, float Strength, float2 Offset, out float2 Out)
|
||
{
|
||
float2 delta = UV - Center;
|
||
float angle = Strength * length(delta);
|
||
float x = cos(angle) * delta.x - sin(angle) * delta.y;
|
||
float y = sin(angle) * delta.x + cos(angle) * delta.y;
|
||
Out = float2(x + Center.x + Offset.x, y + Center.y + Offset.y);
|
||
}
|
||
|
||
void Unity_NormalFromTexture_float(TEXTURE2D_PARAM(Texture, Sampler), float2 UV, float Offset, float Strength, out float3 Out)
|
||
{
|
||
Offset = pow(Offset, 3) * 0.1;
|
||
float2 offsetU = float2(UV.x + Offset, UV.y);
|
||
float2 offsetV = float2(UV.x, UV.y + Offset);
|
||
float normalSample = SAMPLE_TEXTURE2D(Texture, Sampler, UV).r;
|
||
float uSample = SAMPLE_TEXTURE2D(Texture, Sampler, offsetU).r;
|
||
float vSample = SAMPLE_TEXTURE2D(Texture, Sampler, offsetV).r;
|
||
float3 va = float3(1, 0, (uSample - normalSample) * Strength);
|
||
float3 vb = float3(0, 1, (vSample - normalSample) * Strength);
|
||
Out = normalize(cross(va, vb));
|
||
}
|
||
|
||
void Unity_SceneColor_float(float4 UV, out float3 Out)
|
||
{
|
||
Out = SHADERGRAPH_SAMPLE_SCENE_COLOR(UV.xy);
|
||
}
|
||
|
||
void Unity_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
|
||
{
|
||
Out = UV * Tiling + Offset;
|
||
}
|
||
|
||
void Unity_Multiply_float4_float4(float4 A, float4 B, out float4 Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
void Unity_Clamp_float(float In, float Min, float Max, out float Out)
|
||
{
|
||
Out = clamp(In, Min, Max);
|
||
}
|
||
|
||
void Unity_SceneDepth_Eye_float(float4 UV, out float Out)
|
||
{
|
||
if (unity_OrthoParams.w == 1.0)
|
||
{
|
||
Out = LinearEyeDepth(ComputeWorldSpacePosition(UV.xy, SHADERGRAPH_SAMPLE_SCENE_DEPTH(UV.xy), UNITY_MATRIX_I_VP), UNITY_MATRIX_V);
|
||
}
|
||
else
|
||
{
|
||
Out = LinearEyeDepth(SHADERGRAPH_SAMPLE_SCENE_DEPTH(UV.xy), _ZBufferParams);
|
||
}
|
||
}
|
||
|
||
void Unity_Subtract_float(float A, float B, out float Out)
|
||
{
|
||
Out = A - B;
|
||
}
|
||
|
||
void Unity_Divide_float(float A, float B, out float Out)
|
||
{
|
||
Out = A / B;
|
||
}
|
||
|
||
void Unity_Saturate_float(float In, out float Out)
|
||
{
|
||
Out = saturate(In);
|
||
}
|
||
|
||
void Unity_Add_float(float A, float B, out float Out)
|
||
{
|
||
Out = A + B;
|
||
}
|
||
|
||
void Unity_Smoothstep_float(float Edge1, float Edge2, float In, out float Out)
|
||
{
|
||
Out = smoothstep(Edge1, Edge2, In);
|
||
}
|
||
|
||
// Custom interpolators pre vertex
|
||
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
|
||
|
||
// Graph Vertex
|
||
struct VertexDescription
|
||
{
|
||
float3 Position;
|
||
float3 Normal;
|
||
float3 Tangent;
|
||
};
|
||
|
||
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
|
||
{
|
||
VertexDescription description = (VertexDescription)0;
|
||
float _Property_a85d0177ea0341d9a0a80ed35edb2c8a_Out_0_Boolean = _Vertex_Offset;
|
||
float4 _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4 = IN.uv1;
|
||
float _Split_d2412a890bef4daf877bc52848883f38_R_1_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[0];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_G_2_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[1];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_B_3_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[2];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_A_4_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[3];
|
||
float _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float;
|
||
Unity_Multiply_float_float(IN.TimeParameters.x, _Split_d2412a890bef4daf877bc52848883f38_A_4_Float, _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float);
|
||
float _SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float;
|
||
Unity_SimpleNoise_Deterministic_float((IN.ObjectSpacePosition.xy), _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float, _SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float);
|
||
float3 _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3;
|
||
Unity_Multiply_float3_float3(IN.WorldSpaceNormal, (_SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float.xxx), _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3);
|
||
float3 _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3;
|
||
Unity_Add_float3(IN.ObjectSpacePosition, _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3, _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3);
|
||
float3 _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3;
|
||
Unity_Branch_float3(_Property_a85d0177ea0341d9a0a80ed35edb2c8a_Out_0_Boolean, _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3, IN.ObjectSpacePosition, _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3);
|
||
description.Position = _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3;
|
||
description.Normal = IN.ObjectSpaceNormal;
|
||
description.Tangent = IN.ObjectSpaceTangent;
|
||
return description;
|
||
}
|
||
|
||
// Custom interpolators, pre surface
|
||
#ifdef FEATURES_GRAPH_VERTEX
|
||
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
|
||
{
|
||
return output;
|
||
}
|
||
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
|
||
#endif
|
||
|
||
// Graph Pixel
|
||
struct SurfaceDescription
|
||
{
|
||
float3 BaseColor;
|
||
float Alpha;
|
||
float AlphaClipThreshold;
|
||
};
|
||
|
||
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
||
{
|
||
SurfaceDescription surface = (SurfaceDescription)0;
|
||
float _Property_78804880cedc47fdbd69823b872b9e1d_Out_0_Boolean = _Distort;
|
||
float4 _ScreenPosition_314475fc06764cd696bcb0f051af688d_Out_0_Vector4 = float4(IN.NDCPosition.xy, 0, 0);
|
||
UnityTexture2D _Property_fd6dac2eb5684f44b017c1784bea81d7_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_Distortion_Noise);
|
||
float _Multiply_d2d103e49eac44d0b1584b206c0dc171_Out_2_Float;
|
||
Unity_Multiply_float_float(1, IN.TimeParameters.x, _Multiply_d2d103e49eac44d0b1584b206c0dc171_Out_2_Float);
|
||
float2 _Twirl_604dcecc3b8749e3a7a70bd8524db3c7_Out_4_Vector2;
|
||
Unity_Twirl_float(IN.uv0.xy, float2 (0.5, 0.5), float(5), (_Multiply_d2d103e49eac44d0b1584b206c0dc171_Out_2_Float.xx), _Twirl_604dcecc3b8749e3a7a70bd8524db3c7_Out_4_Vector2);
|
||
float4 _UV_22e830f19205444ba2e6ea8e08a7d384_Out_0_Vector4 = IN.uv2;
|
||
float _Split_dd61a7836c0d4dd0af69acff06b02195_R_1_Float = _UV_22e830f19205444ba2e6ea8e08a7d384_Out_0_Vector4[0];
|
||
float _Split_dd61a7836c0d4dd0af69acff06b02195_G_2_Float = _UV_22e830f19205444ba2e6ea8e08a7d384_Out_0_Vector4[1];
|
||
float _Split_dd61a7836c0d4dd0af69acff06b02195_B_3_Float = _UV_22e830f19205444ba2e6ea8e08a7d384_Out_0_Vector4[2];
|
||
float _Split_dd61a7836c0d4dd0af69acff06b02195_A_4_Float = _UV_22e830f19205444ba2e6ea8e08a7d384_Out_0_Vector4[3];
|
||
float _Multiply_79d07365e21043b38f724b8b8ef99abf_Out_2_Float;
|
||
Unity_Multiply_float_float(_Split_dd61a7836c0d4dd0af69acff06b02195_G_2_Float, 0.1, _Multiply_79d07365e21043b38f724b8b8ef99abf_Out_2_Float);
|
||
float4 _UV_8a8370844fe34de7ad6269dae77ba12a_Out_0_Vector4 = IN.uv2;
|
||
float _Split_013c8550ee754fcab89ba2a9e3ca7117_R_1_Float = _UV_8a8370844fe34de7ad6269dae77ba12a_Out_0_Vector4[0];
|
||
float _Split_013c8550ee754fcab89ba2a9e3ca7117_G_2_Float = _UV_8a8370844fe34de7ad6269dae77ba12a_Out_0_Vector4[1];
|
||
float _Split_013c8550ee754fcab89ba2a9e3ca7117_B_3_Float = _UV_8a8370844fe34de7ad6269dae77ba12a_Out_0_Vector4[2];
|
||
float _Split_013c8550ee754fcab89ba2a9e3ca7117_A_4_Float = _UV_8a8370844fe34de7ad6269dae77ba12a_Out_0_Vector4[3];
|
||
float _Multiply_5ddbe47697014ff59e00b3c4ef78d7b5_Out_2_Float;
|
||
Unity_Multiply_float_float(_Split_013c8550ee754fcab89ba2a9e3ca7117_R_1_Float, 0.01, _Multiply_5ddbe47697014ff59e00b3c4ef78d7b5_Out_2_Float);
|
||
float3 _NormalFromTexture_013a78afb6074711a80a448e3642e406_Out_5_Vector3;
|
||
Unity_NormalFromTexture_float(TEXTURE2D_ARGS(_Property_fd6dac2eb5684f44b017c1784bea81d7_Out_0_Texture2D.tex, _Property_fd6dac2eb5684f44b017c1784bea81d7_Out_0_Texture2D.samplerstate), _Property_fd6dac2eb5684f44b017c1784bea81d7_Out_0_Texture2D.GetTransformedUV(_Twirl_604dcecc3b8749e3a7a70bd8524db3c7_Out_4_Vector2), _Multiply_79d07365e21043b38f724b8b8ef99abf_Out_2_Float, _Multiply_5ddbe47697014ff59e00b3c4ef78d7b5_Out_2_Float, _NormalFromTexture_013a78afb6074711a80a448e3642e406_Out_5_Vector3);
|
||
float3 _Multiply_a3bebb9cbf564bc49c85414f4893d4c1_Out_2_Vector3;
|
||
Unity_Multiply_float3_float3((_ScreenPosition_314475fc06764cd696bcb0f051af688d_Out_0_Vector4.xyz), _NormalFromTexture_013a78afb6074711a80a448e3642e406_Out_5_Vector3, _Multiply_a3bebb9cbf564bc49c85414f4893d4c1_Out_2_Vector3);
|
||
float3 _Add_074f843d89ea44908b33d5cc2d28b7b8_Out_2_Vector3;
|
||
Unity_Add_float3((_ScreenPosition_314475fc06764cd696bcb0f051af688d_Out_0_Vector4.xyz), _Multiply_a3bebb9cbf564bc49c85414f4893d4c1_Out_2_Vector3, _Add_074f843d89ea44908b33d5cc2d28b7b8_Out_2_Vector3);
|
||
float3 _SceneColor_209c40916111453eb1e0c580e4a9f27b_Out_1_Vector3;
|
||
Unity_SceneColor_float((float4(_Add_074f843d89ea44908b33d5cc2d28b7b8_Out_2_Vector3, 1.0)), _SceneColor_209c40916111453eb1e0c580e4a9f27b_Out_1_Vector3);
|
||
UnityTexture2D _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_Main_Texture);
|
||
float4 _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4 = IN.uv0;
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_R_1_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[0];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_G_2_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[1];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_B_3_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[2];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_A_4_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[3];
|
||
float2 _Vector2_3b7618a9a80f44f8937bf30595ad7e38_Out_0_Vector2 = float2(_Split_88edf1e1762f4685b6a05e3c49b4a79b_B_3_Float, _Split_88edf1e1762f4685b6a05e3c49b4a79b_A_4_Float);
|
||
float2 _TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2;
|
||
Unity_TilingAndOffset_float(IN.uv0.xy, float2 (1, 1), _Vector2_3b7618a9a80f44f8937bf30595ad7e38_Out_0_Vector2, _TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2);
|
||
float4 _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.tex, _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.samplerstate, _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2) );
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_R_4_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.r;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_G_5_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.g;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_B_6_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.b;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_A_7_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.a;
|
||
float4 _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4;
|
||
Unity_Multiply_float4_float4(IN.VertexColor, _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4, _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4);
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_R_1_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[0];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_G_2_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[1];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_B_3_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[2];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_A_4_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[3];
|
||
float3 _Vector3_c56d660d8d604b0095df913163d05636_Out_0_Vector3 = float3(_Split_6a09d55e29c94fef8172d229eb37fff4_R_1_Float, _Split_6a09d55e29c94fef8172d229eb37fff4_G_2_Float, _Split_6a09d55e29c94fef8172d229eb37fff4_B_3_Float);
|
||
float3 _Multiply_6b3b4c3d71ac403991dfa8448caf465d_Out_2_Vector3;
|
||
Unity_Multiply_float3_float3(float3(0, 0, 0), _Vector3_c56d660d8d604b0095df913163d05636_Out_0_Vector3, _Multiply_6b3b4c3d71ac403991dfa8448caf465d_Out_2_Vector3);
|
||
float3 _Add_acbcfe1a53394a188eb16f2205ba5fae_Out_2_Vector3;
|
||
Unity_Add_float3(_SceneColor_209c40916111453eb1e0c580e4a9f27b_Out_1_Vector3, _Multiply_6b3b4c3d71ac403991dfa8448caf465d_Out_2_Vector3, _Add_acbcfe1a53394a188eb16f2205ba5fae_Out_2_Vector3);
|
||
float4 _UV_b99c1e3fd7b14962b22510ab822596fa_Out_0_Vector4 = IN.uv1;
|
||
float _Split_d91e1a6788134a0db18458e2c9ffe1e2_R_1_Float = _UV_b99c1e3fd7b14962b22510ab822596fa_Out_0_Vector4[0];
|
||
float _Split_d91e1a6788134a0db18458e2c9ffe1e2_G_2_Float = _UV_b99c1e3fd7b14962b22510ab822596fa_Out_0_Vector4[1];
|
||
float _Split_d91e1a6788134a0db18458e2c9ffe1e2_B_3_Float = _UV_b99c1e3fd7b14962b22510ab822596fa_Out_0_Vector4[2];
|
||
float _Split_d91e1a6788134a0db18458e2c9ffe1e2_A_4_Float = _UV_b99c1e3fd7b14962b22510ab822596fa_Out_0_Vector4[3];
|
||
float _Clamp_8d3c85ef31db418187bf82aa0d05c018_Out_3_Float;
|
||
Unity_Clamp_float(_Split_d91e1a6788134a0db18458e2c9ffe1e2_B_3_Float, float(1), float(10), _Clamp_8d3c85ef31db418187bf82aa0d05c018_Out_3_Float);
|
||
float3 _Multiply_09fb4be9ffbf4d1a837e111a26a36d03_Out_2_Vector3;
|
||
Unity_Multiply_float3_float3((_Clamp_8d3c85ef31db418187bf82aa0d05c018_Out_3_Float.xxx), _Vector3_c56d660d8d604b0095df913163d05636_Out_0_Vector3, _Multiply_09fb4be9ffbf4d1a837e111a26a36d03_Out_2_Vector3);
|
||
float3 _Branch_585281afb21148e8850339e89a273dd4_Out_3_Vector3;
|
||
Unity_Branch_float3(_Property_78804880cedc47fdbd69823b872b9e1d_Out_0_Boolean, _Add_acbcfe1a53394a188eb16f2205ba5fae_Out_2_Vector3, _Multiply_09fb4be9ffbf4d1a837e111a26a36d03_Out_2_Vector3, _Branch_585281afb21148e8850339e89a273dd4_Out_3_Vector3);
|
||
float _SceneDepth_cbf4b7140c8747fba9e28c881275612c_Out_1_Float;
|
||
Unity_SceneDepth_Eye_float(float4(IN.NDCPosition.xy, 0, 0), _SceneDepth_cbf4b7140c8747fba9e28c881275612c_Out_1_Float);
|
||
float4 _ScreenPosition_c8c254b7170c483f9436f2a186f2f25f_Out_0_Vector4 = IN.ScreenPosition;
|
||
float _Split_6ebe6dd7c053473a86cc78d4af3b5456_R_1_Float = _ScreenPosition_c8c254b7170c483f9436f2a186f2f25f_Out_0_Vector4[0];
|
||
float _Split_6ebe6dd7c053473a86cc78d4af3b5456_G_2_Float = _ScreenPosition_c8c254b7170c483f9436f2a186f2f25f_Out_0_Vector4[1];
|
||
float _Split_6ebe6dd7c053473a86cc78d4af3b5456_B_3_Float = _ScreenPosition_c8c254b7170c483f9436f2a186f2f25f_Out_0_Vector4[2];
|
||
float _Split_6ebe6dd7c053473a86cc78d4af3b5456_A_4_Float = _ScreenPosition_c8c254b7170c483f9436f2a186f2f25f_Out_0_Vector4[3];
|
||
float _Subtract_205f8ae6662b43bd8bc6a9b7fe1df0bc_Out_2_Float;
|
||
Unity_Subtract_float(_SceneDepth_cbf4b7140c8747fba9e28c881275612c_Out_1_Float, _Split_6ebe6dd7c053473a86cc78d4af3b5456_A_4_Float, _Subtract_205f8ae6662b43bd8bc6a9b7fe1df0bc_Out_2_Float);
|
||
float _Property_32583f2525b14d90927281637ad7b962_Out_0_Float = _Depth_Fade_Factor;
|
||
float _Divide_89c4abebb8194b988799339162560ac4_Out_2_Float;
|
||
Unity_Divide_float(_Subtract_205f8ae6662b43bd8bc6a9b7fe1df0bc_Out_2_Float, _Property_32583f2525b14d90927281637ad7b962_Out_0_Float, _Divide_89c4abebb8194b988799339162560ac4_Out_2_Float);
|
||
float _Saturate_34122799a8de408ab780fb9e5fa36601_Out_1_Float;
|
||
Unity_Saturate_float(_Divide_89c4abebb8194b988799339162560ac4_Out_2_Float, _Saturate_34122799a8de408ab780fb9e5fa36601_Out_1_Float);
|
||
float3 _Multiply_a3558c8f5efb4581b510c889004960f7_Out_2_Vector3;
|
||
// [GroundVFX] Depth Fade 비활성화 - 지형 아래에서도 검정 안 나오도록
|
||
Unity_Multiply_float3_float3(_Branch_585281afb21148e8850339e89a273dd4_Out_3_Vector3, float3(1,1,1), _Multiply_a3558c8f5efb4581b510c889004960f7_Out_2_Vector3);
|
||
float4 _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4 = IN.uv1;
|
||
float _Split_b444b317981f46f1958301bf94b38de1_R_1_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[0];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_G_2_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[1];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_B_3_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[2];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_A_4_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[3];
|
||
float _Add_66fb86a088584979815762970a1803f5_Out_2_Float;
|
||
Unity_Add_float(_Split_b444b317981f46f1958301bf94b38de1_R_1_Float, _Split_b444b317981f46f1958301bf94b38de1_G_2_Float, _Add_66fb86a088584979815762970a1803f5_Out_2_Float);
|
||
UnityTexture2D _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_Dissolve_Texture);
|
||
float4 _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.tex, _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.samplerstate, _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2) );
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_R_4_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.r;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_G_5_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.g;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_B_6_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.b;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_A_7_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.a;
|
||
float _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float;
|
||
Unity_Smoothstep_float(_Split_b444b317981f46f1958301bf94b38de1_R_1_Float, _Add_66fb86a088584979815762970a1803f5_Out_2_Float, _SampleTexture2D_755ae0396640490095bbe69901c64485_R_4_Float, _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float);
|
||
float _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float;
|
||
Unity_Multiply_float_float(_Split_6a09d55e29c94fef8172d229eb37fff4_A_4_Float, _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float, _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float);
|
||
surface.BaseColor = _Multiply_a3558c8f5efb4581b510c889004960f7_Out_2_Vector3;
|
||
surface.Alpha = _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float;
|
||
surface.AlphaClipThreshold = float(0.5);
|
||
return surface;
|
||
}
|
||
|
||
// --------------------------------------------------
|
||
// Build Graph Inputs
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#define VFX_SRP_ATTRIBUTES Attributes
|
||
#define VFX_SRP_VARYINGS Varyings
|
||
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
|
||
#endif
|
||
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
|
||
{
|
||
VertexDescriptionInputs output;
|
||
ZERO_INITIALIZE(VertexDescriptionInputs, output);
|
||
|
||
output.ObjectSpaceNormal = input.normalOS;
|
||
output.WorldSpaceNormal = TransformObjectToWorldNormal(input.normalOS);
|
||
output.ObjectSpaceTangent = input.tangentOS.xyz;
|
||
output.ObjectSpacePosition = input.positionOS;
|
||
output.uv1 = input.uv1;
|
||
output.TimeParameters = _TimeParameters.xyz;
|
||
#if UNITY_ANY_INSTANCING_ENABLED
|
||
#else // TODO: XR support for procedural instancing because in this case UNITY_ANY_INSTANCING_ENABLED is not defined and instanceID is incorrect.
|
||
#endif
|
||
|
||
return output;
|
||
}
|
||
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
|
||
{
|
||
SurfaceDescriptionInputs output;
|
||
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
||
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#if VFX_USE_GRAPH_VALUES
|
||
uint instanceActiveIndex = asuint(UNITY_ACCESS_INSTANCED_PROP(PerInstance, _InstanceActiveIndex));
|
||
/* WARNING: $splice Could not find named fragment 'VFXLoadGraphValues' */
|
||
#endif
|
||
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
|
||
|
||
#endif
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
output.WorldSpacePosition = input.positionWS;
|
||
output.ScreenPosition = ComputeScreenPos(TransformWorldToHClip(input.positionWS), _ProjectionParams.x);
|
||
|
||
#if UNITY_UV_STARTS_AT_TOP
|
||
output.PixelPosition = float2(input.positionCS.x, (_ProjectionParams.x < 0) ? (_ScaledScreenParams.y - input.positionCS.y) : input.positionCS.y);
|
||
#else
|
||
output.PixelPosition = float2(input.positionCS.x, (_ProjectionParams.x > 0) ? (_ScaledScreenParams.y - input.positionCS.y) : input.positionCS.y);
|
||
#endif
|
||
|
||
output.NDCPosition = output.PixelPosition.xy / _ScaledScreenParams.xy;
|
||
output.NDCPosition.y = 1.0f - output.NDCPosition.y;
|
||
|
||
output.uv0 = input.texCoord0;
|
||
output.uv1 = input.texCoord1;
|
||
output.uv2 = input.texCoord2;
|
||
output.VertexColor = input.color;
|
||
#if UNITY_ANY_INSTANCING_ENABLED
|
||
#else // TODO: XR support for procedural instancing because in this case UNITY_ANY_INSTANCING_ENABLED is not defined and instanceID is incorrect.
|
||
#endif
|
||
output.TimeParameters = _TimeParameters.xyz; // This is mainly for LW as HD overwrite this value
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
|
||
#else
|
||
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
|
||
#endif
|
||
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
|
||
|
||
return output;
|
||
}
|
||
|
||
// --------------------------------------------------
|
||
// Main
|
||
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/UnlitPass.hlsl"
|
||
|
||
// --------------------------------------------------
|
||
// Visual Effect Vertex Invocations
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
|
||
#endif
|
||
|
||
ENDHLSL
|
||
}
|
||
Pass
|
||
{
|
||
Name "DepthOnly"
|
||
Tags
|
||
{
|
||
"LightMode" = "DepthOnly"
|
||
}
|
||
|
||
// Render State
|
||
Cull [_Cull]
|
||
ZTest LEqual
|
||
ZWrite On
|
||
ColorMask R
|
||
|
||
// Debug
|
||
// <None>
|
||
|
||
// --------------------------------------------------
|
||
// Pass
|
||
|
||
HLSLPROGRAM
|
||
|
||
// Pragmas
|
||
#pragma target 2.0
|
||
#pragma multi_compile_instancing
|
||
#pragma vertex vert
|
||
#pragma fragment frag
|
||
|
||
// Keywords
|
||
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
|
||
// GraphKeywords: <None>
|
||
|
||
// Defines
|
||
|
||
#define ATTRIBUTES_NEED_NORMAL
|
||
#define ATTRIBUTES_NEED_TANGENT
|
||
#define ATTRIBUTES_NEED_TEXCOORD0
|
||
#define ATTRIBUTES_NEED_TEXCOORD1
|
||
#define ATTRIBUTES_NEED_COLOR
|
||
#define GRAPH_VERTEX_USES_TIME_PARAMETERS_INPUT
|
||
#define FEATURES_GRAPH_VERTEX_NORMAL_OUTPUT
|
||
#define FEATURES_GRAPH_VERTEX_TANGENT_OUTPUT
|
||
#define VARYINGS_NEED_TEXCOORD0
|
||
#define VARYINGS_NEED_TEXCOORD1
|
||
#define VARYINGS_NEED_COLOR
|
||
#define FEATURES_GRAPH_VERTEX
|
||
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
|
||
#define SHADERPASS SHADERPASS_DEPTHONLY
|
||
|
||
|
||
// custom interpolator pre-include
|
||
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
|
||
|
||
// Includes
|
||
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||
|
||
// --------------------------------------------------
|
||
// Structs and Packing
|
||
|
||
// custom interpolators pre packing
|
||
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
|
||
|
||
struct Attributes
|
||
{
|
||
float3 positionOS : POSITION;
|
||
float3 normalOS : NORMAL;
|
||
float4 tangentOS : TANGENT;
|
||
float4 uv0 : TEXCOORD0;
|
||
float4 uv1 : TEXCOORD1;
|
||
float4 color : COLOR;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(ATTRIBUTES_NEED_INSTANCEID)
|
||
uint instanceID : INSTANCEID_SEMANTIC;
|
||
#endif
|
||
};
|
||
struct Varyings
|
||
{
|
||
float4 positionCS : SV_POSITION;
|
||
float4 texCoord0;
|
||
float4 texCoord1;
|
||
float4 color;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
uint instanceID : CUSTOM_INSTANCE_ID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
|
||
#endif
|
||
};
|
||
struct SurfaceDescriptionInputs
|
||
{
|
||
float4 uv0;
|
||
float4 uv1;
|
||
float4 VertexColor;
|
||
};
|
||
struct VertexDescriptionInputs
|
||
{
|
||
float3 ObjectSpaceNormal;
|
||
float3 WorldSpaceNormal;
|
||
float3 ObjectSpaceTangent;
|
||
float3 ObjectSpacePosition;
|
||
float4 uv1;
|
||
float3 TimeParameters;
|
||
};
|
||
struct PackedVaryings
|
||
{
|
||
float4 positionCS : SV_POSITION;
|
||
float4 texCoord0 : INTERP0;
|
||
float4 texCoord1 : INTERP1;
|
||
float4 color : INTERP2;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
uint instanceID : CUSTOM_INSTANCE_ID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
|
||
#endif
|
||
};
|
||
|
||
PackedVaryings PackVaryings (Varyings input)
|
||
{
|
||
PackedVaryings output;
|
||
ZERO_INITIALIZE(PackedVaryings, output);
|
||
output.positionCS = input.positionCS;
|
||
output.texCoord0.xyzw = input.texCoord0;
|
||
output.texCoord1.xyzw = input.texCoord1;
|
||
output.color.xyzw = input.color;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
output.instanceID = input.instanceID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
output.cullFace = input.cullFace;
|
||
#endif
|
||
return output;
|
||
}
|
||
|
||
Varyings UnpackVaryings (PackedVaryings input)
|
||
{
|
||
Varyings output;
|
||
output.positionCS = input.positionCS;
|
||
output.texCoord0 = input.texCoord0.xyzw;
|
||
output.texCoord1 = input.texCoord1.xyzw;
|
||
output.color = input.color.xyzw;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
output.instanceID = input.instanceID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
output.cullFace = input.cullFace;
|
||
#endif
|
||
return output;
|
||
}
|
||
|
||
|
||
// --------------------------------------------------
|
||
// Graph
|
||
|
||
// Graph Properties
|
||
CBUFFER_START(UnityPerMaterial)
|
||
float4 _Main_Texture_TexelSize;
|
||
float4 _Dissolve_Texture_TexelSize;
|
||
float _Depth_Fade_Factor;
|
||
float _Distort;
|
||
float _Vertex_Offset;
|
||
float4 _Distortion_Noise_TexelSize;
|
||
float4 _Color_Mask_TexelSize;
|
||
float4 _Hue_shift;
|
||
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
||
CBUFFER_END
|
||
|
||
|
||
// Object and Global properties
|
||
SAMPLER(SamplerState_Linear_Repeat);
|
||
TEXTURE2D(_Main_Texture);
|
||
SAMPLER(sampler_Main_Texture);
|
||
TEXTURE2D(_Dissolve_Texture);
|
||
SAMPLER(sampler_Dissolve_Texture);
|
||
TEXTURE2D(_Distortion_Noise);
|
||
SAMPLER(sampler_Distortion_Noise);
|
||
TEXTURE2D(_Color_Mask);
|
||
SAMPLER(sampler_Color_Mask);
|
||
|
||
// Graph Includes
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl"
|
||
|
||
// -- Property used by ScenePickingPass
|
||
#ifdef SCENEPICKINGPASS
|
||
float4 _SelectionID;
|
||
#endif
|
||
|
||
// -- Properties used by SceneSelectionPass
|
||
#ifdef SCENESELECTIONPASS
|
||
int _ObjectId;
|
||
int _PassValue;
|
||
#endif
|
||
|
||
// Graph Functions
|
||
|
||
void Unity_Multiply_float_float(float A, float B, out float Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
float Unity_SimpleNoise_ValueNoise_Deterministic_float (float2 uv)
|
||
{
|
||
float2 i = floor(uv);
|
||
float2 f = frac(uv);
|
||
f = f * f * (3.0 - 2.0 * f);
|
||
uv = abs(frac(uv) - 0.5);
|
||
float2 c0 = i + float2(0.0, 0.0);
|
||
float2 c1 = i + float2(1.0, 0.0);
|
||
float2 c2 = i + float2(0.0, 1.0);
|
||
float2 c3 = i + float2(1.0, 1.0);
|
||
float r0; Hash_Tchou_2_1_float(c0, r0);
|
||
float r1; Hash_Tchou_2_1_float(c1, r1);
|
||
float r2; Hash_Tchou_2_1_float(c2, r2);
|
||
float r3; Hash_Tchou_2_1_float(c3, r3);
|
||
float bottomOfGrid = lerp(r0, r1, f.x);
|
||
float topOfGrid = lerp(r2, r3, f.x);
|
||
float t = lerp(bottomOfGrid, topOfGrid, f.y);
|
||
return t;
|
||
}
|
||
|
||
void Unity_SimpleNoise_Deterministic_float(float2 UV, float Scale, out float Out)
|
||
{
|
||
float freq, amp;
|
||
Out = 0.0f;
|
||
freq = pow(2.0, float(0));
|
||
amp = pow(0.5, float(3-0));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
freq = pow(2.0, float(1));
|
||
amp = pow(0.5, float(3-1));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
freq = pow(2.0, float(2));
|
||
amp = pow(0.5, float(3-2));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
}
|
||
|
||
void Unity_Multiply_float3_float3(float3 A, float3 B, out float3 Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
void Unity_Add_float3(float3 A, float3 B, out float3 Out)
|
||
{
|
||
Out = A + B;
|
||
}
|
||
|
||
void Unity_Branch_float3(float Predicate, float3 True, float3 False, out float3 Out)
|
||
{
|
||
Out = Predicate ? True : False;
|
||
}
|
||
|
||
void Unity_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
|
||
{
|
||
Out = UV * Tiling + Offset;
|
||
}
|
||
|
||
void Unity_Multiply_float4_float4(float4 A, float4 B, out float4 Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
void Unity_Add_float(float A, float B, out float Out)
|
||
{
|
||
Out = A + B;
|
||
}
|
||
|
||
void Unity_Smoothstep_float(float Edge1, float Edge2, float In, out float Out)
|
||
{
|
||
Out = smoothstep(Edge1, Edge2, In);
|
||
}
|
||
|
||
// Custom interpolators pre vertex
|
||
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
|
||
|
||
// Graph Vertex
|
||
struct VertexDescription
|
||
{
|
||
float3 Position;
|
||
float3 Normal;
|
||
float3 Tangent;
|
||
};
|
||
|
||
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
|
||
{
|
||
VertexDescription description = (VertexDescription)0;
|
||
float _Property_a85d0177ea0341d9a0a80ed35edb2c8a_Out_0_Boolean = _Vertex_Offset;
|
||
float4 _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4 = IN.uv1;
|
||
float _Split_d2412a890bef4daf877bc52848883f38_R_1_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[0];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_G_2_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[1];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_B_3_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[2];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_A_4_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[3];
|
||
float _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float;
|
||
Unity_Multiply_float_float(IN.TimeParameters.x, _Split_d2412a890bef4daf877bc52848883f38_A_4_Float, _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float);
|
||
float _SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float;
|
||
Unity_SimpleNoise_Deterministic_float((IN.ObjectSpacePosition.xy), _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float, _SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float);
|
||
float3 _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3;
|
||
Unity_Multiply_float3_float3(IN.WorldSpaceNormal, (_SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float.xxx), _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3);
|
||
float3 _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3;
|
||
Unity_Add_float3(IN.ObjectSpacePosition, _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3, _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3);
|
||
float3 _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3;
|
||
Unity_Branch_float3(_Property_a85d0177ea0341d9a0a80ed35edb2c8a_Out_0_Boolean, _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3, IN.ObjectSpacePosition, _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3);
|
||
description.Position = _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3;
|
||
description.Normal = IN.ObjectSpaceNormal;
|
||
description.Tangent = IN.ObjectSpaceTangent;
|
||
return description;
|
||
}
|
||
|
||
// Custom interpolators, pre surface
|
||
#ifdef FEATURES_GRAPH_VERTEX
|
||
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
|
||
{
|
||
return output;
|
||
}
|
||
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
|
||
#endif
|
||
|
||
// Graph Pixel
|
||
struct SurfaceDescription
|
||
{
|
||
float Alpha;
|
||
float AlphaClipThreshold;
|
||
};
|
||
|
||
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
||
{
|
||
SurfaceDescription surface = (SurfaceDescription)0;
|
||
UnityTexture2D _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_Main_Texture);
|
||
float4 _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4 = IN.uv0;
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_R_1_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[0];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_G_2_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[1];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_B_3_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[2];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_A_4_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[3];
|
||
float2 _Vector2_3b7618a9a80f44f8937bf30595ad7e38_Out_0_Vector2 = float2(_Split_88edf1e1762f4685b6a05e3c49b4a79b_B_3_Float, _Split_88edf1e1762f4685b6a05e3c49b4a79b_A_4_Float);
|
||
float2 _TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2;
|
||
Unity_TilingAndOffset_float(IN.uv0.xy, float2 (1, 1), _Vector2_3b7618a9a80f44f8937bf30595ad7e38_Out_0_Vector2, _TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2);
|
||
float4 _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.tex, _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.samplerstate, _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2) );
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_R_4_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.r;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_G_5_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.g;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_B_6_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.b;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_A_7_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.a;
|
||
float4 _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4;
|
||
Unity_Multiply_float4_float4(IN.VertexColor, _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4, _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4);
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_R_1_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[0];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_G_2_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[1];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_B_3_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[2];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_A_4_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[3];
|
||
float4 _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4 = IN.uv1;
|
||
float _Split_b444b317981f46f1958301bf94b38de1_R_1_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[0];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_G_2_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[1];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_B_3_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[2];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_A_4_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[3];
|
||
float _Add_66fb86a088584979815762970a1803f5_Out_2_Float;
|
||
Unity_Add_float(_Split_b444b317981f46f1958301bf94b38de1_R_1_Float, _Split_b444b317981f46f1958301bf94b38de1_G_2_Float, _Add_66fb86a088584979815762970a1803f5_Out_2_Float);
|
||
UnityTexture2D _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_Dissolve_Texture);
|
||
float4 _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.tex, _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.samplerstate, _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2) );
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_R_4_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.r;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_G_5_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.g;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_B_6_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.b;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_A_7_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.a;
|
||
float _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float;
|
||
Unity_Smoothstep_float(_Split_b444b317981f46f1958301bf94b38de1_R_1_Float, _Add_66fb86a088584979815762970a1803f5_Out_2_Float, _SampleTexture2D_755ae0396640490095bbe69901c64485_R_4_Float, _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float);
|
||
float _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float;
|
||
Unity_Multiply_float_float(_Split_6a09d55e29c94fef8172d229eb37fff4_A_4_Float, _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float, _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float);
|
||
surface.Alpha = _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float;
|
||
surface.AlphaClipThreshold = float(0.5);
|
||
return surface;
|
||
}
|
||
|
||
// --------------------------------------------------
|
||
// Build Graph Inputs
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#define VFX_SRP_ATTRIBUTES Attributes
|
||
#define VFX_SRP_VARYINGS Varyings
|
||
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
|
||
#endif
|
||
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
|
||
{
|
||
VertexDescriptionInputs output;
|
||
ZERO_INITIALIZE(VertexDescriptionInputs, output);
|
||
|
||
output.ObjectSpaceNormal = input.normalOS;
|
||
output.WorldSpaceNormal = TransformObjectToWorldNormal(input.normalOS);
|
||
output.ObjectSpaceTangent = input.tangentOS.xyz;
|
||
output.ObjectSpacePosition = input.positionOS;
|
||
output.uv1 = input.uv1;
|
||
output.TimeParameters = _TimeParameters.xyz;
|
||
#if UNITY_ANY_INSTANCING_ENABLED
|
||
#else // TODO: XR support for procedural instancing because in this case UNITY_ANY_INSTANCING_ENABLED is not defined and instanceID is incorrect.
|
||
#endif
|
||
|
||
return output;
|
||
}
|
||
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
|
||
{
|
||
SurfaceDescriptionInputs output;
|
||
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
||
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#if VFX_USE_GRAPH_VALUES
|
||
uint instanceActiveIndex = asuint(UNITY_ACCESS_INSTANCED_PROP(PerInstance, _InstanceActiveIndex));
|
||
/* WARNING: $splice Could not find named fragment 'VFXLoadGraphValues' */
|
||
#endif
|
||
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
|
||
|
||
#endif
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
#if UNITY_UV_STARTS_AT_TOP
|
||
#else
|
||
#endif
|
||
|
||
|
||
output.uv0 = input.texCoord0;
|
||
output.uv1 = input.texCoord1;
|
||
output.VertexColor = input.color;
|
||
#if UNITY_ANY_INSTANCING_ENABLED
|
||
#else // TODO: XR support for procedural instancing because in this case UNITY_ANY_INSTANCING_ENABLED is not defined and instanceID is incorrect.
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
|
||
#else
|
||
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
|
||
#endif
|
||
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
|
||
|
||
return output;
|
||
}
|
||
|
||
// --------------------------------------------------
|
||
// Main
|
||
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/DepthOnlyPass.hlsl"
|
||
|
||
// --------------------------------------------------
|
||
// Visual Effect Vertex Invocations
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
|
||
#endif
|
||
|
||
ENDHLSL
|
||
}
|
||
Pass
|
||
{
|
||
Name "MotionVectors"
|
||
Tags
|
||
{
|
||
"LightMode" = "MotionVectors"
|
||
}
|
||
|
||
// Render State
|
||
Cull [_Cull]
|
||
ZTest LEqual
|
||
ZWrite On
|
||
ColorMask RG
|
||
|
||
// Debug
|
||
// <None>
|
||
|
||
// --------------------------------------------------
|
||
// Pass
|
||
|
||
HLSLPROGRAM
|
||
|
||
// Pragmas
|
||
#pragma target 3.5
|
||
#pragma multi_compile_instancing
|
||
#pragma vertex vert
|
||
#pragma fragment frag
|
||
|
||
// Keywords
|
||
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
|
||
// GraphKeywords: <None>
|
||
|
||
// Defines
|
||
|
||
#define ATTRIBUTES_NEED_NORMAL
|
||
#define ATTRIBUTES_NEED_TEXCOORD0
|
||
#define ATTRIBUTES_NEED_TEXCOORD1
|
||
#define ATTRIBUTES_NEED_COLOR
|
||
#define GRAPH_VERTEX_USES_TIME_PARAMETERS_INPUT
|
||
#define VARYINGS_NEED_TEXCOORD0
|
||
#define VARYINGS_NEED_TEXCOORD1
|
||
#define VARYINGS_NEED_COLOR
|
||
#define FEATURES_GRAPH_VERTEX
|
||
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
|
||
#define SHADERPASS SHADERPASS_MOTION_VECTORS
|
||
|
||
|
||
// custom interpolator pre-include
|
||
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
|
||
|
||
// Includes
|
||
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
|
||
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||
|
||
// --------------------------------------------------
|
||
// Structs and Packing
|
||
|
||
// custom interpolators pre packing
|
||
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
|
||
|
||
struct Attributes
|
||
{
|
||
float3 positionOS : POSITION;
|
||
float3 normalOS : NORMAL;
|
||
float4 uv0 : TEXCOORD0;
|
||
float4 uv1 : TEXCOORD1;
|
||
float4 color : COLOR;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(ATTRIBUTES_NEED_INSTANCEID)
|
||
uint instanceID : INSTANCEID_SEMANTIC;
|
||
#endif
|
||
};
|
||
struct Varyings
|
||
{
|
||
float4 positionCS : SV_POSITION;
|
||
float4 texCoord0;
|
||
float4 texCoord1;
|
||
float4 color;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
uint instanceID : CUSTOM_INSTANCE_ID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
|
||
#endif
|
||
};
|
||
struct SurfaceDescriptionInputs
|
||
{
|
||
float4 uv0;
|
||
float4 uv1;
|
||
float4 VertexColor;
|
||
};
|
||
struct VertexDescriptionInputs
|
||
{
|
||
float3 WorldSpaceNormal;
|
||
float3 ObjectSpacePosition;
|
||
float4 uv1;
|
||
float3 TimeParameters;
|
||
};
|
||
struct PackedVaryings
|
||
{
|
||
float4 positionCS : SV_POSITION;
|
||
float4 texCoord0 : INTERP0;
|
||
float4 texCoord1 : INTERP1;
|
||
float4 color : INTERP2;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
uint instanceID : CUSTOM_INSTANCE_ID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
|
||
#endif
|
||
};
|
||
|
||
PackedVaryings PackVaryings (Varyings input)
|
||
{
|
||
PackedVaryings output;
|
||
ZERO_INITIALIZE(PackedVaryings, output);
|
||
output.positionCS = input.positionCS;
|
||
output.texCoord0.xyzw = input.texCoord0;
|
||
output.texCoord1.xyzw = input.texCoord1;
|
||
output.color.xyzw = input.color;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
output.instanceID = input.instanceID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
output.cullFace = input.cullFace;
|
||
#endif
|
||
return output;
|
||
}
|
||
|
||
Varyings UnpackVaryings (PackedVaryings input)
|
||
{
|
||
Varyings output;
|
||
output.positionCS = input.positionCS;
|
||
output.texCoord0 = input.texCoord0.xyzw;
|
||
output.texCoord1 = input.texCoord1.xyzw;
|
||
output.color = input.color.xyzw;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
output.instanceID = input.instanceID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
output.cullFace = input.cullFace;
|
||
#endif
|
||
return output;
|
||
}
|
||
|
||
|
||
// --------------------------------------------------
|
||
// Graph
|
||
|
||
// Graph Properties
|
||
CBUFFER_START(UnityPerMaterial)
|
||
float4 _Main_Texture_TexelSize;
|
||
float4 _Dissolve_Texture_TexelSize;
|
||
float _Depth_Fade_Factor;
|
||
float _Distort;
|
||
float _Vertex_Offset;
|
||
float4 _Distortion_Noise_TexelSize;
|
||
float4 _Color_Mask_TexelSize;
|
||
float4 _Hue_shift;
|
||
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
||
CBUFFER_END
|
||
|
||
|
||
// Object and Global properties
|
||
SAMPLER(SamplerState_Linear_Repeat);
|
||
TEXTURE2D(_Main_Texture);
|
||
SAMPLER(sampler_Main_Texture);
|
||
TEXTURE2D(_Dissolve_Texture);
|
||
SAMPLER(sampler_Dissolve_Texture);
|
||
TEXTURE2D(_Distortion_Noise);
|
||
SAMPLER(sampler_Distortion_Noise);
|
||
TEXTURE2D(_Color_Mask);
|
||
SAMPLER(sampler_Color_Mask);
|
||
|
||
// Graph Includes
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl"
|
||
|
||
// -- Property used by ScenePickingPass
|
||
#ifdef SCENEPICKINGPASS
|
||
float4 _SelectionID;
|
||
#endif
|
||
|
||
// -- Properties used by SceneSelectionPass
|
||
#ifdef SCENESELECTIONPASS
|
||
int _ObjectId;
|
||
int _PassValue;
|
||
#endif
|
||
|
||
// Graph Functions
|
||
|
||
void Unity_Multiply_float_float(float A, float B, out float Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
float Unity_SimpleNoise_ValueNoise_Deterministic_float (float2 uv)
|
||
{
|
||
float2 i = floor(uv);
|
||
float2 f = frac(uv);
|
||
f = f * f * (3.0 - 2.0 * f);
|
||
uv = abs(frac(uv) - 0.5);
|
||
float2 c0 = i + float2(0.0, 0.0);
|
||
float2 c1 = i + float2(1.0, 0.0);
|
||
float2 c2 = i + float2(0.0, 1.0);
|
||
float2 c3 = i + float2(1.0, 1.0);
|
||
float r0; Hash_Tchou_2_1_float(c0, r0);
|
||
float r1; Hash_Tchou_2_1_float(c1, r1);
|
||
float r2; Hash_Tchou_2_1_float(c2, r2);
|
||
float r3; Hash_Tchou_2_1_float(c3, r3);
|
||
float bottomOfGrid = lerp(r0, r1, f.x);
|
||
float topOfGrid = lerp(r2, r3, f.x);
|
||
float t = lerp(bottomOfGrid, topOfGrid, f.y);
|
||
return t;
|
||
}
|
||
|
||
void Unity_SimpleNoise_Deterministic_float(float2 UV, float Scale, out float Out)
|
||
{
|
||
float freq, amp;
|
||
Out = 0.0f;
|
||
freq = pow(2.0, float(0));
|
||
amp = pow(0.5, float(3-0));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
freq = pow(2.0, float(1));
|
||
amp = pow(0.5, float(3-1));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
freq = pow(2.0, float(2));
|
||
amp = pow(0.5, float(3-2));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
}
|
||
|
||
void Unity_Multiply_float3_float3(float3 A, float3 B, out float3 Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
void Unity_Add_float3(float3 A, float3 B, out float3 Out)
|
||
{
|
||
Out = A + B;
|
||
}
|
||
|
||
void Unity_Branch_float3(float Predicate, float3 True, float3 False, out float3 Out)
|
||
{
|
||
Out = Predicate ? True : False;
|
||
}
|
||
|
||
void Unity_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
|
||
{
|
||
Out = UV * Tiling + Offset;
|
||
}
|
||
|
||
void Unity_Multiply_float4_float4(float4 A, float4 B, out float4 Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
void Unity_Add_float(float A, float B, out float Out)
|
||
{
|
||
Out = A + B;
|
||
}
|
||
|
||
void Unity_Smoothstep_float(float Edge1, float Edge2, float In, out float Out)
|
||
{
|
||
Out = smoothstep(Edge1, Edge2, In);
|
||
}
|
||
|
||
// Custom interpolators pre vertex
|
||
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
|
||
|
||
// Graph Vertex
|
||
struct VertexDescription
|
||
{
|
||
float3 Position;
|
||
};
|
||
|
||
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
|
||
{
|
||
VertexDescription description = (VertexDescription)0;
|
||
float _Property_a85d0177ea0341d9a0a80ed35edb2c8a_Out_0_Boolean = _Vertex_Offset;
|
||
float4 _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4 = IN.uv1;
|
||
float _Split_d2412a890bef4daf877bc52848883f38_R_1_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[0];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_G_2_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[1];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_B_3_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[2];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_A_4_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[3];
|
||
float _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float;
|
||
Unity_Multiply_float_float(IN.TimeParameters.x, _Split_d2412a890bef4daf877bc52848883f38_A_4_Float, _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float);
|
||
float _SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float;
|
||
Unity_SimpleNoise_Deterministic_float((IN.ObjectSpacePosition.xy), _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float, _SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float);
|
||
float3 _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3;
|
||
Unity_Multiply_float3_float3(IN.WorldSpaceNormal, (_SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float.xxx), _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3);
|
||
float3 _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3;
|
||
Unity_Add_float3(IN.ObjectSpacePosition, _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3, _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3);
|
||
float3 _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3;
|
||
Unity_Branch_float3(_Property_a85d0177ea0341d9a0a80ed35edb2c8a_Out_0_Boolean, _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3, IN.ObjectSpacePosition, _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3);
|
||
description.Position = _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3;
|
||
return description;
|
||
}
|
||
|
||
// Custom interpolators, pre surface
|
||
#ifdef FEATURES_GRAPH_VERTEX
|
||
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
|
||
{
|
||
return output;
|
||
}
|
||
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
|
||
#endif
|
||
|
||
// Graph Pixel
|
||
struct SurfaceDescription
|
||
{
|
||
float Alpha;
|
||
float AlphaClipThreshold;
|
||
};
|
||
|
||
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
||
{
|
||
SurfaceDescription surface = (SurfaceDescription)0;
|
||
UnityTexture2D _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_Main_Texture);
|
||
float4 _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4 = IN.uv0;
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_R_1_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[0];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_G_2_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[1];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_B_3_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[2];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_A_4_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[3];
|
||
float2 _Vector2_3b7618a9a80f44f8937bf30595ad7e38_Out_0_Vector2 = float2(_Split_88edf1e1762f4685b6a05e3c49b4a79b_B_3_Float, _Split_88edf1e1762f4685b6a05e3c49b4a79b_A_4_Float);
|
||
float2 _TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2;
|
||
Unity_TilingAndOffset_float(IN.uv0.xy, float2 (1, 1), _Vector2_3b7618a9a80f44f8937bf30595ad7e38_Out_0_Vector2, _TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2);
|
||
float4 _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.tex, _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.samplerstate, _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2) );
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_R_4_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.r;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_G_5_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.g;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_B_6_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.b;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_A_7_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.a;
|
||
float4 _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4;
|
||
Unity_Multiply_float4_float4(IN.VertexColor, _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4, _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4);
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_R_1_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[0];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_G_2_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[1];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_B_3_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[2];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_A_4_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[3];
|
||
float4 _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4 = IN.uv1;
|
||
float _Split_b444b317981f46f1958301bf94b38de1_R_1_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[0];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_G_2_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[1];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_B_3_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[2];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_A_4_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[3];
|
||
float _Add_66fb86a088584979815762970a1803f5_Out_2_Float;
|
||
Unity_Add_float(_Split_b444b317981f46f1958301bf94b38de1_R_1_Float, _Split_b444b317981f46f1958301bf94b38de1_G_2_Float, _Add_66fb86a088584979815762970a1803f5_Out_2_Float);
|
||
UnityTexture2D _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_Dissolve_Texture);
|
||
float4 _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.tex, _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.samplerstate, _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2) );
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_R_4_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.r;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_G_5_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.g;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_B_6_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.b;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_A_7_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.a;
|
||
float _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float;
|
||
Unity_Smoothstep_float(_Split_b444b317981f46f1958301bf94b38de1_R_1_Float, _Add_66fb86a088584979815762970a1803f5_Out_2_Float, _SampleTexture2D_755ae0396640490095bbe69901c64485_R_4_Float, _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float);
|
||
float _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float;
|
||
Unity_Multiply_float_float(_Split_6a09d55e29c94fef8172d229eb37fff4_A_4_Float, _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float, _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float);
|
||
surface.Alpha = _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float;
|
||
surface.AlphaClipThreshold = float(0.5);
|
||
return surface;
|
||
}
|
||
|
||
// --------------------------------------------------
|
||
// Build Graph Inputs
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#define VFX_SRP_ATTRIBUTES Attributes
|
||
#define VFX_SRP_VARYINGS Varyings
|
||
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
|
||
#endif
|
||
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
|
||
{
|
||
VertexDescriptionInputs output;
|
||
ZERO_INITIALIZE(VertexDescriptionInputs, output);
|
||
|
||
output.WorldSpaceNormal = TransformObjectToWorldNormal(input.normalOS);
|
||
output.ObjectSpacePosition = input.positionOS;
|
||
output.uv1 = input.uv1;
|
||
output.TimeParameters = _TimeParameters.xyz;
|
||
#if UNITY_ANY_INSTANCING_ENABLED
|
||
#else // TODO: XR support for procedural instancing because in this case UNITY_ANY_INSTANCING_ENABLED is not defined and instanceID is incorrect.
|
||
#endif
|
||
|
||
return output;
|
||
}
|
||
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
|
||
{
|
||
SurfaceDescriptionInputs output;
|
||
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
||
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#if VFX_USE_GRAPH_VALUES
|
||
uint instanceActiveIndex = asuint(UNITY_ACCESS_INSTANCED_PROP(PerInstance, _InstanceActiveIndex));
|
||
/* WARNING: $splice Could not find named fragment 'VFXLoadGraphValues' */
|
||
#endif
|
||
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
|
||
|
||
#endif
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
#if UNITY_UV_STARTS_AT_TOP
|
||
#else
|
||
#endif
|
||
|
||
|
||
output.uv0 = input.texCoord0;
|
||
output.uv1 = input.texCoord1;
|
||
output.VertexColor = input.color;
|
||
#if UNITY_ANY_INSTANCING_ENABLED
|
||
#else // TODO: XR support for procedural instancing because in this case UNITY_ANY_INSTANCING_ENABLED is not defined and instanceID is incorrect.
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
|
||
#else
|
||
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
|
||
#endif
|
||
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
|
||
|
||
return output;
|
||
}
|
||
|
||
// --------------------------------------------------
|
||
// Main
|
||
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/MotionVectorPass.hlsl"
|
||
|
||
// --------------------------------------------------
|
||
// Visual Effect Vertex Invocations
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
|
||
#endif
|
||
|
||
ENDHLSL
|
||
}
|
||
Pass
|
||
{
|
||
Name "DepthNormalsOnly"
|
||
Tags
|
||
{
|
||
"LightMode" = "DepthNormalsOnly"
|
||
}
|
||
|
||
// Render State
|
||
Cull [_Cull]
|
||
ZTest LEqual
|
||
ZWrite On
|
||
|
||
// Debug
|
||
// <None>
|
||
|
||
// --------------------------------------------------
|
||
// Pass
|
||
|
||
HLSLPROGRAM
|
||
|
||
// Pragmas
|
||
#pragma target 2.0
|
||
#pragma multi_compile_instancing
|
||
#pragma vertex vert
|
||
#pragma fragment frag
|
||
|
||
// Keywords
|
||
#pragma multi_compile_fragment _ _GBUFFER_NORMALS_OCT
|
||
#pragma shader_feature_fragment _ _SURFACE_TYPE_TRANSPARENT
|
||
#pragma shader_feature_local_fragment _ _ALPHAPREMULTIPLY_ON
|
||
#pragma shader_feature_local_fragment _ _ALPHAMODULATE_ON
|
||
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
|
||
// GraphKeywords: <None>
|
||
|
||
// Defines
|
||
|
||
#define ATTRIBUTES_NEED_NORMAL
|
||
#define ATTRIBUTES_NEED_TANGENT
|
||
#define ATTRIBUTES_NEED_TEXCOORD0
|
||
#define ATTRIBUTES_NEED_TEXCOORD1
|
||
#define ATTRIBUTES_NEED_COLOR
|
||
#define GRAPH_VERTEX_USES_TIME_PARAMETERS_INPUT
|
||
#define FEATURES_GRAPH_VERTEX_NORMAL_OUTPUT
|
||
#define FEATURES_GRAPH_VERTEX_TANGENT_OUTPUT
|
||
#define VARYINGS_NEED_NORMAL_WS
|
||
#define VARYINGS_NEED_TEXCOORD0
|
||
#define VARYINGS_NEED_TEXCOORD1
|
||
#define VARYINGS_NEED_COLOR
|
||
#define FEATURES_GRAPH_VERTEX
|
||
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
|
||
#define SHADERPASS SHADERPASS_DEPTHNORMALSONLY
|
||
|
||
|
||
// custom interpolator pre-include
|
||
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
|
||
|
||
// Includes
|
||
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
|
||
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||
|
||
// --------------------------------------------------
|
||
// Structs and Packing
|
||
|
||
// custom interpolators pre packing
|
||
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
|
||
|
||
struct Attributes
|
||
{
|
||
float3 positionOS : POSITION;
|
||
float3 normalOS : NORMAL;
|
||
float4 tangentOS : TANGENT;
|
||
float4 uv0 : TEXCOORD0;
|
||
float4 uv1 : TEXCOORD1;
|
||
float4 color : COLOR;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(ATTRIBUTES_NEED_INSTANCEID)
|
||
uint instanceID : INSTANCEID_SEMANTIC;
|
||
#endif
|
||
};
|
||
struct Varyings
|
||
{
|
||
float4 positionCS : SV_POSITION;
|
||
float3 normalWS;
|
||
float4 texCoord0;
|
||
float4 texCoord1;
|
||
float4 color;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
uint instanceID : CUSTOM_INSTANCE_ID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
|
||
#endif
|
||
};
|
||
struct SurfaceDescriptionInputs
|
||
{
|
||
float4 uv0;
|
||
float4 uv1;
|
||
float4 VertexColor;
|
||
};
|
||
struct VertexDescriptionInputs
|
||
{
|
||
float3 ObjectSpaceNormal;
|
||
float3 WorldSpaceNormal;
|
||
float3 ObjectSpaceTangent;
|
||
float3 ObjectSpacePosition;
|
||
float4 uv1;
|
||
float3 TimeParameters;
|
||
};
|
||
struct PackedVaryings
|
||
{
|
||
float4 positionCS : SV_POSITION;
|
||
float4 texCoord0 : INTERP0;
|
||
float4 texCoord1 : INTERP1;
|
||
float4 color : INTERP2;
|
||
float3 normalWS : INTERP3;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
uint instanceID : CUSTOM_INSTANCE_ID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
|
||
#endif
|
||
};
|
||
|
||
PackedVaryings PackVaryings (Varyings input)
|
||
{
|
||
PackedVaryings output;
|
||
ZERO_INITIALIZE(PackedVaryings, output);
|
||
output.positionCS = input.positionCS;
|
||
output.texCoord0.xyzw = input.texCoord0;
|
||
output.texCoord1.xyzw = input.texCoord1;
|
||
output.color.xyzw = input.color;
|
||
output.normalWS.xyz = input.normalWS;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
output.instanceID = input.instanceID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
output.cullFace = input.cullFace;
|
||
#endif
|
||
return output;
|
||
}
|
||
|
||
Varyings UnpackVaryings (PackedVaryings input)
|
||
{
|
||
Varyings output;
|
||
output.positionCS = input.positionCS;
|
||
output.texCoord0 = input.texCoord0.xyzw;
|
||
output.texCoord1 = input.texCoord1.xyzw;
|
||
output.color = input.color.xyzw;
|
||
output.normalWS = input.normalWS.xyz;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
output.instanceID = input.instanceID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
output.cullFace = input.cullFace;
|
||
#endif
|
||
return output;
|
||
}
|
||
|
||
|
||
// --------------------------------------------------
|
||
// Graph
|
||
|
||
// Graph Properties
|
||
CBUFFER_START(UnityPerMaterial)
|
||
float4 _Main_Texture_TexelSize;
|
||
float4 _Dissolve_Texture_TexelSize;
|
||
float _Depth_Fade_Factor;
|
||
float _Distort;
|
||
float _Vertex_Offset;
|
||
float4 _Distortion_Noise_TexelSize;
|
||
float4 _Color_Mask_TexelSize;
|
||
float4 _Hue_shift;
|
||
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
||
CBUFFER_END
|
||
|
||
|
||
// Object and Global properties
|
||
SAMPLER(SamplerState_Linear_Repeat);
|
||
TEXTURE2D(_Main_Texture);
|
||
SAMPLER(sampler_Main_Texture);
|
||
TEXTURE2D(_Dissolve_Texture);
|
||
SAMPLER(sampler_Dissolve_Texture);
|
||
TEXTURE2D(_Distortion_Noise);
|
||
SAMPLER(sampler_Distortion_Noise);
|
||
TEXTURE2D(_Color_Mask);
|
||
SAMPLER(sampler_Color_Mask);
|
||
|
||
// Graph Includes
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl"
|
||
|
||
// -- Property used by ScenePickingPass
|
||
#ifdef SCENEPICKINGPASS
|
||
float4 _SelectionID;
|
||
#endif
|
||
|
||
// -- Properties used by SceneSelectionPass
|
||
#ifdef SCENESELECTIONPASS
|
||
int _ObjectId;
|
||
int _PassValue;
|
||
#endif
|
||
|
||
// Graph Functions
|
||
|
||
void Unity_Multiply_float_float(float A, float B, out float Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
float Unity_SimpleNoise_ValueNoise_Deterministic_float (float2 uv)
|
||
{
|
||
float2 i = floor(uv);
|
||
float2 f = frac(uv);
|
||
f = f * f * (3.0 - 2.0 * f);
|
||
uv = abs(frac(uv) - 0.5);
|
||
float2 c0 = i + float2(0.0, 0.0);
|
||
float2 c1 = i + float2(1.0, 0.0);
|
||
float2 c2 = i + float2(0.0, 1.0);
|
||
float2 c3 = i + float2(1.0, 1.0);
|
||
float r0; Hash_Tchou_2_1_float(c0, r0);
|
||
float r1; Hash_Tchou_2_1_float(c1, r1);
|
||
float r2; Hash_Tchou_2_1_float(c2, r2);
|
||
float r3; Hash_Tchou_2_1_float(c3, r3);
|
||
float bottomOfGrid = lerp(r0, r1, f.x);
|
||
float topOfGrid = lerp(r2, r3, f.x);
|
||
float t = lerp(bottomOfGrid, topOfGrid, f.y);
|
||
return t;
|
||
}
|
||
|
||
void Unity_SimpleNoise_Deterministic_float(float2 UV, float Scale, out float Out)
|
||
{
|
||
float freq, amp;
|
||
Out = 0.0f;
|
||
freq = pow(2.0, float(0));
|
||
amp = pow(0.5, float(3-0));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
freq = pow(2.0, float(1));
|
||
amp = pow(0.5, float(3-1));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
freq = pow(2.0, float(2));
|
||
amp = pow(0.5, float(3-2));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
}
|
||
|
||
void Unity_Multiply_float3_float3(float3 A, float3 B, out float3 Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
void Unity_Add_float3(float3 A, float3 B, out float3 Out)
|
||
{
|
||
Out = A + B;
|
||
}
|
||
|
||
void Unity_Branch_float3(float Predicate, float3 True, float3 False, out float3 Out)
|
||
{
|
||
Out = Predicate ? True : False;
|
||
}
|
||
|
||
void Unity_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
|
||
{
|
||
Out = UV * Tiling + Offset;
|
||
}
|
||
|
||
void Unity_Multiply_float4_float4(float4 A, float4 B, out float4 Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
void Unity_Add_float(float A, float B, out float Out)
|
||
{
|
||
Out = A + B;
|
||
}
|
||
|
||
void Unity_Smoothstep_float(float Edge1, float Edge2, float In, out float Out)
|
||
{
|
||
Out = smoothstep(Edge1, Edge2, In);
|
||
}
|
||
|
||
// Custom interpolators pre vertex
|
||
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
|
||
|
||
// Graph Vertex
|
||
struct VertexDescription
|
||
{
|
||
float3 Position;
|
||
float3 Normal;
|
||
float3 Tangent;
|
||
};
|
||
|
||
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
|
||
{
|
||
VertexDescription description = (VertexDescription)0;
|
||
float _Property_a85d0177ea0341d9a0a80ed35edb2c8a_Out_0_Boolean = _Vertex_Offset;
|
||
float4 _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4 = IN.uv1;
|
||
float _Split_d2412a890bef4daf877bc52848883f38_R_1_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[0];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_G_2_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[1];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_B_3_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[2];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_A_4_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[3];
|
||
float _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float;
|
||
Unity_Multiply_float_float(IN.TimeParameters.x, _Split_d2412a890bef4daf877bc52848883f38_A_4_Float, _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float);
|
||
float _SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float;
|
||
Unity_SimpleNoise_Deterministic_float((IN.ObjectSpacePosition.xy), _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float, _SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float);
|
||
float3 _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3;
|
||
Unity_Multiply_float3_float3(IN.WorldSpaceNormal, (_SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float.xxx), _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3);
|
||
float3 _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3;
|
||
Unity_Add_float3(IN.ObjectSpacePosition, _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3, _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3);
|
||
float3 _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3;
|
||
Unity_Branch_float3(_Property_a85d0177ea0341d9a0a80ed35edb2c8a_Out_0_Boolean, _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3, IN.ObjectSpacePosition, _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3);
|
||
description.Position = _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3;
|
||
description.Normal = IN.ObjectSpaceNormal;
|
||
description.Tangent = IN.ObjectSpaceTangent;
|
||
return description;
|
||
}
|
||
|
||
// Custom interpolators, pre surface
|
||
#ifdef FEATURES_GRAPH_VERTEX
|
||
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
|
||
{
|
||
return output;
|
||
}
|
||
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
|
||
#endif
|
||
|
||
// Graph Pixel
|
||
struct SurfaceDescription
|
||
{
|
||
float Alpha;
|
||
float AlphaClipThreshold;
|
||
};
|
||
|
||
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
||
{
|
||
SurfaceDescription surface = (SurfaceDescription)0;
|
||
UnityTexture2D _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_Main_Texture);
|
||
float4 _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4 = IN.uv0;
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_R_1_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[0];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_G_2_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[1];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_B_3_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[2];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_A_4_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[3];
|
||
float2 _Vector2_3b7618a9a80f44f8937bf30595ad7e38_Out_0_Vector2 = float2(_Split_88edf1e1762f4685b6a05e3c49b4a79b_B_3_Float, _Split_88edf1e1762f4685b6a05e3c49b4a79b_A_4_Float);
|
||
float2 _TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2;
|
||
Unity_TilingAndOffset_float(IN.uv0.xy, float2 (1, 1), _Vector2_3b7618a9a80f44f8937bf30595ad7e38_Out_0_Vector2, _TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2);
|
||
float4 _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.tex, _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.samplerstate, _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2) );
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_R_4_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.r;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_G_5_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.g;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_B_6_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.b;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_A_7_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.a;
|
||
float4 _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4;
|
||
Unity_Multiply_float4_float4(IN.VertexColor, _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4, _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4);
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_R_1_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[0];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_G_2_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[1];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_B_3_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[2];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_A_4_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[3];
|
||
float4 _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4 = IN.uv1;
|
||
float _Split_b444b317981f46f1958301bf94b38de1_R_1_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[0];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_G_2_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[1];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_B_3_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[2];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_A_4_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[3];
|
||
float _Add_66fb86a088584979815762970a1803f5_Out_2_Float;
|
||
Unity_Add_float(_Split_b444b317981f46f1958301bf94b38de1_R_1_Float, _Split_b444b317981f46f1958301bf94b38de1_G_2_Float, _Add_66fb86a088584979815762970a1803f5_Out_2_Float);
|
||
UnityTexture2D _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_Dissolve_Texture);
|
||
float4 _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.tex, _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.samplerstate, _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2) );
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_R_4_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.r;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_G_5_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.g;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_B_6_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.b;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_A_7_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.a;
|
||
float _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float;
|
||
Unity_Smoothstep_float(_Split_b444b317981f46f1958301bf94b38de1_R_1_Float, _Add_66fb86a088584979815762970a1803f5_Out_2_Float, _SampleTexture2D_755ae0396640490095bbe69901c64485_R_4_Float, _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float);
|
||
float _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float;
|
||
Unity_Multiply_float_float(_Split_6a09d55e29c94fef8172d229eb37fff4_A_4_Float, _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float, _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float);
|
||
surface.Alpha = _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float;
|
||
surface.AlphaClipThreshold = float(0.5);
|
||
return surface;
|
||
}
|
||
|
||
// --------------------------------------------------
|
||
// Build Graph Inputs
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#define VFX_SRP_ATTRIBUTES Attributes
|
||
#define VFX_SRP_VARYINGS Varyings
|
||
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
|
||
#endif
|
||
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
|
||
{
|
||
VertexDescriptionInputs output;
|
||
ZERO_INITIALIZE(VertexDescriptionInputs, output);
|
||
|
||
output.ObjectSpaceNormal = input.normalOS;
|
||
output.WorldSpaceNormal = TransformObjectToWorldNormal(input.normalOS);
|
||
output.ObjectSpaceTangent = input.tangentOS.xyz;
|
||
output.ObjectSpacePosition = input.positionOS;
|
||
output.uv1 = input.uv1;
|
||
output.TimeParameters = _TimeParameters.xyz;
|
||
#if UNITY_ANY_INSTANCING_ENABLED
|
||
#else // TODO: XR support for procedural instancing because in this case UNITY_ANY_INSTANCING_ENABLED is not defined and instanceID is incorrect.
|
||
#endif
|
||
|
||
return output;
|
||
}
|
||
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
|
||
{
|
||
SurfaceDescriptionInputs output;
|
||
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
||
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#if VFX_USE_GRAPH_VALUES
|
||
uint instanceActiveIndex = asuint(UNITY_ACCESS_INSTANCED_PROP(PerInstance, _InstanceActiveIndex));
|
||
/* WARNING: $splice Could not find named fragment 'VFXLoadGraphValues' */
|
||
#endif
|
||
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
|
||
|
||
#endif
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
#if UNITY_UV_STARTS_AT_TOP
|
||
#else
|
||
#endif
|
||
|
||
|
||
output.uv0 = input.texCoord0;
|
||
output.uv1 = input.texCoord1;
|
||
output.VertexColor = input.color;
|
||
#if UNITY_ANY_INSTANCING_ENABLED
|
||
#else // TODO: XR support for procedural instancing because in this case UNITY_ANY_INSTANCING_ENABLED is not defined and instanceID is incorrect.
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
|
||
#else
|
||
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
|
||
#endif
|
||
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
|
||
|
||
return output;
|
||
}
|
||
|
||
// --------------------------------------------------
|
||
// Main
|
||
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/DepthNormalsOnlyPass.hlsl"
|
||
|
||
// --------------------------------------------------
|
||
// Visual Effect Vertex Invocations
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
|
||
#endif
|
||
|
||
ENDHLSL
|
||
}
|
||
Pass
|
||
{
|
||
Name "ShadowCaster"
|
||
Tags
|
||
{
|
||
"LightMode" = "ShadowCaster"
|
||
}
|
||
|
||
// Render State
|
||
Cull [_Cull]
|
||
ZTest LEqual
|
||
ZWrite On
|
||
ColorMask 0
|
||
|
||
// Debug
|
||
// <None>
|
||
|
||
// --------------------------------------------------
|
||
// Pass
|
||
|
||
HLSLPROGRAM
|
||
|
||
// Pragmas
|
||
#pragma target 2.0
|
||
#pragma multi_compile_instancing
|
||
#pragma vertex vert
|
||
#pragma fragment frag
|
||
|
||
// Keywords
|
||
#pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW
|
||
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
|
||
// GraphKeywords: <None>
|
||
|
||
// Defines
|
||
|
||
#define ATTRIBUTES_NEED_NORMAL
|
||
#define ATTRIBUTES_NEED_TANGENT
|
||
#define ATTRIBUTES_NEED_TEXCOORD0
|
||
#define ATTRIBUTES_NEED_TEXCOORD1
|
||
#define ATTRIBUTES_NEED_COLOR
|
||
#define GRAPH_VERTEX_USES_TIME_PARAMETERS_INPUT
|
||
#define FEATURES_GRAPH_VERTEX_NORMAL_OUTPUT
|
||
#define FEATURES_GRAPH_VERTEX_TANGENT_OUTPUT
|
||
#define VARYINGS_NEED_NORMAL_WS
|
||
#define VARYINGS_NEED_TEXCOORD0
|
||
#define VARYINGS_NEED_TEXCOORD1
|
||
#define VARYINGS_NEED_COLOR
|
||
#define FEATURES_GRAPH_VERTEX
|
||
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
|
||
#define SHADERPASS SHADERPASS_SHADOWCASTER
|
||
|
||
|
||
// custom interpolator pre-include
|
||
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
|
||
|
||
// Includes
|
||
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||
|
||
// --------------------------------------------------
|
||
// Structs and Packing
|
||
|
||
// custom interpolators pre packing
|
||
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
|
||
|
||
struct Attributes
|
||
{
|
||
float3 positionOS : POSITION;
|
||
float3 normalOS : NORMAL;
|
||
float4 tangentOS : TANGENT;
|
||
float4 uv0 : TEXCOORD0;
|
||
float4 uv1 : TEXCOORD1;
|
||
float4 color : COLOR;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(ATTRIBUTES_NEED_INSTANCEID)
|
||
uint instanceID : INSTANCEID_SEMANTIC;
|
||
#endif
|
||
};
|
||
struct Varyings
|
||
{
|
||
float4 positionCS : SV_POSITION;
|
||
float3 normalWS;
|
||
float4 texCoord0;
|
||
float4 texCoord1;
|
||
float4 color;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
uint instanceID : CUSTOM_INSTANCE_ID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
|
||
#endif
|
||
};
|
||
struct SurfaceDescriptionInputs
|
||
{
|
||
float4 uv0;
|
||
float4 uv1;
|
||
float4 VertexColor;
|
||
};
|
||
struct VertexDescriptionInputs
|
||
{
|
||
float3 ObjectSpaceNormal;
|
||
float3 WorldSpaceNormal;
|
||
float3 ObjectSpaceTangent;
|
||
float3 ObjectSpacePosition;
|
||
float4 uv1;
|
||
float3 TimeParameters;
|
||
};
|
||
struct PackedVaryings
|
||
{
|
||
float4 positionCS : SV_POSITION;
|
||
float4 texCoord0 : INTERP0;
|
||
float4 texCoord1 : INTERP1;
|
||
float4 color : INTERP2;
|
||
float3 normalWS : INTERP3;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
uint instanceID : CUSTOM_INSTANCE_ID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
|
||
#endif
|
||
};
|
||
|
||
PackedVaryings PackVaryings (Varyings input)
|
||
{
|
||
PackedVaryings output;
|
||
ZERO_INITIALIZE(PackedVaryings, output);
|
||
output.positionCS = input.positionCS;
|
||
output.texCoord0.xyzw = input.texCoord0;
|
||
output.texCoord1.xyzw = input.texCoord1;
|
||
output.color.xyzw = input.color;
|
||
output.normalWS.xyz = input.normalWS;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
output.instanceID = input.instanceID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
output.cullFace = input.cullFace;
|
||
#endif
|
||
return output;
|
||
}
|
||
|
||
Varyings UnpackVaryings (PackedVaryings input)
|
||
{
|
||
Varyings output;
|
||
output.positionCS = input.positionCS;
|
||
output.texCoord0 = input.texCoord0.xyzw;
|
||
output.texCoord1 = input.texCoord1.xyzw;
|
||
output.color = input.color.xyzw;
|
||
output.normalWS = input.normalWS.xyz;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
output.instanceID = input.instanceID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
output.cullFace = input.cullFace;
|
||
#endif
|
||
return output;
|
||
}
|
||
|
||
|
||
// --------------------------------------------------
|
||
// Graph
|
||
|
||
// Graph Properties
|
||
CBUFFER_START(UnityPerMaterial)
|
||
float4 _Main_Texture_TexelSize;
|
||
float4 _Dissolve_Texture_TexelSize;
|
||
float _Depth_Fade_Factor;
|
||
float _Distort;
|
||
float _Vertex_Offset;
|
||
float4 _Distortion_Noise_TexelSize;
|
||
float4 _Color_Mask_TexelSize;
|
||
float4 _Hue_shift;
|
||
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
||
CBUFFER_END
|
||
|
||
|
||
// Object and Global properties
|
||
SAMPLER(SamplerState_Linear_Repeat);
|
||
TEXTURE2D(_Main_Texture);
|
||
SAMPLER(sampler_Main_Texture);
|
||
TEXTURE2D(_Dissolve_Texture);
|
||
SAMPLER(sampler_Dissolve_Texture);
|
||
TEXTURE2D(_Distortion_Noise);
|
||
SAMPLER(sampler_Distortion_Noise);
|
||
TEXTURE2D(_Color_Mask);
|
||
SAMPLER(sampler_Color_Mask);
|
||
|
||
// Graph Includes
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl"
|
||
|
||
// -- Property used by ScenePickingPass
|
||
#ifdef SCENEPICKINGPASS
|
||
float4 _SelectionID;
|
||
#endif
|
||
|
||
// -- Properties used by SceneSelectionPass
|
||
#ifdef SCENESELECTIONPASS
|
||
int _ObjectId;
|
||
int _PassValue;
|
||
#endif
|
||
|
||
// Graph Functions
|
||
|
||
void Unity_Multiply_float_float(float A, float B, out float Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
float Unity_SimpleNoise_ValueNoise_Deterministic_float (float2 uv)
|
||
{
|
||
float2 i = floor(uv);
|
||
float2 f = frac(uv);
|
||
f = f * f * (3.0 - 2.0 * f);
|
||
uv = abs(frac(uv) - 0.5);
|
||
float2 c0 = i + float2(0.0, 0.0);
|
||
float2 c1 = i + float2(1.0, 0.0);
|
||
float2 c2 = i + float2(0.0, 1.0);
|
||
float2 c3 = i + float2(1.0, 1.0);
|
||
float r0; Hash_Tchou_2_1_float(c0, r0);
|
||
float r1; Hash_Tchou_2_1_float(c1, r1);
|
||
float r2; Hash_Tchou_2_1_float(c2, r2);
|
||
float r3; Hash_Tchou_2_1_float(c3, r3);
|
||
float bottomOfGrid = lerp(r0, r1, f.x);
|
||
float topOfGrid = lerp(r2, r3, f.x);
|
||
float t = lerp(bottomOfGrid, topOfGrid, f.y);
|
||
return t;
|
||
}
|
||
|
||
void Unity_SimpleNoise_Deterministic_float(float2 UV, float Scale, out float Out)
|
||
{
|
||
float freq, amp;
|
||
Out = 0.0f;
|
||
freq = pow(2.0, float(0));
|
||
amp = pow(0.5, float(3-0));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
freq = pow(2.0, float(1));
|
||
amp = pow(0.5, float(3-1));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
freq = pow(2.0, float(2));
|
||
amp = pow(0.5, float(3-2));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
}
|
||
|
||
void Unity_Multiply_float3_float3(float3 A, float3 B, out float3 Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
void Unity_Add_float3(float3 A, float3 B, out float3 Out)
|
||
{
|
||
Out = A + B;
|
||
}
|
||
|
||
void Unity_Branch_float3(float Predicate, float3 True, float3 False, out float3 Out)
|
||
{
|
||
Out = Predicate ? True : False;
|
||
}
|
||
|
||
void Unity_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
|
||
{
|
||
Out = UV * Tiling + Offset;
|
||
}
|
||
|
||
void Unity_Multiply_float4_float4(float4 A, float4 B, out float4 Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
void Unity_Add_float(float A, float B, out float Out)
|
||
{
|
||
Out = A + B;
|
||
}
|
||
|
||
void Unity_Smoothstep_float(float Edge1, float Edge2, float In, out float Out)
|
||
{
|
||
Out = smoothstep(Edge1, Edge2, In);
|
||
}
|
||
|
||
// Custom interpolators pre vertex
|
||
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
|
||
|
||
// Graph Vertex
|
||
struct VertexDescription
|
||
{
|
||
float3 Position;
|
||
float3 Normal;
|
||
float3 Tangent;
|
||
};
|
||
|
||
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
|
||
{
|
||
VertexDescription description = (VertexDescription)0;
|
||
float _Property_a85d0177ea0341d9a0a80ed35edb2c8a_Out_0_Boolean = _Vertex_Offset;
|
||
float4 _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4 = IN.uv1;
|
||
float _Split_d2412a890bef4daf877bc52848883f38_R_1_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[0];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_G_2_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[1];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_B_3_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[2];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_A_4_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[3];
|
||
float _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float;
|
||
Unity_Multiply_float_float(IN.TimeParameters.x, _Split_d2412a890bef4daf877bc52848883f38_A_4_Float, _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float);
|
||
float _SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float;
|
||
Unity_SimpleNoise_Deterministic_float((IN.ObjectSpacePosition.xy), _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float, _SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float);
|
||
float3 _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3;
|
||
Unity_Multiply_float3_float3(IN.WorldSpaceNormal, (_SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float.xxx), _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3);
|
||
float3 _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3;
|
||
Unity_Add_float3(IN.ObjectSpacePosition, _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3, _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3);
|
||
float3 _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3;
|
||
Unity_Branch_float3(_Property_a85d0177ea0341d9a0a80ed35edb2c8a_Out_0_Boolean, _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3, IN.ObjectSpacePosition, _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3);
|
||
description.Position = _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3;
|
||
description.Normal = IN.ObjectSpaceNormal;
|
||
description.Tangent = IN.ObjectSpaceTangent;
|
||
return description;
|
||
}
|
||
|
||
// Custom interpolators, pre surface
|
||
#ifdef FEATURES_GRAPH_VERTEX
|
||
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
|
||
{
|
||
return output;
|
||
}
|
||
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
|
||
#endif
|
||
|
||
// Graph Pixel
|
||
struct SurfaceDescription
|
||
{
|
||
float Alpha;
|
||
float AlphaClipThreshold;
|
||
};
|
||
|
||
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
||
{
|
||
SurfaceDescription surface = (SurfaceDescription)0;
|
||
UnityTexture2D _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_Main_Texture);
|
||
float4 _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4 = IN.uv0;
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_R_1_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[0];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_G_2_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[1];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_B_3_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[2];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_A_4_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[3];
|
||
float2 _Vector2_3b7618a9a80f44f8937bf30595ad7e38_Out_0_Vector2 = float2(_Split_88edf1e1762f4685b6a05e3c49b4a79b_B_3_Float, _Split_88edf1e1762f4685b6a05e3c49b4a79b_A_4_Float);
|
||
float2 _TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2;
|
||
Unity_TilingAndOffset_float(IN.uv0.xy, float2 (1, 1), _Vector2_3b7618a9a80f44f8937bf30595ad7e38_Out_0_Vector2, _TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2);
|
||
float4 _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.tex, _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.samplerstate, _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2) );
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_R_4_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.r;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_G_5_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.g;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_B_6_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.b;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_A_7_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.a;
|
||
float4 _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4;
|
||
Unity_Multiply_float4_float4(IN.VertexColor, _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4, _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4);
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_R_1_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[0];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_G_2_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[1];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_B_3_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[2];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_A_4_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[3];
|
||
float4 _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4 = IN.uv1;
|
||
float _Split_b444b317981f46f1958301bf94b38de1_R_1_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[0];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_G_2_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[1];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_B_3_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[2];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_A_4_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[3];
|
||
float _Add_66fb86a088584979815762970a1803f5_Out_2_Float;
|
||
Unity_Add_float(_Split_b444b317981f46f1958301bf94b38de1_R_1_Float, _Split_b444b317981f46f1958301bf94b38de1_G_2_Float, _Add_66fb86a088584979815762970a1803f5_Out_2_Float);
|
||
UnityTexture2D _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_Dissolve_Texture);
|
||
float4 _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.tex, _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.samplerstate, _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2) );
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_R_4_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.r;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_G_5_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.g;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_B_6_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.b;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_A_7_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.a;
|
||
float _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float;
|
||
Unity_Smoothstep_float(_Split_b444b317981f46f1958301bf94b38de1_R_1_Float, _Add_66fb86a088584979815762970a1803f5_Out_2_Float, _SampleTexture2D_755ae0396640490095bbe69901c64485_R_4_Float, _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float);
|
||
float _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float;
|
||
Unity_Multiply_float_float(_Split_6a09d55e29c94fef8172d229eb37fff4_A_4_Float, _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float, _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float);
|
||
surface.Alpha = _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float;
|
||
surface.AlphaClipThreshold = float(0.5);
|
||
return surface;
|
||
}
|
||
|
||
// --------------------------------------------------
|
||
// Build Graph Inputs
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#define VFX_SRP_ATTRIBUTES Attributes
|
||
#define VFX_SRP_VARYINGS Varyings
|
||
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
|
||
#endif
|
||
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
|
||
{
|
||
VertexDescriptionInputs output;
|
||
ZERO_INITIALIZE(VertexDescriptionInputs, output);
|
||
|
||
output.ObjectSpaceNormal = input.normalOS;
|
||
output.WorldSpaceNormal = TransformObjectToWorldNormal(input.normalOS);
|
||
output.ObjectSpaceTangent = input.tangentOS.xyz;
|
||
output.ObjectSpacePosition = input.positionOS;
|
||
output.uv1 = input.uv1;
|
||
output.TimeParameters = _TimeParameters.xyz;
|
||
#if UNITY_ANY_INSTANCING_ENABLED
|
||
#else // TODO: XR support for procedural instancing because in this case UNITY_ANY_INSTANCING_ENABLED is not defined and instanceID is incorrect.
|
||
#endif
|
||
|
||
return output;
|
||
}
|
||
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
|
||
{
|
||
SurfaceDescriptionInputs output;
|
||
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
||
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#if VFX_USE_GRAPH_VALUES
|
||
uint instanceActiveIndex = asuint(UNITY_ACCESS_INSTANCED_PROP(PerInstance, _InstanceActiveIndex));
|
||
/* WARNING: $splice Could not find named fragment 'VFXLoadGraphValues' */
|
||
#endif
|
||
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
|
||
|
||
#endif
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
#if UNITY_UV_STARTS_AT_TOP
|
||
#else
|
||
#endif
|
||
|
||
|
||
output.uv0 = input.texCoord0;
|
||
output.uv1 = input.texCoord1;
|
||
output.VertexColor = input.color;
|
||
#if UNITY_ANY_INSTANCING_ENABLED
|
||
#else // TODO: XR support for procedural instancing because in this case UNITY_ANY_INSTANCING_ENABLED is not defined and instanceID is incorrect.
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
|
||
#else
|
||
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
|
||
#endif
|
||
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
|
||
|
||
return output;
|
||
}
|
||
|
||
// --------------------------------------------------
|
||
// Main
|
||
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShadowCasterPass.hlsl"
|
||
|
||
// --------------------------------------------------
|
||
// Visual Effect Vertex Invocations
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
|
||
#endif
|
||
|
||
ENDHLSL
|
||
}
|
||
Pass
|
||
{
|
||
Name "GBuffer"
|
||
Tags
|
||
{
|
||
"LightMode" = "UniversalGBuffer"
|
||
}
|
||
|
||
// Render State
|
||
Cull [_Cull]
|
||
Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha]
|
||
ZTest Always
|
||
ZWrite [_ZWrite]
|
||
|
||
// [GroundVFX] 캐릭터(Stencil Ref 221) 위에 안 그<><EAB7B8>지도록
|
||
Stencil
|
||
{
|
||
Ref 221
|
||
ReadMask 221
|
||
Comp NotEqual
|
||
Pass Keep
|
||
}
|
||
|
||
// Debug
|
||
// <None>
|
||
|
||
// --------------------------------------------------
|
||
// Pass
|
||
|
||
HLSLPROGRAM
|
||
|
||
// Pragmas
|
||
#pragma target 4.5
|
||
#pragma exclude_renderers gles3 glcore
|
||
#pragma multi_compile_instancing
|
||
#pragma instancing_options renderinglayer
|
||
#pragma vertex vert
|
||
#pragma fragment frag
|
||
|
||
// Keywords
|
||
#pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
|
||
#pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION
|
||
#pragma multi_compile_fragment _ _RENDER_PASS_ENABLED
|
||
#pragma multi_compile_fragment _ _GBUFFER_NORMALS_OCT
|
||
#pragma multi_compile _ SHADOWS_SHADOWMASK
|
||
#pragma shader_feature_fragment _ _SURFACE_TYPE_TRANSPARENT
|
||
#pragma shader_feature_local_fragment _ _ALPHAPREMULTIPLY_ON
|
||
#pragma shader_feature_local_fragment _ _ALPHAMODULATE_ON
|
||
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
|
||
// GraphKeywords: <None>
|
||
|
||
// Defines
|
||
|
||
#define ATTRIBUTES_NEED_NORMAL
|
||
#define ATTRIBUTES_NEED_TANGENT
|
||
#define ATTRIBUTES_NEED_TEXCOORD0
|
||
#define ATTRIBUTES_NEED_TEXCOORD1
|
||
#define ATTRIBUTES_NEED_TEXCOORD2
|
||
#define ATTRIBUTES_NEED_COLOR
|
||
#define GRAPH_VERTEX_USES_TIME_PARAMETERS_INPUT
|
||
#define FEATURES_GRAPH_VERTEX_NORMAL_OUTPUT
|
||
#define FEATURES_GRAPH_VERTEX_TANGENT_OUTPUT
|
||
#define VARYINGS_NEED_POSITION_WS
|
||
#define VARYINGS_NEED_NORMAL_WS
|
||
#define VARYINGS_NEED_TEXCOORD0
|
||
#define VARYINGS_NEED_TEXCOORD1
|
||
#define VARYINGS_NEED_TEXCOORD2
|
||
#define VARYINGS_NEED_COLOR
|
||
#define FEATURES_GRAPH_VERTEX
|
||
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
|
||
#define SHADERPASS SHADERPASS_GBUFFER
|
||
#define REQUIRE_DEPTH_TEXTURE
|
||
#define REQUIRE_OPAQUE_TEXTURE
|
||
|
||
|
||
// custom interpolator pre-include
|
||
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
|
||
|
||
// Includes
|
||
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
|
||
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||
|
||
// --------------------------------------------------
|
||
// Structs and Packing
|
||
|
||
// custom interpolators pre packing
|
||
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
|
||
|
||
struct Attributes
|
||
{
|
||
float3 positionOS : POSITION;
|
||
float3 normalOS : NORMAL;
|
||
float4 tangentOS : TANGENT;
|
||
float4 uv0 : TEXCOORD0;
|
||
float4 uv1 : TEXCOORD1;
|
||
float4 uv2 : TEXCOORD2;
|
||
float4 color : COLOR;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(ATTRIBUTES_NEED_INSTANCEID)
|
||
uint instanceID : INSTANCEID_SEMANTIC;
|
||
#endif
|
||
};
|
||
struct Varyings
|
||
{
|
||
float4 positionCS : SV_POSITION;
|
||
float3 positionWS;
|
||
float3 normalWS;
|
||
float4 texCoord0;
|
||
float4 texCoord1;
|
||
float4 texCoord2;
|
||
float4 color;
|
||
#if !defined(LIGHTMAP_ON)
|
||
float3 sh;
|
||
#endif
|
||
#if defined(USE_APV_PROBE_OCCLUSION)
|
||
float4 probeOcclusion;
|
||
#endif
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
uint instanceID : CUSTOM_INSTANCE_ID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
|
||
#endif
|
||
};
|
||
struct SurfaceDescriptionInputs
|
||
{
|
||
float3 WorldSpacePosition;
|
||
float4 ScreenPosition;
|
||
float2 NDCPosition;
|
||
float2 PixelPosition;
|
||
float4 uv0;
|
||
float4 uv1;
|
||
float4 uv2;
|
||
float4 VertexColor;
|
||
float3 TimeParameters;
|
||
};
|
||
struct VertexDescriptionInputs
|
||
{
|
||
float3 ObjectSpaceNormal;
|
||
float3 WorldSpaceNormal;
|
||
float3 ObjectSpaceTangent;
|
||
float3 ObjectSpacePosition;
|
||
float4 uv1;
|
||
float3 TimeParameters;
|
||
};
|
||
struct PackedVaryings
|
||
{
|
||
float4 positionCS : SV_POSITION;
|
||
#if !defined(LIGHTMAP_ON)
|
||
float3 sh : INTERP0;
|
||
#endif
|
||
#if defined(USE_APV_PROBE_OCCLUSION)
|
||
float4 probeOcclusion : INTERP1;
|
||
#endif
|
||
float4 texCoord0 : INTERP2;
|
||
float4 texCoord1 : INTERP3;
|
||
float4 texCoord2 : INTERP4;
|
||
float4 color : INTERP5;
|
||
float3 positionWS : INTERP6;
|
||
float3 normalWS : INTERP7;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
uint instanceID : CUSTOM_INSTANCE_ID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
|
||
#endif
|
||
};
|
||
|
||
PackedVaryings PackVaryings (Varyings input)
|
||
{
|
||
PackedVaryings output;
|
||
ZERO_INITIALIZE(PackedVaryings, output);
|
||
output.positionCS = input.positionCS;
|
||
#if !defined(LIGHTMAP_ON)
|
||
output.sh = input.sh;
|
||
#endif
|
||
#if defined(USE_APV_PROBE_OCCLUSION)
|
||
output.probeOcclusion = input.probeOcclusion;
|
||
#endif
|
||
output.texCoord0.xyzw = input.texCoord0;
|
||
output.texCoord1.xyzw = input.texCoord1;
|
||
output.texCoord2.xyzw = input.texCoord2;
|
||
output.color.xyzw = input.color;
|
||
output.positionWS.xyz = input.positionWS;
|
||
output.normalWS.xyz = input.normalWS;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
output.instanceID = input.instanceID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
output.cullFace = input.cullFace;
|
||
#endif
|
||
return output;
|
||
}
|
||
|
||
Varyings UnpackVaryings (PackedVaryings input)
|
||
{
|
||
Varyings output;
|
||
output.positionCS = input.positionCS;
|
||
#if !defined(LIGHTMAP_ON)
|
||
output.sh = input.sh;
|
||
#endif
|
||
#if defined(USE_APV_PROBE_OCCLUSION)
|
||
output.probeOcclusion = input.probeOcclusion;
|
||
#endif
|
||
output.texCoord0 = input.texCoord0.xyzw;
|
||
output.texCoord1 = input.texCoord1.xyzw;
|
||
output.texCoord2 = input.texCoord2.xyzw;
|
||
output.color = input.color.xyzw;
|
||
output.positionWS = input.positionWS.xyz;
|
||
output.normalWS = input.normalWS.xyz;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
output.instanceID = input.instanceID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
output.cullFace = input.cullFace;
|
||
#endif
|
||
return output;
|
||
}
|
||
|
||
|
||
// --------------------------------------------------
|
||
// Graph
|
||
|
||
// Graph Properties
|
||
CBUFFER_START(UnityPerMaterial)
|
||
float4 _Main_Texture_TexelSize;
|
||
float4 _Dissolve_Texture_TexelSize;
|
||
float _Depth_Fade_Factor;
|
||
float _Distort;
|
||
float _Vertex_Offset;
|
||
float4 _Distortion_Noise_TexelSize;
|
||
float4 _Color_Mask_TexelSize;
|
||
float4 _Hue_shift;
|
||
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
||
CBUFFER_END
|
||
|
||
|
||
// Object and Global properties
|
||
SAMPLER(SamplerState_Linear_Repeat);
|
||
TEXTURE2D(_Main_Texture);
|
||
SAMPLER(sampler_Main_Texture);
|
||
TEXTURE2D(_Dissolve_Texture);
|
||
SAMPLER(sampler_Dissolve_Texture);
|
||
TEXTURE2D(_Distortion_Noise);
|
||
SAMPLER(sampler_Distortion_Noise);
|
||
TEXTURE2D(_Color_Mask);
|
||
SAMPLER(sampler_Color_Mask);
|
||
|
||
// Graph Includes
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl"
|
||
|
||
// -- Property used by ScenePickingPass
|
||
#ifdef SCENEPICKINGPASS
|
||
float4 _SelectionID;
|
||
#endif
|
||
|
||
// -- Properties used by SceneSelectionPass
|
||
#ifdef SCENESELECTIONPASS
|
||
int _ObjectId;
|
||
int _PassValue;
|
||
#endif
|
||
|
||
// Graph Functions
|
||
|
||
void Unity_Multiply_float_float(float A, float B, out float Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
float Unity_SimpleNoise_ValueNoise_Deterministic_float (float2 uv)
|
||
{
|
||
float2 i = floor(uv);
|
||
float2 f = frac(uv);
|
||
f = f * f * (3.0 - 2.0 * f);
|
||
uv = abs(frac(uv) - 0.5);
|
||
float2 c0 = i + float2(0.0, 0.0);
|
||
float2 c1 = i + float2(1.0, 0.0);
|
||
float2 c2 = i + float2(0.0, 1.0);
|
||
float2 c3 = i + float2(1.0, 1.0);
|
||
float r0; Hash_Tchou_2_1_float(c0, r0);
|
||
float r1; Hash_Tchou_2_1_float(c1, r1);
|
||
float r2; Hash_Tchou_2_1_float(c2, r2);
|
||
float r3; Hash_Tchou_2_1_float(c3, r3);
|
||
float bottomOfGrid = lerp(r0, r1, f.x);
|
||
float topOfGrid = lerp(r2, r3, f.x);
|
||
float t = lerp(bottomOfGrid, topOfGrid, f.y);
|
||
return t;
|
||
}
|
||
|
||
void Unity_SimpleNoise_Deterministic_float(float2 UV, float Scale, out float Out)
|
||
{
|
||
float freq, amp;
|
||
Out = 0.0f;
|
||
freq = pow(2.0, float(0));
|
||
amp = pow(0.5, float(3-0));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
freq = pow(2.0, float(1));
|
||
amp = pow(0.5, float(3-1));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
freq = pow(2.0, float(2));
|
||
amp = pow(0.5, float(3-2));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
}
|
||
|
||
void Unity_Multiply_float3_float3(float3 A, float3 B, out float3 Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
void Unity_Add_float3(float3 A, float3 B, out float3 Out)
|
||
{
|
||
Out = A + B;
|
||
}
|
||
|
||
void Unity_Branch_float3(float Predicate, float3 True, float3 False, out float3 Out)
|
||
{
|
||
Out = Predicate ? True : False;
|
||
}
|
||
|
||
void Unity_Twirl_float(float2 UV, float2 Center, float Strength, float2 Offset, out float2 Out)
|
||
{
|
||
float2 delta = UV - Center;
|
||
float angle = Strength * length(delta);
|
||
float x = cos(angle) * delta.x - sin(angle) * delta.y;
|
||
float y = sin(angle) * delta.x + cos(angle) * delta.y;
|
||
Out = float2(x + Center.x + Offset.x, y + Center.y + Offset.y);
|
||
}
|
||
|
||
void Unity_NormalFromTexture_float(TEXTURE2D_PARAM(Texture, Sampler), float2 UV, float Offset, float Strength, out float3 Out)
|
||
{
|
||
Offset = pow(Offset, 3) * 0.1;
|
||
float2 offsetU = float2(UV.x + Offset, UV.y);
|
||
float2 offsetV = float2(UV.x, UV.y + Offset);
|
||
float normalSample = SAMPLE_TEXTURE2D(Texture, Sampler, UV).r;
|
||
float uSample = SAMPLE_TEXTURE2D(Texture, Sampler, offsetU).r;
|
||
float vSample = SAMPLE_TEXTURE2D(Texture, Sampler, offsetV).r;
|
||
float3 va = float3(1, 0, (uSample - normalSample) * Strength);
|
||
float3 vb = float3(0, 1, (vSample - normalSample) * Strength);
|
||
Out = normalize(cross(va, vb));
|
||
}
|
||
|
||
void Unity_SceneColor_float(float4 UV, out float3 Out)
|
||
{
|
||
Out = SHADERGRAPH_SAMPLE_SCENE_COLOR(UV.xy);
|
||
}
|
||
|
||
void Unity_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
|
||
{
|
||
Out = UV * Tiling + Offset;
|
||
}
|
||
|
||
void Unity_Multiply_float4_float4(float4 A, float4 B, out float4 Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
void Unity_Clamp_float(float In, float Min, float Max, out float Out)
|
||
{
|
||
Out = clamp(In, Min, Max);
|
||
}
|
||
|
||
void Unity_SceneDepth_Eye_float(float4 UV, out float Out)
|
||
{
|
||
if (unity_OrthoParams.w == 1.0)
|
||
{
|
||
Out = LinearEyeDepth(ComputeWorldSpacePosition(UV.xy, SHADERGRAPH_SAMPLE_SCENE_DEPTH(UV.xy), UNITY_MATRIX_I_VP), UNITY_MATRIX_V);
|
||
}
|
||
else
|
||
{
|
||
Out = LinearEyeDepth(SHADERGRAPH_SAMPLE_SCENE_DEPTH(UV.xy), _ZBufferParams);
|
||
}
|
||
}
|
||
|
||
void Unity_Subtract_float(float A, float B, out float Out)
|
||
{
|
||
Out = A - B;
|
||
}
|
||
|
||
void Unity_Divide_float(float A, float B, out float Out)
|
||
{
|
||
Out = A / B;
|
||
}
|
||
|
||
void Unity_Saturate_float(float In, out float Out)
|
||
{
|
||
Out = saturate(In);
|
||
}
|
||
|
||
void Unity_Add_float(float A, float B, out float Out)
|
||
{
|
||
Out = A + B;
|
||
}
|
||
|
||
void Unity_Smoothstep_float(float Edge1, float Edge2, float In, out float Out)
|
||
{
|
||
Out = smoothstep(Edge1, Edge2, In);
|
||
}
|
||
|
||
// Custom interpolators pre vertex
|
||
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
|
||
|
||
// Graph Vertex
|
||
struct VertexDescription
|
||
{
|
||
float3 Position;
|
||
float3 Normal;
|
||
float3 Tangent;
|
||
};
|
||
|
||
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
|
||
{
|
||
VertexDescription description = (VertexDescription)0;
|
||
float _Property_a85d0177ea0341d9a0a80ed35edb2c8a_Out_0_Boolean = _Vertex_Offset;
|
||
float4 _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4 = IN.uv1;
|
||
float _Split_d2412a890bef4daf877bc52848883f38_R_1_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[0];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_G_2_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[1];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_B_3_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[2];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_A_4_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[3];
|
||
float _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float;
|
||
Unity_Multiply_float_float(IN.TimeParameters.x, _Split_d2412a890bef4daf877bc52848883f38_A_4_Float, _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float);
|
||
float _SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float;
|
||
Unity_SimpleNoise_Deterministic_float((IN.ObjectSpacePosition.xy), _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float, _SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float);
|
||
float3 _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3;
|
||
Unity_Multiply_float3_float3(IN.WorldSpaceNormal, (_SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float.xxx), _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3);
|
||
float3 _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3;
|
||
Unity_Add_float3(IN.ObjectSpacePosition, _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3, _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3);
|
||
float3 _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3;
|
||
Unity_Branch_float3(_Property_a85d0177ea0341d9a0a80ed35edb2c8a_Out_0_Boolean, _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3, IN.ObjectSpacePosition, _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3);
|
||
description.Position = _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3;
|
||
description.Normal = IN.ObjectSpaceNormal;
|
||
description.Tangent = IN.ObjectSpaceTangent;
|
||
return description;
|
||
}
|
||
|
||
// Custom interpolators, pre surface
|
||
#ifdef FEATURES_GRAPH_VERTEX
|
||
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
|
||
{
|
||
return output;
|
||
}
|
||
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
|
||
#endif
|
||
|
||
// Graph Pixel
|
||
struct SurfaceDescription
|
||
{
|
||
float3 BaseColor;
|
||
float Alpha;
|
||
float AlphaClipThreshold;
|
||
};
|
||
|
||
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
||
{
|
||
SurfaceDescription surface = (SurfaceDescription)0;
|
||
float _Property_78804880cedc47fdbd69823b872b9e1d_Out_0_Boolean = _Distort;
|
||
float4 _ScreenPosition_314475fc06764cd696bcb0f051af688d_Out_0_Vector4 = float4(IN.NDCPosition.xy, 0, 0);
|
||
UnityTexture2D _Property_fd6dac2eb5684f44b017c1784bea81d7_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_Distortion_Noise);
|
||
float _Multiply_d2d103e49eac44d0b1584b206c0dc171_Out_2_Float;
|
||
Unity_Multiply_float_float(1, IN.TimeParameters.x, _Multiply_d2d103e49eac44d0b1584b206c0dc171_Out_2_Float);
|
||
float2 _Twirl_604dcecc3b8749e3a7a70bd8524db3c7_Out_4_Vector2;
|
||
Unity_Twirl_float(IN.uv0.xy, float2 (0.5, 0.5), float(5), (_Multiply_d2d103e49eac44d0b1584b206c0dc171_Out_2_Float.xx), _Twirl_604dcecc3b8749e3a7a70bd8524db3c7_Out_4_Vector2);
|
||
float4 _UV_22e830f19205444ba2e6ea8e08a7d384_Out_0_Vector4 = IN.uv2;
|
||
float _Split_dd61a7836c0d4dd0af69acff06b02195_R_1_Float = _UV_22e830f19205444ba2e6ea8e08a7d384_Out_0_Vector4[0];
|
||
float _Split_dd61a7836c0d4dd0af69acff06b02195_G_2_Float = _UV_22e830f19205444ba2e6ea8e08a7d384_Out_0_Vector4[1];
|
||
float _Split_dd61a7836c0d4dd0af69acff06b02195_B_3_Float = _UV_22e830f19205444ba2e6ea8e08a7d384_Out_0_Vector4[2];
|
||
float _Split_dd61a7836c0d4dd0af69acff06b02195_A_4_Float = _UV_22e830f19205444ba2e6ea8e08a7d384_Out_0_Vector4[3];
|
||
float _Multiply_79d07365e21043b38f724b8b8ef99abf_Out_2_Float;
|
||
Unity_Multiply_float_float(_Split_dd61a7836c0d4dd0af69acff06b02195_G_2_Float, 0.1, _Multiply_79d07365e21043b38f724b8b8ef99abf_Out_2_Float);
|
||
float4 _UV_8a8370844fe34de7ad6269dae77ba12a_Out_0_Vector4 = IN.uv2;
|
||
float _Split_013c8550ee754fcab89ba2a9e3ca7117_R_1_Float = _UV_8a8370844fe34de7ad6269dae77ba12a_Out_0_Vector4[0];
|
||
float _Split_013c8550ee754fcab89ba2a9e3ca7117_G_2_Float = _UV_8a8370844fe34de7ad6269dae77ba12a_Out_0_Vector4[1];
|
||
float _Split_013c8550ee754fcab89ba2a9e3ca7117_B_3_Float = _UV_8a8370844fe34de7ad6269dae77ba12a_Out_0_Vector4[2];
|
||
float _Split_013c8550ee754fcab89ba2a9e3ca7117_A_4_Float = _UV_8a8370844fe34de7ad6269dae77ba12a_Out_0_Vector4[3];
|
||
float _Multiply_5ddbe47697014ff59e00b3c4ef78d7b5_Out_2_Float;
|
||
Unity_Multiply_float_float(_Split_013c8550ee754fcab89ba2a9e3ca7117_R_1_Float, 0.01, _Multiply_5ddbe47697014ff59e00b3c4ef78d7b5_Out_2_Float);
|
||
float3 _NormalFromTexture_013a78afb6074711a80a448e3642e406_Out_5_Vector3;
|
||
Unity_NormalFromTexture_float(TEXTURE2D_ARGS(_Property_fd6dac2eb5684f44b017c1784bea81d7_Out_0_Texture2D.tex, _Property_fd6dac2eb5684f44b017c1784bea81d7_Out_0_Texture2D.samplerstate), _Property_fd6dac2eb5684f44b017c1784bea81d7_Out_0_Texture2D.GetTransformedUV(_Twirl_604dcecc3b8749e3a7a70bd8524db3c7_Out_4_Vector2), _Multiply_79d07365e21043b38f724b8b8ef99abf_Out_2_Float, _Multiply_5ddbe47697014ff59e00b3c4ef78d7b5_Out_2_Float, _NormalFromTexture_013a78afb6074711a80a448e3642e406_Out_5_Vector3);
|
||
float3 _Multiply_a3bebb9cbf564bc49c85414f4893d4c1_Out_2_Vector3;
|
||
Unity_Multiply_float3_float3((_ScreenPosition_314475fc06764cd696bcb0f051af688d_Out_0_Vector4.xyz), _NormalFromTexture_013a78afb6074711a80a448e3642e406_Out_5_Vector3, _Multiply_a3bebb9cbf564bc49c85414f4893d4c1_Out_2_Vector3);
|
||
float3 _Add_074f843d89ea44908b33d5cc2d28b7b8_Out_2_Vector3;
|
||
Unity_Add_float3((_ScreenPosition_314475fc06764cd696bcb0f051af688d_Out_0_Vector4.xyz), _Multiply_a3bebb9cbf564bc49c85414f4893d4c1_Out_2_Vector3, _Add_074f843d89ea44908b33d5cc2d28b7b8_Out_2_Vector3);
|
||
float3 _SceneColor_209c40916111453eb1e0c580e4a9f27b_Out_1_Vector3;
|
||
Unity_SceneColor_float((float4(_Add_074f843d89ea44908b33d5cc2d28b7b8_Out_2_Vector3, 1.0)), _SceneColor_209c40916111453eb1e0c580e4a9f27b_Out_1_Vector3);
|
||
UnityTexture2D _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_Main_Texture);
|
||
float4 _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4 = IN.uv0;
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_R_1_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[0];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_G_2_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[1];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_B_3_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[2];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_A_4_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[3];
|
||
float2 _Vector2_3b7618a9a80f44f8937bf30595ad7e38_Out_0_Vector2 = float2(_Split_88edf1e1762f4685b6a05e3c49b4a79b_B_3_Float, _Split_88edf1e1762f4685b6a05e3c49b4a79b_A_4_Float);
|
||
float2 _TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2;
|
||
Unity_TilingAndOffset_float(IN.uv0.xy, float2 (1, 1), _Vector2_3b7618a9a80f44f8937bf30595ad7e38_Out_0_Vector2, _TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2);
|
||
float4 _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.tex, _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.samplerstate, _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2) );
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_R_4_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.r;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_G_5_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.g;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_B_6_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.b;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_A_7_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.a;
|
||
float4 _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4;
|
||
Unity_Multiply_float4_float4(IN.VertexColor, _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4, _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4);
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_R_1_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[0];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_G_2_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[1];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_B_3_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[2];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_A_4_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[3];
|
||
float3 _Vector3_c56d660d8d604b0095df913163d05636_Out_0_Vector3 = float3(_Split_6a09d55e29c94fef8172d229eb37fff4_R_1_Float, _Split_6a09d55e29c94fef8172d229eb37fff4_G_2_Float, _Split_6a09d55e29c94fef8172d229eb37fff4_B_3_Float);
|
||
float3 _Multiply_6b3b4c3d71ac403991dfa8448caf465d_Out_2_Vector3;
|
||
Unity_Multiply_float3_float3(float3(0, 0, 0), _Vector3_c56d660d8d604b0095df913163d05636_Out_0_Vector3, _Multiply_6b3b4c3d71ac403991dfa8448caf465d_Out_2_Vector3);
|
||
float3 _Add_acbcfe1a53394a188eb16f2205ba5fae_Out_2_Vector3;
|
||
Unity_Add_float3(_SceneColor_209c40916111453eb1e0c580e4a9f27b_Out_1_Vector3, _Multiply_6b3b4c3d71ac403991dfa8448caf465d_Out_2_Vector3, _Add_acbcfe1a53394a188eb16f2205ba5fae_Out_2_Vector3);
|
||
float4 _UV_b99c1e3fd7b14962b22510ab822596fa_Out_0_Vector4 = IN.uv1;
|
||
float _Split_d91e1a6788134a0db18458e2c9ffe1e2_R_1_Float = _UV_b99c1e3fd7b14962b22510ab822596fa_Out_0_Vector4[0];
|
||
float _Split_d91e1a6788134a0db18458e2c9ffe1e2_G_2_Float = _UV_b99c1e3fd7b14962b22510ab822596fa_Out_0_Vector4[1];
|
||
float _Split_d91e1a6788134a0db18458e2c9ffe1e2_B_3_Float = _UV_b99c1e3fd7b14962b22510ab822596fa_Out_0_Vector4[2];
|
||
float _Split_d91e1a6788134a0db18458e2c9ffe1e2_A_4_Float = _UV_b99c1e3fd7b14962b22510ab822596fa_Out_0_Vector4[3];
|
||
float _Clamp_8d3c85ef31db418187bf82aa0d05c018_Out_3_Float;
|
||
Unity_Clamp_float(_Split_d91e1a6788134a0db18458e2c9ffe1e2_B_3_Float, float(1), float(10), _Clamp_8d3c85ef31db418187bf82aa0d05c018_Out_3_Float);
|
||
float3 _Multiply_09fb4be9ffbf4d1a837e111a26a36d03_Out_2_Vector3;
|
||
Unity_Multiply_float3_float3((_Clamp_8d3c85ef31db418187bf82aa0d05c018_Out_3_Float.xxx), _Vector3_c56d660d8d604b0095df913163d05636_Out_0_Vector3, _Multiply_09fb4be9ffbf4d1a837e111a26a36d03_Out_2_Vector3);
|
||
float3 _Branch_585281afb21148e8850339e89a273dd4_Out_3_Vector3;
|
||
Unity_Branch_float3(_Property_78804880cedc47fdbd69823b872b9e1d_Out_0_Boolean, _Add_acbcfe1a53394a188eb16f2205ba5fae_Out_2_Vector3, _Multiply_09fb4be9ffbf4d1a837e111a26a36d03_Out_2_Vector3, _Branch_585281afb21148e8850339e89a273dd4_Out_3_Vector3);
|
||
float _SceneDepth_cbf4b7140c8747fba9e28c881275612c_Out_1_Float;
|
||
Unity_SceneDepth_Eye_float(float4(IN.NDCPosition.xy, 0, 0), _SceneDepth_cbf4b7140c8747fba9e28c881275612c_Out_1_Float);
|
||
float4 _ScreenPosition_c8c254b7170c483f9436f2a186f2f25f_Out_0_Vector4 = IN.ScreenPosition;
|
||
float _Split_6ebe6dd7c053473a86cc78d4af3b5456_R_1_Float = _ScreenPosition_c8c254b7170c483f9436f2a186f2f25f_Out_0_Vector4[0];
|
||
float _Split_6ebe6dd7c053473a86cc78d4af3b5456_G_2_Float = _ScreenPosition_c8c254b7170c483f9436f2a186f2f25f_Out_0_Vector4[1];
|
||
float _Split_6ebe6dd7c053473a86cc78d4af3b5456_B_3_Float = _ScreenPosition_c8c254b7170c483f9436f2a186f2f25f_Out_0_Vector4[2];
|
||
float _Split_6ebe6dd7c053473a86cc78d4af3b5456_A_4_Float = _ScreenPosition_c8c254b7170c483f9436f2a186f2f25f_Out_0_Vector4[3];
|
||
float _Subtract_205f8ae6662b43bd8bc6a9b7fe1df0bc_Out_2_Float;
|
||
Unity_Subtract_float(_SceneDepth_cbf4b7140c8747fba9e28c881275612c_Out_1_Float, _Split_6ebe6dd7c053473a86cc78d4af3b5456_A_4_Float, _Subtract_205f8ae6662b43bd8bc6a9b7fe1df0bc_Out_2_Float);
|
||
float _Property_32583f2525b14d90927281637ad7b962_Out_0_Float = _Depth_Fade_Factor;
|
||
float _Divide_89c4abebb8194b988799339162560ac4_Out_2_Float;
|
||
Unity_Divide_float(_Subtract_205f8ae6662b43bd8bc6a9b7fe1df0bc_Out_2_Float, _Property_32583f2525b14d90927281637ad7b962_Out_0_Float, _Divide_89c4abebb8194b988799339162560ac4_Out_2_Float);
|
||
float _Saturate_34122799a8de408ab780fb9e5fa36601_Out_1_Float;
|
||
Unity_Saturate_float(_Divide_89c4abebb8194b988799339162560ac4_Out_2_Float, _Saturate_34122799a8de408ab780fb9e5fa36601_Out_1_Float);
|
||
float3 _Multiply_a3558c8f5efb4581b510c889004960f7_Out_2_Vector3;
|
||
// [GroundVFX] Depth Fade 비활성화 - 지형 아래에서도 검정 안 나오도록
|
||
Unity_Multiply_float3_float3(_Branch_585281afb21148e8850339e89a273dd4_Out_3_Vector3, float3(1,1,1), _Multiply_a3558c8f5efb4581b510c889004960f7_Out_2_Vector3);
|
||
float4 _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4 = IN.uv1;
|
||
float _Split_b444b317981f46f1958301bf94b38de1_R_1_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[0];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_G_2_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[1];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_B_3_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[2];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_A_4_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[3];
|
||
float _Add_66fb86a088584979815762970a1803f5_Out_2_Float;
|
||
Unity_Add_float(_Split_b444b317981f46f1958301bf94b38de1_R_1_Float, _Split_b444b317981f46f1958301bf94b38de1_G_2_Float, _Add_66fb86a088584979815762970a1803f5_Out_2_Float);
|
||
UnityTexture2D _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_Dissolve_Texture);
|
||
float4 _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.tex, _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.samplerstate, _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2) );
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_R_4_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.r;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_G_5_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.g;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_B_6_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.b;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_A_7_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.a;
|
||
float _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float;
|
||
Unity_Smoothstep_float(_Split_b444b317981f46f1958301bf94b38de1_R_1_Float, _Add_66fb86a088584979815762970a1803f5_Out_2_Float, _SampleTexture2D_755ae0396640490095bbe69901c64485_R_4_Float, _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float);
|
||
float _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float;
|
||
Unity_Multiply_float_float(_Split_6a09d55e29c94fef8172d229eb37fff4_A_4_Float, _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float, _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float);
|
||
surface.BaseColor = _Multiply_a3558c8f5efb4581b510c889004960f7_Out_2_Vector3;
|
||
surface.Alpha = _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float;
|
||
surface.AlphaClipThreshold = float(0.5);
|
||
return surface;
|
||
}
|
||
|
||
// --------------------------------------------------
|
||
// Build Graph Inputs
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#define VFX_SRP_ATTRIBUTES Attributes
|
||
#define VFX_SRP_VARYINGS Varyings
|
||
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
|
||
#endif
|
||
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
|
||
{
|
||
VertexDescriptionInputs output;
|
||
ZERO_INITIALIZE(VertexDescriptionInputs, output);
|
||
|
||
output.ObjectSpaceNormal = input.normalOS;
|
||
output.WorldSpaceNormal = TransformObjectToWorldNormal(input.normalOS);
|
||
output.ObjectSpaceTangent = input.tangentOS.xyz;
|
||
output.ObjectSpacePosition = input.positionOS;
|
||
output.uv1 = input.uv1;
|
||
output.TimeParameters = _TimeParameters.xyz;
|
||
#if UNITY_ANY_INSTANCING_ENABLED
|
||
#else // TODO: XR support for procedural instancing because in this case UNITY_ANY_INSTANCING_ENABLED is not defined and instanceID is incorrect.
|
||
#endif
|
||
|
||
return output;
|
||
}
|
||
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
|
||
{
|
||
SurfaceDescriptionInputs output;
|
||
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
||
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#if VFX_USE_GRAPH_VALUES
|
||
uint instanceActiveIndex = asuint(UNITY_ACCESS_INSTANCED_PROP(PerInstance, _InstanceActiveIndex));
|
||
/* WARNING: $splice Could not find named fragment 'VFXLoadGraphValues' */
|
||
#endif
|
||
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
|
||
|
||
#endif
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
output.WorldSpacePosition = input.positionWS;
|
||
output.ScreenPosition = ComputeScreenPos(TransformWorldToHClip(input.positionWS), _ProjectionParams.x);
|
||
|
||
#if UNITY_UV_STARTS_AT_TOP
|
||
output.PixelPosition = float2(input.positionCS.x, (_ProjectionParams.x < 0) ? (_ScaledScreenParams.y - input.positionCS.y) : input.positionCS.y);
|
||
#else
|
||
output.PixelPosition = float2(input.positionCS.x, (_ProjectionParams.x > 0) ? (_ScaledScreenParams.y - input.positionCS.y) : input.positionCS.y);
|
||
#endif
|
||
|
||
output.NDCPosition = output.PixelPosition.xy / _ScaledScreenParams.xy;
|
||
output.NDCPosition.y = 1.0f - output.NDCPosition.y;
|
||
|
||
output.uv0 = input.texCoord0;
|
||
output.uv1 = input.texCoord1;
|
||
output.uv2 = input.texCoord2;
|
||
output.VertexColor = input.color;
|
||
#if UNITY_ANY_INSTANCING_ENABLED
|
||
#else // TODO: XR support for procedural instancing because in this case UNITY_ANY_INSTANCING_ENABLED is not defined and instanceID is incorrect.
|
||
#endif
|
||
output.TimeParameters = _TimeParameters.xyz; // This is mainly for LW as HD overwrite this value
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
|
||
#else
|
||
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
|
||
#endif
|
||
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
|
||
|
||
return output;
|
||
}
|
||
|
||
// --------------------------------------------------
|
||
// Main
|
||
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/UnlitGBufferPass.hlsl"
|
||
|
||
// --------------------------------------------------
|
||
// Visual Effect Vertex Invocations
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
|
||
#endif
|
||
|
||
ENDHLSL
|
||
}
|
||
Pass
|
||
{
|
||
Name "SceneSelectionPass"
|
||
Tags
|
||
{
|
||
"LightMode" = "SceneSelectionPass"
|
||
}
|
||
|
||
// Render State
|
||
Cull Off
|
||
|
||
// Debug
|
||
// <None>
|
||
|
||
// --------------------------------------------------
|
||
// Pass
|
||
|
||
HLSLPROGRAM
|
||
|
||
// Pragmas
|
||
#pragma target 2.0
|
||
#pragma vertex vert
|
||
#pragma fragment frag
|
||
|
||
// Keywords
|
||
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
|
||
// GraphKeywords: <None>
|
||
|
||
// Defines
|
||
|
||
#define ATTRIBUTES_NEED_NORMAL
|
||
#define ATTRIBUTES_NEED_TANGENT
|
||
#define ATTRIBUTES_NEED_TEXCOORD0
|
||
#define ATTRIBUTES_NEED_TEXCOORD1
|
||
#define ATTRIBUTES_NEED_COLOR
|
||
#define GRAPH_VERTEX_USES_TIME_PARAMETERS_INPUT
|
||
#define FEATURES_GRAPH_VERTEX_NORMAL_OUTPUT
|
||
#define FEATURES_GRAPH_VERTEX_TANGENT_OUTPUT
|
||
#define VARYINGS_NEED_TEXCOORD0
|
||
#define VARYINGS_NEED_TEXCOORD1
|
||
#define VARYINGS_NEED_COLOR
|
||
#define FEATURES_GRAPH_VERTEX
|
||
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
|
||
#define SHADERPASS SHADERPASS_DEPTHONLY
|
||
#define SCENESELECTIONPASS 1
|
||
#define ALPHA_CLIP_THRESHOLD 1
|
||
|
||
|
||
// custom interpolator pre-include
|
||
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
|
||
|
||
// Includes
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||
|
||
// --------------------------------------------------
|
||
// Structs and Packing
|
||
|
||
// custom interpolators pre packing
|
||
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
|
||
|
||
struct Attributes
|
||
{
|
||
float3 positionOS : POSITION;
|
||
float3 normalOS : NORMAL;
|
||
float4 tangentOS : TANGENT;
|
||
float4 uv0 : TEXCOORD0;
|
||
float4 uv1 : TEXCOORD1;
|
||
float4 color : COLOR;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(ATTRIBUTES_NEED_INSTANCEID)
|
||
uint instanceID : INSTANCEID_SEMANTIC;
|
||
#endif
|
||
};
|
||
struct Varyings
|
||
{
|
||
float4 positionCS : SV_POSITION;
|
||
float4 texCoord0;
|
||
float4 texCoord1;
|
||
float4 color;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
uint instanceID : CUSTOM_INSTANCE_ID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
|
||
#endif
|
||
};
|
||
struct SurfaceDescriptionInputs
|
||
{
|
||
float4 uv0;
|
||
float4 uv1;
|
||
float4 VertexColor;
|
||
};
|
||
struct VertexDescriptionInputs
|
||
{
|
||
float3 ObjectSpaceNormal;
|
||
float3 WorldSpaceNormal;
|
||
float3 ObjectSpaceTangent;
|
||
float3 ObjectSpacePosition;
|
||
float4 uv1;
|
||
float3 TimeParameters;
|
||
};
|
||
struct PackedVaryings
|
||
{
|
||
float4 positionCS : SV_POSITION;
|
||
float4 texCoord0 : INTERP0;
|
||
float4 texCoord1 : INTERP1;
|
||
float4 color : INTERP2;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
uint instanceID : CUSTOM_INSTANCE_ID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
|
||
#endif
|
||
};
|
||
|
||
PackedVaryings PackVaryings (Varyings input)
|
||
{
|
||
PackedVaryings output;
|
||
ZERO_INITIALIZE(PackedVaryings, output);
|
||
output.positionCS = input.positionCS;
|
||
output.texCoord0.xyzw = input.texCoord0;
|
||
output.texCoord1.xyzw = input.texCoord1;
|
||
output.color.xyzw = input.color;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
output.instanceID = input.instanceID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
output.cullFace = input.cullFace;
|
||
#endif
|
||
return output;
|
||
}
|
||
|
||
Varyings UnpackVaryings (PackedVaryings input)
|
||
{
|
||
Varyings output;
|
||
output.positionCS = input.positionCS;
|
||
output.texCoord0 = input.texCoord0.xyzw;
|
||
output.texCoord1 = input.texCoord1.xyzw;
|
||
output.color = input.color.xyzw;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
output.instanceID = input.instanceID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
output.cullFace = input.cullFace;
|
||
#endif
|
||
return output;
|
||
}
|
||
|
||
|
||
// --------------------------------------------------
|
||
// Graph
|
||
|
||
// Graph Properties
|
||
CBUFFER_START(UnityPerMaterial)
|
||
float4 _Main_Texture_TexelSize;
|
||
float4 _Dissolve_Texture_TexelSize;
|
||
float _Depth_Fade_Factor;
|
||
float _Distort;
|
||
float _Vertex_Offset;
|
||
float4 _Distortion_Noise_TexelSize;
|
||
float4 _Color_Mask_TexelSize;
|
||
float4 _Hue_shift;
|
||
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
||
CBUFFER_END
|
||
|
||
|
||
// Object and Global properties
|
||
SAMPLER(SamplerState_Linear_Repeat);
|
||
TEXTURE2D(_Main_Texture);
|
||
SAMPLER(sampler_Main_Texture);
|
||
TEXTURE2D(_Dissolve_Texture);
|
||
SAMPLER(sampler_Dissolve_Texture);
|
||
TEXTURE2D(_Distortion_Noise);
|
||
SAMPLER(sampler_Distortion_Noise);
|
||
TEXTURE2D(_Color_Mask);
|
||
SAMPLER(sampler_Color_Mask);
|
||
|
||
// Graph Includes
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl"
|
||
|
||
// -- Property used by ScenePickingPass
|
||
#ifdef SCENEPICKINGPASS
|
||
float4 _SelectionID;
|
||
#endif
|
||
|
||
// -- Properties used by SceneSelectionPass
|
||
#ifdef SCENESELECTIONPASS
|
||
int _ObjectId;
|
||
int _PassValue;
|
||
#endif
|
||
|
||
// Graph Functions
|
||
|
||
void Unity_Multiply_float_float(float A, float B, out float Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
float Unity_SimpleNoise_ValueNoise_Deterministic_float (float2 uv)
|
||
{
|
||
float2 i = floor(uv);
|
||
float2 f = frac(uv);
|
||
f = f * f * (3.0 - 2.0 * f);
|
||
uv = abs(frac(uv) - 0.5);
|
||
float2 c0 = i + float2(0.0, 0.0);
|
||
float2 c1 = i + float2(1.0, 0.0);
|
||
float2 c2 = i + float2(0.0, 1.0);
|
||
float2 c3 = i + float2(1.0, 1.0);
|
||
float r0; Hash_Tchou_2_1_float(c0, r0);
|
||
float r1; Hash_Tchou_2_1_float(c1, r1);
|
||
float r2; Hash_Tchou_2_1_float(c2, r2);
|
||
float r3; Hash_Tchou_2_1_float(c3, r3);
|
||
float bottomOfGrid = lerp(r0, r1, f.x);
|
||
float topOfGrid = lerp(r2, r3, f.x);
|
||
float t = lerp(bottomOfGrid, topOfGrid, f.y);
|
||
return t;
|
||
}
|
||
|
||
void Unity_SimpleNoise_Deterministic_float(float2 UV, float Scale, out float Out)
|
||
{
|
||
float freq, amp;
|
||
Out = 0.0f;
|
||
freq = pow(2.0, float(0));
|
||
amp = pow(0.5, float(3-0));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
freq = pow(2.0, float(1));
|
||
amp = pow(0.5, float(3-1));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
freq = pow(2.0, float(2));
|
||
amp = pow(0.5, float(3-2));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
}
|
||
|
||
void Unity_Multiply_float3_float3(float3 A, float3 B, out float3 Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
void Unity_Add_float3(float3 A, float3 B, out float3 Out)
|
||
{
|
||
Out = A + B;
|
||
}
|
||
|
||
void Unity_Branch_float3(float Predicate, float3 True, float3 False, out float3 Out)
|
||
{
|
||
Out = Predicate ? True : False;
|
||
}
|
||
|
||
void Unity_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
|
||
{
|
||
Out = UV * Tiling + Offset;
|
||
}
|
||
|
||
void Unity_Multiply_float4_float4(float4 A, float4 B, out float4 Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
void Unity_Add_float(float A, float B, out float Out)
|
||
{
|
||
Out = A + B;
|
||
}
|
||
|
||
void Unity_Smoothstep_float(float Edge1, float Edge2, float In, out float Out)
|
||
{
|
||
Out = smoothstep(Edge1, Edge2, In);
|
||
}
|
||
|
||
// Custom interpolators pre vertex
|
||
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
|
||
|
||
// Graph Vertex
|
||
struct VertexDescription
|
||
{
|
||
float3 Position;
|
||
float3 Normal;
|
||
float3 Tangent;
|
||
};
|
||
|
||
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
|
||
{
|
||
VertexDescription description = (VertexDescription)0;
|
||
float _Property_a85d0177ea0341d9a0a80ed35edb2c8a_Out_0_Boolean = _Vertex_Offset;
|
||
float4 _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4 = IN.uv1;
|
||
float _Split_d2412a890bef4daf877bc52848883f38_R_1_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[0];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_G_2_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[1];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_B_3_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[2];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_A_4_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[3];
|
||
float _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float;
|
||
Unity_Multiply_float_float(IN.TimeParameters.x, _Split_d2412a890bef4daf877bc52848883f38_A_4_Float, _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float);
|
||
float _SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float;
|
||
Unity_SimpleNoise_Deterministic_float((IN.ObjectSpacePosition.xy), _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float, _SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float);
|
||
float3 _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3;
|
||
Unity_Multiply_float3_float3(IN.WorldSpaceNormal, (_SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float.xxx), _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3);
|
||
float3 _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3;
|
||
Unity_Add_float3(IN.ObjectSpacePosition, _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3, _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3);
|
||
float3 _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3;
|
||
Unity_Branch_float3(_Property_a85d0177ea0341d9a0a80ed35edb2c8a_Out_0_Boolean, _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3, IN.ObjectSpacePosition, _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3);
|
||
description.Position = _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3;
|
||
description.Normal = IN.ObjectSpaceNormal;
|
||
description.Tangent = IN.ObjectSpaceTangent;
|
||
return description;
|
||
}
|
||
|
||
// Custom interpolators, pre surface
|
||
#ifdef FEATURES_GRAPH_VERTEX
|
||
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
|
||
{
|
||
return output;
|
||
}
|
||
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
|
||
#endif
|
||
|
||
// Graph Pixel
|
||
struct SurfaceDescription
|
||
{
|
||
float Alpha;
|
||
float AlphaClipThreshold;
|
||
};
|
||
|
||
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
||
{
|
||
SurfaceDescription surface = (SurfaceDescription)0;
|
||
UnityTexture2D _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_Main_Texture);
|
||
float4 _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4 = IN.uv0;
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_R_1_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[0];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_G_2_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[1];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_B_3_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[2];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_A_4_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[3];
|
||
float2 _Vector2_3b7618a9a80f44f8937bf30595ad7e38_Out_0_Vector2 = float2(_Split_88edf1e1762f4685b6a05e3c49b4a79b_B_3_Float, _Split_88edf1e1762f4685b6a05e3c49b4a79b_A_4_Float);
|
||
float2 _TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2;
|
||
Unity_TilingAndOffset_float(IN.uv0.xy, float2 (1, 1), _Vector2_3b7618a9a80f44f8937bf30595ad7e38_Out_0_Vector2, _TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2);
|
||
float4 _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.tex, _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.samplerstate, _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2) );
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_R_4_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.r;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_G_5_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.g;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_B_6_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.b;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_A_7_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.a;
|
||
float4 _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4;
|
||
Unity_Multiply_float4_float4(IN.VertexColor, _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4, _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4);
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_R_1_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[0];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_G_2_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[1];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_B_3_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[2];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_A_4_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[3];
|
||
float4 _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4 = IN.uv1;
|
||
float _Split_b444b317981f46f1958301bf94b38de1_R_1_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[0];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_G_2_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[1];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_B_3_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[2];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_A_4_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[3];
|
||
float _Add_66fb86a088584979815762970a1803f5_Out_2_Float;
|
||
Unity_Add_float(_Split_b444b317981f46f1958301bf94b38de1_R_1_Float, _Split_b444b317981f46f1958301bf94b38de1_G_2_Float, _Add_66fb86a088584979815762970a1803f5_Out_2_Float);
|
||
UnityTexture2D _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_Dissolve_Texture);
|
||
float4 _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.tex, _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.samplerstate, _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2) );
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_R_4_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.r;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_G_5_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.g;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_B_6_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.b;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_A_7_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.a;
|
||
float _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float;
|
||
Unity_Smoothstep_float(_Split_b444b317981f46f1958301bf94b38de1_R_1_Float, _Add_66fb86a088584979815762970a1803f5_Out_2_Float, _SampleTexture2D_755ae0396640490095bbe69901c64485_R_4_Float, _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float);
|
||
float _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float;
|
||
Unity_Multiply_float_float(_Split_6a09d55e29c94fef8172d229eb37fff4_A_4_Float, _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float, _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float);
|
||
surface.Alpha = _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float;
|
||
surface.AlphaClipThreshold = float(0.5);
|
||
return surface;
|
||
}
|
||
|
||
// --------------------------------------------------
|
||
// Build Graph Inputs
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#define VFX_SRP_ATTRIBUTES Attributes
|
||
#define VFX_SRP_VARYINGS Varyings
|
||
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
|
||
#endif
|
||
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
|
||
{
|
||
VertexDescriptionInputs output;
|
||
ZERO_INITIALIZE(VertexDescriptionInputs, output);
|
||
|
||
output.ObjectSpaceNormal = input.normalOS;
|
||
output.WorldSpaceNormal = TransformObjectToWorldNormal(input.normalOS);
|
||
output.ObjectSpaceTangent = input.tangentOS.xyz;
|
||
output.ObjectSpacePosition = input.positionOS;
|
||
output.uv1 = input.uv1;
|
||
output.TimeParameters = _TimeParameters.xyz;
|
||
#if UNITY_ANY_INSTANCING_ENABLED
|
||
#else // TODO: XR support for procedural instancing because in this case UNITY_ANY_INSTANCING_ENABLED is not defined and instanceID is incorrect.
|
||
#endif
|
||
|
||
return output;
|
||
}
|
||
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
|
||
{
|
||
SurfaceDescriptionInputs output;
|
||
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
||
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#if VFX_USE_GRAPH_VALUES
|
||
uint instanceActiveIndex = asuint(UNITY_ACCESS_INSTANCED_PROP(PerInstance, _InstanceActiveIndex));
|
||
/* WARNING: $splice Could not find named fragment 'VFXLoadGraphValues' */
|
||
#endif
|
||
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
|
||
|
||
#endif
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
#if UNITY_UV_STARTS_AT_TOP
|
||
#else
|
||
#endif
|
||
|
||
|
||
output.uv0 = input.texCoord0;
|
||
output.uv1 = input.texCoord1;
|
||
output.VertexColor = input.color;
|
||
#if UNITY_ANY_INSTANCING_ENABLED
|
||
#else // TODO: XR support for procedural instancing because in this case UNITY_ANY_INSTANCING_ENABLED is not defined and instanceID is incorrect.
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
|
||
#else
|
||
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
|
||
#endif
|
||
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
|
||
|
||
return output;
|
||
}
|
||
|
||
// --------------------------------------------------
|
||
// Main
|
||
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/SelectionPickingPass.hlsl"
|
||
|
||
// --------------------------------------------------
|
||
// Visual Effect Vertex Invocations
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
|
||
#endif
|
||
|
||
ENDHLSL
|
||
}
|
||
Pass
|
||
{
|
||
Name "ScenePickingPass"
|
||
Tags
|
||
{
|
||
"LightMode" = "Picking"
|
||
}
|
||
|
||
// Render State
|
||
Cull [_Cull]
|
||
|
||
// Debug
|
||
// <None>
|
||
|
||
// --------------------------------------------------
|
||
// Pass
|
||
|
||
HLSLPROGRAM
|
||
|
||
// Pragmas
|
||
#pragma target 2.0
|
||
#pragma vertex vert
|
||
#pragma fragment frag
|
||
|
||
// Keywords
|
||
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
|
||
// GraphKeywords: <None>
|
||
|
||
// Defines
|
||
|
||
#define ATTRIBUTES_NEED_NORMAL
|
||
#define ATTRIBUTES_NEED_TANGENT
|
||
#define ATTRIBUTES_NEED_TEXCOORD0
|
||
#define ATTRIBUTES_NEED_TEXCOORD1
|
||
#define ATTRIBUTES_NEED_TEXCOORD2
|
||
#define ATTRIBUTES_NEED_COLOR
|
||
#define GRAPH_VERTEX_USES_TIME_PARAMETERS_INPUT
|
||
#define FEATURES_GRAPH_VERTEX_NORMAL_OUTPUT
|
||
#define FEATURES_GRAPH_VERTEX_TANGENT_OUTPUT
|
||
#define VARYINGS_NEED_POSITION_WS
|
||
#define VARYINGS_NEED_TEXCOORD0
|
||
#define VARYINGS_NEED_TEXCOORD1
|
||
#define VARYINGS_NEED_TEXCOORD2
|
||
#define VARYINGS_NEED_COLOR
|
||
#define FEATURES_GRAPH_VERTEX
|
||
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
|
||
#define SHADERPASS SHADERPASS_DEPTHONLY
|
||
#define SCENEPICKINGPASS 1
|
||
#define ALPHA_CLIP_THRESHOLD 1
|
||
#define REQUIRE_DEPTH_TEXTURE
|
||
#define REQUIRE_OPAQUE_TEXTURE
|
||
|
||
|
||
// custom interpolator pre-include
|
||
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
|
||
|
||
// Includes
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||
|
||
// --------------------------------------------------
|
||
// Structs and Packing
|
||
|
||
// custom interpolators pre packing
|
||
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
|
||
|
||
struct Attributes
|
||
{
|
||
float3 positionOS : POSITION;
|
||
float3 normalOS : NORMAL;
|
||
float4 tangentOS : TANGENT;
|
||
float4 uv0 : TEXCOORD0;
|
||
float4 uv1 : TEXCOORD1;
|
||
float4 uv2 : TEXCOORD2;
|
||
float4 color : COLOR;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(ATTRIBUTES_NEED_INSTANCEID)
|
||
uint instanceID : INSTANCEID_SEMANTIC;
|
||
#endif
|
||
};
|
||
struct Varyings
|
||
{
|
||
float4 positionCS : SV_POSITION;
|
||
float3 positionWS;
|
||
float4 texCoord0;
|
||
float4 texCoord1;
|
||
float4 texCoord2;
|
||
float4 color;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
uint instanceID : CUSTOM_INSTANCE_ID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
|
||
#endif
|
||
};
|
||
struct SurfaceDescriptionInputs
|
||
{
|
||
float3 WorldSpacePosition;
|
||
float4 ScreenPosition;
|
||
float2 NDCPosition;
|
||
float2 PixelPosition;
|
||
float4 uv0;
|
||
float4 uv1;
|
||
float4 uv2;
|
||
float4 VertexColor;
|
||
float3 TimeParameters;
|
||
};
|
||
struct VertexDescriptionInputs
|
||
{
|
||
float3 ObjectSpaceNormal;
|
||
float3 WorldSpaceNormal;
|
||
float3 ObjectSpaceTangent;
|
||
float3 ObjectSpacePosition;
|
||
float4 uv1;
|
||
float3 TimeParameters;
|
||
};
|
||
struct PackedVaryings
|
||
{
|
||
float4 positionCS : SV_POSITION;
|
||
float4 texCoord0 : INTERP0;
|
||
float4 texCoord1 : INTERP1;
|
||
float4 texCoord2 : INTERP2;
|
||
float4 color : INTERP3;
|
||
float3 positionWS : INTERP4;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
uint instanceID : CUSTOM_INSTANCE_ID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
|
||
#endif
|
||
};
|
||
|
||
PackedVaryings PackVaryings (Varyings input)
|
||
{
|
||
PackedVaryings output;
|
||
ZERO_INITIALIZE(PackedVaryings, output);
|
||
output.positionCS = input.positionCS;
|
||
output.texCoord0.xyzw = input.texCoord0;
|
||
output.texCoord1.xyzw = input.texCoord1;
|
||
output.texCoord2.xyzw = input.texCoord2;
|
||
output.color.xyzw = input.color;
|
||
output.positionWS.xyz = input.positionWS;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
output.instanceID = input.instanceID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
output.cullFace = input.cullFace;
|
||
#endif
|
||
return output;
|
||
}
|
||
|
||
Varyings UnpackVaryings (PackedVaryings input)
|
||
{
|
||
Varyings output;
|
||
output.positionCS = input.positionCS;
|
||
output.texCoord0 = input.texCoord0.xyzw;
|
||
output.texCoord1 = input.texCoord1.xyzw;
|
||
output.texCoord2 = input.texCoord2.xyzw;
|
||
output.color = input.color.xyzw;
|
||
output.positionWS = input.positionWS.xyz;
|
||
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
||
output.instanceID = input.instanceID;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
|
||
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
|
||
#endif
|
||
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
|
||
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
|
||
#endif
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
output.cullFace = input.cullFace;
|
||
#endif
|
||
return output;
|
||
}
|
||
|
||
|
||
// --------------------------------------------------
|
||
// Graph
|
||
|
||
// Graph Properties
|
||
CBUFFER_START(UnityPerMaterial)
|
||
float4 _Main_Texture_TexelSize;
|
||
float4 _Dissolve_Texture_TexelSize;
|
||
float _Depth_Fade_Factor;
|
||
float _Distort;
|
||
float _Vertex_Offset;
|
||
float4 _Distortion_Noise_TexelSize;
|
||
float4 _Color_Mask_TexelSize;
|
||
float4 _Hue_shift;
|
||
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
||
CBUFFER_END
|
||
|
||
|
||
// Object and Global properties
|
||
SAMPLER(SamplerState_Linear_Repeat);
|
||
TEXTURE2D(_Main_Texture);
|
||
SAMPLER(sampler_Main_Texture);
|
||
TEXTURE2D(_Dissolve_Texture);
|
||
SAMPLER(sampler_Dissolve_Texture);
|
||
TEXTURE2D(_Distortion_Noise);
|
||
SAMPLER(sampler_Distortion_Noise);
|
||
TEXTURE2D(_Color_Mask);
|
||
SAMPLER(sampler_Color_Mask);
|
||
|
||
// Graph Includes
|
||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl"
|
||
|
||
// -- Property used by ScenePickingPass
|
||
#ifdef SCENEPICKINGPASS
|
||
float4 _SelectionID;
|
||
#endif
|
||
|
||
// -- Properties used by SceneSelectionPass
|
||
#ifdef SCENESELECTIONPASS
|
||
int _ObjectId;
|
||
int _PassValue;
|
||
#endif
|
||
|
||
// Graph Functions
|
||
|
||
void Unity_Multiply_float_float(float A, float B, out float Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
float Unity_SimpleNoise_ValueNoise_Deterministic_float (float2 uv)
|
||
{
|
||
float2 i = floor(uv);
|
||
float2 f = frac(uv);
|
||
f = f * f * (3.0 - 2.0 * f);
|
||
uv = abs(frac(uv) - 0.5);
|
||
float2 c0 = i + float2(0.0, 0.0);
|
||
float2 c1 = i + float2(1.0, 0.0);
|
||
float2 c2 = i + float2(0.0, 1.0);
|
||
float2 c3 = i + float2(1.0, 1.0);
|
||
float r0; Hash_Tchou_2_1_float(c0, r0);
|
||
float r1; Hash_Tchou_2_1_float(c1, r1);
|
||
float r2; Hash_Tchou_2_1_float(c2, r2);
|
||
float r3; Hash_Tchou_2_1_float(c3, r3);
|
||
float bottomOfGrid = lerp(r0, r1, f.x);
|
||
float topOfGrid = lerp(r2, r3, f.x);
|
||
float t = lerp(bottomOfGrid, topOfGrid, f.y);
|
||
return t;
|
||
}
|
||
|
||
void Unity_SimpleNoise_Deterministic_float(float2 UV, float Scale, out float Out)
|
||
{
|
||
float freq, amp;
|
||
Out = 0.0f;
|
||
freq = pow(2.0, float(0));
|
||
amp = pow(0.5, float(3-0));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
freq = pow(2.0, float(1));
|
||
amp = pow(0.5, float(3-1));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
freq = pow(2.0, float(2));
|
||
amp = pow(0.5, float(3-2));
|
||
Out += Unity_SimpleNoise_ValueNoise_Deterministic_float(float2(UV.xy*(Scale/freq)))*amp;
|
||
}
|
||
|
||
void Unity_Multiply_float3_float3(float3 A, float3 B, out float3 Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
void Unity_Add_float3(float3 A, float3 B, out float3 Out)
|
||
{
|
||
Out = A + B;
|
||
}
|
||
|
||
void Unity_Branch_float3(float Predicate, float3 True, float3 False, out float3 Out)
|
||
{
|
||
Out = Predicate ? True : False;
|
||
}
|
||
|
||
void Unity_Twirl_float(float2 UV, float2 Center, float Strength, float2 Offset, out float2 Out)
|
||
{
|
||
float2 delta = UV - Center;
|
||
float angle = Strength * length(delta);
|
||
float x = cos(angle) * delta.x - sin(angle) * delta.y;
|
||
float y = sin(angle) * delta.x + cos(angle) * delta.y;
|
||
Out = float2(x + Center.x + Offset.x, y + Center.y + Offset.y);
|
||
}
|
||
|
||
void Unity_NormalFromTexture_float(TEXTURE2D_PARAM(Texture, Sampler), float2 UV, float Offset, float Strength, out float3 Out)
|
||
{
|
||
Offset = pow(Offset, 3) * 0.1;
|
||
float2 offsetU = float2(UV.x + Offset, UV.y);
|
||
float2 offsetV = float2(UV.x, UV.y + Offset);
|
||
float normalSample = SAMPLE_TEXTURE2D(Texture, Sampler, UV).r;
|
||
float uSample = SAMPLE_TEXTURE2D(Texture, Sampler, offsetU).r;
|
||
float vSample = SAMPLE_TEXTURE2D(Texture, Sampler, offsetV).r;
|
||
float3 va = float3(1, 0, (uSample - normalSample) * Strength);
|
||
float3 vb = float3(0, 1, (vSample - normalSample) * Strength);
|
||
Out = normalize(cross(va, vb));
|
||
}
|
||
|
||
void Unity_SceneColor_float(float4 UV, out float3 Out)
|
||
{
|
||
Out = SHADERGRAPH_SAMPLE_SCENE_COLOR(UV.xy);
|
||
}
|
||
|
||
void Unity_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
|
||
{
|
||
Out = UV * Tiling + Offset;
|
||
}
|
||
|
||
void Unity_Multiply_float4_float4(float4 A, float4 B, out float4 Out)
|
||
{
|
||
Out = A * B;
|
||
}
|
||
|
||
void Unity_Clamp_float(float In, float Min, float Max, out float Out)
|
||
{
|
||
Out = clamp(In, Min, Max);
|
||
}
|
||
|
||
void Unity_SceneDepth_Eye_float(float4 UV, out float Out)
|
||
{
|
||
if (unity_OrthoParams.w == 1.0)
|
||
{
|
||
Out = LinearEyeDepth(ComputeWorldSpacePosition(UV.xy, SHADERGRAPH_SAMPLE_SCENE_DEPTH(UV.xy), UNITY_MATRIX_I_VP), UNITY_MATRIX_V);
|
||
}
|
||
else
|
||
{
|
||
Out = LinearEyeDepth(SHADERGRAPH_SAMPLE_SCENE_DEPTH(UV.xy), _ZBufferParams);
|
||
}
|
||
}
|
||
|
||
void Unity_Subtract_float(float A, float B, out float Out)
|
||
{
|
||
Out = A - B;
|
||
}
|
||
|
||
void Unity_Divide_float(float A, float B, out float Out)
|
||
{
|
||
Out = A / B;
|
||
}
|
||
|
||
void Unity_Saturate_float(float In, out float Out)
|
||
{
|
||
Out = saturate(In);
|
||
}
|
||
|
||
void Unity_Add_float(float A, float B, out float Out)
|
||
{
|
||
Out = A + B;
|
||
}
|
||
|
||
void Unity_Smoothstep_float(float Edge1, float Edge2, float In, out float Out)
|
||
{
|
||
Out = smoothstep(Edge1, Edge2, In);
|
||
}
|
||
|
||
// Custom interpolators pre vertex
|
||
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
|
||
|
||
// Graph Vertex
|
||
struct VertexDescription
|
||
{
|
||
float3 Position;
|
||
float3 Normal;
|
||
float3 Tangent;
|
||
};
|
||
|
||
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
|
||
{
|
||
VertexDescription description = (VertexDescription)0;
|
||
float _Property_a85d0177ea0341d9a0a80ed35edb2c8a_Out_0_Boolean = _Vertex_Offset;
|
||
float4 _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4 = IN.uv1;
|
||
float _Split_d2412a890bef4daf877bc52848883f38_R_1_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[0];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_G_2_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[1];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_B_3_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[2];
|
||
float _Split_d2412a890bef4daf877bc52848883f38_A_4_Float = _UV_5b1dfc466540458f9ef8535ef4b2a221_Out_0_Vector4[3];
|
||
float _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float;
|
||
Unity_Multiply_float_float(IN.TimeParameters.x, _Split_d2412a890bef4daf877bc52848883f38_A_4_Float, _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float);
|
||
float _SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float;
|
||
Unity_SimpleNoise_Deterministic_float((IN.ObjectSpacePosition.xy), _Multiply_628a67c2b76b4664b9e4696b3605c099_Out_2_Float, _SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float);
|
||
float3 _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3;
|
||
Unity_Multiply_float3_float3(IN.WorldSpaceNormal, (_SimpleNoise_d6542178491a4e799a39d1963f6e9d3f_Out_2_Float.xxx), _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3);
|
||
float3 _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3;
|
||
Unity_Add_float3(IN.ObjectSpacePosition, _Multiply_ae2c4546134e4beeb5b74f0bff8400bb_Out_2_Vector3, _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3);
|
||
float3 _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3;
|
||
Unity_Branch_float3(_Property_a85d0177ea0341d9a0a80ed35edb2c8a_Out_0_Boolean, _Add_11a991aacc0540b1a76963cd610bd217_Out_2_Vector3, IN.ObjectSpacePosition, _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3);
|
||
description.Position = _Branch_a1a0323848bb4e62acb8d111c3c22a73_Out_3_Vector3;
|
||
description.Normal = IN.ObjectSpaceNormal;
|
||
description.Tangent = IN.ObjectSpaceTangent;
|
||
return description;
|
||
}
|
||
|
||
// Custom interpolators, pre surface
|
||
#ifdef FEATURES_GRAPH_VERTEX
|
||
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
|
||
{
|
||
return output;
|
||
}
|
||
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
|
||
#endif
|
||
|
||
// Graph Pixel
|
||
struct SurfaceDescription
|
||
{
|
||
float3 BaseColor;
|
||
float Alpha;
|
||
float AlphaClipThreshold;
|
||
};
|
||
|
||
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
||
{
|
||
SurfaceDescription surface = (SurfaceDescription)0;
|
||
float _Property_78804880cedc47fdbd69823b872b9e1d_Out_0_Boolean = _Distort;
|
||
float4 _ScreenPosition_314475fc06764cd696bcb0f051af688d_Out_0_Vector4 = float4(IN.NDCPosition.xy, 0, 0);
|
||
UnityTexture2D _Property_fd6dac2eb5684f44b017c1784bea81d7_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_Distortion_Noise);
|
||
float _Multiply_d2d103e49eac44d0b1584b206c0dc171_Out_2_Float;
|
||
Unity_Multiply_float_float(1, IN.TimeParameters.x, _Multiply_d2d103e49eac44d0b1584b206c0dc171_Out_2_Float);
|
||
float2 _Twirl_604dcecc3b8749e3a7a70bd8524db3c7_Out_4_Vector2;
|
||
Unity_Twirl_float(IN.uv0.xy, float2 (0.5, 0.5), float(5), (_Multiply_d2d103e49eac44d0b1584b206c0dc171_Out_2_Float.xx), _Twirl_604dcecc3b8749e3a7a70bd8524db3c7_Out_4_Vector2);
|
||
float4 _UV_22e830f19205444ba2e6ea8e08a7d384_Out_0_Vector4 = IN.uv2;
|
||
float _Split_dd61a7836c0d4dd0af69acff06b02195_R_1_Float = _UV_22e830f19205444ba2e6ea8e08a7d384_Out_0_Vector4[0];
|
||
float _Split_dd61a7836c0d4dd0af69acff06b02195_G_2_Float = _UV_22e830f19205444ba2e6ea8e08a7d384_Out_0_Vector4[1];
|
||
float _Split_dd61a7836c0d4dd0af69acff06b02195_B_3_Float = _UV_22e830f19205444ba2e6ea8e08a7d384_Out_0_Vector4[2];
|
||
float _Split_dd61a7836c0d4dd0af69acff06b02195_A_4_Float = _UV_22e830f19205444ba2e6ea8e08a7d384_Out_0_Vector4[3];
|
||
float _Multiply_79d07365e21043b38f724b8b8ef99abf_Out_2_Float;
|
||
Unity_Multiply_float_float(_Split_dd61a7836c0d4dd0af69acff06b02195_G_2_Float, 0.1, _Multiply_79d07365e21043b38f724b8b8ef99abf_Out_2_Float);
|
||
float4 _UV_8a8370844fe34de7ad6269dae77ba12a_Out_0_Vector4 = IN.uv2;
|
||
float _Split_013c8550ee754fcab89ba2a9e3ca7117_R_1_Float = _UV_8a8370844fe34de7ad6269dae77ba12a_Out_0_Vector4[0];
|
||
float _Split_013c8550ee754fcab89ba2a9e3ca7117_G_2_Float = _UV_8a8370844fe34de7ad6269dae77ba12a_Out_0_Vector4[1];
|
||
float _Split_013c8550ee754fcab89ba2a9e3ca7117_B_3_Float = _UV_8a8370844fe34de7ad6269dae77ba12a_Out_0_Vector4[2];
|
||
float _Split_013c8550ee754fcab89ba2a9e3ca7117_A_4_Float = _UV_8a8370844fe34de7ad6269dae77ba12a_Out_0_Vector4[3];
|
||
float _Multiply_5ddbe47697014ff59e00b3c4ef78d7b5_Out_2_Float;
|
||
Unity_Multiply_float_float(_Split_013c8550ee754fcab89ba2a9e3ca7117_R_1_Float, 0.01, _Multiply_5ddbe47697014ff59e00b3c4ef78d7b5_Out_2_Float);
|
||
float3 _NormalFromTexture_013a78afb6074711a80a448e3642e406_Out_5_Vector3;
|
||
Unity_NormalFromTexture_float(TEXTURE2D_ARGS(_Property_fd6dac2eb5684f44b017c1784bea81d7_Out_0_Texture2D.tex, _Property_fd6dac2eb5684f44b017c1784bea81d7_Out_0_Texture2D.samplerstate), _Property_fd6dac2eb5684f44b017c1784bea81d7_Out_0_Texture2D.GetTransformedUV(_Twirl_604dcecc3b8749e3a7a70bd8524db3c7_Out_4_Vector2), _Multiply_79d07365e21043b38f724b8b8ef99abf_Out_2_Float, _Multiply_5ddbe47697014ff59e00b3c4ef78d7b5_Out_2_Float, _NormalFromTexture_013a78afb6074711a80a448e3642e406_Out_5_Vector3);
|
||
float3 _Multiply_a3bebb9cbf564bc49c85414f4893d4c1_Out_2_Vector3;
|
||
Unity_Multiply_float3_float3((_ScreenPosition_314475fc06764cd696bcb0f051af688d_Out_0_Vector4.xyz), _NormalFromTexture_013a78afb6074711a80a448e3642e406_Out_5_Vector3, _Multiply_a3bebb9cbf564bc49c85414f4893d4c1_Out_2_Vector3);
|
||
float3 _Add_074f843d89ea44908b33d5cc2d28b7b8_Out_2_Vector3;
|
||
Unity_Add_float3((_ScreenPosition_314475fc06764cd696bcb0f051af688d_Out_0_Vector4.xyz), _Multiply_a3bebb9cbf564bc49c85414f4893d4c1_Out_2_Vector3, _Add_074f843d89ea44908b33d5cc2d28b7b8_Out_2_Vector3);
|
||
float3 _SceneColor_209c40916111453eb1e0c580e4a9f27b_Out_1_Vector3;
|
||
Unity_SceneColor_float((float4(_Add_074f843d89ea44908b33d5cc2d28b7b8_Out_2_Vector3, 1.0)), _SceneColor_209c40916111453eb1e0c580e4a9f27b_Out_1_Vector3);
|
||
UnityTexture2D _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_Main_Texture);
|
||
float4 _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4 = IN.uv0;
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_R_1_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[0];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_G_2_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[1];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_B_3_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[2];
|
||
float _Split_88edf1e1762f4685b6a05e3c49b4a79b_A_4_Float = _UV_b3e5f3e650b74a7ebeda9f74fded1b47_Out_0_Vector4[3];
|
||
float2 _Vector2_3b7618a9a80f44f8937bf30595ad7e38_Out_0_Vector2 = float2(_Split_88edf1e1762f4685b6a05e3c49b4a79b_B_3_Float, _Split_88edf1e1762f4685b6a05e3c49b4a79b_A_4_Float);
|
||
float2 _TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2;
|
||
Unity_TilingAndOffset_float(IN.uv0.xy, float2 (1, 1), _Vector2_3b7618a9a80f44f8937bf30595ad7e38_Out_0_Vector2, _TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2);
|
||
float4 _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.tex, _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.samplerstate, _Property_853042d666004c099fb969b9a5d646fd_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2) );
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_R_4_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.r;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_G_5_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.g;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_B_6_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.b;
|
||
float _SampleTexture2D_91eb236b08d74d45afd474257513386c_A_7_Float = _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4.a;
|
||
float4 _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4;
|
||
Unity_Multiply_float4_float4(IN.VertexColor, _SampleTexture2D_91eb236b08d74d45afd474257513386c_RGBA_0_Vector4, _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4);
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_R_1_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[0];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_G_2_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[1];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_B_3_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[2];
|
||
float _Split_6a09d55e29c94fef8172d229eb37fff4_A_4_Float = _Multiply_68d98cdeee9d4e3aaab24fa1a3cf5d25_Out_2_Vector4[3];
|
||
float3 _Vector3_c56d660d8d604b0095df913163d05636_Out_0_Vector3 = float3(_Split_6a09d55e29c94fef8172d229eb37fff4_R_1_Float, _Split_6a09d55e29c94fef8172d229eb37fff4_G_2_Float, _Split_6a09d55e29c94fef8172d229eb37fff4_B_3_Float);
|
||
float3 _Multiply_6b3b4c3d71ac403991dfa8448caf465d_Out_2_Vector3;
|
||
Unity_Multiply_float3_float3(float3(0, 0, 0), _Vector3_c56d660d8d604b0095df913163d05636_Out_0_Vector3, _Multiply_6b3b4c3d71ac403991dfa8448caf465d_Out_2_Vector3);
|
||
float3 _Add_acbcfe1a53394a188eb16f2205ba5fae_Out_2_Vector3;
|
||
Unity_Add_float3(_SceneColor_209c40916111453eb1e0c580e4a9f27b_Out_1_Vector3, _Multiply_6b3b4c3d71ac403991dfa8448caf465d_Out_2_Vector3, _Add_acbcfe1a53394a188eb16f2205ba5fae_Out_2_Vector3);
|
||
float4 _UV_b99c1e3fd7b14962b22510ab822596fa_Out_0_Vector4 = IN.uv1;
|
||
float _Split_d91e1a6788134a0db18458e2c9ffe1e2_R_1_Float = _UV_b99c1e3fd7b14962b22510ab822596fa_Out_0_Vector4[0];
|
||
float _Split_d91e1a6788134a0db18458e2c9ffe1e2_G_2_Float = _UV_b99c1e3fd7b14962b22510ab822596fa_Out_0_Vector4[1];
|
||
float _Split_d91e1a6788134a0db18458e2c9ffe1e2_B_3_Float = _UV_b99c1e3fd7b14962b22510ab822596fa_Out_0_Vector4[2];
|
||
float _Split_d91e1a6788134a0db18458e2c9ffe1e2_A_4_Float = _UV_b99c1e3fd7b14962b22510ab822596fa_Out_0_Vector4[3];
|
||
float _Clamp_8d3c85ef31db418187bf82aa0d05c018_Out_3_Float;
|
||
Unity_Clamp_float(_Split_d91e1a6788134a0db18458e2c9ffe1e2_B_3_Float, float(1), float(10), _Clamp_8d3c85ef31db418187bf82aa0d05c018_Out_3_Float);
|
||
float3 _Multiply_09fb4be9ffbf4d1a837e111a26a36d03_Out_2_Vector3;
|
||
Unity_Multiply_float3_float3((_Clamp_8d3c85ef31db418187bf82aa0d05c018_Out_3_Float.xxx), _Vector3_c56d660d8d604b0095df913163d05636_Out_0_Vector3, _Multiply_09fb4be9ffbf4d1a837e111a26a36d03_Out_2_Vector3);
|
||
float3 _Branch_585281afb21148e8850339e89a273dd4_Out_3_Vector3;
|
||
Unity_Branch_float3(_Property_78804880cedc47fdbd69823b872b9e1d_Out_0_Boolean, _Add_acbcfe1a53394a188eb16f2205ba5fae_Out_2_Vector3, _Multiply_09fb4be9ffbf4d1a837e111a26a36d03_Out_2_Vector3, _Branch_585281afb21148e8850339e89a273dd4_Out_3_Vector3);
|
||
float _SceneDepth_cbf4b7140c8747fba9e28c881275612c_Out_1_Float;
|
||
Unity_SceneDepth_Eye_float(float4(IN.NDCPosition.xy, 0, 0), _SceneDepth_cbf4b7140c8747fba9e28c881275612c_Out_1_Float);
|
||
float4 _ScreenPosition_c8c254b7170c483f9436f2a186f2f25f_Out_0_Vector4 = IN.ScreenPosition;
|
||
float _Split_6ebe6dd7c053473a86cc78d4af3b5456_R_1_Float = _ScreenPosition_c8c254b7170c483f9436f2a186f2f25f_Out_0_Vector4[0];
|
||
float _Split_6ebe6dd7c053473a86cc78d4af3b5456_G_2_Float = _ScreenPosition_c8c254b7170c483f9436f2a186f2f25f_Out_0_Vector4[1];
|
||
float _Split_6ebe6dd7c053473a86cc78d4af3b5456_B_3_Float = _ScreenPosition_c8c254b7170c483f9436f2a186f2f25f_Out_0_Vector4[2];
|
||
float _Split_6ebe6dd7c053473a86cc78d4af3b5456_A_4_Float = _ScreenPosition_c8c254b7170c483f9436f2a186f2f25f_Out_0_Vector4[3];
|
||
float _Subtract_205f8ae6662b43bd8bc6a9b7fe1df0bc_Out_2_Float;
|
||
Unity_Subtract_float(_SceneDepth_cbf4b7140c8747fba9e28c881275612c_Out_1_Float, _Split_6ebe6dd7c053473a86cc78d4af3b5456_A_4_Float, _Subtract_205f8ae6662b43bd8bc6a9b7fe1df0bc_Out_2_Float);
|
||
float _Property_32583f2525b14d90927281637ad7b962_Out_0_Float = _Depth_Fade_Factor;
|
||
float _Divide_89c4abebb8194b988799339162560ac4_Out_2_Float;
|
||
Unity_Divide_float(_Subtract_205f8ae6662b43bd8bc6a9b7fe1df0bc_Out_2_Float, _Property_32583f2525b14d90927281637ad7b962_Out_0_Float, _Divide_89c4abebb8194b988799339162560ac4_Out_2_Float);
|
||
float _Saturate_34122799a8de408ab780fb9e5fa36601_Out_1_Float;
|
||
Unity_Saturate_float(_Divide_89c4abebb8194b988799339162560ac4_Out_2_Float, _Saturate_34122799a8de408ab780fb9e5fa36601_Out_1_Float);
|
||
float3 _Multiply_a3558c8f5efb4581b510c889004960f7_Out_2_Vector3;
|
||
// [GroundVFX] Depth Fade 비활성화 - 지형 아래에서도 검정 안 나오도록
|
||
Unity_Multiply_float3_float3(_Branch_585281afb21148e8850339e89a273dd4_Out_3_Vector3, float3(1,1,1), _Multiply_a3558c8f5efb4581b510c889004960f7_Out_2_Vector3);
|
||
float4 _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4 = IN.uv1;
|
||
float _Split_b444b317981f46f1958301bf94b38de1_R_1_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[0];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_G_2_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[1];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_B_3_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[2];
|
||
float _Split_b444b317981f46f1958301bf94b38de1_A_4_Float = _UV_08b1d8ed4744476d9ec27d4bfc042afe_Out_0_Vector4[3];
|
||
float _Add_66fb86a088584979815762970a1803f5_Out_2_Float;
|
||
Unity_Add_float(_Split_b444b317981f46f1958301bf94b38de1_R_1_Float, _Split_b444b317981f46f1958301bf94b38de1_G_2_Float, _Add_66fb86a088584979815762970a1803f5_Out_2_Float);
|
||
UnityTexture2D _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_Dissolve_Texture);
|
||
float4 _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.tex, _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.samplerstate, _Property_e8a840319f5b41cdaa707f822ca3ae11_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_e798aa3c9b40492d9adafac0357bc1ba_Out_3_Vector2) );
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_R_4_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.r;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_G_5_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.g;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_B_6_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.b;
|
||
float _SampleTexture2D_755ae0396640490095bbe69901c64485_A_7_Float = _SampleTexture2D_755ae0396640490095bbe69901c64485_RGBA_0_Vector4.a;
|
||
float _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float;
|
||
Unity_Smoothstep_float(_Split_b444b317981f46f1958301bf94b38de1_R_1_Float, _Add_66fb86a088584979815762970a1803f5_Out_2_Float, _SampleTexture2D_755ae0396640490095bbe69901c64485_R_4_Float, _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float);
|
||
float _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float;
|
||
Unity_Multiply_float_float(_Split_6a09d55e29c94fef8172d229eb37fff4_A_4_Float, _Smoothstep_da8d7a9358f44c8a80013467490deb26_Out_3_Float, _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float);
|
||
surface.BaseColor = _Multiply_a3558c8f5efb4581b510c889004960f7_Out_2_Vector3;
|
||
surface.Alpha = _Multiply_e36a738a2910476d86e658acedbafd6c_Out_2_Float;
|
||
surface.AlphaClipThreshold = float(0.5);
|
||
return surface;
|
||
}
|
||
|
||
// --------------------------------------------------
|
||
// Build Graph Inputs
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#define VFX_SRP_ATTRIBUTES Attributes
|
||
#define VFX_SRP_VARYINGS Varyings
|
||
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
|
||
#endif
|
||
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
|
||
{
|
||
VertexDescriptionInputs output;
|
||
ZERO_INITIALIZE(VertexDescriptionInputs, output);
|
||
|
||
output.ObjectSpaceNormal = input.normalOS;
|
||
output.WorldSpaceNormal = TransformObjectToWorldNormal(input.normalOS);
|
||
output.ObjectSpaceTangent = input.tangentOS.xyz;
|
||
output.ObjectSpacePosition = input.positionOS;
|
||
output.uv1 = input.uv1;
|
||
output.TimeParameters = _TimeParameters.xyz;
|
||
#if UNITY_ANY_INSTANCING_ENABLED
|
||
#else // TODO: XR support for procedural instancing because in this case UNITY_ANY_INSTANCING_ENABLED is not defined and instanceID is incorrect.
|
||
#endif
|
||
|
||
return output;
|
||
}
|
||
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
|
||
{
|
||
SurfaceDescriptionInputs output;
|
||
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
||
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#if VFX_USE_GRAPH_VALUES
|
||
uint instanceActiveIndex = asuint(UNITY_ACCESS_INSTANCED_PROP(PerInstance, _InstanceActiveIndex));
|
||
/* WARNING: $splice Could not find named fragment 'VFXLoadGraphValues' */
|
||
#endif
|
||
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
|
||
|
||
#endif
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
output.WorldSpacePosition = input.positionWS;
|
||
output.ScreenPosition = ComputeScreenPos(TransformWorldToHClip(input.positionWS), _ProjectionParams.x);
|
||
|
||
#if UNITY_UV_STARTS_AT_TOP
|
||
output.PixelPosition = float2(input.positionCS.x, (_ProjectionParams.x < 0) ? (_ScaledScreenParams.y - input.positionCS.y) : input.positionCS.y);
|
||
#else
|
||
output.PixelPosition = float2(input.positionCS.x, (_ProjectionParams.x > 0) ? (_ScaledScreenParams.y - input.positionCS.y) : input.positionCS.y);
|
||
#endif
|
||
|
||
output.NDCPosition = output.PixelPosition.xy / _ScaledScreenParams.xy;
|
||
output.NDCPosition.y = 1.0f - output.NDCPosition.y;
|
||
|
||
output.uv0 = input.texCoord0;
|
||
output.uv1 = input.texCoord1;
|
||
output.uv2 = input.texCoord2;
|
||
output.VertexColor = input.color;
|
||
#if UNITY_ANY_INSTANCING_ENABLED
|
||
#else // TODO: XR support for procedural instancing because in this case UNITY_ANY_INSTANCING_ENABLED is not defined and instanceID is incorrect.
|
||
#endif
|
||
output.TimeParameters = _TimeParameters.xyz; // This is mainly for LW as HD overwrite this value
|
||
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
|
||
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
|
||
#else
|
||
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
|
||
#endif
|
||
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
|
||
|
||
return output;
|
||
}
|
||
|
||
// --------------------------------------------------
|
||
// Main
|
||
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
|
||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/SelectionPickingPass.hlsl"
|
||
|
||
// --------------------------------------------------
|
||
// Visual Effect Vertex Invocations
|
||
#ifdef HAVE_VFX_MODIFICATION
|
||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
|
||
#endif
|
||
|
||
ENDHLSL
|
||
}
|
||
}
|
||
CustomEditor "UnityEditor.ShaderGraph.GenericShaderGraphMaterialGUI"
|
||
CustomEditorForRenderPipeline "UnityEditor.ShaderGraphUnlitGUI" "UnityEngine.Rendering.Universal.UniversalRenderPipelineAsset"
|
||
FallBack "Hidden/Shader Graph/FallbackError"
|
||
} |