22564 lines
1.5 MiB
22564 lines
1.5 MiB
Shader "NatureManufacture/HDRP/Foliage/Bark"
|
|
{
|
|
Properties
|
|
{
|
|
_TrunkBaseColor("Trunk Base Color", Color) = (1, 1, 1, 0)
|
|
[NoScaleOffset]_TrunkBaseColorMap("Trunk Base Map", 2D) = "white" {}
|
|
_TrunkTilingOffset("Trunk Tiling and Offset", Vector) = (1, 1, 0, 0)
|
|
[Normal][NoScaleOffset]_TrunkNormalMap("Trunk Normal Map", 2D) = "bump" {}
|
|
_TrunkNormalScale("Trunk Normal Scale", Range(0, 8)) = 1
|
|
[NoScaleOffset]_TrunkMaskMap("Trunk Mask Map MT(R) AO(G) SM(A)", 2D) = "white" {}
|
|
_TrunkMetallic("Trunk Metallic", Range(0, 1)) = 1
|
|
_TrunkAORemapMin("Trunk AO Remap Min", Range(0, 1)) = 0
|
|
_TrunkAORemapMax("Trunk AO Remap Max", Range(0, 1)) = 1
|
|
_TrunkSmoothnessRemapMin("Trunk Smoothness Remap Min", Range(0, 1)) = 0
|
|
_TrunkSmoothnessRemapMax("Trunk Smoothness Remap Max", Range(0, 1)) = 1
|
|
[NoScaleOffset]_LayerMask("Bark Blend Mask(A)", 2D) = "black" {}
|
|
_BarkBlendMaskTilingOffset("Bark Blend Mask Tiling Offset", Vector) = (1, 1, 0, 0)
|
|
_BarkBaseColor("Bark Base Color", Color) = (1, 1, 1, 0)
|
|
[NoScaleOffset]_BarkBaseColorMap("Bark Base Map", 2D) = "white" {}
|
|
[ToggleUI]_BarkUseUV3("Bark Use UV3", Float) = 1
|
|
_BarkTilingOffset("Bark Tiling and Offset", Vector) = (1, 1, 0, 0)
|
|
[Normal][NoScaleOffset]_BarkNormalMap("Bark Normal Map", 2D) = "bump" {}
|
|
_BarkNormalScale("Bark Normal Scale", Range(0, 8)) = 1
|
|
[NoScaleOffset]_BarkMaskMap("Bark Mask Map MT(R) AO(G) SM(A)", 2D) = "white" {}
|
|
_BarkMetallic("Bark Metallic", Range(0, 1)) = 1
|
|
_BarkSmoothnessRemapMin("Bark Smoothness Remap Min", Range(0, 1)) = 0
|
|
_BarkSmoothnessRemapMax("Bark Smoothness Remap Max", Range(0, 1)) = 1
|
|
_BarkAORemapMin("Bark AO Remap Min", Range(0, 1)) = 0
|
|
_BarkAORemapMax("Bark AO Remap Max", Range(0, 1)) = 1
|
|
_Stiffness("Wind Stiffness", Float) = 1
|
|
_InitialBend("Wind Initial Bend", Float) = 0
|
|
_Drag("Wind Drag", Float) = 1
|
|
_HeightDrag("Wind Drag Height Offset", Float) = 0
|
|
_NewNormal("Mesh Normal Multiply", Vector) = (0, 0, 0, 0)
|
|
[HideInInspector]_EmissionColor("Color", Color) = (1, 1, 1, 1)
|
|
[HideInInspector]_RenderQueueType("Float", Float) = 1
|
|
[HideInInspector][ToggleUI]_AddPrecomputedVelocity("Boolean", Float) = 0
|
|
[HideInInspector][ToggleUI]_DepthOffsetEnable("Boolean", Float) = 0
|
|
[HideInInspector][ToggleUI]_ConservativeDepthOffsetEnable("Boolean", Float) = 0
|
|
[HideInInspector][ToggleUI]_TransparentWritingMotionVec("Boolean", Float) = 0
|
|
[HideInInspector][ToggleUI]_AlphaCutoffEnable("Boolean", Float) = 0
|
|
[HideInInspector]_TransparentSortPriority("_TransparentSortPriority", Float) = 0
|
|
[HideInInspector][ToggleUI]_UseShadowThreshold("Boolean", Float) = 0
|
|
[HideInInspector][ToggleUI]_DoubleSidedEnable("Boolean", Float) = 0
|
|
[HideInInspector][Enum(Flip, 0, Mirror, 1, None, 2)]_DoubleSidedNormalMode("Float", Float) = 2
|
|
[HideInInspector]_DoubleSidedConstants("Vector4", Vector) = (1, 1, -1, 0)
|
|
[HideInInspector][Enum(Auto, 0, On, 1, Off, 2)]_DoubleSidedGIMode("Float", Float) = 0
|
|
[HideInInspector][ToggleUI]_TransparentDepthPrepassEnable("Boolean", Float) = 0
|
|
[HideInInspector][ToggleUI]_TransparentDepthPostpassEnable("Boolean", Float) = 0
|
|
[HideInInspector][ToggleUI]_PerPixelSorting("Boolean", Float) = 0
|
|
[HideInInspector]_SurfaceType("Float", Float) = 0
|
|
[HideInInspector]_BlendMode("Float", Float) = 0
|
|
[HideInInspector]_SrcBlend("Float", Float) = 1
|
|
[HideInInspector]_DstBlend("Float", Float) = 0
|
|
[HideInInspector]_DstBlend2("Float", Float) = 0
|
|
[HideInInspector]_AlphaSrcBlend("Float", Float) = 1
|
|
[HideInInspector]_AlphaDstBlend("Float", Float) = 0
|
|
[HideInInspector][ToggleUI]_ZWrite("Boolean", Float) = 1
|
|
[HideInInspector][ToggleUI]_TransparentZWrite("Boolean", Float) = 0
|
|
[HideInInspector]_CullMode("Float", Float) = 2
|
|
[HideInInspector][ToggleUI]_EnableFogOnTransparent("Boolean", Float) = 1
|
|
[HideInInspector]_CullModeForward("Float", Float) = 2
|
|
[HideInInspector][Enum(Front, 1, Back, 2)]_TransparentCullMode("Float", Float) = 2
|
|
[HideInInspector][Enum(UnityEngine.Rendering.HighDefinition.OpaqueCullMode)]_OpaqueCullMode("Float", Float) = 2
|
|
[HideInInspector]_ZTestDepthEqualForOpaque("Float", Int) = 3
|
|
[HideInInspector][Enum(UnityEngine.Rendering.CompareFunction)]_ZTestTransparent("Float", Float) = 4
|
|
[HideInInspector][ToggleUI]_TransparentBackfaceEnable("Boolean", Float) = 0
|
|
[HideInInspector][ToggleUI]_RequireSplitLighting("Boolean", Float) = 0
|
|
[HideInInspector][ToggleUI]_ReceivesSSR("Boolean", Float) = 1
|
|
[HideInInspector][ToggleUI]_ReceivesSSRTransparent("Boolean", Float) = 0
|
|
[HideInInspector][ToggleUI]_EnableBlendModePreserveSpecularLighting("Boolean", Float) = 1
|
|
[HideInInspector][ToggleUI]_SupportDecals("Boolean", Float) = 1
|
|
[HideInInspector][ToggleUI]_ExcludeFromTUAndAA("Boolean", Float) = 0
|
|
[HideInInspector]_StencilRef("Float", Int) = 0
|
|
[HideInInspector]_StencilWriteMask("Float", Int) = 6
|
|
[HideInInspector]_StencilRefDepth("Float", Int) = 8
|
|
[HideInInspector]_StencilWriteMaskDepth("Float", Int) = 9
|
|
[HideInInspector]_StencilRefMV("Float", Int) = 40
|
|
[HideInInspector]_StencilWriteMaskMV("Float", Int) = 41
|
|
[HideInInspector]_StencilRefDistortionVec("Float", Int) = 4
|
|
[HideInInspector]_StencilWriteMaskDistortionVec("Float", Int) = 4
|
|
[HideInInspector]_StencilWriteMaskGBuffer("Float", Int) = 15
|
|
[HideInInspector]_StencilRefGBuffer("Float", Int) = 10
|
|
[HideInInspector]_ZTestGBuffer("Float", Int) = 4
|
|
[HideInInspector][ToggleUI]_RayTracing("Boolean", Float) = 0
|
|
[HideInInspector][Enum(None, 0, Planar, 1, Sphere, 2, Thin, 3)]_RefractionModel("Float", Float) = 0
|
|
[HideInInspector][Enum(Standard, 1)]_MaterialID("_MaterialID", Float) = 1
|
|
[HideInInspector]_MaterialTypeMask("_MaterialTypeMask", Float) = 2
|
|
[HideInInspector][ToggleUI]_TransmissionEnable("Boolean", 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"="HDRenderPipeline"
|
|
"RenderType"="HDLitShader"
|
|
"Queue"="Geometry+225"
|
|
"DisableBatching"="LODFading"
|
|
"ShaderGraphShader"="true"
|
|
"ShaderGraphTargetId"="HDLitSubTarget"
|
|
}
|
|
Pass
|
|
{
|
|
Name "ShadowCaster"
|
|
Tags
|
|
{
|
|
"LightMode" = "ShadowCaster"
|
|
}
|
|
|
|
// Render State
|
|
Cull [_CullMode]
|
|
ZWrite On
|
|
ColorMask 0
|
|
ZClip [_ZClip]
|
|
|
|
// Debug
|
|
// <None>
|
|
|
|
// --------------------------------------------------
|
|
// Pass
|
|
|
|
HLSLPROGRAM
|
|
|
|
// Pragmas
|
|
#pragma multi_compile _ DOTS_INSTANCING_ON
|
|
#pragma instancing_options renderinglayer
|
|
#pragma target 4.5
|
|
#pragma vertex Vert
|
|
#pragma fragment Frag
|
|
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
|
|
#pragma multi_compile_instancing
|
|
|
|
// Keywords
|
|
#pragma shader_feature _ _SURFACE_TYPE_TRANSPARENT
|
|
#pragma shader_feature_local _ _DOUBLESIDED_ON
|
|
#pragma shader_feature_local _ _ADD_PRECOMPUTED_VELOCITY
|
|
#pragma shader_feature_local _ _TRANSPARENT_WRITES_MOTION_VEC _TRANSPARENT_REFRACTIVE_SORT
|
|
#pragma shader_feature_local_fragment _ _ENABLE_FOG_ON_TRANSPARENT
|
|
#pragma multi_compile _ LOD_FADE_CROSSFADE
|
|
#pragma shader_feature_local_fragment _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local _ _REFRACTION_PLANE _REFRACTION_SPHERE _REFRACTION_THIN
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// GraphKeywords: <None>
|
|
|
|
// Defines
|
|
#define SHADERPASS SHADERPASS_SHADOWS
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
|
|
// For custom interpolators to inject a substruct definition before FragInputs definition,
|
|
// allowing for FragInputs to capture CI's intended for ShaderGraph's SDI.
|
|
struct CustomInterpolators
|
|
{
|
|
};
|
|
#define USE_CUSTOMINTERP_SUBSTRUCT
|
|
|
|
|
|
|
|
// TODO: Merge FragInputsVFX substruct with CustomInterpolators.
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
struct FragInputsVFX
|
|
{
|
|
/* WARNING: $splice Could not find named fragment 'FragInputsVFX' */
|
|
};
|
|
#endif
|
|
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/GeometricTools.hlsl" // Required by Tessellation.hlsl
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Tessellation.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" // Required to be include before we include properties as it define DECLARE_STACK_CB
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl" // Required before including properties as it defines UNITY_TEXTURE_STREAMING_DEBUG_VARS
|
|
// Always include Shader Graph version
|
|
// Always include last to avoid double macros
|
|
#include "Packages/com.unity.shadergraph/ShaderGraphLibrary/Functions.hlsl" // Need to be here for Gradient struct definition
|
|
|
|
// --------------------------------------------------
|
|
// Defines
|
|
|
|
// Attribute
|
|
#define ATTRIBUTES_NEED_NORMAL
|
|
#define ATTRIBUTES_NEED_TANGENT
|
|
#define ATTRIBUTES_NEED_COLOR
|
|
|
|
#define HAVE_MESH_MODIFICATION
|
|
|
|
//Strip down the FragInputs.hlsl (on graphics), so we can only optimize the interpolators we use.
|
|
//if by accident something requests contents of FragInputs.hlsl, it will be caught as a compiler error
|
|
//Frag inputs stripping is only enabled when FRAG_INPUTS_ENABLE_STRIPPING is set
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && SHADERPASS != SHADERPASS_RAYTRACING_GBUFFER && SHADERPASS != SHADERPASS_FULL_SCREEN_DEBUG
|
|
#define FRAG_INPUTS_ENABLE_STRIPPING
|
|
#endif
|
|
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl"
|
|
|
|
|
|
|
|
|
|
// Following two define are a workaround introduce in 10.1.x for RaytracingQualityNode
|
|
// The ShaderGraph don't support correctly migration of this node as it serialize all the node data
|
|
// in the json file making it impossible to uprgrade. Until we get a fix, we do a workaround here
|
|
// to still allow us to rename the field and keyword of this node without breaking existing code.
|
|
#ifdef RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define RAYTRACING_SHADER_GRAPH_HIGH
|
|
#endif
|
|
|
|
#ifdef RAYTRACING_SHADER_GRAPH_RAYTRACED
|
|
#define RAYTRACING_SHADER_GRAPH_LOW
|
|
#endif
|
|
// end
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// We need isFrontFace when using double sided - it is not required for unlit as in case of unlit double sided only drive the cullmode
|
|
// VARYINGS_NEED_CULLFACE can be define by VaryingsMeshToPS.FaceSign input if a IsFrontFace Node is included in the shader graph.
|
|
#if defined(_DOUBLESIDED_ON) && !defined(VARYINGS_NEED_CULLFACE)
|
|
#define VARYINGS_NEED_CULLFACE
|
|
#endif
|
|
#endif
|
|
|
|
// Specific Material Define
|
|
#define _SPECULAR_OCCLUSION_FROM_AO 1
|
|
#define _ENERGY_CONSERVING_SPECULAR 1
|
|
|
|
#if _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// Colored Transmission doesn't support clear coat
|
|
#undef _MATERIAL_FEATURE_CLEAR_COAT
|
|
#endif
|
|
|
|
// If we use subsurface scattering, enable output split lighting (for forward pass)
|
|
#if defined(_MATERIAL_FEATURE_SUBSURFACE_SCATTERING) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define OUTPUT_SPLIT_LIGHTING
|
|
#endif
|
|
|
|
// This shader support recursive rendering for raytracing
|
|
#define HAVE_RECURSIVE_RENDERING
|
|
|
|
// In Path Tracing, For all single-sided, refractive materials, we want to force a thin refraction model
|
|
#if (SHADERPASS == SHADERPASS_PATH_TRACING) && !defined(_DOUBLESIDED_ON) && (defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE))
|
|
#undef _REFRACTION_PLANE
|
|
#undef _REFRACTION_SPHERE
|
|
#define _REFRACTION_THIN
|
|
#endif
|
|
// Caution: we can use the define SHADER_UNLIT onlit after the above Material include as it is the Unlit template who define it
|
|
|
|
// To handle SSR on transparent correctly with a possibility to enable/disable it per framesettings
|
|
// we should have a code like this:
|
|
// if !defined(_DISABLE_SSR_TRANSPARENT)
|
|
// pragma multi_compile _ WRITE_NORMAL_BUFFER
|
|
// endif
|
|
// i.e we enable the multicompile only if we can receive SSR or not, and then C# code drive
|
|
// it based on if SSR transparent in frame settings and not (and stripper can strip it).
|
|
// this is currently not possible with our current preprocessor as _DISABLE_SSR_TRANSPARENT is a keyword not a define
|
|
// so instead we used this and chose to pay the extra cost of normal write even if SSR transaprent is disabled.
|
|
// Ideally the shader graph generator should handle it but condition below can't be handle correctly for now.
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
#if !defined(_DISABLE_SSR_TRANSPARENT) && !defined(SHADER_UNLIT)
|
|
#define WRITE_NORMAL_BUFFER
|
|
#endif
|
|
#endif
|
|
|
|
// See Lit.shader
|
|
#if SHADERPASS == SHADERPASS_MOTION_VECTORS && defined(WRITE_DECAL_BUFFER_AND_RENDERING_LAYER)
|
|
#define WRITE_DECAL_BUFFER
|
|
#endif
|
|
|
|
#ifndef DEBUG_DISPLAY
|
|
// In case of opaque we don't want to perform the alpha test, it is done in depth prepass and we use depth equal for ztest (setup from UI)
|
|
// Don't do it with debug display mode as it is possible there is no depth prepass in this case
|
|
#if !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#if SHADERPASS == SHADERPASS_FORWARD
|
|
#define SHADERPASS_FORWARD_BYPASS_ALPHA_TEST
|
|
#elif SHADERPASS == SHADERPASS_GBUFFER
|
|
#define SHADERPASS_GBUFFER_BYPASS_ALPHA_TEST
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
// Define _DEFERRED_CAPABLE_MATERIAL for shader capable to run in deferred pass
|
|
#if defined(SHADER_LIT) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _DEFERRED_CAPABLE_MATERIAL
|
|
#endif
|
|
|
|
// Translate transparent motion vector define
|
|
#if (defined(_TRANSPARENT_WRITES_MOTION_VEC) || defined(_TRANSPARENT_REFRACTIVE_SORT)) && defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _WRITE_TRANSPARENT_MOTION_VECTOR
|
|
#endif
|
|
|
|
// -- Graph Properties
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _TrunkBaseColor;
|
|
float4 _TrunkBaseColorMap_TexelSize;
|
|
float4 _TrunkTilingOffset;
|
|
float4 _TrunkNormalMap_TexelSize;
|
|
float _TrunkNormalScale;
|
|
float4 _TrunkMaskMap_TexelSize;
|
|
float _TrunkMetallic;
|
|
float _TrunkAORemapMin;
|
|
float _TrunkAORemapMax;
|
|
float _TrunkSmoothnessRemapMin;
|
|
float _TrunkSmoothnessRemapMax;
|
|
float4 _LayerMask_TexelSize;
|
|
float4 _BarkBlendMaskTilingOffset;
|
|
float4 _BarkBaseColor;
|
|
float4 _BarkBaseColorMap_TexelSize;
|
|
float _BarkUseUV3;
|
|
float4 _BarkTilingOffset;
|
|
float4 _BarkNormalMap_TexelSize;
|
|
float _BarkNormalScale;
|
|
float4 _BarkMaskMap_TexelSize;
|
|
float _BarkMetallic;
|
|
float _BarkSmoothnessRemapMin;
|
|
float _BarkSmoothnessRemapMax;
|
|
float _BarkAORemapMin;
|
|
float _BarkAORemapMax;
|
|
float _Stiffness;
|
|
float _InitialBend;
|
|
float _Drag;
|
|
float _HeightDrag;
|
|
float4 _NewNormal;
|
|
float4 _EmissionColor;
|
|
float _UseShadowThreshold;
|
|
float4 _DoubleSidedConstants;
|
|
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
|
float _BlendMode;
|
|
float _EnableBlendModePreserveSpecularLighting;
|
|
float _RayTracing;
|
|
float _RefractionModel;
|
|
float _MaterialID;
|
|
float _MaterialTypeMask;
|
|
CBUFFER_END
|
|
|
|
|
|
// Object and Global properties
|
|
SAMPLER(SamplerState_Linear_Repeat);
|
|
SAMPLER(SamplerState_Linear_Repeat_Aniso8);
|
|
TEXTURE2D(_TrunkBaseColorMap);
|
|
SAMPLER(sampler_TrunkBaseColorMap);
|
|
TEXTURE2D(_TrunkNormalMap);
|
|
SAMPLER(sampler_TrunkNormalMap);
|
|
TEXTURE2D(_TrunkMaskMap);
|
|
SAMPLER(sampler_TrunkMaskMap);
|
|
TEXTURE2D(_LayerMask);
|
|
SAMPLER(sampler_LayerMask);
|
|
TEXTURE2D(_BarkBaseColorMap);
|
|
SAMPLER(sampler_BarkBaseColorMap);
|
|
TEXTURE2D(_BarkNormalMap);
|
|
SAMPLER(sampler_BarkNormalMap);
|
|
TEXTURE2D(_BarkMaskMap);
|
|
SAMPLER(sampler_BarkMaskMap);
|
|
TEXTURE2D(WIND_SETTINGS_TexNoise);
|
|
SAMPLER(samplerWIND_SETTINGS_TexNoise);
|
|
float4 WIND_SETTINGS_TexNoise_TexelSize;
|
|
TEXTURE2D(WIND_SETTINGS_TexGust);
|
|
SAMPLER(samplerWIND_SETTINGS_TexGust);
|
|
float4 WIND_SETTINGS_TexGust_TexelSize;
|
|
float4 WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float WIND_SETTINGS_FlexNoiseScale;
|
|
float WIND_SETTINGS_ShiverNoiseScale;
|
|
float WIND_SETTINGS_Turbulence;
|
|
float WIND_SETTINGS_GustSpeed;
|
|
float WIND_SETTINGS_GustScale;
|
|
float WIND_SETTINGS_GustWorldScale;
|
|
float4x4 WIND_SETTINGS_Points;
|
|
float4 WIND_SETTINGS_Points_Radius;
|
|
|
|
// -- Property used by ScenePickingPass
|
|
#ifdef SCENEPICKINGPASS
|
|
float4 _SelectionID;
|
|
#endif
|
|
|
|
// -- Properties used by SceneSelectionPass
|
|
#ifdef SCENESELECTIONPASS
|
|
int _ObjectId;
|
|
int _PassValue;
|
|
#endif
|
|
|
|
// Includes
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/NormalSurfaceGradient.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDecalData.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
// GraphIncludes: <None>
|
|
|
|
// --------------------------------------------------
|
|
// Structs and Packing
|
|
|
|
struct AttributesMesh
|
|
{
|
|
float3 positionOS : POSITION;
|
|
float3 normalOS : NORMAL;
|
|
float4 tangentOS : TANGENT;
|
|
float4 color : COLOR;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(ATTRIBUTES_NEED_INSTANCEID)
|
|
uint instanceID : INSTANCEID_SEMANTIC;
|
|
#endif
|
|
};
|
|
struct VaryingsMeshToPS
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
uint instanceID : CUSTOM_INSTANCE_ID;
|
|
#endif
|
|
};
|
|
struct VertexDescriptionInputs
|
|
{
|
|
float3 ObjectSpaceNormal;
|
|
float3 WorldSpaceNormal;
|
|
float3 ObjectSpaceTangent;
|
|
float3 ObjectSpacePosition;
|
|
float4 VertexColor;
|
|
float3 TimeParameters;
|
|
};
|
|
struct SurfaceDescriptionInputs
|
|
{
|
|
};
|
|
struct PackedVaryingsMeshToPS
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
uint instanceID : CUSTOM_INSTANCE_ID;
|
|
#endif
|
|
};
|
|
|
|
PackedVaryingsMeshToPS PackVaryingsMeshToPS (VaryingsMeshToPS input)
|
|
{
|
|
PackedVaryingsMeshToPS output;
|
|
ZERO_INITIALIZE(PackedVaryingsMeshToPS, output);
|
|
output.positionCS = input.positionCS;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
output.instanceID = input.instanceID;
|
|
#endif
|
|
return output;
|
|
}
|
|
|
|
VaryingsMeshToPS UnpackVaryingsMeshToPS (PackedVaryingsMeshToPS input)
|
|
{
|
|
VaryingsMeshToPS output;
|
|
output.positionCS = input.positionCS;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
output.instanceID = input.instanceID;
|
|
#endif
|
|
return output;
|
|
}
|
|
|
|
|
|
// --------------------------------------------------
|
|
// Graph
|
|
|
|
|
|
// Graph Functions
|
|
|
|
void Unity_Add_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
void Unity_Distance_float3(float3 A, float3 B, out float Out)
|
|
{
|
|
Out = distance(A, B);
|
|
}
|
|
|
|
void Unity_Comparison_Less_float(float A, float B, out float Out)
|
|
{
|
|
Out = A < B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_Comparison_Greater_float(float A, float B, out float Out)
|
|
{
|
|
Out = A > B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_Subtract_float(float A, float B, out float Out)
|
|
{
|
|
Out = A - B;
|
|
}
|
|
|
|
void Unity_And_float(float A, float B, out float Out)
|
|
{
|
|
Out = A && B;
|
|
}
|
|
|
|
void Unity_Branch_float(float Predicate, float True, float False, out float Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Multiply_float_float(float A, float B, out float Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Length_float4(float4 In, out float Out)
|
|
{
|
|
Out = length(In);
|
|
}
|
|
|
|
void Unity_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Subtract_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A - B;
|
|
}
|
|
|
|
void Unity_Normalize_float3(float3 In, out float3 Out)
|
|
{
|
|
Out = normalize(In);
|
|
}
|
|
|
|
void Unity_Length_float3(float3 In, out float Out)
|
|
{
|
|
Out = length(In);
|
|
}
|
|
|
|
void Unity_Divide_float(float A, float B, out float Out)
|
|
{
|
|
Out = A / B;
|
|
}
|
|
|
|
void Unity_Clamp_float(float In, float Min, float Max, out float Out)
|
|
{
|
|
Out = clamp(In, Min, Max);
|
|
}
|
|
|
|
void Unity_Lerp_float(float A, float B, float T, out float Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Multiply_float3_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Combine_float(float R, float G, float B, float A, out float4 RGBA, out float3 RGB, out float2 RG)
|
|
{
|
|
RGBA = float4(R, G, B, A);
|
|
RGB = float3(R, G, B);
|
|
RG = float2(R, G);
|
|
}
|
|
|
|
void Unity_Add_float4(float4 A, float4 B, out float4 Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
struct Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float
|
|
{
|
|
};
|
|
|
|
void SG_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float(float4x4 Matrix4_cb72bb33b7a84dfda97778a514f9b60f, float3 Vector3_90379ebf40aa468b8362f8d265f4f234, float4 Vector4_159bb4232f82428893101734a03e2a1e, Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float IN, out float4 WindPoint_1)
|
|
{
|
|
float3 _Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3 = Vector3_90379ebf40aa468b8362f8d265f4f234;
|
|
float4x4 _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4 = Matrix4_cb72bb33b7a84dfda97778a514f9b60f;
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].r);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].g);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].b);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].a);
|
|
float3 _Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4.xyz), _Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3);
|
|
float3 _Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3, _Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3);
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[0];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[1];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[2];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[3];
|
|
float _Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3, _Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float);
|
|
float4 _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4 = Vector4_159bb4232f82428893101734a03e2a1e;
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_R_1_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[0];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_G_2_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[1];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_B_3_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[2];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_A_4_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[3];
|
|
float _Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float;
|
|
Unity_Divide_float(_Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_R_1_Float, _Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float);
|
|
float _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float, float(0), float(1), _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float);
|
|
float _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float;
|
|
Unity_Lerp_float(_Split_d6e088f9ab90466583adc22ea79eb8cc_A_4_Float, float(0), _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float, _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float);
|
|
float3 _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3, (_Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float.xxx), _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3);
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_R_1_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[0];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_G_2_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[1];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_B_3_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[2];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_A_4_Float = 0;
|
|
float4 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4;
|
|
float3 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGB_5_Vector3;
|
|
float2 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_ef99a48850fe4f8f8e30e870c5e2ee09_R_1_Float, _Split_ef99a48850fe4f8f8e30e870c5e2ee09_G_2_Float, _Split_ef99a48850fe4f8f8e30e870c5e2ee09_B_3_Float, _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGB_5_Vector3, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RG_6_Vector2);
|
|
float3 _Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4.xyz), _Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3);
|
|
float3 _Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3, _Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3);
|
|
float _Split_8bbd5052350846968bf312362efd9f01_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[0];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[1];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[2];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[3];
|
|
float _Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3, _Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float);
|
|
float _Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float;
|
|
Unity_Divide_float(_Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_G_2_Float, _Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float);
|
|
float _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float, float(0), float(1), _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float);
|
|
float _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float;
|
|
Unity_Lerp_float(_Split_8bbd5052350846968bf312362efd9f01_A_4_Float, float(0), _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float, _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float);
|
|
float3 _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3, (_Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float.xxx), _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3);
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_R_1_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[0];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_G_2_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[1];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_B_3_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[2];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_A_4_Float = 0;
|
|
float4 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4;
|
|
float3 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGB_5_Vector3;
|
|
float2 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_ab8841795f594d3a90b87ac9fcc98d38_R_1_Float, _Split_ab8841795f594d3a90b87ac9fcc98d38_G_2_Float, _Split_ab8841795f594d3a90b87ac9fcc98d38_B_3_Float, _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGB_5_Vector3, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RG_6_Vector2);
|
|
float4 _Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4;
|
|
Unity_Add_float4(_Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4, _Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4);
|
|
float3 _Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4.xyz), _Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3);
|
|
float3 _Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3, _Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3);
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[0];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[1];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[2];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[3];
|
|
float _Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3, _Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float);
|
|
float _Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float;
|
|
Unity_Divide_float(_Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_B_3_Float, _Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float);
|
|
float _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float, float(0), float(1), _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float);
|
|
float _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float;
|
|
Unity_Lerp_float(_Split_fa21a8022f944854903e06c07c6f079c_A_4_Float, float(0), _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float, _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float);
|
|
float3 _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3, (_Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float.xxx), _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3);
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_R_1_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[0];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_G_2_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[1];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_B_3_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[2];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_A_4_Float = 0;
|
|
float4 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4;
|
|
float3 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGB_5_Vector3;
|
|
float2 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_6b9b5ad9f14a49b9bc49c718430617a8_R_1_Float, _Split_6b9b5ad9f14a49b9bc49c718430617a8_G_2_Float, _Split_6b9b5ad9f14a49b9bc49c718430617a8_B_3_Float, _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGB_5_Vector3, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RG_6_Vector2);
|
|
float4 _Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4;
|
|
Unity_Add_float4(_Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4, _Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4);
|
|
float3 _Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4.xyz), _Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3);
|
|
float3 _Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3, _Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3);
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[0];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[1];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[2];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[3];
|
|
float _Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3, _Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float);
|
|
float _Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float;
|
|
Unity_Divide_float(_Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_A_4_Float, _Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float);
|
|
float _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float, float(0), float(1), _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float);
|
|
float _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float;
|
|
Unity_Lerp_float(_Split_1bfec6763d4b458398e36937b4114c29_A_4_Float, float(0), _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float, _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float);
|
|
float3 _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3, (_Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float.xxx), _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3);
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_R_1_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[0];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_G_2_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[1];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_B_3_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[2];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_A_4_Float = 0;
|
|
float4 _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4;
|
|
float3 _Combine_872906644fc84c8c8286733edba75045_RGB_5_Vector3;
|
|
float2 _Combine_872906644fc84c8c8286733edba75045_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_e22879e6c4574322ab21f6261a21bced_R_1_Float, _Split_e22879e6c4574322ab21f6261a21bced_G_2_Float, _Split_e22879e6c4574322ab21f6261a21bced_B_3_Float, _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float, _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4, _Combine_872906644fc84c8c8286733edba75045_RGB_5_Vector3, _Combine_872906644fc84c8c8286733edba75045_RG_6_Vector2);
|
|
float4 _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4;
|
|
Unity_Add_float4(_Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4, _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4, _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4);
|
|
WindPoint_1 = _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4;
|
|
}
|
|
|
|
void Unity_Power_float(float A, float B, out float Out)
|
|
{
|
|
Out = pow(A, B);
|
|
}
|
|
|
|
void Unity_Or_float(float A, float B, out float Out)
|
|
{
|
|
Out = A || B;
|
|
}
|
|
|
|
void Unity_Branch_float3(float Predicate, float3 True, float3 False, out float3 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Add_float(float A, float B, out float Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
struct Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float
|
|
{
|
|
};
|
|
|
|
void SG_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float(float3 Vector3_604F121F, float3 Vector3_C30D997B, float Vector1_A2C4B4F4, float Vector1_7F78DDD2, UnityTexture2D Texture2D_5BAC276D, UnityTexture2D Texture2D_A3874DB9, float4 Vector4_EBFF8CDE, float Vector1_B4470F9B, float Vector1_2EC6D670, float Vector1_9365F438, float Vector1_F53C4B89, float Vector1_6803B355, float Vector1_5EFF6B1A, Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float IN, out float3 direction_1, out float strength_2)
|
|
{
|
|
float4 _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_R_1_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[0];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_G_2_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[1];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_B_3_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[2];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_A_4_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[3];
|
|
float4 _Combine_39060d5de038a58eb7462ba953e69739_RGBA_4_Vector4;
|
|
float3 _Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3;
|
|
float2 _Combine_39060d5de038a58eb7462ba953e69739_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_f4f701329abd45808bbd6b61ce26dcc8_R_1_Float, _Split_f4f701329abd45808bbd6b61ce26dcc8_G_2_Float, _Split_f4f701329abd45808bbd6b61ce26dcc8_B_3_Float, float(0), _Combine_39060d5de038a58eb7462ba953e69739_RGBA_4_Vector4, _Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3, _Combine_39060d5de038a58eb7462ba953e69739_RG_6_Vector2);
|
|
float3 _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3, _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3);
|
|
float4 _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_R_1_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[0];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_G_2_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[1];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_B_3_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[2];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_A_4_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[3];
|
|
float3 _Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3, (_Split_aeb4c57f09db718e9e14c3afd38465ae_A_4_Float.xxx), _Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3);
|
|
float _Property_72aef364136bb683b08145ce7a1b59a1_Out_0_Float = Vector1_9365F438;
|
|
float _Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_72aef364136bb683b08145ce7a1b59a1_Out_0_Float, float(0), _Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean);
|
|
UnityTexture2D _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D = Texture2D_A3874DB9;
|
|
float3 _Property_f0ff7954720d018395b7da89e2e2d761_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3 = float3(float(1), float(0), float(0));
|
|
float _Property_e53ae21dcf87e286b67de750a59275e7_Out_0_Float = Vector1_9365F438;
|
|
float3 _Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3, (_Property_e53ae21dcf87e286b67de750a59275e7_Out_0_Float.xxx), _Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3);
|
|
float _Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float = Vector1_5EFF6B1A;
|
|
float3 _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3, (_Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float.xxx), _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3);
|
|
float3 _Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_f0ff7954720d018395b7da89e2e2d761_Out_0_Vector3, _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3, _Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3);
|
|
float _Property_7f2599afa6fc5b8394c8fb0389031122_Out_0_Float = Vector1_6803B355;
|
|
float3 _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3, (_Property_7f2599afa6fc5b8394c8fb0389031122_Out_0_Float.xxx), _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3);
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_R_1_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[0];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_G_2_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[1];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_B_3_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[2];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_A_4_Float = 0;
|
|
float4 _Combine_0ac20ec517f076829f01b70d67c5af02_RGBA_4_Vector4;
|
|
float3 _Combine_0ac20ec517f076829f01b70d67c5af02_RGB_5_Vector3;
|
|
float2 _Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_f4466ebe24e7fa838f5735fb1210a3dd_R_1_Float, _Split_f4466ebe24e7fa838f5735fb1210a3dd_B_3_Float, float(0), float(0), _Combine_0ac20ec517f076829f01b70d67c5af02_RGBA_4_Vector4, _Combine_0ac20ec517f076829f01b70d67c5af02_RGB_5_Vector3, _Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2);
|
|
float4 _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4 = SAMPLE_TEXTURE2D_LOD(_Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.tex, _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.samplerstate, _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.GetTransformedUV(_Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2), float(3));
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_R_5_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.r;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_G_6_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.g;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_B_7_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.b;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_A_8_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.a;
|
|
float _Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float;
|
|
Unity_Branch_float(_Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean, _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_R_5_Float, float(0), _Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float);
|
|
float _Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float;
|
|
Unity_Power_float(_Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float, float(2), _Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float);
|
|
float _Property_9592cd5ab3f8628d995c1b79e8b0e51d_Out_0_Float = Vector1_F53C4B89;
|
|
float _Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float;
|
|
Unity_Multiply_float_float(_Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float, _Property_9592cd5ab3f8628d995c1b79e8b0e51d_Out_0_Float, _Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float);
|
|
float3 _Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3((_Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float.xxx), _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3, _Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3);
|
|
float _Property_7be270a4cb312f8ebbfba142f454b30d_Out_0_Float = Vector1_9365F438;
|
|
float3 _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3, (_Property_7be270a4cb312f8ebbfba142f454b30d_Out_0_Float.xxx), _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3);
|
|
float3 _Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3;
|
|
Unity_Add_float3(_Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3, _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3, _Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3);
|
|
float4 _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_e719665c40324e89a536d165d0427a68_R_1_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[0];
|
|
float _Split_e719665c40324e89a536d165d0427a68_G_2_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[1];
|
|
float _Split_e719665c40324e89a536d165d0427a68_B_3_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[2];
|
|
float _Split_e719665c40324e89a536d165d0427a68_A_4_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[3];
|
|
float _Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Split_e719665c40324e89a536d165d0427a68_A_4_Float, float(0), _Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean);
|
|
float _Property_295a45d224dd35829c1fc35a5ac74847_Out_0_Float = Vector1_2EC6D670;
|
|
float _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_295a45d224dd35829c1fc35a5ac74847_Out_0_Float, float(0), _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean);
|
|
float _Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean;
|
|
Unity_Or_float(_Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean, _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean, _Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean);
|
|
UnityTexture2D _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D = Texture2D_5BAC276D;
|
|
float3 _Property_c82f40aba4b7f08db9a97aaccbe0e096_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3, (_Split_e719665c40324e89a536d165d0427a68_A_4_Float.xxx), _Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3);
|
|
float3 _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3, (_Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float.xxx), _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3);
|
|
float3 _Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_c82f40aba4b7f08db9a97aaccbe0e096_Out_0_Vector3, _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3, _Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3);
|
|
float _Property_1ab0df57959c6986a0602bb0abfeaf58_Out_0_Float = Vector1_B4470F9B;
|
|
float3 _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3, (_Property_1ab0df57959c6986a0602bb0abfeaf58_Out_0_Float.xxx), _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3);
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_R_1_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[0];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_G_2_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[1];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_B_3_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[2];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_A_4_Float = 0;
|
|
float4 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGBA_4_Vector4;
|
|
float3 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGB_5_Vector3;
|
|
float2 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_5ff678fef0fb61889da2a8288f7e7d15_R_1_Float, _Split_5ff678fef0fb61889da2a8288f7e7d15_B_3_Float, float(0), float(0), _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGBA_4_Vector4, _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGB_5_Vector3, _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2);
|
|
float4 _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4 = SAMPLE_TEXTURE2D_LOD(_Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.tex, _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.samplerstate, _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.GetTransformedUV(_Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2), float(3));
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_R_5_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.r;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_G_6_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.g;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_B_7_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.b;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_A_8_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.a;
|
|
float4 _Combine_3136fa3d24c46087969f5a3828ccbb98_RGBA_4_Vector4;
|
|
float3 _Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3;
|
|
float2 _Combine_3136fa3d24c46087969f5a3828ccbb98_RG_6_Vector2;
|
|
Unity_Combine_float(_SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_R_5_Float, _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_G_6_Float, _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_B_7_Float, float(0), _Combine_3136fa3d24c46087969f5a3828ccbb98_RGBA_4_Vector4, _Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3, _Combine_3136fa3d24c46087969f5a3828ccbb98_RG_6_Vector2);
|
|
float3 _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3;
|
|
Unity_Add_float3(_Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3, float3(-0.5, -0.5, -0.5), _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3);
|
|
float3 _Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3;
|
|
Unity_Branch_float3(_Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean, _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3, float3(0, 0, 0), _Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3);
|
|
float _Property_9946d066804cc584a96830f8d35269cc_Out_0_Float = Vector1_2EC6D670;
|
|
float3 _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3, (_Property_9946d066804cc584a96830f8d35269cc_Out_0_Float.xxx), _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3);
|
|
float3 _Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3;
|
|
Unity_Add_float3(_Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3, _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3, _Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3);
|
|
float _Property_4ffb3356bdb9c78c815a6e7da47e7a34_Out_0_Float = Vector1_A2C4B4F4;
|
|
float3 _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3, (_Property_4ffb3356bdb9c78c815a6e7da47e7a34_Out_0_Float.xxx), _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3);
|
|
float _Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float;
|
|
Unity_Length_float3(_Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3, _Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float);
|
|
float _Property_51d6736452f5938caf6f83cdfc7df682_Out_0_Float = Vector1_7F78DDD2;
|
|
float _Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float;
|
|
Unity_Add_float(_Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float, _Property_51d6736452f5938caf6f83cdfc7df682_Out_0_Float, _Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float);
|
|
float _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float;
|
|
Unity_Multiply_float_float(_Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float, 0.001, _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float);
|
|
direction_1 = _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3;
|
|
strength_2 = _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float;
|
|
}
|
|
|
|
void Unity_CrossProduct_float(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = cross(A, B);
|
|
}
|
|
|
|
void Unity_Comparison_Equal_float(float A, float B, out float Out)
|
|
{
|
|
Out = A == B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_DotProduct_float3(float3 A, float3 B, out float Out)
|
|
{
|
|
Out = dot(A, B);
|
|
}
|
|
|
|
void Unity_Absolute_float(float In, out float Out)
|
|
{
|
|
Out = abs(In);
|
|
}
|
|
|
|
void Unity_Maximum_float(float A, float B, out float Out)
|
|
{
|
|
Out = max(A, B);
|
|
}
|
|
|
|
void Unity_Cosine_float(float In, out float Out)
|
|
{
|
|
Out = cos(In);
|
|
}
|
|
|
|
void Unity_Sine_float(float In, out float Out)
|
|
{
|
|
Out = sin(In);
|
|
}
|
|
|
|
void Unity_Comparison_NotEqual_float(float A, float B, out float Out)
|
|
{
|
|
Out = A != B ? 1 : 0;
|
|
}
|
|
|
|
struct Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float
|
|
{
|
|
float3 WorldSpaceNormal;
|
|
float4 VertexColor;
|
|
};
|
|
|
|
void SG_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float(float Vector1_BCB03E1A, float3 Vector3_C30D997B, float Vector1_A2C4B4F4, float Vector1_7EE0F94A, float Boolean_527CB26E, float Vector1_DE1BF63A, float Vector1_7F78DDD2, float3 Vector3_DE8CC74D, UnityTexture2D Texture2D_5BAC276D, UnityTexture2D Texture2D_A3874DB9, float4 Vector4_EBFF8CDE, float Vector1_B4470F9B, float Vector1_2EC6D670, float Vector1_9365F438, float Vector1_F53C4B89, float Vector1_6803B355, float4x4 Matrix4_0617b0bd42fc46ff90b1d55303a5477f, float4 Vector4_b44806ec67ca461fbcdf009dc6092cc3, Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float IN, out float3 vertex_1, out float3 normal_2)
|
|
{
|
|
float4 _Vector4_991bdf9badea4b2bb70edc71a7338c1d_Out_0_Vector4 = float4(float(0), float(0), float(0), float(1));
|
|
float3 _Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3;
|
|
{
|
|
// Converting Position from Object to AbsoluteWorld via world space
|
|
float3 world;
|
|
world = TransformObjectToWorld((_Vector4_991bdf9badea4b2bb70edc71a7338c1d_Out_0_Vector4.xyz).xyz);
|
|
_Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3 = GetAbsolutePositionWS(world);
|
|
}
|
|
float _Distance_343883e4e5444664abed46100940f24f_Out_2_Float;
|
|
Unity_Distance_float3(_Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3, float3(0, 0, 0), _Distance_343883e4e5444664abed46100940f24f_Out_2_Float);
|
|
float _Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean;
|
|
Unity_Comparison_Less_float(_Distance_343883e4e5444664abed46100940f24f_Out_2_Float, float(0.001), _Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean);
|
|
float3 _Property_2a4ab46b1d7c45918978aae50bd32b6f_Out_0_Vector3 = Vector3_C30D997B;
|
|
float4 _Vector4_d213eb2790b34988809a251ff9c74c6b_Out_0_Vector4 = float4(float(0), float(0), float(0), float(1));
|
|
float3 _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3;
|
|
_Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3 = TransformObjectToWorld((_Vector4_d213eb2790b34988809a251ff9c74c6b_Out_0_Vector4.xyz).xyz);
|
|
float3 _Property_4a88ff8e6e6b2b84bb2818cf73a0af30_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3;
|
|
_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3 = TransformObjectToWorld(_Property_4a88ff8e6e6b2b84bb2818cf73a0af30_Out_0_Vector3.xyz);
|
|
float _Property_dfda12e25f42bd808e65c99db447e176_Out_0_Boolean = Boolean_527CB26E;
|
|
float _Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float = Vector1_7EE0F94A;
|
|
float _Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float, float(0), _Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean);
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_R_1_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[0];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_G_2_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[1];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_B_3_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[2];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_A_4_Float = 0;
|
|
float _Split_7a634ef857769683b2100876a36535a2_R_1_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[0];
|
|
float _Split_7a634ef857769683b2100876a36535a2_G_2_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[1];
|
|
float _Split_7a634ef857769683b2100876a36535a2_B_3_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[2];
|
|
float _Split_7a634ef857769683b2100876a36535a2_A_4_Float = 0;
|
|
float _Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float;
|
|
Unity_Subtract_float(_Split_05e55a8c1b8cf88f93cbafc67103b677_G_2_Float, _Split_7a634ef857769683b2100876a36535a2_G_2_Float, _Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float);
|
|
float _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean;
|
|
Unity_Comparison_Less_float(_Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float, _Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float, _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean);
|
|
float _And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean;
|
|
Unity_And_float(_Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean, _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean, _And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean);
|
|
float _Property_e5e59fcc565a8b80ac239ba87d1bcf74_Out_0_Float = Vector1_A2C4B4F4;
|
|
float _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float;
|
|
Unity_Branch_float(_And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean, float(1E-05), _Property_e5e59fcc565a8b80ac239ba87d1bcf74_Out_0_Float, _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float);
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_R_1_Float = IN.VertexColor[0];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_G_2_Float = IN.VertexColor[1];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_B_3_Float = IN.VertexColor[2];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_A_4_Float = IN.VertexColor[3];
|
|
float _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float;
|
|
Unity_Multiply_float_float(_Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float, _Split_43013162a81fc4889a1944f2a2b75f66_A_4_Float, _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float);
|
|
float _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float;
|
|
Unity_Branch_float(_Property_dfda12e25f42bd808e65c99db447e176_Out_0_Boolean, _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float, _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float, _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float);
|
|
float _Property_eaab26f57a13988a8a813ad0813c8570_Out_0_Float = Vector1_7F78DDD2;
|
|
UnityTexture2D _Property_0f02225ebee993849ea6be48328c0958_Out_0_Texture2D = Texture2D_5BAC276D;
|
|
UnityTexture2D _Property_fce16cc7b4fcf48097b94eb2d5f1b596_Out_0_Texture2D = Texture2D_A3874DB9;
|
|
float4 _Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float;
|
|
Unity_Length_float4(_Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4, _Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float);
|
|
float _Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float, float(0), _Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean);
|
|
float4 _Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4;
|
|
Unity_Branch_float4(_Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean, _Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4, float4(0, 0, 1, 1), _Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4);
|
|
float4x4 _Property_cb03cb298f0a47d4ae24d85f3c47db75_Out_0_Matrix4 = Matrix4_0617b0bd42fc46ff90b1d55303a5477f;
|
|
float4 _Property_844e35a56a864617b521872c1cee398d_Out_0_Vector4 = Vector4_b44806ec67ca461fbcdf009dc6092cc3;
|
|
Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float _WindNMPoints_071e9370484b4168b560a27fbea64a52;
|
|
float4 _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4;
|
|
SG_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float(_Property_cb03cb298f0a47d4ae24d85f3c47db75_Out_0_Matrix4, SHADERGRAPH_OBJECT_POSITION, _Property_844e35a56a864617b521872c1cee398d_Out_0_Vector4, _WindNMPoints_071e9370484b4168b560a27fbea64a52, _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4);
|
|
float4 _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4;
|
|
Unity_Add_float4(_Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4, _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4, _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4);
|
|
float _Property_02c51f4c8a859f8f88433b435d4452f6_Out_0_Float = Vector1_B4470F9B;
|
|
float _Property_6b508d48a081548385021b27896c0622_Out_0_Float = Vector1_2EC6D670;
|
|
float _Property_d73fed4fb3c7b58d892364765a30498b_Out_0_Float = Vector1_9365F438;
|
|
float _Property_c3101a1b656cac858bfa11dbe7ebd268_Out_0_Float = Vector1_F53C4B89;
|
|
float _Property_c82c2ac458938d86bcc1aae3a58cc1dc_Out_0_Float = Vector1_6803B355;
|
|
float _Property_3f5330d8bec7c681ab9563aad03c7b89_Out_0_Float = Vector1_BCB03E1A;
|
|
Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba;
|
|
float3 _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3;
|
|
float _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float;
|
|
SG_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float, _Property_eaab26f57a13988a8a813ad0813c8570_Out_0_Float, _Property_0f02225ebee993849ea6be48328c0958_Out_0_Texture2D, _Property_fce16cc7b4fcf48097b94eb2d5f1b596_Out_0_Texture2D, _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4, _Property_02c51f4c8a859f8f88433b435d4452f6_Out_0_Float, _Property_6b508d48a081548385021b27896c0622_Out_0_Float, _Property_d73fed4fb3c7b58d892364765a30498b_Out_0_Float, _Property_c3101a1b656cac858bfa11dbe7ebd268_Out_0_Float, _Property_c82c2ac458938d86bcc1aae3a58cc1dc_Out_0_Float, _Property_3f5330d8bec7c681ab9563aad03c7b89_Out_0_Float, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float);
|
|
float3 _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3;
|
|
Unity_CrossProduct_float(float3 (0, 1, 0), _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3, _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3);
|
|
float _Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean;
|
|
Unity_Comparison_Equal_float((_CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3).x, float(0), _Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean);
|
|
float3 _Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean, float3(1E-06, 1E-06, 1E-06), _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3, _Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3);
|
|
float3 _Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3, _Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3);
|
|
float3 _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3);
|
|
float _DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float;
|
|
Unity_DotProduct_float3(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3, _DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float);
|
|
float3 _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, (_DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float.xxx), _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3);
|
|
float3 _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3;
|
|
Unity_Add_float3(_Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3, _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3);
|
|
float3 _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3, _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3);
|
|
float _Distance_702b068f612c7289a99272879da274ed_Out_2_Float;
|
|
Unity_Distance_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Distance_702b068f612c7289a99272879da274ed_Out_2_Float);
|
|
float _Property_f5c255b0f666358291012b78132d6593_Out_0_Float = Vector1_DE1BF63A;
|
|
float _Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float;
|
|
Unity_Divide_float(_Distance_702b068f612c7289a99272879da274ed_Out_2_Float, _Property_f5c255b0f666358291012b78132d6593_Out_0_Float, _Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float);
|
|
float _Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float;
|
|
Unity_Absolute_float(_Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float, _Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float);
|
|
float _Float_96534b09fc72da8da7bad6ebdb2b01ab_Out_0_Float = float(1E-07);
|
|
float _Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float;
|
|
Unity_Maximum_float(_Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float, _Float_96534b09fc72da8da7bad6ebdb2b01ab_Out_0_Float, _Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float);
|
|
float _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float;
|
|
Unity_Divide_float(float(1), _Property_f5c255b0f666358291012b78132d6593_Out_0_Float, _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float);
|
|
float _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float;
|
|
Unity_Power_float(_Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float, _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float, _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float);
|
|
float _Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float;
|
|
Unity_Multiply_float_float(_WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float, _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float, _Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float);
|
|
float _Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float;
|
|
Unity_Cosine_float(_Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float, _Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float);
|
|
float3 _Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3, (_Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float.xxx), _Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3);
|
|
float3 _CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3;
|
|
Unity_CrossProduct_float(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3, _CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3);
|
|
float _Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float;
|
|
Unity_Sine_float(_Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float, _Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float);
|
|
float3 _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3, (_Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float.xxx), _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3);
|
|
float3 _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3;
|
|
Unity_Add_float3(_Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3, _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3, _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3);
|
|
float3 _Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3;
|
|
Unity_Add_float3(_Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3, _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3, _Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3);
|
|
float3 _Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3;
|
|
_Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3 = TransformWorldToObject(_Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3.xyz);
|
|
float3 _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean, _Property_2a4ab46b1d7c45918978aae50bd32b6f_Out_0_Vector3, _Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3, _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3);
|
|
float3 _Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3 = Vector3_DE8CC74D;
|
|
float _Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float;
|
|
Unity_Length_float3(_Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3, _Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float);
|
|
float _Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean;
|
|
Unity_Comparison_NotEqual_float(_Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float, float(0), _Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean);
|
|
float3 _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(IN.WorldSpaceNormal, _Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3, _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3);
|
|
float3 _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean, _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3, IN.WorldSpaceNormal, _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3);
|
|
vertex_1 = _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3;
|
|
normal_2 = _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3;
|
|
}
|
|
|
|
// Graph Vertex
|
|
struct VertexDescription
|
|
{
|
|
float3 Position;
|
|
float3 Normal;
|
|
float3 Tangent;
|
|
};
|
|
|
|
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
|
|
{
|
|
VertexDescription description = (VertexDescription)0;
|
|
float3 _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3;
|
|
Unity_Add_float3(IN.ObjectSpacePosition, float3(1E-07, 1E-07, 1E-07), _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3);
|
|
float _Property_084857c303b23b82b7f2702b4186fa43_Out_0_Float = _Drag;
|
|
float _Property_35ad336ee9b278808178baf539e0133f_Out_0_Float = _HeightDrag;
|
|
float _Property_476e69b3f5653a8c995133f4fccaa757_Out_0_Float = _Stiffness;
|
|
float _Property_805aa6168fe3b08ca209d8ab0fa5d2d3_Out_0_Float = _InitialBend;
|
|
float4 _Property_8e47e7fd5c1a8b88b9cf212a6f62134c_Out_0_Vector4 = _NewNormal;
|
|
UnityTexture2D _Property_3b8cd110cb76a68d88342e4cc1336e0b_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(WIND_SETTINGS_TexNoise);
|
|
UnityTexture2D _Property_a939900eb077ee8593e638c7c457b53b_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(WIND_SETTINGS_TexGust);
|
|
float4 _Property_f59f8f9dc8757f8ab1c1d173e09c0787_Out_0_Vector4 = WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float _Property_89884359995fcf8a8d80bc0e19ce75f1_Out_0_Float = WIND_SETTINGS_FlexNoiseScale;
|
|
float _Property_c460088461241a819f81fd6ab2a8fc04_Out_0_Float = WIND_SETTINGS_Turbulence;
|
|
float _Property_0ef8268ed7d75386b8735f7baab81d22_Out_0_Float = WIND_SETTINGS_GustSpeed;
|
|
float _Property_9f4dae117e65b384a057e2e17ba36791_Out_0_Float = WIND_SETTINGS_GustScale;
|
|
float _Property_8c1472d718ff81889fbd5ee5e93e5291_Out_0_Float = WIND_SETTINGS_GustWorldScale;
|
|
float4x4 _Property_d28187fe6a414fa5b58ca9948c44abca_Out_0_Matrix4 = WIND_SETTINGS_Points;
|
|
float4 _Property_18d7723e0ed14f07992a44bbeb337673_Out_0_Vector4 = WIND_SETTINGS_Points_Radius;
|
|
Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8;
|
|
_WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8.WorldSpaceNormal = IN.WorldSpaceNormal;
|
|
_WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8.VertexColor = IN.VertexColor;
|
|
float3 _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3;
|
|
float3 _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_normal_2_Vector3;
|
|
SG_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float(IN.TimeParameters.x, _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3, _Property_084857c303b23b82b7f2702b4186fa43_Out_0_Float, _Property_35ad336ee9b278808178baf539e0133f_Out_0_Float, 0, _Property_476e69b3f5653a8c995133f4fccaa757_Out_0_Float, _Property_805aa6168fe3b08ca209d8ab0fa5d2d3_Out_0_Float, (_Property_8e47e7fd5c1a8b88b9cf212a6f62134c_Out_0_Vector4.xyz), _Property_3b8cd110cb76a68d88342e4cc1336e0b_Out_0_Texture2D, _Property_a939900eb077ee8593e638c7c457b53b_Out_0_Texture2D, _Property_f59f8f9dc8757f8ab1c1d173e09c0787_Out_0_Vector4, _Property_89884359995fcf8a8d80bc0e19ce75f1_Out_0_Float, _Property_c460088461241a819f81fd6ab2a8fc04_Out_0_Float, _Property_0ef8268ed7d75386b8735f7baab81d22_Out_0_Float, _Property_9f4dae117e65b384a057e2e17ba36791_Out_0_Float, _Property_8c1472d718ff81889fbd5ee5e93e5291_Out_0_Float, _Property_d28187fe6a414fa5b58ca9948c44abca_Out_0_Matrix4, _Property_18d7723e0ed14f07992a44bbeb337673_Out_0_Vector4, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_normal_2_Vector3);
|
|
description.Position = _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3;
|
|
description.Normal = IN.ObjectSpaceNormal;
|
|
description.Tangent = IN.ObjectSpaceTangent;
|
|
return description;
|
|
}
|
|
|
|
// Graph Pixel
|
|
struct SurfaceDescription
|
|
{
|
|
float Alpha;
|
|
};
|
|
|
|
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
|
{
|
|
SurfaceDescription surface = (SurfaceDescription)0;
|
|
surface.Alpha = float(1);
|
|
return surface;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Graph Inputs
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#define VFX_SRP_ATTRIBUTES AttributesMesh
|
|
#define VaryingsMeshType VaryingsMeshToPS
|
|
#define VFX_SRP_VARYINGS VaryingsMeshType
|
|
#define VFX_SRP_SURFACE_INPUTS FragInputs
|
|
#endif
|
|
|
|
VertexDescriptionInputs AttributesMeshToVertexDescriptionInputs(AttributesMesh 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.VertexColor = input.color;
|
|
output.TimeParameters = _TimeParameters.xyz; // Note: in case of animation this will be overwrite (allow to handle motion vector)
|
|
#if UNITY_ANY_INSTANCING_ENABLED
|
|
#else
|
|
#endif
|
|
|
|
return output;
|
|
}
|
|
|
|
VertexDescription GetVertexDescription(AttributesMesh input, float3 timeParameters
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
// build graph inputs
|
|
VertexDescriptionInputs vertexDescriptionInputs = AttributesMeshToVertexDescriptionInputs(input);
|
|
// Override time parameters with used one (This is required to correctly handle motion vectors for vertex animation based on time)
|
|
vertexDescriptionInputs.TimeParameters = timeParameters;
|
|
|
|
// evaluate vertex graph
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
// Fetch the vertex graph properties for the particle instance.
|
|
GetElementVertexProperties(element, properties);
|
|
|
|
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs, properties);
|
|
#else
|
|
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs);
|
|
#endif
|
|
return vertexDescription;
|
|
|
|
}
|
|
|
|
AttributesMesh ApplyMeshModification(AttributesMesh input, float3 timeParameters
|
|
#ifdef USE_CUSTOMINTERP_SUBSTRUCT
|
|
#ifdef TESSELLATION_ON
|
|
, inout VaryingsMeshToDS varyings
|
|
#else
|
|
, inout VaryingsMeshToPS varyings
|
|
#endif
|
|
#endif
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
VertexDescription vertexDescription = GetVertexDescription(input, timeParameters
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, element
|
|
#endif
|
|
);
|
|
|
|
// copy graph output to the results
|
|
input.positionOS = vertexDescription.Position;
|
|
input.normalOS = vertexDescription.Normal;
|
|
input.tangentOS.xyz = vertexDescription.Tangent;
|
|
|
|
|
|
|
|
return input;
|
|
}
|
|
|
|
#if defined(_ADD_CUSTOM_VELOCITY) // For shader graph custom velocity
|
|
// Return precomputed Velocity in object space
|
|
float3 GetCustomVelocity(AttributesMesh input
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
VertexDescription vertexDescription = GetVertexDescription(input, _TimeParameters.xyz
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, element
|
|
#endif
|
|
);
|
|
return vertexDescription.CustomVelocity;
|
|
}
|
|
#endif
|
|
|
|
FragInputs BuildFragInputs(VaryingsMeshToPS input)
|
|
{
|
|
FragInputs output;
|
|
ZERO_INITIALIZE(FragInputs, output);
|
|
|
|
// Init to some default value to make the computer quiet (else it output 'divide by zero' warning even if value is not used).
|
|
// TODO: this is a really poor workaround, but the variable is used in a bunch of places
|
|
// to compute normals which are then passed on elsewhere to compute other values...
|
|
output.tangentToWorld = k_identity3x3;
|
|
output.positionSS = input.positionCS; // input.positionCS is SV_Position
|
|
|
|
|
|
#if UNITY_ANY_INSTANCING_ENABLED
|
|
#else
|
|
#endif
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
// FragInputs from VFX come from two places: Interpolator or CBuffer.
|
|
#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
|
|
|
|
// splice point to copy custom interpolator fields from varyings to frag inputs
|
|
|
|
|
|
return output;
|
|
}
|
|
|
|
// existing HDRP code uses the combined function to go directly from packed to frag inputs
|
|
FragInputs UnpackVaryingsMeshToFragInputs(PackedVaryingsMeshToPS input)
|
|
{
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
#if defined(HAVE_VFX_MODIFICATION) && defined(UNITY_INSTANCING_ENABLED)
|
|
unity_InstanceID = input.instanceID;
|
|
#endif
|
|
VaryingsMeshToPS unpacked = UnpackVaryingsMeshToPS(input);
|
|
return BuildFragInputs(unpacked);
|
|
}
|
|
SurfaceDescriptionInputs FragInputsToSurfaceDescriptionInputs(FragInputs input, float3 viewWS)
|
|
{
|
|
SurfaceDescriptionInputs output;
|
|
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
|
|
|
#if defined(SHADER_STAGE_RAY_TRACING)
|
|
#else
|
|
#endif
|
|
|
|
#if UNITY_UV_STARTS_AT_TOP
|
|
#else
|
|
#endif
|
|
|
|
|
|
|
|
// splice point to copy frag inputs custom interpolator pack into the SDI
|
|
|
|
|
|
return output;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Surface Data (Specific Material)
|
|
|
|
void ApplyDecalToSurfaceDataNoNormal(DecalSurfaceData decalSurfaceData, inout SurfaceData surfaceData);
|
|
|
|
void ApplyDecalAndGetNormal(FragInputs fragInputs, PositionInputs posInput, SurfaceDescription surfaceDescription,
|
|
inout SurfaceData surfaceData)
|
|
{
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
#ifdef DECAL_NORMAL_BLENDING
|
|
// SG nodes don't ouptut surface gradients, so if decals require surf grad blending, we have to convert
|
|
// the normal to gradient before applying the decal. We then have to resolve the gradient back to world space
|
|
float3 normalTS;
|
|
|
|
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, fragInputs.tangentToWorld[2], normalTS);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
|
|
GetNormalWS_SG(fragInputs, normalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
#else
|
|
// normal delivered to master node
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Both uses and modifies 'surfaceData.normalWS'.
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, surfaceData.normalWS.xyz);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
#endif
|
|
}
|
|
void BuildSurfaceData(FragInputs fragInputs, inout SurfaceDescription surfaceDescription, float3 V, PositionInputs posInput, out SurfaceData surfaceData, out float3 bentNormalWS)
|
|
{
|
|
ZERO_INITIALIZE(SurfaceData, surfaceData);
|
|
|
|
// specularOcclusion need to be init ahead of decal to quiet the compiler that modify the SurfaceData struct
|
|
// however specularOcclusion can come from the graph, so need to be init here so it can be override.
|
|
surfaceData.specularOcclusion = 1.0;
|
|
surfaceData.thickness = 0.0;
|
|
|
|
|
|
#if defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE) || defined(_REFRACTION_THIN)
|
|
if (_EnableSSRefraction)
|
|
{
|
|
|
|
surfaceData.transmittanceMask = (1.0 - surfaceDescription.Alpha);
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
else
|
|
{
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
#else
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
#endif
|
|
|
|
// These static material feature allow compile time optimization
|
|
surfaceData.materialFeatures = MATERIALFEATUREFLAGS_LIT_STANDARD;
|
|
#ifdef _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SUBSURFACE_SCATTERING;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_COLORED_TRANSMISSION;
|
|
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_ANISOTROPY
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_ANISOTROPY;
|
|
|
|
// Initialize the normal to something non-zero to avoid a div-zero warning for anisotropy.
|
|
surfaceData.normalWS = float3(0, 1, 0);
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_IRIDESCENCE
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_IRIDESCENCE;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SPECULAR_COLOR;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_CLEAR_COAT
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_CLEAR_COAT;
|
|
#endif
|
|
|
|
#if defined (_MATERIAL_FEATURE_SPECULAR_COLOR) && defined (_ENERGY_CONSERVING_SPECULAR)
|
|
// Require to have setup baseColor
|
|
// Reproduce the energy conservation done in legacy Unity. Not ideal but better for compatibility and users can unchek it
|
|
surfaceData.baseColor *= (1.0 - Max3(surfaceData.specularColor.r, surfaceData.specularColor.g, surfaceData.specularColor.b));
|
|
#endif
|
|
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
ApplyDecalAndGetNormal(fragInputs, posInput, surfaceDescription, surfaceData);
|
|
|
|
surfaceData.geomNormalWS = fragInputs.tangentToWorld[2];
|
|
|
|
surfaceData.tangentWS = normalize(fragInputs.tangentToWorld[0].xyz); // The tangent is not normalize in tangentToWorld for mikkt. TODO: Check if it expected that we normalize with Morten. Tag: SURFACE_GRADIENT
|
|
|
|
|
|
bentNormalWS = surfaceData.normalWS;
|
|
|
|
surfaceData.tangentWS = Orthonormalize(surfaceData.tangentWS, surfaceData.normalWS);
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
// Mipmap mode debugging isn't supported with ray tracing as it relies on derivatives
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD0
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG(posInput.positionSS, fragInputs.texCoord0);
|
|
#else
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG_NO_UV(posInput.positionSS);
|
|
#endif
|
|
surfaceData.metallic = 0;
|
|
}
|
|
#endif
|
|
|
|
// We need to call ApplyDebugToSurfaceData after filling the surfaceData and before filling builtinData
|
|
// as it can modify attribute use for static lighting
|
|
ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData);
|
|
#endif
|
|
|
|
// By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion.
|
|
// If user provide bent normal then we process a better term
|
|
#if defined(_SPECULAR_OCCLUSION_CUSTOM)
|
|
// Just use the value passed through via the slot (not active otherwise)
|
|
#elif defined(_SPECULAR_OCCLUSION_FROM_AO_BENT_NORMAL)
|
|
// If we have bent normal and ambient occlusion, process a specular occlusion
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromBentAO(V, bentNormalWS, surfaceData.normalWS, surfaceData.ambientOcclusion, PerceptualSmoothnessToPerceptualRoughness(surfaceData.perceptualSmoothness));
|
|
#elif defined(_AMBIENT_OCCLUSION) && defined(_SPECULAR_OCCLUSION_FROM_AO)
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness));
|
|
#endif
|
|
|
|
#if defined(_ENABLE_GEOMETRIC_SPECULAR_AA) && !defined(SHADER_STAGE_RAY_TRACING)
|
|
surfaceData.perceptualSmoothness = GeometricNormalFiltering(surfaceData.perceptualSmoothness, fragInputs.tangentToWorld[2], surfaceDescription.SpecularAAScreenSpaceVariance, surfaceDescription.SpecularAAThreshold);
|
|
#endif
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Get Surface And BuiltinData
|
|
|
|
void GetSurfaceAndBuiltinData(FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData RAY_TRACING_OPTIONAL_PARAMETERS)
|
|
{
|
|
// Don't dither if displaced tessellation (we're fading out the displacement instead to match the next LOD)
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && !defined(_TESSELLATION_DISPLACEMENT)
|
|
#ifdef LOD_FADE_CROSSFADE // enable dithering LOD transition if user select CrossFade transition in LOD group
|
|
LODDitheringTransition(ComputeFadeMaskSeed(V, posInput.positionSS), unity_LODFade.x);
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
#ifdef _DOUBLESIDED_ON
|
|
float3 doubleSidedConstants = _DoubleSidedConstants.xyz;
|
|
#else
|
|
float3 doubleSidedConstants = float3(1.0, 1.0, 1.0);
|
|
#endif
|
|
|
|
ApplyDoubleSidedFlipOrMirror(fragInputs, doubleSidedConstants); // Apply double sided flip on the vertex normal
|
|
#endif // SHADER_UNLIT
|
|
|
|
SurfaceDescriptionInputs surfaceDescriptionInputs = FragInputsToSurfaceDescriptionInputs(fragInputs, V);
|
|
|
|
#if defined(HAVE_VFX_MODIFICATION)
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
GetElementPixelProperties(fragInputs, properties);
|
|
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs, properties);
|
|
#else
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs);
|
|
#endif
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
surfaceDescription.Alpha = 1.0f;
|
|
}
|
|
#endif
|
|
|
|
// Perform alpha test very early to save performance (a killed pixel will not sample textures)
|
|
// TODO: split graph evaluation to grab just alpha dependencies first? tricky..
|
|
#ifdef _ALPHATEST_ON
|
|
float alphaCutoff = surfaceDescription.AlphaClipThreshold;
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
// The TransparentDepthPrepass is also used with SSR transparent.
|
|
// If an artists enable transaprent SSR but not the TransparentDepthPrepass itself, then we use AlphaClipThreshold
|
|
// otherwise if TransparentDepthPrepass is enabled we use AlphaClipThresholdDepthPrepass
|
|
#elif SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_POSTPASS
|
|
// DepthPostpass always use its own alpha threshold
|
|
alphaCutoff = surfaceDescription.AlphaClipThresholdDepthPostpass;
|
|
#elif (SHADERPASS == SHADERPASS_SHADOWS) || (SHADERPASS == SHADERPASS_RAYTRACING_VISIBILITY)
|
|
// If use shadow threshold isn't enable we don't allow any test
|
|
#endif
|
|
|
|
GENERIC_ALPHA_TEST(surfaceDescription.Alpha, alphaCutoff);
|
|
#endif
|
|
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && _DEPTHOFFSET_ON
|
|
ApplyDepthOffsetPositionInput(V, surfaceDescription.DepthOffset, GetViewForwardDir(), GetWorldToHClipMatrix(), posInput);
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
float3 bentNormalWS;
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData, bentNormalWS);
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD1
|
|
float4 lightmapTexCoord1 = fragInputs.texCoord1;
|
|
#else
|
|
float4 lightmapTexCoord1 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD2
|
|
float4 lightmapTexCoord2 = fragInputs.texCoord2;
|
|
#else
|
|
float4 lightmapTexCoord2 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Builtin Data
|
|
// For back lighting we use the oposite vertex normal
|
|
InitBuiltinData(posInput, alpha, bentNormalWS, -fragInputs.tangentToWorld[2], lightmapTexCoord1, lightmapTexCoord2, builtinData);
|
|
|
|
#else
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData);
|
|
|
|
ZERO_BUILTIN_INITIALIZE(builtinData); // No call to InitBuiltinData as we don't have any lighting
|
|
builtinData.opacity = surfaceDescription.Alpha;
|
|
|
|
#if defined(DEBUG_DISPLAY)
|
|
// Light Layers are currently not used for the Unlit shader (because it is not lit)
|
|
// But Unlit objects do cast shadows according to their rendering layer mask, which is what we want to
|
|
// display in the light layers visualization mode, therefore we need the renderingLayers
|
|
builtinData.renderingLayers = GetMeshRenderingLayerMask();
|
|
#endif
|
|
|
|
#endif // SHADER_UNLIT
|
|
|
|
#ifdef _ALPHATEST_ON
|
|
// Used for sharpening by alpha to mask - Alpha to covertage is only used with depth only and forward pass (no shadow pass, no transparent pass)
|
|
builtinData.alphaClipTreshold = alphaCutoff;
|
|
#endif
|
|
|
|
// override sampleBakedGI - not used by Unlit
|
|
// When overriding GI, we need to force the isLightmap flag to make sure we don't add APV (sampled in the lightloop) on top of the overridden value (set at GBuffer stage)
|
|
|
|
|
|
// Note this will not fully work on transparent surfaces (can check with _SURFACE_TYPE_TRANSPARENT define)
|
|
// We will always overwrite vt feeback with the nearest. So behind transparent surfaces vt will not be resolved
|
|
// This is a limitation of the current MRT approach.
|
|
#ifdef UNITY_VIRTUAL_TEXTURING
|
|
#endif
|
|
|
|
#if _DEPTHOFFSET_ON
|
|
builtinData.depthOffset = surfaceDescription.DepthOffset;
|
|
#endif
|
|
|
|
// TODO: We should generate distortion / distortionBlur for non distortion pass
|
|
#if (SHADERPASS == SHADERPASS_DISTORTION)
|
|
builtinData.distortion = surfaceDescription.Distortion;
|
|
builtinData.distortionBlur = surfaceDescription.DistortionBlur;
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// PostInitBuiltinData call ApplyDebugToBuiltinData
|
|
PostInitBuiltinData(V, posInput, surfaceData, builtinData);
|
|
#else
|
|
ApplyDebugToBuiltinData(builtinData);
|
|
#endif
|
|
|
|
RAY_TRACING_OPTIONAL_ALPHA_TEST_PASS
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Main
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDepthOnly.hlsl"
|
|
|
|
// --------------------------------------------------
|
|
// Visual Effect Vertex Invocations
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/VisualEffectVertex.hlsl"
|
|
#else
|
|
#endif
|
|
#endif
|
|
|
|
ENDHLSL
|
|
}
|
|
Pass
|
|
{
|
|
Name "META"
|
|
Tags
|
|
{
|
|
"LightMode" = "META"
|
|
}
|
|
|
|
// Render State
|
|
Cull Off
|
|
|
|
// Debug
|
|
// <None>
|
|
|
|
// --------------------------------------------------
|
|
// Pass
|
|
|
|
HLSLPROGRAM
|
|
|
|
// Pragmas
|
|
#pragma multi_compile _ DOTS_INSTANCING_ON
|
|
#pragma instancing_options renderinglayer
|
|
#pragma target 4.5
|
|
#pragma vertex Vert
|
|
#pragma fragment Frag
|
|
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
|
|
#pragma multi_compile_instancing
|
|
|
|
// Keywords
|
|
#pragma shader_feature _ EDITOR_VISUALIZATION
|
|
#pragma shader_feature _ _SURFACE_TYPE_TRANSPARENT
|
|
#pragma shader_feature_local _ _DOUBLESIDED_ON
|
|
#pragma shader_feature_local _ _ADD_PRECOMPUTED_VELOCITY
|
|
#pragma shader_feature_local _ _TRANSPARENT_WRITES_MOTION_VEC _TRANSPARENT_REFRACTIVE_SORT
|
|
#pragma shader_feature_local_fragment _ _ENABLE_FOG_ON_TRANSPARENT
|
|
#pragma multi_compile _ LOD_FADE_CROSSFADE
|
|
#pragma shader_feature_local_fragment _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local _ _REFRACTION_PLANE _REFRACTION_SPHERE _REFRACTION_THIN
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// GraphKeywords: <None>
|
|
|
|
// Defines
|
|
#define SHADERPASS SHADERPASS_LIGHT_TRANSPORT
|
|
#define RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define SCENEPICKINGPASS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
|
|
// For custom interpolators to inject a substruct definition before FragInputs definition,
|
|
// allowing for FragInputs to capture CI's intended for ShaderGraph's SDI.
|
|
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreInclude' */
|
|
|
|
|
|
// TODO: Merge FragInputsVFX substruct with CustomInterpolators.
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
struct FragInputsVFX
|
|
{
|
|
/* WARNING: $splice Could not find named fragment 'FragInputsVFX' */
|
|
};
|
|
#endif
|
|
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/GeometricTools.hlsl" // Required by Tessellation.hlsl
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Tessellation.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" // Required to be include before we include properties as it define DECLARE_STACK_CB
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl" // Required before including properties as it defines UNITY_TEXTURE_STREAMING_DEBUG_VARS
|
|
// Always include Shader Graph version
|
|
// Always include last to avoid double macros
|
|
#include "Packages/com.unity.shadergraph/ShaderGraphLibrary/Functions.hlsl" // Need to be here for Gradient struct definition
|
|
|
|
// --------------------------------------------------
|
|
// Defines
|
|
|
|
// Attribute
|
|
#define ATTRIBUTES_NEED_NORMAL
|
|
#define ATTRIBUTES_NEED_TEXCOORD0
|
|
#define ATTRIBUTES_NEED_TEXCOORD1
|
|
#define ATTRIBUTES_NEED_TEXCOORD2
|
|
#define ATTRIBUTES_NEED_TEXCOORD3
|
|
#define VARYINGS_NEED_POSITION_WS
|
|
#define VARYINGS_NEED_POSITIONPREDISPLACEMENT_WS
|
|
#define VARYINGS_NEED_TEXCOORD0
|
|
#define VARYINGS_NEED_TEXCOORD1
|
|
#define VARYINGS_NEED_TEXCOORD2
|
|
#define VARYINGS_NEED_TEXCOORD3
|
|
|
|
#define HAVE_MESH_MODIFICATION
|
|
|
|
//Strip down the FragInputs.hlsl (on graphics), so we can only optimize the interpolators we use.
|
|
//if by accident something requests contents of FragInputs.hlsl, it will be caught as a compiler error
|
|
//Frag inputs stripping is only enabled when FRAG_INPUTS_ENABLE_STRIPPING is set
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && SHADERPASS != SHADERPASS_RAYTRACING_GBUFFER && SHADERPASS != SHADERPASS_FULL_SCREEN_DEBUG
|
|
#define FRAG_INPUTS_ENABLE_STRIPPING
|
|
#endif
|
|
#define FRAG_INPUTS_USE_TEXCOORD0
|
|
#define FRAG_INPUTS_USE_TEXCOORD1
|
|
#define FRAG_INPUTS_USE_TEXCOORD2
|
|
#define FRAG_INPUTS_USE_TEXCOORD3
|
|
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl"
|
|
|
|
|
|
|
|
|
|
// Following two define are a workaround introduce in 10.1.x for RaytracingQualityNode
|
|
// The ShaderGraph don't support correctly migration of this node as it serialize all the node data
|
|
// in the json file making it impossible to uprgrade. Until we get a fix, we do a workaround here
|
|
// to still allow us to rename the field and keyword of this node without breaking existing code.
|
|
#ifdef RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define RAYTRACING_SHADER_GRAPH_HIGH
|
|
#endif
|
|
|
|
#ifdef RAYTRACING_SHADER_GRAPH_RAYTRACED
|
|
#define RAYTRACING_SHADER_GRAPH_LOW
|
|
#endif
|
|
// end
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// We need isFrontFace when using double sided - it is not required for unlit as in case of unlit double sided only drive the cullmode
|
|
// VARYINGS_NEED_CULLFACE can be define by VaryingsMeshToPS.FaceSign input if a IsFrontFace Node is included in the shader graph.
|
|
#if defined(_DOUBLESIDED_ON) && !defined(VARYINGS_NEED_CULLFACE)
|
|
#define VARYINGS_NEED_CULLFACE
|
|
#endif
|
|
#endif
|
|
|
|
// Specific Material Define
|
|
#define _AMBIENT_OCCLUSION 1
|
|
#define _SPECULAR_OCCLUSION_FROM_AO 1
|
|
#define _ENERGY_CONSERVING_SPECULAR 1
|
|
|
|
#if _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// Colored Transmission doesn't support clear coat
|
|
#undef _MATERIAL_FEATURE_CLEAR_COAT
|
|
#endif
|
|
|
|
// If we use subsurface scattering, enable output split lighting (for forward pass)
|
|
#if defined(_MATERIAL_FEATURE_SUBSURFACE_SCATTERING) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define OUTPUT_SPLIT_LIGHTING
|
|
#endif
|
|
|
|
// This shader support recursive rendering for raytracing
|
|
#define HAVE_RECURSIVE_RENDERING
|
|
|
|
// In Path Tracing, For all single-sided, refractive materials, we want to force a thin refraction model
|
|
#if (SHADERPASS == SHADERPASS_PATH_TRACING) && !defined(_DOUBLESIDED_ON) && (defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE))
|
|
#undef _REFRACTION_PLANE
|
|
#undef _REFRACTION_SPHERE
|
|
#define _REFRACTION_THIN
|
|
#endif
|
|
// Caution: we can use the define SHADER_UNLIT onlit after the above Material include as it is the Unlit template who define it
|
|
|
|
// To handle SSR on transparent correctly with a possibility to enable/disable it per framesettings
|
|
// we should have a code like this:
|
|
// if !defined(_DISABLE_SSR_TRANSPARENT)
|
|
// pragma multi_compile _ WRITE_NORMAL_BUFFER
|
|
// endif
|
|
// i.e we enable the multicompile only if we can receive SSR or not, and then C# code drive
|
|
// it based on if SSR transparent in frame settings and not (and stripper can strip it).
|
|
// this is currently not possible with our current preprocessor as _DISABLE_SSR_TRANSPARENT is a keyword not a define
|
|
// so instead we used this and chose to pay the extra cost of normal write even if SSR transaprent is disabled.
|
|
// Ideally the shader graph generator should handle it but condition below can't be handle correctly for now.
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
#if !defined(_DISABLE_SSR_TRANSPARENT) && !defined(SHADER_UNLIT)
|
|
#define WRITE_NORMAL_BUFFER
|
|
#endif
|
|
#endif
|
|
|
|
// See Lit.shader
|
|
#if SHADERPASS == SHADERPASS_MOTION_VECTORS && defined(WRITE_DECAL_BUFFER_AND_RENDERING_LAYER)
|
|
#define WRITE_DECAL_BUFFER
|
|
#endif
|
|
|
|
#ifndef DEBUG_DISPLAY
|
|
// In case of opaque we don't want to perform the alpha test, it is done in depth prepass and we use depth equal for ztest (setup from UI)
|
|
// Don't do it with debug display mode as it is possible there is no depth prepass in this case
|
|
#if !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#if SHADERPASS == SHADERPASS_FORWARD
|
|
#define SHADERPASS_FORWARD_BYPASS_ALPHA_TEST
|
|
#elif SHADERPASS == SHADERPASS_GBUFFER
|
|
#define SHADERPASS_GBUFFER_BYPASS_ALPHA_TEST
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
// Define _DEFERRED_CAPABLE_MATERIAL for shader capable to run in deferred pass
|
|
#if defined(SHADER_LIT) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _DEFERRED_CAPABLE_MATERIAL
|
|
#endif
|
|
|
|
// Translate transparent motion vector define
|
|
#if (defined(_TRANSPARENT_WRITES_MOTION_VEC) || defined(_TRANSPARENT_REFRACTIVE_SORT)) && defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _WRITE_TRANSPARENT_MOTION_VECTOR
|
|
#endif
|
|
|
|
// -- Graph Properties
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _TrunkBaseColor;
|
|
float4 _TrunkBaseColorMap_TexelSize;
|
|
float4 _TrunkTilingOffset;
|
|
float4 _TrunkNormalMap_TexelSize;
|
|
float _TrunkNormalScale;
|
|
float4 _TrunkMaskMap_TexelSize;
|
|
float _TrunkMetallic;
|
|
float _TrunkAORemapMin;
|
|
float _TrunkAORemapMax;
|
|
float _TrunkSmoothnessRemapMin;
|
|
float _TrunkSmoothnessRemapMax;
|
|
float4 _LayerMask_TexelSize;
|
|
float4 _BarkBlendMaskTilingOffset;
|
|
float4 _BarkBaseColor;
|
|
float4 _BarkBaseColorMap_TexelSize;
|
|
float _BarkUseUV3;
|
|
float4 _BarkTilingOffset;
|
|
float4 _BarkNormalMap_TexelSize;
|
|
float _BarkNormalScale;
|
|
float4 _BarkMaskMap_TexelSize;
|
|
float _BarkMetallic;
|
|
float _BarkSmoothnessRemapMin;
|
|
float _BarkSmoothnessRemapMax;
|
|
float _BarkAORemapMin;
|
|
float _BarkAORemapMax;
|
|
float _Stiffness;
|
|
float _InitialBend;
|
|
float _Drag;
|
|
float _HeightDrag;
|
|
float4 _NewNormal;
|
|
float4 _EmissionColor;
|
|
float _UseShadowThreshold;
|
|
float4 _DoubleSidedConstants;
|
|
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
|
float _BlendMode;
|
|
float _EnableBlendModePreserveSpecularLighting;
|
|
float _RayTracing;
|
|
float _RefractionModel;
|
|
float _MaterialID;
|
|
float _MaterialTypeMask;
|
|
CBUFFER_END
|
|
|
|
|
|
// Object and Global properties
|
|
SAMPLER(SamplerState_Linear_Repeat);
|
|
SAMPLER(SamplerState_Linear_Repeat_Aniso8);
|
|
TEXTURE2D(_TrunkBaseColorMap);
|
|
SAMPLER(sampler_TrunkBaseColorMap);
|
|
TEXTURE2D(_TrunkNormalMap);
|
|
SAMPLER(sampler_TrunkNormalMap);
|
|
TEXTURE2D(_TrunkMaskMap);
|
|
SAMPLER(sampler_TrunkMaskMap);
|
|
TEXTURE2D(_LayerMask);
|
|
SAMPLER(sampler_LayerMask);
|
|
TEXTURE2D(_BarkBaseColorMap);
|
|
SAMPLER(sampler_BarkBaseColorMap);
|
|
TEXTURE2D(_BarkNormalMap);
|
|
SAMPLER(sampler_BarkNormalMap);
|
|
TEXTURE2D(_BarkMaskMap);
|
|
SAMPLER(sampler_BarkMaskMap);
|
|
TEXTURE2D(WIND_SETTINGS_TexNoise);
|
|
SAMPLER(samplerWIND_SETTINGS_TexNoise);
|
|
float4 WIND_SETTINGS_TexNoise_TexelSize;
|
|
TEXTURE2D(WIND_SETTINGS_TexGust);
|
|
SAMPLER(samplerWIND_SETTINGS_TexGust);
|
|
float4 WIND_SETTINGS_TexGust_TexelSize;
|
|
float4 WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float WIND_SETTINGS_FlexNoiseScale;
|
|
float WIND_SETTINGS_ShiverNoiseScale;
|
|
float WIND_SETTINGS_Turbulence;
|
|
float WIND_SETTINGS_GustSpeed;
|
|
float WIND_SETTINGS_GustScale;
|
|
float WIND_SETTINGS_GustWorldScale;
|
|
float4x4 WIND_SETTINGS_Points;
|
|
float4 WIND_SETTINGS_Points_Radius;
|
|
|
|
// -- Property used by ScenePickingPass
|
|
#ifdef SCENEPICKINGPASS
|
|
float4 _SelectionID;
|
|
#endif
|
|
|
|
// -- Properties used by SceneSelectionPass
|
|
#ifdef SCENESELECTIONPASS
|
|
int _ObjectId;
|
|
int _PassValue;
|
|
#endif
|
|
|
|
// Includes
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/PickingSpaceTransforms.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/NormalSurfaceGradient.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDecalData.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
// GraphIncludes: <None>
|
|
|
|
// --------------------------------------------------
|
|
// Structs and Packing
|
|
|
|
struct AttributesMesh
|
|
{
|
|
float3 positionOS : POSITION;
|
|
float3 normalOS : NORMAL;
|
|
float4 uv0 : TEXCOORD0;
|
|
float4 uv1 : TEXCOORD1;
|
|
float4 uv2 : TEXCOORD2;
|
|
float4 uv3 : TEXCOORD3;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(ATTRIBUTES_NEED_INSTANCEID)
|
|
uint instanceID : INSTANCEID_SEMANTIC;
|
|
#endif
|
|
};
|
|
struct VaryingsMeshToPS
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
float3 positionRWS;
|
|
float3 positionPredisplacementRWS;
|
|
float4 texCoord0;
|
|
float4 texCoord1;
|
|
float4 texCoord2;
|
|
float4 texCoord3;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
uint instanceID : CUSTOM_INSTANCE_ID;
|
|
#endif
|
|
};
|
|
struct VertexDescriptionInputs
|
|
{
|
|
};
|
|
struct SurfaceDescriptionInputs
|
|
{
|
|
float3 TangentSpaceNormal;
|
|
float4 uv0;
|
|
float4 uv3;
|
|
};
|
|
struct PackedVaryingsMeshToPS
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
float4 texCoord0 : INTERP0;
|
|
float4 texCoord1 : INTERP1;
|
|
float4 texCoord2 : INTERP2;
|
|
float4 texCoord3 : INTERP3;
|
|
float3 positionRWS : INTERP4;
|
|
float3 positionPredisplacementRWS : INTERP5;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
uint instanceID : CUSTOM_INSTANCE_ID;
|
|
#endif
|
|
};
|
|
|
|
PackedVaryingsMeshToPS PackVaryingsMeshToPS (VaryingsMeshToPS input)
|
|
{
|
|
PackedVaryingsMeshToPS output;
|
|
ZERO_INITIALIZE(PackedVaryingsMeshToPS, output);
|
|
output.positionCS = input.positionCS;
|
|
output.texCoord0.xyzw = input.texCoord0;
|
|
output.texCoord1.xyzw = input.texCoord1;
|
|
output.texCoord2.xyzw = input.texCoord2;
|
|
output.texCoord3.xyzw = input.texCoord3;
|
|
output.positionRWS.xyz = input.positionRWS;
|
|
output.positionPredisplacementRWS.xyz = input.positionPredisplacementRWS;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
output.instanceID = input.instanceID;
|
|
#endif
|
|
return output;
|
|
}
|
|
|
|
VaryingsMeshToPS UnpackVaryingsMeshToPS (PackedVaryingsMeshToPS input)
|
|
{
|
|
VaryingsMeshToPS output;
|
|
output.positionCS = input.positionCS;
|
|
output.texCoord0 = input.texCoord0.xyzw;
|
|
output.texCoord1 = input.texCoord1.xyzw;
|
|
output.texCoord2 = input.texCoord2.xyzw;
|
|
output.texCoord3 = input.texCoord3.xyzw;
|
|
output.positionRWS = input.positionRWS.xyz;
|
|
output.positionPredisplacementRWS = input.positionPredisplacementRWS.xyz;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
output.instanceID = input.instanceID;
|
|
#endif
|
|
return output;
|
|
}
|
|
|
|
|
|
// --------------------------------------------------
|
|
// Graph
|
|
|
|
|
|
// Graph Functions
|
|
|
|
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_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Lerp_float4(float4 A, float4 B, float4 T, out float4 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Multiply_float_float(float A, float B, out float Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Remap_float(float In, float2 InMinMax, float2 OutMinMax, out float Out)
|
|
{
|
|
Out = OutMinMax.x + (In - InMinMax.x) * (OutMinMax.y - OutMinMax.x) / (InMinMax.y - InMinMax.x);
|
|
}
|
|
|
|
void Unity_Lerp_float3(float3 A, float3 B, float3 T, out float3 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_NormalStrength_float(float3 In, float Strength, out float3 Out)
|
|
{
|
|
Out = float3(In.rg * Strength, lerp(1, In.b, saturate(Strength)));
|
|
}
|
|
|
|
// Graph Vertex
|
|
struct VertexDescription
|
|
{
|
|
};
|
|
|
|
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
|
|
{
|
|
VertexDescription description = (VertexDescription)0;
|
|
return description;
|
|
}
|
|
|
|
// Graph Pixel
|
|
struct SurfaceDescription
|
|
{
|
|
float3 BaseColor;
|
|
float3 Emission;
|
|
float Alpha;
|
|
float3 BentNormal;
|
|
float Smoothness;
|
|
float Occlusion;
|
|
float3 NormalTS;
|
|
float Metallic;
|
|
};
|
|
|
|
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
|
{
|
|
SurfaceDescription surface = (SurfaceDescription)0;
|
|
UnityTexture2D _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkBaseColorMap);
|
|
float4 _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4 = _TrunkTilingOffset;
|
|
float _Split_60538633130155809820b3185c81057f_R_1_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[0];
|
|
float _Split_60538633130155809820b3185c81057f_G_2_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[1];
|
|
float _Split_60538633130155809820b3185c81057f_B_3_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[2];
|
|
float _Split_60538633130155809820b3185c81057f_A_4_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[3];
|
|
float2 _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_R_1_Float, _Split_60538633130155809820b3185c81057f_G_2_Float);
|
|
float2 _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_B_3_Float, _Split_60538633130155809820b3185c81057f_A_4_Float);
|
|
float2 _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2, _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2, _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2);
|
|
float4 _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_R_4_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_G_5_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_B_6_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_A_7_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.a;
|
|
float4 _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4 = _TrunkBaseColor;
|
|
float4 _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4, _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4, _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4);
|
|
UnityTexture2D _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkBaseColorMap);
|
|
float _Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean = _BarkUseUV3;
|
|
float4 _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4 = IN.uv3;
|
|
float4 _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4 = IN.uv0;
|
|
float4 _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4;
|
|
Unity_Branch_float4(_Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean, _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4, _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4, _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4);
|
|
float4 _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4 = _BarkTilingOffset;
|
|
float _Split_ee975774554f6480b33168eff36d8be7_R_1_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[0];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_G_2_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[1];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_B_3_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[2];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_A_4_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[3];
|
|
float2 _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_R_1_Float, _Split_ee975774554f6480b33168eff36d8be7_G_2_Float);
|
|
float2 _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_B_3_Float, _Split_ee975774554f6480b33168eff36d8be7_A_4_Float);
|
|
float2 _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float((_Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4.xy), _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2, _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2, _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2);
|
|
float4 _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_R_4_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_G_5_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_B_6_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_A_7_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.a;
|
|
float4 _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4 = _BarkBaseColor;
|
|
float4 _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4, _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4);
|
|
UnityTexture2D _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_LayerMask);
|
|
float4 _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4 = _BarkBlendMaskTilingOffset;
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[0];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[1];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[2];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[3];
|
|
float2 _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float);
|
|
float2 _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float);
|
|
float2 _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2, _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2, _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2);
|
|
float4 _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2) );
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_R_4_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_G_5_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_B_6_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.a;
|
|
float4 _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4;
|
|
Unity_Lerp_float4(_Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxxx), _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4);
|
|
UnityTexture2D _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkMaskMap);
|
|
float4 _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_B_6_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.a;
|
|
float _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float = _TrunkMetallic;
|
|
float _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float, _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float, _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float);
|
|
float _Property_8142f12b781ad08680220297dab56f14_Out_0_Float = _TrunkAORemapMin;
|
|
float _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float = _TrunkAORemapMax;
|
|
float2 _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2 = float2(_Property_8142f12b781ad08680220297dab56f14_Out_0_Float, _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float);
|
|
float _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float, float2 (0, 1), _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float);
|
|
float _Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float = _TrunkSmoothnessRemapMin;
|
|
float _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float = _TrunkSmoothnessRemapMax;
|
|
float2 _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2 = float2(_Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float, _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float);
|
|
float _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float, float2 (0, 1), _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
float3 _Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3 = float3(_Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
UnityTexture2D _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkMaskMap);
|
|
float4 _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_B_6_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.a;
|
|
float _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float = _BarkMetallic;
|
|
float _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float, _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float, _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float);
|
|
float _Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float = _BarkAORemapMin;
|
|
float _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float = _BarkAORemapMax;
|
|
float2 _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2 = float2(_Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float, _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float);
|
|
float _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float, float2 (0, 1), _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float);
|
|
float _Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float = _BarkSmoothnessRemapMin;
|
|
float _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float = _BarkSmoothnessRemapMax;
|
|
float2 _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2 = float2(_Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float, _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float);
|
|
float _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float, float2 (0, 1), _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3 = float3(_Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3;
|
|
Unity_Lerp_float3(_Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3, _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3);
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[0];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[1];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[2];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_A_4_Float = 0;
|
|
UnityTexture2D _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkNormalMap);
|
|
float4 _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4);
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_R_4_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_G_5_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_B_6_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_A_7_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.a;
|
|
float _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float = _TrunkNormalScale;
|
|
float3 _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.xyz), _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float, _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3);
|
|
UnityTexture2D _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkNormalMap);
|
|
float4 _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4);
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_R_4_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_G_5_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_B_6_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_A_7_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.a;
|
|
float _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float = _BarkNormalScale;
|
|
float3 _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.xyz), _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3);
|
|
float3 _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
Unity_Lerp_float3(_NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3);
|
|
surface.BaseColor = (_Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4.xyz);
|
|
surface.Emission = float3(0, 0, 0);
|
|
surface.Alpha = float(1);
|
|
surface.BentNormal = IN.TangentSpaceNormal;
|
|
surface.Smoothness = _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float;
|
|
surface.Occlusion = _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float;
|
|
surface.NormalTS = _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
surface.Metallic = _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float;
|
|
return surface;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Graph Inputs
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#define VFX_SRP_ATTRIBUTES AttributesMesh
|
|
#define VaryingsMeshType VaryingsMeshToPS
|
|
#define VFX_SRP_VARYINGS VaryingsMeshType
|
|
#define VFX_SRP_SURFACE_INPUTS FragInputs
|
|
#endif
|
|
|
|
VertexDescriptionInputs AttributesMeshToVertexDescriptionInputs(AttributesMesh input)
|
|
{
|
|
VertexDescriptionInputs output;
|
|
ZERO_INITIALIZE(VertexDescriptionInputs, output);
|
|
|
|
#if UNITY_ANY_INSTANCING_ENABLED
|
|
#else
|
|
#endif
|
|
|
|
return output;
|
|
}
|
|
|
|
VertexDescription GetVertexDescription(AttributesMesh input, float3 timeParameters
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
// build graph inputs
|
|
VertexDescriptionInputs vertexDescriptionInputs = AttributesMeshToVertexDescriptionInputs(input);
|
|
// Override time parameters with used one (This is required to correctly handle motion vectors for vertex animation based on time)
|
|
|
|
// evaluate vertex graph
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
// Fetch the vertex graph properties for the particle instance.
|
|
GetElementVertexProperties(element, properties);
|
|
|
|
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs, properties);
|
|
#else
|
|
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs);
|
|
#endif
|
|
return vertexDescription;
|
|
|
|
}
|
|
|
|
AttributesMesh ApplyMeshModification(AttributesMesh input, float3 timeParameters
|
|
#ifdef USE_CUSTOMINTERP_SUBSTRUCT
|
|
#ifdef TESSELLATION_ON
|
|
, inout VaryingsMeshToDS varyings
|
|
#else
|
|
, inout VaryingsMeshToPS varyings
|
|
#endif
|
|
#endif
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
VertexDescription vertexDescription = GetVertexDescription(input, timeParameters
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, element
|
|
#endif
|
|
);
|
|
|
|
// copy graph output to the results
|
|
|
|
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorVertMeshCustomInterpolation' */
|
|
|
|
return input;
|
|
}
|
|
|
|
#if defined(_ADD_CUSTOM_VELOCITY) // For shader graph custom velocity
|
|
// Return precomputed Velocity in object space
|
|
float3 GetCustomVelocity(AttributesMesh input
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
VertexDescription vertexDescription = GetVertexDescription(input, _TimeParameters.xyz
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, element
|
|
#endif
|
|
);
|
|
return vertexDescription.CustomVelocity;
|
|
}
|
|
#endif
|
|
|
|
FragInputs BuildFragInputs(VaryingsMeshToPS input)
|
|
{
|
|
FragInputs output;
|
|
ZERO_INITIALIZE(FragInputs, output);
|
|
|
|
// Init to some default value to make the computer quiet (else it output 'divide by zero' warning even if value is not used).
|
|
// TODO: this is a really poor workaround, but the variable is used in a bunch of places
|
|
// to compute normals which are then passed on elsewhere to compute other values...
|
|
output.tangentToWorld = k_identity3x3;
|
|
output.positionSS = input.positionCS; // input.positionCS is SV_Position
|
|
|
|
output.positionRWS = input.positionRWS;
|
|
output.positionPredisplacementRWS = input.positionPredisplacementRWS;
|
|
output.texCoord0 = input.texCoord0;
|
|
output.texCoord1 = input.texCoord1;
|
|
output.texCoord2 = input.texCoord2;
|
|
output.texCoord3 = input.texCoord3;
|
|
|
|
#if UNITY_ANY_INSTANCING_ENABLED
|
|
#else
|
|
#endif
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
// FragInputs from VFX come from two places: Interpolator or CBuffer.
|
|
#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
|
|
|
|
// splice point to copy custom interpolator fields from varyings to frag inputs
|
|
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorVaryingsToFragInputs' */
|
|
|
|
return output;
|
|
}
|
|
|
|
// existing HDRP code uses the combined function to go directly from packed to frag inputs
|
|
FragInputs UnpackVaryingsMeshToFragInputs(PackedVaryingsMeshToPS input)
|
|
{
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
#if defined(HAVE_VFX_MODIFICATION) && defined(UNITY_INSTANCING_ENABLED)
|
|
unity_InstanceID = input.instanceID;
|
|
#endif
|
|
VaryingsMeshToPS unpacked = UnpackVaryingsMeshToPS(input);
|
|
return BuildFragInputs(unpacked);
|
|
}
|
|
SurfaceDescriptionInputs FragInputsToSurfaceDescriptionInputs(FragInputs input, float3 viewWS)
|
|
{
|
|
SurfaceDescriptionInputs output;
|
|
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
|
|
|
#if defined(SHADER_STAGE_RAY_TRACING)
|
|
#else
|
|
#endif
|
|
output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
|
|
|
|
#if UNITY_UV_STARTS_AT_TOP
|
|
#else
|
|
#endif
|
|
|
|
|
|
output.uv0 = input.texCoord0;
|
|
output.uv3 = input.texCoord3;
|
|
|
|
// splice point to copy frag inputs custom interpolator pack into the SDI
|
|
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorCopyToSDI' */
|
|
|
|
return output;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Surface Data (Specific Material)
|
|
|
|
void ApplyDecalToSurfaceDataNoNormal(DecalSurfaceData decalSurfaceData, inout SurfaceData surfaceData);
|
|
|
|
void ApplyDecalAndGetNormal(FragInputs fragInputs, PositionInputs posInput, SurfaceDescription surfaceDescription,
|
|
inout SurfaceData surfaceData)
|
|
{
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
#ifdef DECAL_NORMAL_BLENDING
|
|
// SG nodes don't ouptut surface gradients, so if decals require surf grad blending, we have to convert
|
|
// the normal to gradient before applying the decal. We then have to resolve the gradient back to world space
|
|
float3 normalTS;
|
|
|
|
normalTS = SurfaceGradientFromTangentSpaceNormalAndFromTBN(surfaceDescription.NormalTS,
|
|
fragInputs.tangentToWorld[0], fragInputs.tangentToWorld[1]);
|
|
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, fragInputs.tangentToWorld[2], normalTS);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
|
|
GetNormalWS_SG(fragInputs, normalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
#else
|
|
// normal delivered to master node
|
|
GetNormalWS(fragInputs, surfaceDescription.NormalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Both uses and modifies 'surfaceData.normalWS'.
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, surfaceData.normalWS.xyz);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
#endif
|
|
}
|
|
void BuildSurfaceData(FragInputs fragInputs, inout SurfaceDescription surfaceDescription, float3 V, PositionInputs posInput, out SurfaceData surfaceData, out float3 bentNormalWS)
|
|
{
|
|
ZERO_INITIALIZE(SurfaceData, surfaceData);
|
|
|
|
// specularOcclusion need to be init ahead of decal to quiet the compiler that modify the SurfaceData struct
|
|
// however specularOcclusion can come from the graph, so need to be init here so it can be override.
|
|
surfaceData.specularOcclusion = 1.0;
|
|
surfaceData.thickness = 0.0;
|
|
|
|
surfaceData.baseColor = surfaceDescription.BaseColor;
|
|
surfaceData.perceptualSmoothness = surfaceDescription.Smoothness;
|
|
surfaceData.ambientOcclusion = surfaceDescription.Occlusion;
|
|
surfaceData.metallic = surfaceDescription.Metallic;
|
|
|
|
#if defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE) || defined(_REFRACTION_THIN)
|
|
if (_EnableSSRefraction)
|
|
{
|
|
|
|
surfaceData.transmittanceMask = (1.0 - surfaceDescription.Alpha);
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
else
|
|
{
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
#else
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
#endif
|
|
|
|
// These static material feature allow compile time optimization
|
|
surfaceData.materialFeatures = MATERIALFEATUREFLAGS_LIT_STANDARD;
|
|
#ifdef _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SUBSURFACE_SCATTERING;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_COLORED_TRANSMISSION;
|
|
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_ANISOTROPY
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_ANISOTROPY;
|
|
|
|
// Initialize the normal to something non-zero to avoid a div-zero warning for anisotropy.
|
|
surfaceData.normalWS = float3(0, 1, 0);
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_IRIDESCENCE
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_IRIDESCENCE;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SPECULAR_COLOR;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_CLEAR_COAT
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_CLEAR_COAT;
|
|
#endif
|
|
|
|
#if defined (_MATERIAL_FEATURE_SPECULAR_COLOR) && defined (_ENERGY_CONSERVING_SPECULAR)
|
|
// Require to have setup baseColor
|
|
// Reproduce the energy conservation done in legacy Unity. Not ideal but better for compatibility and users can unchek it
|
|
surfaceData.baseColor *= (1.0 - Max3(surfaceData.specularColor.r, surfaceData.specularColor.g, surfaceData.specularColor.b));
|
|
#endif
|
|
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
ApplyDecalAndGetNormal(fragInputs, posInput, surfaceDescription, surfaceData);
|
|
|
|
surfaceData.geomNormalWS = fragInputs.tangentToWorld[2];
|
|
|
|
surfaceData.tangentWS = normalize(fragInputs.tangentToWorld[0].xyz); // The tangent is not normalize in tangentToWorld for mikkt. TODO: Check if it expected that we normalize with Morten. Tag: SURFACE_GRADIENT
|
|
|
|
|
|
bentNormalWS = surfaceData.normalWS;
|
|
|
|
surfaceData.tangentWS = Orthonormalize(surfaceData.tangentWS, surfaceData.normalWS);
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
// Mipmap mode debugging isn't supported with ray tracing as it relies on derivatives
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD0
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG(posInput.positionSS, fragInputs.texCoord0);
|
|
#else
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG_NO_UV(posInput.positionSS);
|
|
#endif
|
|
surfaceData.metallic = 0;
|
|
}
|
|
#endif
|
|
|
|
// We need to call ApplyDebugToSurfaceData after filling the surfaceData and before filling builtinData
|
|
// as it can modify attribute use for static lighting
|
|
ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData);
|
|
#endif
|
|
|
|
// By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion.
|
|
// If user provide bent normal then we process a better term
|
|
#if defined(_SPECULAR_OCCLUSION_CUSTOM)
|
|
// Just use the value passed through via the slot (not active otherwise)
|
|
#elif defined(_SPECULAR_OCCLUSION_FROM_AO_BENT_NORMAL)
|
|
// If we have bent normal and ambient occlusion, process a specular occlusion
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromBentAO(V, bentNormalWS, surfaceData.normalWS, surfaceData.ambientOcclusion, PerceptualSmoothnessToPerceptualRoughness(surfaceData.perceptualSmoothness));
|
|
#elif defined(_AMBIENT_OCCLUSION) && defined(_SPECULAR_OCCLUSION_FROM_AO)
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness));
|
|
#endif
|
|
|
|
#if defined(_ENABLE_GEOMETRIC_SPECULAR_AA) && !defined(SHADER_STAGE_RAY_TRACING)
|
|
surfaceData.perceptualSmoothness = GeometricNormalFiltering(surfaceData.perceptualSmoothness, fragInputs.tangentToWorld[2], surfaceDescription.SpecularAAScreenSpaceVariance, surfaceDescription.SpecularAAThreshold);
|
|
#endif
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Get Surface And BuiltinData
|
|
|
|
void GetSurfaceAndBuiltinData(FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData RAY_TRACING_OPTIONAL_PARAMETERS)
|
|
{
|
|
// Don't dither if displaced tessellation (we're fading out the displacement instead to match the next LOD)
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && !defined(_TESSELLATION_DISPLACEMENT)
|
|
#ifdef LOD_FADE_CROSSFADE // enable dithering LOD transition if user select CrossFade transition in LOD group
|
|
LODDitheringTransition(ComputeFadeMaskSeed(V, posInput.positionSS), unity_LODFade.x);
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
#ifdef _DOUBLESIDED_ON
|
|
float3 doubleSidedConstants = _DoubleSidedConstants.xyz;
|
|
#else
|
|
float3 doubleSidedConstants = float3(1.0, 1.0, 1.0);
|
|
#endif
|
|
|
|
ApplyDoubleSidedFlipOrMirror(fragInputs, doubleSidedConstants); // Apply double sided flip on the vertex normal
|
|
#endif // SHADER_UNLIT
|
|
|
|
SurfaceDescriptionInputs surfaceDescriptionInputs = FragInputsToSurfaceDescriptionInputs(fragInputs, V);
|
|
|
|
#if defined(HAVE_VFX_MODIFICATION)
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
GetElementPixelProperties(fragInputs, properties);
|
|
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs, properties);
|
|
#else
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs);
|
|
#endif
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
surfaceDescription.Alpha = 1.0f;
|
|
}
|
|
#endif
|
|
|
|
// Perform alpha test very early to save performance (a killed pixel will not sample textures)
|
|
// TODO: split graph evaluation to grab just alpha dependencies first? tricky..
|
|
#ifdef _ALPHATEST_ON
|
|
float alphaCutoff = surfaceDescription.AlphaClipThreshold;
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
// The TransparentDepthPrepass is also used with SSR transparent.
|
|
// If an artists enable transaprent SSR but not the TransparentDepthPrepass itself, then we use AlphaClipThreshold
|
|
// otherwise if TransparentDepthPrepass is enabled we use AlphaClipThresholdDepthPrepass
|
|
#elif SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_POSTPASS
|
|
// DepthPostpass always use its own alpha threshold
|
|
alphaCutoff = surfaceDescription.AlphaClipThresholdDepthPostpass;
|
|
#elif (SHADERPASS == SHADERPASS_SHADOWS) || (SHADERPASS == SHADERPASS_RAYTRACING_VISIBILITY)
|
|
// If use shadow threshold isn't enable we don't allow any test
|
|
#endif
|
|
|
|
GENERIC_ALPHA_TEST(surfaceDescription.Alpha, alphaCutoff);
|
|
#endif
|
|
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && _DEPTHOFFSET_ON
|
|
ApplyDepthOffsetPositionInput(V, surfaceDescription.DepthOffset, GetViewForwardDir(), GetWorldToHClipMatrix(), posInput);
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
float3 bentNormalWS;
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData, bentNormalWS);
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD1
|
|
float4 lightmapTexCoord1 = fragInputs.texCoord1;
|
|
#else
|
|
float4 lightmapTexCoord1 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD2
|
|
float4 lightmapTexCoord2 = fragInputs.texCoord2;
|
|
#else
|
|
float4 lightmapTexCoord2 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Builtin Data
|
|
// For back lighting we use the oposite vertex normal
|
|
InitBuiltinData(posInput, alpha, bentNormalWS, -fragInputs.tangentToWorld[2], lightmapTexCoord1, lightmapTexCoord2, builtinData);
|
|
|
|
#else
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData);
|
|
|
|
ZERO_BUILTIN_INITIALIZE(builtinData); // No call to InitBuiltinData as we don't have any lighting
|
|
builtinData.opacity = surfaceDescription.Alpha;
|
|
|
|
#if defined(DEBUG_DISPLAY)
|
|
// Light Layers are currently not used for the Unlit shader (because it is not lit)
|
|
// But Unlit objects do cast shadows according to their rendering layer mask, which is what we want to
|
|
// display in the light layers visualization mode, therefore we need the renderingLayers
|
|
builtinData.renderingLayers = GetMeshRenderingLayerMask();
|
|
#endif
|
|
|
|
#endif // SHADER_UNLIT
|
|
|
|
#ifdef _ALPHATEST_ON
|
|
// Used for sharpening by alpha to mask - Alpha to covertage is only used with depth only and forward pass (no shadow pass, no transparent pass)
|
|
builtinData.alphaClipTreshold = alphaCutoff;
|
|
#endif
|
|
|
|
// override sampleBakedGI - not used by Unlit
|
|
// When overriding GI, we need to force the isLightmap flag to make sure we don't add APV (sampled in the lightloop) on top of the overridden value (set at GBuffer stage)
|
|
|
|
builtinData.emissiveColor = surfaceDescription.Emission;
|
|
|
|
// Note this will not fully work on transparent surfaces (can check with _SURFACE_TYPE_TRANSPARENT define)
|
|
// We will always overwrite vt feeback with the nearest. So behind transparent surfaces vt will not be resolved
|
|
// This is a limitation of the current MRT approach.
|
|
#ifdef UNITY_VIRTUAL_TEXTURING
|
|
#endif
|
|
|
|
#if _DEPTHOFFSET_ON
|
|
builtinData.depthOffset = surfaceDescription.DepthOffset;
|
|
#endif
|
|
|
|
// TODO: We should generate distortion / distortionBlur for non distortion pass
|
|
#if (SHADERPASS == SHADERPASS_DISTORTION)
|
|
builtinData.distortion = surfaceDescription.Distortion;
|
|
builtinData.distortionBlur = surfaceDescription.DistortionBlur;
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// PostInitBuiltinData call ApplyDebugToBuiltinData
|
|
PostInitBuiltinData(V, posInput, surfaceData, builtinData);
|
|
#else
|
|
ApplyDebugToBuiltinData(builtinData);
|
|
#endif
|
|
|
|
RAY_TRACING_OPTIONAL_ALPHA_TEST_PASS
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Main
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassLightTransport.hlsl"
|
|
|
|
// --------------------------------------------------
|
|
// Visual Effect Vertex Invocations
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/VisualEffectVertex.hlsl"
|
|
#else
|
|
#endif
|
|
#endif
|
|
|
|
ENDHLSL
|
|
}
|
|
Pass
|
|
{
|
|
Name "ScenePickingPass"
|
|
Tags
|
|
{
|
|
"LightMode" = "Picking"
|
|
}
|
|
|
|
// Render State
|
|
Cull [_CullMode]
|
|
|
|
// Debug
|
|
// <None>
|
|
|
|
// --------------------------------------------------
|
|
// Pass
|
|
|
|
HLSLPROGRAM
|
|
|
|
// Pragmas
|
|
#pragma multi_compile _ DOTS_INSTANCING_ON
|
|
#pragma editor_sync_compilation
|
|
#pragma instancing_options renderinglayer
|
|
#pragma target 4.5
|
|
#pragma vertex Vert
|
|
#pragma fragment Frag
|
|
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
|
|
#pragma multi_compile_instancing
|
|
|
|
// Keywords
|
|
#pragma shader_feature _ _SURFACE_TYPE_TRANSPARENT
|
|
#pragma shader_feature_local _ _DOUBLESIDED_ON
|
|
#pragma shader_feature_local _ _ADD_PRECOMPUTED_VELOCITY
|
|
#pragma shader_feature_local _ _TRANSPARENT_WRITES_MOTION_VEC _TRANSPARENT_REFRACTIVE_SORT
|
|
#pragma shader_feature_local_fragment _ _ENABLE_FOG_ON_TRANSPARENT
|
|
#pragma multi_compile _ LOD_FADE_CROSSFADE
|
|
#pragma shader_feature_local_fragment _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local _ _REFRACTION_PLANE _REFRACTION_SPHERE _REFRACTION_THIN
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// GraphKeywords: <None>
|
|
|
|
// Defines
|
|
#define SHADERPASS SHADERPASS_DEPTH_ONLY
|
|
#define SCENEPICKINGPASS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
|
|
// For custom interpolators to inject a substruct definition before FragInputs definition,
|
|
// allowing for FragInputs to capture CI's intended for ShaderGraph's SDI.
|
|
struct CustomInterpolators
|
|
{
|
|
};
|
|
#define USE_CUSTOMINTERP_SUBSTRUCT
|
|
|
|
|
|
|
|
// TODO: Merge FragInputsVFX substruct with CustomInterpolators.
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
struct FragInputsVFX
|
|
{
|
|
/* WARNING: $splice Could not find named fragment 'FragInputsVFX' */
|
|
};
|
|
#endif
|
|
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/GeometricTools.hlsl" // Required by Tessellation.hlsl
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Tessellation.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" // Required to be include before we include properties as it define DECLARE_STACK_CB
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl" // Required before including properties as it defines UNITY_TEXTURE_STREAMING_DEBUG_VARS
|
|
// Always include Shader Graph version
|
|
// Always include last to avoid double macros
|
|
#include "Packages/com.unity.shadergraph/ShaderGraphLibrary/Functions.hlsl" // Need to be here for Gradient struct definition
|
|
|
|
// --------------------------------------------------
|
|
// Defines
|
|
|
|
// Attribute
|
|
#define ATTRIBUTES_NEED_NORMAL
|
|
#define ATTRIBUTES_NEED_TANGENT
|
|
#define ATTRIBUTES_NEED_TEXCOORD0
|
|
#define ATTRIBUTES_NEED_TEXCOORD3
|
|
#define ATTRIBUTES_NEED_COLOR
|
|
#define VARYINGS_NEED_TANGENT_TO_WORLD
|
|
#define VARYINGS_NEED_TEXCOORD0
|
|
#define VARYINGS_NEED_TEXCOORD3
|
|
|
|
#define HAVE_MESH_MODIFICATION
|
|
|
|
//Strip down the FragInputs.hlsl (on graphics), so we can only optimize the interpolators we use.
|
|
//if by accident something requests contents of FragInputs.hlsl, it will be caught as a compiler error
|
|
//Frag inputs stripping is only enabled when FRAG_INPUTS_ENABLE_STRIPPING is set
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && SHADERPASS != SHADERPASS_RAYTRACING_GBUFFER && SHADERPASS != SHADERPASS_FULL_SCREEN_DEBUG
|
|
#define FRAG_INPUTS_ENABLE_STRIPPING
|
|
#endif
|
|
#define FRAG_INPUTS_USE_TEXCOORD0
|
|
#define FRAG_INPUTS_USE_TEXCOORD3
|
|
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl"
|
|
|
|
|
|
|
|
|
|
// Following two define are a workaround introduce in 10.1.x for RaytracingQualityNode
|
|
// The ShaderGraph don't support correctly migration of this node as it serialize all the node data
|
|
// in the json file making it impossible to uprgrade. Until we get a fix, we do a workaround here
|
|
// to still allow us to rename the field and keyword of this node without breaking existing code.
|
|
#ifdef RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define RAYTRACING_SHADER_GRAPH_HIGH
|
|
#endif
|
|
|
|
#ifdef RAYTRACING_SHADER_GRAPH_RAYTRACED
|
|
#define RAYTRACING_SHADER_GRAPH_LOW
|
|
#endif
|
|
// end
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// We need isFrontFace when using double sided - it is not required for unlit as in case of unlit double sided only drive the cullmode
|
|
// VARYINGS_NEED_CULLFACE can be define by VaryingsMeshToPS.FaceSign input if a IsFrontFace Node is included in the shader graph.
|
|
#if defined(_DOUBLESIDED_ON) && !defined(VARYINGS_NEED_CULLFACE)
|
|
#define VARYINGS_NEED_CULLFACE
|
|
#endif
|
|
#endif
|
|
|
|
// Specific Material Define
|
|
#define _AMBIENT_OCCLUSION 1
|
|
#define _SPECULAR_OCCLUSION_FROM_AO 1
|
|
#define _ENERGY_CONSERVING_SPECULAR 1
|
|
|
|
#if _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// Colored Transmission doesn't support clear coat
|
|
#undef _MATERIAL_FEATURE_CLEAR_COAT
|
|
#endif
|
|
|
|
// If we use subsurface scattering, enable output split lighting (for forward pass)
|
|
#if defined(_MATERIAL_FEATURE_SUBSURFACE_SCATTERING) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define OUTPUT_SPLIT_LIGHTING
|
|
#endif
|
|
|
|
// This shader support recursive rendering for raytracing
|
|
#define HAVE_RECURSIVE_RENDERING
|
|
|
|
// In Path Tracing, For all single-sided, refractive materials, we want to force a thin refraction model
|
|
#if (SHADERPASS == SHADERPASS_PATH_TRACING) && !defined(_DOUBLESIDED_ON) && (defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE))
|
|
#undef _REFRACTION_PLANE
|
|
#undef _REFRACTION_SPHERE
|
|
#define _REFRACTION_THIN
|
|
#endif
|
|
// Caution: we can use the define SHADER_UNLIT onlit after the above Material include as it is the Unlit template who define it
|
|
|
|
// To handle SSR on transparent correctly with a possibility to enable/disable it per framesettings
|
|
// we should have a code like this:
|
|
// if !defined(_DISABLE_SSR_TRANSPARENT)
|
|
// pragma multi_compile _ WRITE_NORMAL_BUFFER
|
|
// endif
|
|
// i.e we enable the multicompile only if we can receive SSR or not, and then C# code drive
|
|
// it based on if SSR transparent in frame settings and not (and stripper can strip it).
|
|
// this is currently not possible with our current preprocessor as _DISABLE_SSR_TRANSPARENT is a keyword not a define
|
|
// so instead we used this and chose to pay the extra cost of normal write even if SSR transaprent is disabled.
|
|
// Ideally the shader graph generator should handle it but condition below can't be handle correctly for now.
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
#if !defined(_DISABLE_SSR_TRANSPARENT) && !defined(SHADER_UNLIT)
|
|
#define WRITE_NORMAL_BUFFER
|
|
#endif
|
|
#endif
|
|
|
|
// See Lit.shader
|
|
#if SHADERPASS == SHADERPASS_MOTION_VECTORS && defined(WRITE_DECAL_BUFFER_AND_RENDERING_LAYER)
|
|
#define WRITE_DECAL_BUFFER
|
|
#endif
|
|
|
|
#ifndef DEBUG_DISPLAY
|
|
// In case of opaque we don't want to perform the alpha test, it is done in depth prepass and we use depth equal for ztest (setup from UI)
|
|
// Don't do it with debug display mode as it is possible there is no depth prepass in this case
|
|
#if !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#if SHADERPASS == SHADERPASS_FORWARD
|
|
#define SHADERPASS_FORWARD_BYPASS_ALPHA_TEST
|
|
#elif SHADERPASS == SHADERPASS_GBUFFER
|
|
#define SHADERPASS_GBUFFER_BYPASS_ALPHA_TEST
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
// Define _DEFERRED_CAPABLE_MATERIAL for shader capable to run in deferred pass
|
|
#if defined(SHADER_LIT) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _DEFERRED_CAPABLE_MATERIAL
|
|
#endif
|
|
|
|
// Translate transparent motion vector define
|
|
#if (defined(_TRANSPARENT_WRITES_MOTION_VEC) || defined(_TRANSPARENT_REFRACTIVE_SORT)) && defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _WRITE_TRANSPARENT_MOTION_VECTOR
|
|
#endif
|
|
|
|
// -- Graph Properties
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _TrunkBaseColor;
|
|
float4 _TrunkBaseColorMap_TexelSize;
|
|
float4 _TrunkTilingOffset;
|
|
float4 _TrunkNormalMap_TexelSize;
|
|
float _TrunkNormalScale;
|
|
float4 _TrunkMaskMap_TexelSize;
|
|
float _TrunkMetallic;
|
|
float _TrunkAORemapMin;
|
|
float _TrunkAORemapMax;
|
|
float _TrunkSmoothnessRemapMin;
|
|
float _TrunkSmoothnessRemapMax;
|
|
float4 _LayerMask_TexelSize;
|
|
float4 _BarkBlendMaskTilingOffset;
|
|
float4 _BarkBaseColor;
|
|
float4 _BarkBaseColorMap_TexelSize;
|
|
float _BarkUseUV3;
|
|
float4 _BarkTilingOffset;
|
|
float4 _BarkNormalMap_TexelSize;
|
|
float _BarkNormalScale;
|
|
float4 _BarkMaskMap_TexelSize;
|
|
float _BarkMetallic;
|
|
float _BarkSmoothnessRemapMin;
|
|
float _BarkSmoothnessRemapMax;
|
|
float _BarkAORemapMin;
|
|
float _BarkAORemapMax;
|
|
float _Stiffness;
|
|
float _InitialBend;
|
|
float _Drag;
|
|
float _HeightDrag;
|
|
float4 _NewNormal;
|
|
float4 _EmissionColor;
|
|
float _UseShadowThreshold;
|
|
float4 _DoubleSidedConstants;
|
|
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
|
float _BlendMode;
|
|
float _EnableBlendModePreserveSpecularLighting;
|
|
float _RayTracing;
|
|
float _RefractionModel;
|
|
float _MaterialID;
|
|
float _MaterialTypeMask;
|
|
CBUFFER_END
|
|
|
|
|
|
// Object and Global properties
|
|
SAMPLER(SamplerState_Linear_Repeat);
|
|
SAMPLER(SamplerState_Linear_Repeat_Aniso8);
|
|
TEXTURE2D(_TrunkBaseColorMap);
|
|
SAMPLER(sampler_TrunkBaseColorMap);
|
|
TEXTURE2D(_TrunkNormalMap);
|
|
SAMPLER(sampler_TrunkNormalMap);
|
|
TEXTURE2D(_TrunkMaskMap);
|
|
SAMPLER(sampler_TrunkMaskMap);
|
|
TEXTURE2D(_LayerMask);
|
|
SAMPLER(sampler_LayerMask);
|
|
TEXTURE2D(_BarkBaseColorMap);
|
|
SAMPLER(sampler_BarkBaseColorMap);
|
|
TEXTURE2D(_BarkNormalMap);
|
|
SAMPLER(sampler_BarkNormalMap);
|
|
TEXTURE2D(_BarkMaskMap);
|
|
SAMPLER(sampler_BarkMaskMap);
|
|
TEXTURE2D(WIND_SETTINGS_TexNoise);
|
|
SAMPLER(samplerWIND_SETTINGS_TexNoise);
|
|
float4 WIND_SETTINGS_TexNoise_TexelSize;
|
|
TEXTURE2D(WIND_SETTINGS_TexGust);
|
|
SAMPLER(samplerWIND_SETTINGS_TexGust);
|
|
float4 WIND_SETTINGS_TexGust_TexelSize;
|
|
float4 WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float WIND_SETTINGS_FlexNoiseScale;
|
|
float WIND_SETTINGS_ShiverNoiseScale;
|
|
float WIND_SETTINGS_Turbulence;
|
|
float WIND_SETTINGS_GustSpeed;
|
|
float WIND_SETTINGS_GustScale;
|
|
float WIND_SETTINGS_GustWorldScale;
|
|
float4x4 WIND_SETTINGS_Points;
|
|
float4 WIND_SETTINGS_Points_Radius;
|
|
|
|
// -- Property used by ScenePickingPass
|
|
#ifdef SCENEPICKINGPASS
|
|
float4 _SelectionID;
|
|
#endif
|
|
|
|
// -- Properties used by SceneSelectionPass
|
|
#ifdef SCENESELECTIONPASS
|
|
int _ObjectId;
|
|
int _PassValue;
|
|
#endif
|
|
|
|
// Includes
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/PickingSpaceTransforms.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/NormalSurfaceGradient.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
// GraphIncludes: <None>
|
|
|
|
// --------------------------------------------------
|
|
// Structs and Packing
|
|
|
|
struct AttributesMesh
|
|
{
|
|
float3 positionOS : POSITION;
|
|
float3 normalOS : NORMAL;
|
|
float4 tangentOS : TANGENT;
|
|
float4 uv0 : TEXCOORD0;
|
|
float4 uv3 : TEXCOORD3;
|
|
float4 color : COLOR;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(ATTRIBUTES_NEED_INSTANCEID)
|
|
uint instanceID : INSTANCEID_SEMANTIC;
|
|
#endif
|
|
};
|
|
struct VaryingsMeshToPS
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
float3 normalWS;
|
|
float4 tangentWS;
|
|
float4 texCoord0;
|
|
float4 texCoord3;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
uint instanceID : CUSTOM_INSTANCE_ID;
|
|
#endif
|
|
};
|
|
struct VertexDescriptionInputs
|
|
{
|
|
float3 ObjectSpaceNormal;
|
|
float3 WorldSpaceNormal;
|
|
float3 ObjectSpaceTangent;
|
|
float3 ObjectSpacePosition;
|
|
float4 VertexColor;
|
|
float3 TimeParameters;
|
|
};
|
|
struct SurfaceDescriptionInputs
|
|
{
|
|
float3 TangentSpaceNormal;
|
|
float4 uv0;
|
|
float4 uv3;
|
|
};
|
|
struct PackedVaryingsMeshToPS
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
float4 tangentWS : INTERP0;
|
|
float4 texCoord0 : INTERP1;
|
|
float4 texCoord3 : INTERP2;
|
|
float3 normalWS : INTERP3;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
uint instanceID : CUSTOM_INSTANCE_ID;
|
|
#endif
|
|
};
|
|
|
|
PackedVaryingsMeshToPS PackVaryingsMeshToPS (VaryingsMeshToPS input)
|
|
{
|
|
PackedVaryingsMeshToPS output;
|
|
ZERO_INITIALIZE(PackedVaryingsMeshToPS, output);
|
|
output.positionCS = input.positionCS;
|
|
output.tangentWS.xyzw = input.tangentWS;
|
|
output.texCoord0.xyzw = input.texCoord0;
|
|
output.texCoord3.xyzw = input.texCoord3;
|
|
output.normalWS.xyz = input.normalWS;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
output.instanceID = input.instanceID;
|
|
#endif
|
|
return output;
|
|
}
|
|
|
|
VaryingsMeshToPS UnpackVaryingsMeshToPS (PackedVaryingsMeshToPS input)
|
|
{
|
|
VaryingsMeshToPS output;
|
|
output.positionCS = input.positionCS;
|
|
output.tangentWS = input.tangentWS.xyzw;
|
|
output.texCoord0 = input.texCoord0.xyzw;
|
|
output.texCoord3 = input.texCoord3.xyzw;
|
|
output.normalWS = input.normalWS.xyz;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
output.instanceID = input.instanceID;
|
|
#endif
|
|
return output;
|
|
}
|
|
|
|
|
|
// --------------------------------------------------
|
|
// Graph
|
|
|
|
|
|
// Graph Functions
|
|
|
|
void Unity_Add_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
void Unity_Distance_float3(float3 A, float3 B, out float Out)
|
|
{
|
|
Out = distance(A, B);
|
|
}
|
|
|
|
void Unity_Comparison_Less_float(float A, float B, out float Out)
|
|
{
|
|
Out = A < B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_Comparison_Greater_float(float A, float B, out float Out)
|
|
{
|
|
Out = A > B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_Subtract_float(float A, float B, out float Out)
|
|
{
|
|
Out = A - B;
|
|
}
|
|
|
|
void Unity_And_float(float A, float B, out float Out)
|
|
{
|
|
Out = A && B;
|
|
}
|
|
|
|
void Unity_Branch_float(float Predicate, float True, float False, out float Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Multiply_float_float(float A, float B, out float Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Length_float4(float4 In, out float Out)
|
|
{
|
|
Out = length(In);
|
|
}
|
|
|
|
void Unity_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Subtract_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A - B;
|
|
}
|
|
|
|
void Unity_Normalize_float3(float3 In, out float3 Out)
|
|
{
|
|
Out = normalize(In);
|
|
}
|
|
|
|
void Unity_Length_float3(float3 In, out float Out)
|
|
{
|
|
Out = length(In);
|
|
}
|
|
|
|
void Unity_Divide_float(float A, float B, out float Out)
|
|
{
|
|
Out = A / B;
|
|
}
|
|
|
|
void Unity_Clamp_float(float In, float Min, float Max, out float Out)
|
|
{
|
|
Out = clamp(In, Min, Max);
|
|
}
|
|
|
|
void Unity_Lerp_float(float A, float B, float T, out float Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Multiply_float3_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Combine_float(float R, float G, float B, float A, out float4 RGBA, out float3 RGB, out float2 RG)
|
|
{
|
|
RGBA = float4(R, G, B, A);
|
|
RGB = float3(R, G, B);
|
|
RG = float2(R, G);
|
|
}
|
|
|
|
void Unity_Add_float4(float4 A, float4 B, out float4 Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
struct Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float
|
|
{
|
|
};
|
|
|
|
void SG_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float(float4x4 Matrix4_cb72bb33b7a84dfda97778a514f9b60f, float3 Vector3_90379ebf40aa468b8362f8d265f4f234, float4 Vector4_159bb4232f82428893101734a03e2a1e, Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float IN, out float4 WindPoint_1)
|
|
{
|
|
float3 _Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3 = Vector3_90379ebf40aa468b8362f8d265f4f234;
|
|
float4x4 _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4 = Matrix4_cb72bb33b7a84dfda97778a514f9b60f;
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].r);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].g);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].b);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].a);
|
|
float3 _Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4.xyz), _Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3);
|
|
float3 _Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3, _Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3);
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[0];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[1];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[2];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[3];
|
|
float _Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3, _Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float);
|
|
float4 _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4 = Vector4_159bb4232f82428893101734a03e2a1e;
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_R_1_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[0];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_G_2_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[1];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_B_3_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[2];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_A_4_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[3];
|
|
float _Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float;
|
|
Unity_Divide_float(_Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_R_1_Float, _Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float);
|
|
float _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float, float(0), float(1), _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float);
|
|
float _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float;
|
|
Unity_Lerp_float(_Split_d6e088f9ab90466583adc22ea79eb8cc_A_4_Float, float(0), _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float, _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float);
|
|
float3 _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3, (_Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float.xxx), _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3);
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_R_1_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[0];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_G_2_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[1];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_B_3_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[2];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_A_4_Float = 0;
|
|
float4 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4;
|
|
float3 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGB_5_Vector3;
|
|
float2 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_ef99a48850fe4f8f8e30e870c5e2ee09_R_1_Float, _Split_ef99a48850fe4f8f8e30e870c5e2ee09_G_2_Float, _Split_ef99a48850fe4f8f8e30e870c5e2ee09_B_3_Float, _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGB_5_Vector3, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RG_6_Vector2);
|
|
float3 _Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4.xyz), _Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3);
|
|
float3 _Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3, _Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3);
|
|
float _Split_8bbd5052350846968bf312362efd9f01_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[0];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[1];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[2];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[3];
|
|
float _Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3, _Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float);
|
|
float _Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float;
|
|
Unity_Divide_float(_Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_G_2_Float, _Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float);
|
|
float _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float, float(0), float(1), _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float);
|
|
float _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float;
|
|
Unity_Lerp_float(_Split_8bbd5052350846968bf312362efd9f01_A_4_Float, float(0), _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float, _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float);
|
|
float3 _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3, (_Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float.xxx), _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3);
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_R_1_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[0];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_G_2_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[1];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_B_3_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[2];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_A_4_Float = 0;
|
|
float4 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4;
|
|
float3 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGB_5_Vector3;
|
|
float2 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_ab8841795f594d3a90b87ac9fcc98d38_R_1_Float, _Split_ab8841795f594d3a90b87ac9fcc98d38_G_2_Float, _Split_ab8841795f594d3a90b87ac9fcc98d38_B_3_Float, _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGB_5_Vector3, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RG_6_Vector2);
|
|
float4 _Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4;
|
|
Unity_Add_float4(_Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4, _Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4);
|
|
float3 _Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4.xyz), _Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3);
|
|
float3 _Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3, _Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3);
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[0];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[1];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[2];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[3];
|
|
float _Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3, _Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float);
|
|
float _Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float;
|
|
Unity_Divide_float(_Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_B_3_Float, _Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float);
|
|
float _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float, float(0), float(1), _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float);
|
|
float _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float;
|
|
Unity_Lerp_float(_Split_fa21a8022f944854903e06c07c6f079c_A_4_Float, float(0), _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float, _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float);
|
|
float3 _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3, (_Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float.xxx), _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3);
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_R_1_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[0];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_G_2_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[1];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_B_3_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[2];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_A_4_Float = 0;
|
|
float4 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4;
|
|
float3 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGB_5_Vector3;
|
|
float2 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_6b9b5ad9f14a49b9bc49c718430617a8_R_1_Float, _Split_6b9b5ad9f14a49b9bc49c718430617a8_G_2_Float, _Split_6b9b5ad9f14a49b9bc49c718430617a8_B_3_Float, _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGB_5_Vector3, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RG_6_Vector2);
|
|
float4 _Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4;
|
|
Unity_Add_float4(_Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4, _Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4);
|
|
float3 _Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4.xyz), _Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3);
|
|
float3 _Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3, _Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3);
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[0];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[1];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[2];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[3];
|
|
float _Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3, _Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float);
|
|
float _Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float;
|
|
Unity_Divide_float(_Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_A_4_Float, _Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float);
|
|
float _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float, float(0), float(1), _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float);
|
|
float _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float;
|
|
Unity_Lerp_float(_Split_1bfec6763d4b458398e36937b4114c29_A_4_Float, float(0), _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float, _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float);
|
|
float3 _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3, (_Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float.xxx), _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3);
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_R_1_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[0];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_G_2_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[1];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_B_3_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[2];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_A_4_Float = 0;
|
|
float4 _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4;
|
|
float3 _Combine_872906644fc84c8c8286733edba75045_RGB_5_Vector3;
|
|
float2 _Combine_872906644fc84c8c8286733edba75045_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_e22879e6c4574322ab21f6261a21bced_R_1_Float, _Split_e22879e6c4574322ab21f6261a21bced_G_2_Float, _Split_e22879e6c4574322ab21f6261a21bced_B_3_Float, _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float, _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4, _Combine_872906644fc84c8c8286733edba75045_RGB_5_Vector3, _Combine_872906644fc84c8c8286733edba75045_RG_6_Vector2);
|
|
float4 _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4;
|
|
Unity_Add_float4(_Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4, _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4, _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4);
|
|
WindPoint_1 = _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4;
|
|
}
|
|
|
|
void Unity_Power_float(float A, float B, out float Out)
|
|
{
|
|
Out = pow(A, B);
|
|
}
|
|
|
|
void Unity_Or_float(float A, float B, out float Out)
|
|
{
|
|
Out = A || B;
|
|
}
|
|
|
|
void Unity_Branch_float3(float Predicate, float3 True, float3 False, out float3 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Add_float(float A, float B, out float Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
struct Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float
|
|
{
|
|
};
|
|
|
|
void SG_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float(float3 Vector3_604F121F, float3 Vector3_C30D997B, float Vector1_A2C4B4F4, float Vector1_7F78DDD2, UnityTexture2D Texture2D_5BAC276D, UnityTexture2D Texture2D_A3874DB9, float4 Vector4_EBFF8CDE, float Vector1_B4470F9B, float Vector1_2EC6D670, float Vector1_9365F438, float Vector1_F53C4B89, float Vector1_6803B355, float Vector1_5EFF6B1A, Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float IN, out float3 direction_1, out float strength_2)
|
|
{
|
|
float4 _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_R_1_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[0];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_G_2_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[1];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_B_3_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[2];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_A_4_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[3];
|
|
float4 _Combine_39060d5de038a58eb7462ba953e69739_RGBA_4_Vector4;
|
|
float3 _Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3;
|
|
float2 _Combine_39060d5de038a58eb7462ba953e69739_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_f4f701329abd45808bbd6b61ce26dcc8_R_1_Float, _Split_f4f701329abd45808bbd6b61ce26dcc8_G_2_Float, _Split_f4f701329abd45808bbd6b61ce26dcc8_B_3_Float, float(0), _Combine_39060d5de038a58eb7462ba953e69739_RGBA_4_Vector4, _Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3, _Combine_39060d5de038a58eb7462ba953e69739_RG_6_Vector2);
|
|
float3 _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3, _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3);
|
|
float4 _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_R_1_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[0];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_G_2_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[1];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_B_3_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[2];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_A_4_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[3];
|
|
float3 _Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3, (_Split_aeb4c57f09db718e9e14c3afd38465ae_A_4_Float.xxx), _Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3);
|
|
float _Property_72aef364136bb683b08145ce7a1b59a1_Out_0_Float = Vector1_9365F438;
|
|
float _Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_72aef364136bb683b08145ce7a1b59a1_Out_0_Float, float(0), _Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean);
|
|
UnityTexture2D _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D = Texture2D_A3874DB9;
|
|
float3 _Property_f0ff7954720d018395b7da89e2e2d761_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3 = float3(float(1), float(0), float(0));
|
|
float _Property_e53ae21dcf87e286b67de750a59275e7_Out_0_Float = Vector1_9365F438;
|
|
float3 _Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3, (_Property_e53ae21dcf87e286b67de750a59275e7_Out_0_Float.xxx), _Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3);
|
|
float _Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float = Vector1_5EFF6B1A;
|
|
float3 _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3, (_Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float.xxx), _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3);
|
|
float3 _Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_f0ff7954720d018395b7da89e2e2d761_Out_0_Vector3, _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3, _Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3);
|
|
float _Property_7f2599afa6fc5b8394c8fb0389031122_Out_0_Float = Vector1_6803B355;
|
|
float3 _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3, (_Property_7f2599afa6fc5b8394c8fb0389031122_Out_0_Float.xxx), _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3);
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_R_1_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[0];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_G_2_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[1];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_B_3_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[2];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_A_4_Float = 0;
|
|
float4 _Combine_0ac20ec517f076829f01b70d67c5af02_RGBA_4_Vector4;
|
|
float3 _Combine_0ac20ec517f076829f01b70d67c5af02_RGB_5_Vector3;
|
|
float2 _Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_f4466ebe24e7fa838f5735fb1210a3dd_R_1_Float, _Split_f4466ebe24e7fa838f5735fb1210a3dd_B_3_Float, float(0), float(0), _Combine_0ac20ec517f076829f01b70d67c5af02_RGBA_4_Vector4, _Combine_0ac20ec517f076829f01b70d67c5af02_RGB_5_Vector3, _Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2);
|
|
float4 _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4 = SAMPLE_TEXTURE2D_LOD(_Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.tex, _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.samplerstate, _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.GetTransformedUV(_Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2), float(3));
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_R_5_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.r;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_G_6_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.g;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_B_7_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.b;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_A_8_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.a;
|
|
float _Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float;
|
|
Unity_Branch_float(_Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean, _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_R_5_Float, float(0), _Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float);
|
|
float _Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float;
|
|
Unity_Power_float(_Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float, float(2), _Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float);
|
|
float _Property_9592cd5ab3f8628d995c1b79e8b0e51d_Out_0_Float = Vector1_F53C4B89;
|
|
float _Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float;
|
|
Unity_Multiply_float_float(_Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float, _Property_9592cd5ab3f8628d995c1b79e8b0e51d_Out_0_Float, _Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float);
|
|
float3 _Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3((_Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float.xxx), _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3, _Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3);
|
|
float _Property_7be270a4cb312f8ebbfba142f454b30d_Out_0_Float = Vector1_9365F438;
|
|
float3 _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3, (_Property_7be270a4cb312f8ebbfba142f454b30d_Out_0_Float.xxx), _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3);
|
|
float3 _Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3;
|
|
Unity_Add_float3(_Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3, _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3, _Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3);
|
|
float4 _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_e719665c40324e89a536d165d0427a68_R_1_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[0];
|
|
float _Split_e719665c40324e89a536d165d0427a68_G_2_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[1];
|
|
float _Split_e719665c40324e89a536d165d0427a68_B_3_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[2];
|
|
float _Split_e719665c40324e89a536d165d0427a68_A_4_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[3];
|
|
float _Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Split_e719665c40324e89a536d165d0427a68_A_4_Float, float(0), _Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean);
|
|
float _Property_295a45d224dd35829c1fc35a5ac74847_Out_0_Float = Vector1_2EC6D670;
|
|
float _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_295a45d224dd35829c1fc35a5ac74847_Out_0_Float, float(0), _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean);
|
|
float _Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean;
|
|
Unity_Or_float(_Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean, _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean, _Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean);
|
|
UnityTexture2D _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D = Texture2D_5BAC276D;
|
|
float3 _Property_c82f40aba4b7f08db9a97aaccbe0e096_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3, (_Split_e719665c40324e89a536d165d0427a68_A_4_Float.xxx), _Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3);
|
|
float3 _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3, (_Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float.xxx), _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3);
|
|
float3 _Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_c82f40aba4b7f08db9a97aaccbe0e096_Out_0_Vector3, _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3, _Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3);
|
|
float _Property_1ab0df57959c6986a0602bb0abfeaf58_Out_0_Float = Vector1_B4470F9B;
|
|
float3 _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3, (_Property_1ab0df57959c6986a0602bb0abfeaf58_Out_0_Float.xxx), _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3);
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_R_1_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[0];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_G_2_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[1];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_B_3_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[2];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_A_4_Float = 0;
|
|
float4 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGBA_4_Vector4;
|
|
float3 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGB_5_Vector3;
|
|
float2 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_5ff678fef0fb61889da2a8288f7e7d15_R_1_Float, _Split_5ff678fef0fb61889da2a8288f7e7d15_B_3_Float, float(0), float(0), _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGBA_4_Vector4, _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGB_5_Vector3, _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2);
|
|
float4 _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4 = SAMPLE_TEXTURE2D_LOD(_Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.tex, _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.samplerstate, _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.GetTransformedUV(_Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2), float(3));
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_R_5_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.r;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_G_6_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.g;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_B_7_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.b;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_A_8_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.a;
|
|
float4 _Combine_3136fa3d24c46087969f5a3828ccbb98_RGBA_4_Vector4;
|
|
float3 _Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3;
|
|
float2 _Combine_3136fa3d24c46087969f5a3828ccbb98_RG_6_Vector2;
|
|
Unity_Combine_float(_SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_R_5_Float, _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_G_6_Float, _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_B_7_Float, float(0), _Combine_3136fa3d24c46087969f5a3828ccbb98_RGBA_4_Vector4, _Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3, _Combine_3136fa3d24c46087969f5a3828ccbb98_RG_6_Vector2);
|
|
float3 _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3;
|
|
Unity_Add_float3(_Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3, float3(-0.5, -0.5, -0.5), _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3);
|
|
float3 _Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3;
|
|
Unity_Branch_float3(_Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean, _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3, float3(0, 0, 0), _Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3);
|
|
float _Property_9946d066804cc584a96830f8d35269cc_Out_0_Float = Vector1_2EC6D670;
|
|
float3 _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3, (_Property_9946d066804cc584a96830f8d35269cc_Out_0_Float.xxx), _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3);
|
|
float3 _Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3;
|
|
Unity_Add_float3(_Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3, _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3, _Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3);
|
|
float _Property_4ffb3356bdb9c78c815a6e7da47e7a34_Out_0_Float = Vector1_A2C4B4F4;
|
|
float3 _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3, (_Property_4ffb3356bdb9c78c815a6e7da47e7a34_Out_0_Float.xxx), _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3);
|
|
float _Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float;
|
|
Unity_Length_float3(_Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3, _Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float);
|
|
float _Property_51d6736452f5938caf6f83cdfc7df682_Out_0_Float = Vector1_7F78DDD2;
|
|
float _Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float;
|
|
Unity_Add_float(_Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float, _Property_51d6736452f5938caf6f83cdfc7df682_Out_0_Float, _Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float);
|
|
float _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float;
|
|
Unity_Multiply_float_float(_Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float, 0.001, _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float);
|
|
direction_1 = _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3;
|
|
strength_2 = _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float;
|
|
}
|
|
|
|
void Unity_CrossProduct_float(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = cross(A, B);
|
|
}
|
|
|
|
void Unity_Comparison_Equal_float(float A, float B, out float Out)
|
|
{
|
|
Out = A == B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_DotProduct_float3(float3 A, float3 B, out float Out)
|
|
{
|
|
Out = dot(A, B);
|
|
}
|
|
|
|
void Unity_Absolute_float(float In, out float Out)
|
|
{
|
|
Out = abs(In);
|
|
}
|
|
|
|
void Unity_Maximum_float(float A, float B, out float Out)
|
|
{
|
|
Out = max(A, B);
|
|
}
|
|
|
|
void Unity_Cosine_float(float In, out float Out)
|
|
{
|
|
Out = cos(In);
|
|
}
|
|
|
|
void Unity_Sine_float(float In, out float Out)
|
|
{
|
|
Out = sin(In);
|
|
}
|
|
|
|
void Unity_Comparison_NotEqual_float(float A, float B, out float Out)
|
|
{
|
|
Out = A != B ? 1 : 0;
|
|
}
|
|
|
|
struct Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float
|
|
{
|
|
float3 WorldSpaceNormal;
|
|
float4 VertexColor;
|
|
};
|
|
|
|
void SG_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float(float Vector1_BCB03E1A, float3 Vector3_C30D997B, float Vector1_A2C4B4F4, float Vector1_7EE0F94A, float Boolean_527CB26E, float Vector1_DE1BF63A, float Vector1_7F78DDD2, float3 Vector3_DE8CC74D, UnityTexture2D Texture2D_5BAC276D, UnityTexture2D Texture2D_A3874DB9, float4 Vector4_EBFF8CDE, float Vector1_B4470F9B, float Vector1_2EC6D670, float Vector1_9365F438, float Vector1_F53C4B89, float Vector1_6803B355, float4x4 Matrix4_0617b0bd42fc46ff90b1d55303a5477f, float4 Vector4_b44806ec67ca461fbcdf009dc6092cc3, Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float IN, out float3 vertex_1, out float3 normal_2)
|
|
{
|
|
float4 _Vector4_991bdf9badea4b2bb70edc71a7338c1d_Out_0_Vector4 = float4(float(0), float(0), float(0), float(1));
|
|
float3 _Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3;
|
|
{
|
|
// Converting Position from Object to AbsoluteWorld via world space
|
|
float3 world;
|
|
world = TransformObjectToWorld((_Vector4_991bdf9badea4b2bb70edc71a7338c1d_Out_0_Vector4.xyz).xyz);
|
|
_Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3 = GetAbsolutePositionWS(world);
|
|
}
|
|
float _Distance_343883e4e5444664abed46100940f24f_Out_2_Float;
|
|
Unity_Distance_float3(_Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3, float3(0, 0, 0), _Distance_343883e4e5444664abed46100940f24f_Out_2_Float);
|
|
float _Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean;
|
|
Unity_Comparison_Less_float(_Distance_343883e4e5444664abed46100940f24f_Out_2_Float, float(0.001), _Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean);
|
|
float3 _Property_2a4ab46b1d7c45918978aae50bd32b6f_Out_0_Vector3 = Vector3_C30D997B;
|
|
float4 _Vector4_d213eb2790b34988809a251ff9c74c6b_Out_0_Vector4 = float4(float(0), float(0), float(0), float(1));
|
|
float3 _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3;
|
|
_Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3 = TransformObjectToWorld((_Vector4_d213eb2790b34988809a251ff9c74c6b_Out_0_Vector4.xyz).xyz);
|
|
float3 _Property_4a88ff8e6e6b2b84bb2818cf73a0af30_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3;
|
|
_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3 = TransformObjectToWorld(_Property_4a88ff8e6e6b2b84bb2818cf73a0af30_Out_0_Vector3.xyz);
|
|
float _Property_dfda12e25f42bd808e65c99db447e176_Out_0_Boolean = Boolean_527CB26E;
|
|
float _Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float = Vector1_7EE0F94A;
|
|
float _Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float, float(0), _Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean);
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_R_1_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[0];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_G_2_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[1];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_B_3_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[2];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_A_4_Float = 0;
|
|
float _Split_7a634ef857769683b2100876a36535a2_R_1_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[0];
|
|
float _Split_7a634ef857769683b2100876a36535a2_G_2_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[1];
|
|
float _Split_7a634ef857769683b2100876a36535a2_B_3_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[2];
|
|
float _Split_7a634ef857769683b2100876a36535a2_A_4_Float = 0;
|
|
float _Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float;
|
|
Unity_Subtract_float(_Split_05e55a8c1b8cf88f93cbafc67103b677_G_2_Float, _Split_7a634ef857769683b2100876a36535a2_G_2_Float, _Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float);
|
|
float _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean;
|
|
Unity_Comparison_Less_float(_Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float, _Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float, _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean);
|
|
float _And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean;
|
|
Unity_And_float(_Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean, _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean, _And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean);
|
|
float _Property_e5e59fcc565a8b80ac239ba87d1bcf74_Out_0_Float = Vector1_A2C4B4F4;
|
|
float _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float;
|
|
Unity_Branch_float(_And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean, float(1E-05), _Property_e5e59fcc565a8b80ac239ba87d1bcf74_Out_0_Float, _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float);
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_R_1_Float = IN.VertexColor[0];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_G_2_Float = IN.VertexColor[1];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_B_3_Float = IN.VertexColor[2];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_A_4_Float = IN.VertexColor[3];
|
|
float _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float;
|
|
Unity_Multiply_float_float(_Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float, _Split_43013162a81fc4889a1944f2a2b75f66_A_4_Float, _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float);
|
|
float _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float;
|
|
Unity_Branch_float(_Property_dfda12e25f42bd808e65c99db447e176_Out_0_Boolean, _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float, _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float, _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float);
|
|
float _Property_eaab26f57a13988a8a813ad0813c8570_Out_0_Float = Vector1_7F78DDD2;
|
|
UnityTexture2D _Property_0f02225ebee993849ea6be48328c0958_Out_0_Texture2D = Texture2D_5BAC276D;
|
|
UnityTexture2D _Property_fce16cc7b4fcf48097b94eb2d5f1b596_Out_0_Texture2D = Texture2D_A3874DB9;
|
|
float4 _Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float;
|
|
Unity_Length_float4(_Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4, _Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float);
|
|
float _Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float, float(0), _Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean);
|
|
float4 _Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4;
|
|
Unity_Branch_float4(_Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean, _Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4, float4(0, 0, 1, 1), _Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4);
|
|
float4x4 _Property_cb03cb298f0a47d4ae24d85f3c47db75_Out_0_Matrix4 = Matrix4_0617b0bd42fc46ff90b1d55303a5477f;
|
|
float4 _Property_844e35a56a864617b521872c1cee398d_Out_0_Vector4 = Vector4_b44806ec67ca461fbcdf009dc6092cc3;
|
|
Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float _WindNMPoints_071e9370484b4168b560a27fbea64a52;
|
|
float4 _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4;
|
|
SG_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float(_Property_cb03cb298f0a47d4ae24d85f3c47db75_Out_0_Matrix4, SHADERGRAPH_OBJECT_POSITION, _Property_844e35a56a864617b521872c1cee398d_Out_0_Vector4, _WindNMPoints_071e9370484b4168b560a27fbea64a52, _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4);
|
|
float4 _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4;
|
|
Unity_Add_float4(_Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4, _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4, _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4);
|
|
float _Property_02c51f4c8a859f8f88433b435d4452f6_Out_0_Float = Vector1_B4470F9B;
|
|
float _Property_6b508d48a081548385021b27896c0622_Out_0_Float = Vector1_2EC6D670;
|
|
float _Property_d73fed4fb3c7b58d892364765a30498b_Out_0_Float = Vector1_9365F438;
|
|
float _Property_c3101a1b656cac858bfa11dbe7ebd268_Out_0_Float = Vector1_F53C4B89;
|
|
float _Property_c82c2ac458938d86bcc1aae3a58cc1dc_Out_0_Float = Vector1_6803B355;
|
|
float _Property_3f5330d8bec7c681ab9563aad03c7b89_Out_0_Float = Vector1_BCB03E1A;
|
|
Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba;
|
|
float3 _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3;
|
|
float _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float;
|
|
SG_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float, _Property_eaab26f57a13988a8a813ad0813c8570_Out_0_Float, _Property_0f02225ebee993849ea6be48328c0958_Out_0_Texture2D, _Property_fce16cc7b4fcf48097b94eb2d5f1b596_Out_0_Texture2D, _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4, _Property_02c51f4c8a859f8f88433b435d4452f6_Out_0_Float, _Property_6b508d48a081548385021b27896c0622_Out_0_Float, _Property_d73fed4fb3c7b58d892364765a30498b_Out_0_Float, _Property_c3101a1b656cac858bfa11dbe7ebd268_Out_0_Float, _Property_c82c2ac458938d86bcc1aae3a58cc1dc_Out_0_Float, _Property_3f5330d8bec7c681ab9563aad03c7b89_Out_0_Float, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float);
|
|
float3 _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3;
|
|
Unity_CrossProduct_float(float3 (0, 1, 0), _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3, _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3);
|
|
float _Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean;
|
|
Unity_Comparison_Equal_float((_CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3).x, float(0), _Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean);
|
|
float3 _Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean, float3(1E-06, 1E-06, 1E-06), _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3, _Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3);
|
|
float3 _Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3, _Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3);
|
|
float3 _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3);
|
|
float _DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float;
|
|
Unity_DotProduct_float3(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3, _DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float);
|
|
float3 _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, (_DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float.xxx), _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3);
|
|
float3 _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3;
|
|
Unity_Add_float3(_Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3, _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3);
|
|
float3 _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3, _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3);
|
|
float _Distance_702b068f612c7289a99272879da274ed_Out_2_Float;
|
|
Unity_Distance_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Distance_702b068f612c7289a99272879da274ed_Out_2_Float);
|
|
float _Property_f5c255b0f666358291012b78132d6593_Out_0_Float = Vector1_DE1BF63A;
|
|
float _Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float;
|
|
Unity_Divide_float(_Distance_702b068f612c7289a99272879da274ed_Out_2_Float, _Property_f5c255b0f666358291012b78132d6593_Out_0_Float, _Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float);
|
|
float _Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float;
|
|
Unity_Absolute_float(_Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float, _Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float);
|
|
float _Float_96534b09fc72da8da7bad6ebdb2b01ab_Out_0_Float = float(1E-07);
|
|
float _Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float;
|
|
Unity_Maximum_float(_Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float, _Float_96534b09fc72da8da7bad6ebdb2b01ab_Out_0_Float, _Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float);
|
|
float _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float;
|
|
Unity_Divide_float(float(1), _Property_f5c255b0f666358291012b78132d6593_Out_0_Float, _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float);
|
|
float _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float;
|
|
Unity_Power_float(_Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float, _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float, _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float);
|
|
float _Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float;
|
|
Unity_Multiply_float_float(_WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float, _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float, _Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float);
|
|
float _Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float;
|
|
Unity_Cosine_float(_Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float, _Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float);
|
|
float3 _Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3, (_Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float.xxx), _Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3);
|
|
float3 _CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3;
|
|
Unity_CrossProduct_float(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3, _CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3);
|
|
float _Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float;
|
|
Unity_Sine_float(_Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float, _Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float);
|
|
float3 _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3, (_Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float.xxx), _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3);
|
|
float3 _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3;
|
|
Unity_Add_float3(_Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3, _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3, _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3);
|
|
float3 _Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3;
|
|
Unity_Add_float3(_Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3, _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3, _Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3);
|
|
float3 _Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3;
|
|
_Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3 = TransformWorldToObject(_Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3.xyz);
|
|
float3 _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean, _Property_2a4ab46b1d7c45918978aae50bd32b6f_Out_0_Vector3, _Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3, _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3);
|
|
float3 _Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3 = Vector3_DE8CC74D;
|
|
float _Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float;
|
|
Unity_Length_float3(_Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3, _Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float);
|
|
float _Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean;
|
|
Unity_Comparison_NotEqual_float(_Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float, float(0), _Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean);
|
|
float3 _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(IN.WorldSpaceNormal, _Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3, _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3);
|
|
float3 _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean, _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3, IN.WorldSpaceNormal, _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3);
|
|
vertex_1 = _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3;
|
|
normal_2 = _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3;
|
|
}
|
|
|
|
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_Lerp_float4(float4 A, float4 B, float4 T, out float4 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Remap_float(float In, float2 InMinMax, float2 OutMinMax, out float Out)
|
|
{
|
|
Out = OutMinMax.x + (In - InMinMax.x) * (OutMinMax.y - OutMinMax.x) / (InMinMax.y - InMinMax.x);
|
|
}
|
|
|
|
void Unity_Lerp_float3(float3 A, float3 B, float3 T, out float3 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_NormalStrength_float(float3 In, float Strength, out float3 Out)
|
|
{
|
|
Out = float3(In.rg * Strength, lerp(1, In.b, saturate(Strength)));
|
|
}
|
|
|
|
// Graph Vertex
|
|
struct VertexDescription
|
|
{
|
|
float3 Position;
|
|
float3 Normal;
|
|
float3 Tangent;
|
|
};
|
|
|
|
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
|
|
{
|
|
VertexDescription description = (VertexDescription)0;
|
|
float3 _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3;
|
|
Unity_Add_float3(IN.ObjectSpacePosition, float3(1E-07, 1E-07, 1E-07), _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3);
|
|
float _Property_084857c303b23b82b7f2702b4186fa43_Out_0_Float = _Drag;
|
|
float _Property_35ad336ee9b278808178baf539e0133f_Out_0_Float = _HeightDrag;
|
|
float _Property_476e69b3f5653a8c995133f4fccaa757_Out_0_Float = _Stiffness;
|
|
float _Property_805aa6168fe3b08ca209d8ab0fa5d2d3_Out_0_Float = _InitialBend;
|
|
float4 _Property_8e47e7fd5c1a8b88b9cf212a6f62134c_Out_0_Vector4 = _NewNormal;
|
|
UnityTexture2D _Property_3b8cd110cb76a68d88342e4cc1336e0b_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(WIND_SETTINGS_TexNoise);
|
|
UnityTexture2D _Property_a939900eb077ee8593e638c7c457b53b_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(WIND_SETTINGS_TexGust);
|
|
float4 _Property_f59f8f9dc8757f8ab1c1d173e09c0787_Out_0_Vector4 = WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float _Property_89884359995fcf8a8d80bc0e19ce75f1_Out_0_Float = WIND_SETTINGS_FlexNoiseScale;
|
|
float _Property_c460088461241a819f81fd6ab2a8fc04_Out_0_Float = WIND_SETTINGS_Turbulence;
|
|
float _Property_0ef8268ed7d75386b8735f7baab81d22_Out_0_Float = WIND_SETTINGS_GustSpeed;
|
|
float _Property_9f4dae117e65b384a057e2e17ba36791_Out_0_Float = WIND_SETTINGS_GustScale;
|
|
float _Property_8c1472d718ff81889fbd5ee5e93e5291_Out_0_Float = WIND_SETTINGS_GustWorldScale;
|
|
float4x4 _Property_d28187fe6a414fa5b58ca9948c44abca_Out_0_Matrix4 = WIND_SETTINGS_Points;
|
|
float4 _Property_18d7723e0ed14f07992a44bbeb337673_Out_0_Vector4 = WIND_SETTINGS_Points_Radius;
|
|
Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8;
|
|
_WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8.WorldSpaceNormal = IN.WorldSpaceNormal;
|
|
_WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8.VertexColor = IN.VertexColor;
|
|
float3 _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3;
|
|
float3 _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_normal_2_Vector3;
|
|
SG_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float(IN.TimeParameters.x, _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3, _Property_084857c303b23b82b7f2702b4186fa43_Out_0_Float, _Property_35ad336ee9b278808178baf539e0133f_Out_0_Float, 0, _Property_476e69b3f5653a8c995133f4fccaa757_Out_0_Float, _Property_805aa6168fe3b08ca209d8ab0fa5d2d3_Out_0_Float, (_Property_8e47e7fd5c1a8b88b9cf212a6f62134c_Out_0_Vector4.xyz), _Property_3b8cd110cb76a68d88342e4cc1336e0b_Out_0_Texture2D, _Property_a939900eb077ee8593e638c7c457b53b_Out_0_Texture2D, _Property_f59f8f9dc8757f8ab1c1d173e09c0787_Out_0_Vector4, _Property_89884359995fcf8a8d80bc0e19ce75f1_Out_0_Float, _Property_c460088461241a819f81fd6ab2a8fc04_Out_0_Float, _Property_0ef8268ed7d75386b8735f7baab81d22_Out_0_Float, _Property_9f4dae117e65b384a057e2e17ba36791_Out_0_Float, _Property_8c1472d718ff81889fbd5ee5e93e5291_Out_0_Float, _Property_d28187fe6a414fa5b58ca9948c44abca_Out_0_Matrix4, _Property_18d7723e0ed14f07992a44bbeb337673_Out_0_Vector4, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_normal_2_Vector3);
|
|
description.Position = _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3;
|
|
description.Normal = IN.ObjectSpaceNormal;
|
|
description.Tangent = IN.ObjectSpaceTangent;
|
|
return description;
|
|
}
|
|
|
|
// Graph Pixel
|
|
struct SurfaceDescription
|
|
{
|
|
float3 BaseColor;
|
|
float3 Emission;
|
|
float Alpha;
|
|
float3 BentNormal;
|
|
float Smoothness;
|
|
float Occlusion;
|
|
float3 NormalTS;
|
|
float Metallic;
|
|
};
|
|
|
|
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
|
{
|
|
SurfaceDescription surface = (SurfaceDescription)0;
|
|
UnityTexture2D _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkBaseColorMap);
|
|
float4 _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4 = _TrunkTilingOffset;
|
|
float _Split_60538633130155809820b3185c81057f_R_1_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[0];
|
|
float _Split_60538633130155809820b3185c81057f_G_2_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[1];
|
|
float _Split_60538633130155809820b3185c81057f_B_3_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[2];
|
|
float _Split_60538633130155809820b3185c81057f_A_4_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[3];
|
|
float2 _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_R_1_Float, _Split_60538633130155809820b3185c81057f_G_2_Float);
|
|
float2 _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_B_3_Float, _Split_60538633130155809820b3185c81057f_A_4_Float);
|
|
float2 _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2, _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2, _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2);
|
|
float4 _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_R_4_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_G_5_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_B_6_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_A_7_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.a;
|
|
float4 _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4 = _TrunkBaseColor;
|
|
float4 _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4, _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4, _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4);
|
|
UnityTexture2D _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkBaseColorMap);
|
|
float _Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean = _BarkUseUV3;
|
|
float4 _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4 = IN.uv3;
|
|
float4 _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4 = IN.uv0;
|
|
float4 _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4;
|
|
Unity_Branch_float4(_Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean, _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4, _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4, _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4);
|
|
float4 _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4 = _BarkTilingOffset;
|
|
float _Split_ee975774554f6480b33168eff36d8be7_R_1_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[0];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_G_2_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[1];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_B_3_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[2];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_A_4_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[3];
|
|
float2 _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_R_1_Float, _Split_ee975774554f6480b33168eff36d8be7_G_2_Float);
|
|
float2 _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_B_3_Float, _Split_ee975774554f6480b33168eff36d8be7_A_4_Float);
|
|
float2 _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float((_Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4.xy), _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2, _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2, _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2);
|
|
float4 _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_R_4_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_G_5_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_B_6_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_A_7_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.a;
|
|
float4 _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4 = _BarkBaseColor;
|
|
float4 _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4, _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4);
|
|
UnityTexture2D _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_LayerMask);
|
|
float4 _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4 = _BarkBlendMaskTilingOffset;
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[0];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[1];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[2];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[3];
|
|
float2 _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float);
|
|
float2 _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float);
|
|
float2 _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2, _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2, _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2);
|
|
float4 _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2) );
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_R_4_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_G_5_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_B_6_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.a;
|
|
float4 _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4;
|
|
Unity_Lerp_float4(_Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxxx), _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4);
|
|
UnityTexture2D _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkMaskMap);
|
|
float4 _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_B_6_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.a;
|
|
float _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float = _TrunkMetallic;
|
|
float _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float, _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float, _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float);
|
|
float _Property_8142f12b781ad08680220297dab56f14_Out_0_Float = _TrunkAORemapMin;
|
|
float _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float = _TrunkAORemapMax;
|
|
float2 _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2 = float2(_Property_8142f12b781ad08680220297dab56f14_Out_0_Float, _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float);
|
|
float _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float, float2 (0, 1), _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float);
|
|
float _Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float = _TrunkSmoothnessRemapMin;
|
|
float _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float = _TrunkSmoothnessRemapMax;
|
|
float2 _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2 = float2(_Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float, _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float);
|
|
float _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float, float2 (0, 1), _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
float3 _Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3 = float3(_Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
UnityTexture2D _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkMaskMap);
|
|
float4 _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_B_6_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.a;
|
|
float _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float = _BarkMetallic;
|
|
float _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float, _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float, _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float);
|
|
float _Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float = _BarkAORemapMin;
|
|
float _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float = _BarkAORemapMax;
|
|
float2 _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2 = float2(_Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float, _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float);
|
|
float _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float, float2 (0, 1), _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float);
|
|
float _Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float = _BarkSmoothnessRemapMin;
|
|
float _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float = _BarkSmoothnessRemapMax;
|
|
float2 _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2 = float2(_Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float, _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float);
|
|
float _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float, float2 (0, 1), _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3 = float3(_Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3;
|
|
Unity_Lerp_float3(_Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3, _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3);
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[0];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[1];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[2];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_A_4_Float = 0;
|
|
UnityTexture2D _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkNormalMap);
|
|
float4 _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4);
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_R_4_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_G_5_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_B_6_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_A_7_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.a;
|
|
float _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float = _TrunkNormalScale;
|
|
float3 _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.xyz), _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float, _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3);
|
|
UnityTexture2D _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkNormalMap);
|
|
float4 _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4);
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_R_4_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_G_5_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_B_6_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_A_7_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.a;
|
|
float _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float = _BarkNormalScale;
|
|
float3 _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.xyz), _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3);
|
|
float3 _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
Unity_Lerp_float3(_NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3);
|
|
surface.BaseColor = (_Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4.xyz);
|
|
surface.Emission = float3(0, 0, 0);
|
|
surface.Alpha = float(1);
|
|
surface.BentNormal = IN.TangentSpaceNormal;
|
|
surface.Smoothness = _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float;
|
|
surface.Occlusion = _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float;
|
|
surface.NormalTS = _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
surface.Metallic = _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float;
|
|
return surface;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Graph Inputs
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#define VFX_SRP_ATTRIBUTES AttributesMesh
|
|
#define VaryingsMeshType VaryingsMeshToPS
|
|
#define VFX_SRP_VARYINGS VaryingsMeshType
|
|
#define VFX_SRP_SURFACE_INPUTS FragInputs
|
|
#endif
|
|
|
|
VertexDescriptionInputs AttributesMeshToVertexDescriptionInputs(AttributesMesh 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.VertexColor = input.color;
|
|
output.TimeParameters = _TimeParameters.xyz; // Note: in case of animation this will be overwrite (allow to handle motion vector)
|
|
#if UNITY_ANY_INSTANCING_ENABLED
|
|
#else
|
|
#endif
|
|
|
|
return output;
|
|
}
|
|
|
|
VertexDescription GetVertexDescription(AttributesMesh input, float3 timeParameters
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
// build graph inputs
|
|
VertexDescriptionInputs vertexDescriptionInputs = AttributesMeshToVertexDescriptionInputs(input);
|
|
// Override time parameters with used one (This is required to correctly handle motion vectors for vertex animation based on time)
|
|
vertexDescriptionInputs.TimeParameters = timeParameters;
|
|
|
|
// evaluate vertex graph
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
// Fetch the vertex graph properties for the particle instance.
|
|
GetElementVertexProperties(element, properties);
|
|
|
|
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs, properties);
|
|
#else
|
|
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs);
|
|
#endif
|
|
return vertexDescription;
|
|
|
|
}
|
|
|
|
AttributesMesh ApplyMeshModification(AttributesMesh input, float3 timeParameters
|
|
#ifdef USE_CUSTOMINTERP_SUBSTRUCT
|
|
#ifdef TESSELLATION_ON
|
|
, inout VaryingsMeshToDS varyings
|
|
#else
|
|
, inout VaryingsMeshToPS varyings
|
|
#endif
|
|
#endif
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
VertexDescription vertexDescription = GetVertexDescription(input, timeParameters
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, element
|
|
#endif
|
|
);
|
|
|
|
// copy graph output to the results
|
|
input.positionOS = vertexDescription.Position;
|
|
input.normalOS = vertexDescription.Normal;
|
|
input.tangentOS.xyz = vertexDescription.Tangent;
|
|
|
|
|
|
|
|
return input;
|
|
}
|
|
|
|
#if defined(_ADD_CUSTOM_VELOCITY) // For shader graph custom velocity
|
|
// Return precomputed Velocity in object space
|
|
float3 GetCustomVelocity(AttributesMesh input
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
VertexDescription vertexDescription = GetVertexDescription(input, _TimeParameters.xyz
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, element
|
|
#endif
|
|
);
|
|
return vertexDescription.CustomVelocity;
|
|
}
|
|
#endif
|
|
|
|
FragInputs BuildFragInputs(VaryingsMeshToPS input)
|
|
{
|
|
FragInputs output;
|
|
ZERO_INITIALIZE(FragInputs, output);
|
|
|
|
// Init to some default value to make the computer quiet (else it output 'divide by zero' warning even if value is not used).
|
|
// TODO: this is a really poor workaround, but the variable is used in a bunch of places
|
|
// to compute normals which are then passed on elsewhere to compute other values...
|
|
output.tangentToWorld = k_identity3x3;
|
|
output.positionSS = input.positionCS; // input.positionCS is SV_Position
|
|
|
|
output.tangentToWorld = BuildTangentToWorld(input.tangentWS, input.normalWS);
|
|
output.texCoord0 = input.texCoord0;
|
|
output.texCoord3 = input.texCoord3;
|
|
|
|
#if UNITY_ANY_INSTANCING_ENABLED
|
|
#else
|
|
#endif
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
// FragInputs from VFX come from two places: Interpolator or CBuffer.
|
|
#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
|
|
|
|
// splice point to copy custom interpolator fields from varyings to frag inputs
|
|
|
|
|
|
return output;
|
|
}
|
|
|
|
// existing HDRP code uses the combined function to go directly from packed to frag inputs
|
|
FragInputs UnpackVaryingsMeshToFragInputs(PackedVaryingsMeshToPS input)
|
|
{
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
#if defined(HAVE_VFX_MODIFICATION) && defined(UNITY_INSTANCING_ENABLED)
|
|
unity_InstanceID = input.instanceID;
|
|
#endif
|
|
VaryingsMeshToPS unpacked = UnpackVaryingsMeshToPS(input);
|
|
return BuildFragInputs(unpacked);
|
|
}
|
|
SurfaceDescriptionInputs FragInputsToSurfaceDescriptionInputs(FragInputs input, float3 viewWS)
|
|
{
|
|
SurfaceDescriptionInputs output;
|
|
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
|
|
|
#if defined(SHADER_STAGE_RAY_TRACING)
|
|
#else
|
|
#endif
|
|
output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
|
|
|
|
#if UNITY_UV_STARTS_AT_TOP
|
|
#else
|
|
#endif
|
|
|
|
|
|
output.uv0 = input.texCoord0;
|
|
output.uv3 = input.texCoord3;
|
|
|
|
// splice point to copy frag inputs custom interpolator pack into the SDI
|
|
|
|
|
|
return output;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Surface Data (Specific Material)
|
|
|
|
void ApplyDecalToSurfaceDataNoNormal(DecalSurfaceData decalSurfaceData, inout SurfaceData surfaceData);
|
|
|
|
void ApplyDecalAndGetNormal(FragInputs fragInputs, PositionInputs posInput, SurfaceDescription surfaceDescription,
|
|
inout SurfaceData surfaceData)
|
|
{
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
#ifdef DECAL_NORMAL_BLENDING
|
|
// SG nodes don't ouptut surface gradients, so if decals require surf grad blending, we have to convert
|
|
// the normal to gradient before applying the decal. We then have to resolve the gradient back to world space
|
|
float3 normalTS;
|
|
|
|
normalTS = SurfaceGradientFromTangentSpaceNormalAndFromTBN(surfaceDescription.NormalTS,
|
|
fragInputs.tangentToWorld[0], fragInputs.tangentToWorld[1]);
|
|
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, fragInputs.tangentToWorld[2], normalTS);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
|
|
GetNormalWS_SG(fragInputs, normalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
#else
|
|
// normal delivered to master node
|
|
GetNormalWS(fragInputs, surfaceDescription.NormalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Both uses and modifies 'surfaceData.normalWS'.
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, surfaceData.normalWS.xyz);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
#endif
|
|
}
|
|
void BuildSurfaceData(FragInputs fragInputs, inout SurfaceDescription surfaceDescription, float3 V, PositionInputs posInput, out SurfaceData surfaceData, out float3 bentNormalWS)
|
|
{
|
|
ZERO_INITIALIZE(SurfaceData, surfaceData);
|
|
|
|
// specularOcclusion need to be init ahead of decal to quiet the compiler that modify the SurfaceData struct
|
|
// however specularOcclusion can come from the graph, so need to be init here so it can be override.
|
|
surfaceData.specularOcclusion = 1.0;
|
|
surfaceData.thickness = 0.0;
|
|
|
|
surfaceData.baseColor = surfaceDescription.BaseColor;
|
|
surfaceData.perceptualSmoothness = surfaceDescription.Smoothness;
|
|
surfaceData.ambientOcclusion = surfaceDescription.Occlusion;
|
|
surfaceData.metallic = surfaceDescription.Metallic;
|
|
|
|
#if defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE) || defined(_REFRACTION_THIN)
|
|
if (_EnableSSRefraction)
|
|
{
|
|
|
|
surfaceData.transmittanceMask = (1.0 - surfaceDescription.Alpha);
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
else
|
|
{
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
#else
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
#endif
|
|
|
|
// These static material feature allow compile time optimization
|
|
surfaceData.materialFeatures = MATERIALFEATUREFLAGS_LIT_STANDARD;
|
|
#ifdef _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SUBSURFACE_SCATTERING;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_COLORED_TRANSMISSION;
|
|
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_ANISOTROPY
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_ANISOTROPY;
|
|
|
|
// Initialize the normal to something non-zero to avoid a div-zero warning for anisotropy.
|
|
surfaceData.normalWS = float3(0, 1, 0);
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_IRIDESCENCE
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_IRIDESCENCE;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SPECULAR_COLOR;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_CLEAR_COAT
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_CLEAR_COAT;
|
|
#endif
|
|
|
|
#if defined (_MATERIAL_FEATURE_SPECULAR_COLOR) && defined (_ENERGY_CONSERVING_SPECULAR)
|
|
// Require to have setup baseColor
|
|
// Reproduce the energy conservation done in legacy Unity. Not ideal but better for compatibility and users can unchek it
|
|
surfaceData.baseColor *= (1.0 - Max3(surfaceData.specularColor.r, surfaceData.specularColor.g, surfaceData.specularColor.b));
|
|
#endif
|
|
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
ApplyDecalAndGetNormal(fragInputs, posInput, surfaceDescription, surfaceData);
|
|
|
|
surfaceData.geomNormalWS = fragInputs.tangentToWorld[2];
|
|
|
|
surfaceData.tangentWS = normalize(fragInputs.tangentToWorld[0].xyz); // The tangent is not normalize in tangentToWorld for mikkt. TODO: Check if it expected that we normalize with Morten. Tag: SURFACE_GRADIENT
|
|
|
|
|
|
bentNormalWS = surfaceData.normalWS;
|
|
|
|
surfaceData.tangentWS = Orthonormalize(surfaceData.tangentWS, surfaceData.normalWS);
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
// Mipmap mode debugging isn't supported with ray tracing as it relies on derivatives
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD0
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG(posInput.positionSS, fragInputs.texCoord0);
|
|
#else
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG_NO_UV(posInput.positionSS);
|
|
#endif
|
|
surfaceData.metallic = 0;
|
|
}
|
|
#endif
|
|
|
|
// We need to call ApplyDebugToSurfaceData after filling the surfaceData and before filling builtinData
|
|
// as it can modify attribute use for static lighting
|
|
ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData);
|
|
#endif
|
|
|
|
// By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion.
|
|
// If user provide bent normal then we process a better term
|
|
#if defined(_SPECULAR_OCCLUSION_CUSTOM)
|
|
// Just use the value passed through via the slot (not active otherwise)
|
|
#elif defined(_SPECULAR_OCCLUSION_FROM_AO_BENT_NORMAL)
|
|
// If we have bent normal and ambient occlusion, process a specular occlusion
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromBentAO(V, bentNormalWS, surfaceData.normalWS, surfaceData.ambientOcclusion, PerceptualSmoothnessToPerceptualRoughness(surfaceData.perceptualSmoothness));
|
|
#elif defined(_AMBIENT_OCCLUSION) && defined(_SPECULAR_OCCLUSION_FROM_AO)
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness));
|
|
#endif
|
|
|
|
#if defined(_ENABLE_GEOMETRIC_SPECULAR_AA) && !defined(SHADER_STAGE_RAY_TRACING)
|
|
surfaceData.perceptualSmoothness = GeometricNormalFiltering(surfaceData.perceptualSmoothness, fragInputs.tangentToWorld[2], surfaceDescription.SpecularAAScreenSpaceVariance, surfaceDescription.SpecularAAThreshold);
|
|
#endif
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Get Surface And BuiltinData
|
|
|
|
void GetSurfaceAndBuiltinData(FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData RAY_TRACING_OPTIONAL_PARAMETERS)
|
|
{
|
|
// Don't dither if displaced tessellation (we're fading out the displacement instead to match the next LOD)
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && !defined(_TESSELLATION_DISPLACEMENT)
|
|
#ifdef LOD_FADE_CROSSFADE // enable dithering LOD transition if user select CrossFade transition in LOD group
|
|
LODDitheringTransition(ComputeFadeMaskSeed(V, posInput.positionSS), unity_LODFade.x);
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
#ifdef _DOUBLESIDED_ON
|
|
float3 doubleSidedConstants = _DoubleSidedConstants.xyz;
|
|
#else
|
|
float3 doubleSidedConstants = float3(1.0, 1.0, 1.0);
|
|
#endif
|
|
|
|
ApplyDoubleSidedFlipOrMirror(fragInputs, doubleSidedConstants); // Apply double sided flip on the vertex normal
|
|
#endif // SHADER_UNLIT
|
|
|
|
SurfaceDescriptionInputs surfaceDescriptionInputs = FragInputsToSurfaceDescriptionInputs(fragInputs, V);
|
|
|
|
#if defined(HAVE_VFX_MODIFICATION)
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
GetElementPixelProperties(fragInputs, properties);
|
|
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs, properties);
|
|
#else
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs);
|
|
#endif
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
surfaceDescription.Alpha = 1.0f;
|
|
}
|
|
#endif
|
|
|
|
// Perform alpha test very early to save performance (a killed pixel will not sample textures)
|
|
// TODO: split graph evaluation to grab just alpha dependencies first? tricky..
|
|
#ifdef _ALPHATEST_ON
|
|
float alphaCutoff = surfaceDescription.AlphaClipThreshold;
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
// The TransparentDepthPrepass is also used with SSR transparent.
|
|
// If an artists enable transaprent SSR but not the TransparentDepthPrepass itself, then we use AlphaClipThreshold
|
|
// otherwise if TransparentDepthPrepass is enabled we use AlphaClipThresholdDepthPrepass
|
|
#elif SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_POSTPASS
|
|
// DepthPostpass always use its own alpha threshold
|
|
alphaCutoff = surfaceDescription.AlphaClipThresholdDepthPostpass;
|
|
#elif (SHADERPASS == SHADERPASS_SHADOWS) || (SHADERPASS == SHADERPASS_RAYTRACING_VISIBILITY)
|
|
// If use shadow threshold isn't enable we don't allow any test
|
|
#endif
|
|
|
|
GENERIC_ALPHA_TEST(surfaceDescription.Alpha, alphaCutoff);
|
|
#endif
|
|
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && _DEPTHOFFSET_ON
|
|
ApplyDepthOffsetPositionInput(V, surfaceDescription.DepthOffset, GetViewForwardDir(), GetWorldToHClipMatrix(), posInput);
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
float3 bentNormalWS;
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData, bentNormalWS);
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD1
|
|
float4 lightmapTexCoord1 = fragInputs.texCoord1;
|
|
#else
|
|
float4 lightmapTexCoord1 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD2
|
|
float4 lightmapTexCoord2 = fragInputs.texCoord2;
|
|
#else
|
|
float4 lightmapTexCoord2 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Builtin Data
|
|
// For back lighting we use the oposite vertex normal
|
|
InitBuiltinData(posInput, alpha, bentNormalWS, -fragInputs.tangentToWorld[2], lightmapTexCoord1, lightmapTexCoord2, builtinData);
|
|
|
|
#else
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData);
|
|
|
|
ZERO_BUILTIN_INITIALIZE(builtinData); // No call to InitBuiltinData as we don't have any lighting
|
|
builtinData.opacity = surfaceDescription.Alpha;
|
|
|
|
#if defined(DEBUG_DISPLAY)
|
|
// Light Layers are currently not used for the Unlit shader (because it is not lit)
|
|
// But Unlit objects do cast shadows according to their rendering layer mask, which is what we want to
|
|
// display in the light layers visualization mode, therefore we need the renderingLayers
|
|
builtinData.renderingLayers = GetMeshRenderingLayerMask();
|
|
#endif
|
|
|
|
#endif // SHADER_UNLIT
|
|
|
|
#ifdef _ALPHATEST_ON
|
|
// Used for sharpening by alpha to mask - Alpha to covertage is only used with depth only and forward pass (no shadow pass, no transparent pass)
|
|
builtinData.alphaClipTreshold = alphaCutoff;
|
|
#endif
|
|
|
|
// override sampleBakedGI - not used by Unlit
|
|
// When overriding GI, we need to force the isLightmap flag to make sure we don't add APV (sampled in the lightloop) on top of the overridden value (set at GBuffer stage)
|
|
|
|
builtinData.emissiveColor = surfaceDescription.Emission;
|
|
|
|
// Note this will not fully work on transparent surfaces (can check with _SURFACE_TYPE_TRANSPARENT define)
|
|
// We will always overwrite vt feeback with the nearest. So behind transparent surfaces vt will not be resolved
|
|
// This is a limitation of the current MRT approach.
|
|
#ifdef UNITY_VIRTUAL_TEXTURING
|
|
#endif
|
|
|
|
#if _DEPTHOFFSET_ON
|
|
builtinData.depthOffset = surfaceDescription.DepthOffset;
|
|
#endif
|
|
|
|
// TODO: We should generate distortion / distortionBlur for non distortion pass
|
|
#if (SHADERPASS == SHADERPASS_DISTORTION)
|
|
builtinData.distortion = surfaceDescription.Distortion;
|
|
builtinData.distortionBlur = surfaceDescription.DistortionBlur;
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// PostInitBuiltinData call ApplyDebugToBuiltinData
|
|
PostInitBuiltinData(V, posInput, surfaceData, builtinData);
|
|
#else
|
|
ApplyDebugToBuiltinData(builtinData);
|
|
#endif
|
|
|
|
RAY_TRACING_OPTIONAL_ALPHA_TEST_PASS
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Main
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDepthOnly.hlsl"
|
|
|
|
// --------------------------------------------------
|
|
// Visual Effect Vertex Invocations
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/VisualEffectVertex.hlsl"
|
|
#else
|
|
#endif
|
|
#endif
|
|
|
|
ENDHLSL
|
|
}
|
|
Pass
|
|
{
|
|
Name "SceneSelectionPass"
|
|
Tags
|
|
{
|
|
"LightMode" = "SceneSelectionPass"
|
|
}
|
|
|
|
// Render State
|
|
Cull Off
|
|
|
|
// Debug
|
|
// <None>
|
|
|
|
// --------------------------------------------------
|
|
// Pass
|
|
|
|
HLSLPROGRAM
|
|
|
|
// Pragmas
|
|
#pragma multi_compile _ DOTS_INSTANCING_ON
|
|
#pragma editor_sync_compilation
|
|
#pragma instancing_options renderinglayer
|
|
#pragma target 4.5
|
|
#pragma vertex Vert
|
|
#pragma fragment Frag
|
|
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
|
|
#pragma multi_compile_instancing
|
|
|
|
// Keywords
|
|
#pragma shader_feature _ _SURFACE_TYPE_TRANSPARENT
|
|
#pragma shader_feature_local _ _DOUBLESIDED_ON
|
|
#pragma shader_feature_local _ _ADD_PRECOMPUTED_VELOCITY
|
|
#pragma shader_feature_local _ _TRANSPARENT_WRITES_MOTION_VEC _TRANSPARENT_REFRACTIVE_SORT
|
|
#pragma shader_feature_local_fragment _ _ENABLE_FOG_ON_TRANSPARENT
|
|
#pragma multi_compile _ LOD_FADE_CROSSFADE
|
|
#pragma shader_feature_local_fragment _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local _ _REFRACTION_PLANE _REFRACTION_SPHERE _REFRACTION_THIN
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// GraphKeywords: <None>
|
|
|
|
// Defines
|
|
#define SHADERPASS SHADERPASS_DEPTH_ONLY
|
|
#define RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define SCENESELECTIONPASS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
|
|
// For custom interpolators to inject a substruct definition before FragInputs definition,
|
|
// allowing for FragInputs to capture CI's intended for ShaderGraph's SDI.
|
|
struct CustomInterpolators
|
|
{
|
|
};
|
|
#define USE_CUSTOMINTERP_SUBSTRUCT
|
|
|
|
|
|
|
|
// TODO: Merge FragInputsVFX substruct with CustomInterpolators.
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
struct FragInputsVFX
|
|
{
|
|
/* WARNING: $splice Could not find named fragment 'FragInputsVFX' */
|
|
};
|
|
#endif
|
|
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/GeometricTools.hlsl" // Required by Tessellation.hlsl
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Tessellation.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" // Required to be include before we include properties as it define DECLARE_STACK_CB
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl" // Required before including properties as it defines UNITY_TEXTURE_STREAMING_DEBUG_VARS
|
|
// Always include Shader Graph version
|
|
// Always include last to avoid double macros
|
|
#include "Packages/com.unity.shadergraph/ShaderGraphLibrary/Functions.hlsl" // Need to be here for Gradient struct definition
|
|
|
|
// --------------------------------------------------
|
|
// Defines
|
|
|
|
// Attribute
|
|
#define ATTRIBUTES_NEED_NORMAL
|
|
#define ATTRIBUTES_NEED_TANGENT
|
|
#define ATTRIBUTES_NEED_TEXCOORD0
|
|
#define ATTRIBUTES_NEED_TEXCOORD3
|
|
#define ATTRIBUTES_NEED_COLOR
|
|
#define VARYINGS_NEED_TEXCOORD0
|
|
#define VARYINGS_NEED_TEXCOORD3
|
|
|
|
#define HAVE_MESH_MODIFICATION
|
|
|
|
//Strip down the FragInputs.hlsl (on graphics), so we can only optimize the interpolators we use.
|
|
//if by accident something requests contents of FragInputs.hlsl, it will be caught as a compiler error
|
|
//Frag inputs stripping is only enabled when FRAG_INPUTS_ENABLE_STRIPPING is set
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && SHADERPASS != SHADERPASS_RAYTRACING_GBUFFER && SHADERPASS != SHADERPASS_FULL_SCREEN_DEBUG
|
|
#define FRAG_INPUTS_ENABLE_STRIPPING
|
|
#endif
|
|
#define FRAG_INPUTS_USE_TEXCOORD0
|
|
#define FRAG_INPUTS_USE_TEXCOORD3
|
|
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl"
|
|
|
|
|
|
|
|
|
|
// Following two define are a workaround introduce in 10.1.x for RaytracingQualityNode
|
|
// The ShaderGraph don't support correctly migration of this node as it serialize all the node data
|
|
// in the json file making it impossible to uprgrade. Until we get a fix, we do a workaround here
|
|
// to still allow us to rename the field and keyword of this node without breaking existing code.
|
|
#ifdef RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define RAYTRACING_SHADER_GRAPH_HIGH
|
|
#endif
|
|
|
|
#ifdef RAYTRACING_SHADER_GRAPH_RAYTRACED
|
|
#define RAYTRACING_SHADER_GRAPH_LOW
|
|
#endif
|
|
// end
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// We need isFrontFace when using double sided - it is not required for unlit as in case of unlit double sided only drive the cullmode
|
|
// VARYINGS_NEED_CULLFACE can be define by VaryingsMeshToPS.FaceSign input if a IsFrontFace Node is included in the shader graph.
|
|
#if defined(_DOUBLESIDED_ON) && !defined(VARYINGS_NEED_CULLFACE)
|
|
#define VARYINGS_NEED_CULLFACE
|
|
#endif
|
|
#endif
|
|
|
|
// Specific Material Define
|
|
#define _AMBIENT_OCCLUSION 1
|
|
#define _SPECULAR_OCCLUSION_FROM_AO 1
|
|
#define _ENERGY_CONSERVING_SPECULAR 1
|
|
|
|
#if _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// Colored Transmission doesn't support clear coat
|
|
#undef _MATERIAL_FEATURE_CLEAR_COAT
|
|
#endif
|
|
|
|
// If we use subsurface scattering, enable output split lighting (for forward pass)
|
|
#if defined(_MATERIAL_FEATURE_SUBSURFACE_SCATTERING) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define OUTPUT_SPLIT_LIGHTING
|
|
#endif
|
|
|
|
// This shader support recursive rendering for raytracing
|
|
#define HAVE_RECURSIVE_RENDERING
|
|
|
|
// In Path Tracing, For all single-sided, refractive materials, we want to force a thin refraction model
|
|
#if (SHADERPASS == SHADERPASS_PATH_TRACING) && !defined(_DOUBLESIDED_ON) && (defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE))
|
|
#undef _REFRACTION_PLANE
|
|
#undef _REFRACTION_SPHERE
|
|
#define _REFRACTION_THIN
|
|
#endif
|
|
// Caution: we can use the define SHADER_UNLIT onlit after the above Material include as it is the Unlit template who define it
|
|
|
|
// To handle SSR on transparent correctly with a possibility to enable/disable it per framesettings
|
|
// we should have a code like this:
|
|
// if !defined(_DISABLE_SSR_TRANSPARENT)
|
|
// pragma multi_compile _ WRITE_NORMAL_BUFFER
|
|
// endif
|
|
// i.e we enable the multicompile only if we can receive SSR or not, and then C# code drive
|
|
// it based on if SSR transparent in frame settings and not (and stripper can strip it).
|
|
// this is currently not possible with our current preprocessor as _DISABLE_SSR_TRANSPARENT is a keyword not a define
|
|
// so instead we used this and chose to pay the extra cost of normal write even if SSR transaprent is disabled.
|
|
// Ideally the shader graph generator should handle it but condition below can't be handle correctly for now.
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
#if !defined(_DISABLE_SSR_TRANSPARENT) && !defined(SHADER_UNLIT)
|
|
#define WRITE_NORMAL_BUFFER
|
|
#endif
|
|
#endif
|
|
|
|
// See Lit.shader
|
|
#if SHADERPASS == SHADERPASS_MOTION_VECTORS && defined(WRITE_DECAL_BUFFER_AND_RENDERING_LAYER)
|
|
#define WRITE_DECAL_BUFFER
|
|
#endif
|
|
|
|
#ifndef DEBUG_DISPLAY
|
|
// In case of opaque we don't want to perform the alpha test, it is done in depth prepass and we use depth equal for ztest (setup from UI)
|
|
// Don't do it with debug display mode as it is possible there is no depth prepass in this case
|
|
#if !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#if SHADERPASS == SHADERPASS_FORWARD
|
|
#define SHADERPASS_FORWARD_BYPASS_ALPHA_TEST
|
|
#elif SHADERPASS == SHADERPASS_GBUFFER
|
|
#define SHADERPASS_GBUFFER_BYPASS_ALPHA_TEST
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
// Define _DEFERRED_CAPABLE_MATERIAL for shader capable to run in deferred pass
|
|
#if defined(SHADER_LIT) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _DEFERRED_CAPABLE_MATERIAL
|
|
#endif
|
|
|
|
// Translate transparent motion vector define
|
|
#if (defined(_TRANSPARENT_WRITES_MOTION_VEC) || defined(_TRANSPARENT_REFRACTIVE_SORT)) && defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _WRITE_TRANSPARENT_MOTION_VECTOR
|
|
#endif
|
|
|
|
// -- Graph Properties
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _TrunkBaseColor;
|
|
float4 _TrunkBaseColorMap_TexelSize;
|
|
float4 _TrunkTilingOffset;
|
|
float4 _TrunkNormalMap_TexelSize;
|
|
float _TrunkNormalScale;
|
|
float4 _TrunkMaskMap_TexelSize;
|
|
float _TrunkMetallic;
|
|
float _TrunkAORemapMin;
|
|
float _TrunkAORemapMax;
|
|
float _TrunkSmoothnessRemapMin;
|
|
float _TrunkSmoothnessRemapMax;
|
|
float4 _LayerMask_TexelSize;
|
|
float4 _BarkBlendMaskTilingOffset;
|
|
float4 _BarkBaseColor;
|
|
float4 _BarkBaseColorMap_TexelSize;
|
|
float _BarkUseUV3;
|
|
float4 _BarkTilingOffset;
|
|
float4 _BarkNormalMap_TexelSize;
|
|
float _BarkNormalScale;
|
|
float4 _BarkMaskMap_TexelSize;
|
|
float _BarkMetallic;
|
|
float _BarkSmoothnessRemapMin;
|
|
float _BarkSmoothnessRemapMax;
|
|
float _BarkAORemapMin;
|
|
float _BarkAORemapMax;
|
|
float _Stiffness;
|
|
float _InitialBend;
|
|
float _Drag;
|
|
float _HeightDrag;
|
|
float4 _NewNormal;
|
|
float4 _EmissionColor;
|
|
float _UseShadowThreshold;
|
|
float4 _DoubleSidedConstants;
|
|
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
|
float _BlendMode;
|
|
float _EnableBlendModePreserveSpecularLighting;
|
|
float _RayTracing;
|
|
float _RefractionModel;
|
|
float _MaterialID;
|
|
float _MaterialTypeMask;
|
|
CBUFFER_END
|
|
|
|
|
|
// Object and Global properties
|
|
SAMPLER(SamplerState_Linear_Repeat);
|
|
SAMPLER(SamplerState_Linear_Repeat_Aniso8);
|
|
TEXTURE2D(_TrunkBaseColorMap);
|
|
SAMPLER(sampler_TrunkBaseColorMap);
|
|
TEXTURE2D(_TrunkNormalMap);
|
|
SAMPLER(sampler_TrunkNormalMap);
|
|
TEXTURE2D(_TrunkMaskMap);
|
|
SAMPLER(sampler_TrunkMaskMap);
|
|
TEXTURE2D(_LayerMask);
|
|
SAMPLER(sampler_LayerMask);
|
|
TEXTURE2D(_BarkBaseColorMap);
|
|
SAMPLER(sampler_BarkBaseColorMap);
|
|
TEXTURE2D(_BarkNormalMap);
|
|
SAMPLER(sampler_BarkNormalMap);
|
|
TEXTURE2D(_BarkMaskMap);
|
|
SAMPLER(sampler_BarkMaskMap);
|
|
TEXTURE2D(WIND_SETTINGS_TexNoise);
|
|
SAMPLER(samplerWIND_SETTINGS_TexNoise);
|
|
float4 WIND_SETTINGS_TexNoise_TexelSize;
|
|
TEXTURE2D(WIND_SETTINGS_TexGust);
|
|
SAMPLER(samplerWIND_SETTINGS_TexGust);
|
|
float4 WIND_SETTINGS_TexGust_TexelSize;
|
|
float4 WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float WIND_SETTINGS_FlexNoiseScale;
|
|
float WIND_SETTINGS_ShiverNoiseScale;
|
|
float WIND_SETTINGS_Turbulence;
|
|
float WIND_SETTINGS_GustSpeed;
|
|
float WIND_SETTINGS_GustScale;
|
|
float WIND_SETTINGS_GustWorldScale;
|
|
float4x4 WIND_SETTINGS_Points;
|
|
float4 WIND_SETTINGS_Points_Radius;
|
|
|
|
// -- Property used by ScenePickingPass
|
|
#ifdef SCENEPICKINGPASS
|
|
float4 _SelectionID;
|
|
#endif
|
|
|
|
// -- Properties used by SceneSelectionPass
|
|
#ifdef SCENESELECTIONPASS
|
|
int _ObjectId;
|
|
int _PassValue;
|
|
#endif
|
|
|
|
// Includes
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/PickingSpaceTransforms.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/NormalSurfaceGradient.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDecalData.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
// GraphIncludes: <None>
|
|
|
|
// --------------------------------------------------
|
|
// Structs and Packing
|
|
|
|
struct AttributesMesh
|
|
{
|
|
float3 positionOS : POSITION;
|
|
float3 normalOS : NORMAL;
|
|
float4 tangentOS : TANGENT;
|
|
float4 uv0 : TEXCOORD0;
|
|
float4 uv3 : TEXCOORD3;
|
|
float4 color : COLOR;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(ATTRIBUTES_NEED_INSTANCEID)
|
|
uint instanceID : INSTANCEID_SEMANTIC;
|
|
#endif
|
|
};
|
|
struct VaryingsMeshToPS
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
float4 texCoord0;
|
|
float4 texCoord3;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
uint instanceID : CUSTOM_INSTANCE_ID;
|
|
#endif
|
|
};
|
|
struct VertexDescriptionInputs
|
|
{
|
|
float3 ObjectSpaceNormal;
|
|
float3 WorldSpaceNormal;
|
|
float3 ObjectSpaceTangent;
|
|
float3 ObjectSpacePosition;
|
|
float4 VertexColor;
|
|
float3 TimeParameters;
|
|
};
|
|
struct SurfaceDescriptionInputs
|
|
{
|
|
float3 TangentSpaceNormal;
|
|
float4 uv0;
|
|
float4 uv3;
|
|
};
|
|
struct PackedVaryingsMeshToPS
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
float4 texCoord0 : INTERP0;
|
|
float4 texCoord3 : INTERP1;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
uint instanceID : CUSTOM_INSTANCE_ID;
|
|
#endif
|
|
};
|
|
|
|
PackedVaryingsMeshToPS PackVaryingsMeshToPS (VaryingsMeshToPS input)
|
|
{
|
|
PackedVaryingsMeshToPS output;
|
|
ZERO_INITIALIZE(PackedVaryingsMeshToPS, output);
|
|
output.positionCS = input.positionCS;
|
|
output.texCoord0.xyzw = input.texCoord0;
|
|
output.texCoord3.xyzw = input.texCoord3;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
output.instanceID = input.instanceID;
|
|
#endif
|
|
return output;
|
|
}
|
|
|
|
VaryingsMeshToPS UnpackVaryingsMeshToPS (PackedVaryingsMeshToPS input)
|
|
{
|
|
VaryingsMeshToPS output;
|
|
output.positionCS = input.positionCS;
|
|
output.texCoord0 = input.texCoord0.xyzw;
|
|
output.texCoord3 = input.texCoord3.xyzw;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
output.instanceID = input.instanceID;
|
|
#endif
|
|
return output;
|
|
}
|
|
|
|
|
|
// --------------------------------------------------
|
|
// Graph
|
|
|
|
|
|
// Graph Functions
|
|
|
|
void Unity_Add_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
void Unity_Distance_float3(float3 A, float3 B, out float Out)
|
|
{
|
|
Out = distance(A, B);
|
|
}
|
|
|
|
void Unity_Comparison_Less_float(float A, float B, out float Out)
|
|
{
|
|
Out = A < B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_Comparison_Greater_float(float A, float B, out float Out)
|
|
{
|
|
Out = A > B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_Subtract_float(float A, float B, out float Out)
|
|
{
|
|
Out = A - B;
|
|
}
|
|
|
|
void Unity_And_float(float A, float B, out float Out)
|
|
{
|
|
Out = A && B;
|
|
}
|
|
|
|
void Unity_Branch_float(float Predicate, float True, float False, out float Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Multiply_float_float(float A, float B, out float Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Length_float4(float4 In, out float Out)
|
|
{
|
|
Out = length(In);
|
|
}
|
|
|
|
void Unity_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Subtract_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A - B;
|
|
}
|
|
|
|
void Unity_Normalize_float3(float3 In, out float3 Out)
|
|
{
|
|
Out = normalize(In);
|
|
}
|
|
|
|
void Unity_Length_float3(float3 In, out float Out)
|
|
{
|
|
Out = length(In);
|
|
}
|
|
|
|
void Unity_Divide_float(float A, float B, out float Out)
|
|
{
|
|
Out = A / B;
|
|
}
|
|
|
|
void Unity_Clamp_float(float In, float Min, float Max, out float Out)
|
|
{
|
|
Out = clamp(In, Min, Max);
|
|
}
|
|
|
|
void Unity_Lerp_float(float A, float B, float T, out float Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Multiply_float3_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Combine_float(float R, float G, float B, float A, out float4 RGBA, out float3 RGB, out float2 RG)
|
|
{
|
|
RGBA = float4(R, G, B, A);
|
|
RGB = float3(R, G, B);
|
|
RG = float2(R, G);
|
|
}
|
|
|
|
void Unity_Add_float4(float4 A, float4 B, out float4 Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
struct Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float
|
|
{
|
|
};
|
|
|
|
void SG_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float(float4x4 Matrix4_cb72bb33b7a84dfda97778a514f9b60f, float3 Vector3_90379ebf40aa468b8362f8d265f4f234, float4 Vector4_159bb4232f82428893101734a03e2a1e, Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float IN, out float4 WindPoint_1)
|
|
{
|
|
float3 _Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3 = Vector3_90379ebf40aa468b8362f8d265f4f234;
|
|
float4x4 _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4 = Matrix4_cb72bb33b7a84dfda97778a514f9b60f;
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].r);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].g);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].b);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].a);
|
|
float3 _Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4.xyz), _Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3);
|
|
float3 _Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3, _Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3);
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[0];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[1];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[2];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[3];
|
|
float _Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3, _Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float);
|
|
float4 _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4 = Vector4_159bb4232f82428893101734a03e2a1e;
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_R_1_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[0];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_G_2_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[1];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_B_3_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[2];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_A_4_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[3];
|
|
float _Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float;
|
|
Unity_Divide_float(_Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_R_1_Float, _Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float);
|
|
float _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float, float(0), float(1), _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float);
|
|
float _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float;
|
|
Unity_Lerp_float(_Split_d6e088f9ab90466583adc22ea79eb8cc_A_4_Float, float(0), _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float, _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float);
|
|
float3 _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3, (_Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float.xxx), _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3);
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_R_1_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[0];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_G_2_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[1];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_B_3_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[2];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_A_4_Float = 0;
|
|
float4 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4;
|
|
float3 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGB_5_Vector3;
|
|
float2 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_ef99a48850fe4f8f8e30e870c5e2ee09_R_1_Float, _Split_ef99a48850fe4f8f8e30e870c5e2ee09_G_2_Float, _Split_ef99a48850fe4f8f8e30e870c5e2ee09_B_3_Float, _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGB_5_Vector3, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RG_6_Vector2);
|
|
float3 _Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4.xyz), _Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3);
|
|
float3 _Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3, _Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3);
|
|
float _Split_8bbd5052350846968bf312362efd9f01_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[0];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[1];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[2];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[3];
|
|
float _Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3, _Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float);
|
|
float _Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float;
|
|
Unity_Divide_float(_Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_G_2_Float, _Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float);
|
|
float _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float, float(0), float(1), _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float);
|
|
float _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float;
|
|
Unity_Lerp_float(_Split_8bbd5052350846968bf312362efd9f01_A_4_Float, float(0), _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float, _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float);
|
|
float3 _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3, (_Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float.xxx), _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3);
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_R_1_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[0];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_G_2_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[1];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_B_3_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[2];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_A_4_Float = 0;
|
|
float4 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4;
|
|
float3 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGB_5_Vector3;
|
|
float2 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_ab8841795f594d3a90b87ac9fcc98d38_R_1_Float, _Split_ab8841795f594d3a90b87ac9fcc98d38_G_2_Float, _Split_ab8841795f594d3a90b87ac9fcc98d38_B_3_Float, _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGB_5_Vector3, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RG_6_Vector2);
|
|
float4 _Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4;
|
|
Unity_Add_float4(_Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4, _Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4);
|
|
float3 _Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4.xyz), _Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3);
|
|
float3 _Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3, _Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3);
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[0];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[1];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[2];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[3];
|
|
float _Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3, _Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float);
|
|
float _Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float;
|
|
Unity_Divide_float(_Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_B_3_Float, _Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float);
|
|
float _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float, float(0), float(1), _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float);
|
|
float _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float;
|
|
Unity_Lerp_float(_Split_fa21a8022f944854903e06c07c6f079c_A_4_Float, float(0), _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float, _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float);
|
|
float3 _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3, (_Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float.xxx), _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3);
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_R_1_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[0];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_G_2_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[1];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_B_3_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[2];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_A_4_Float = 0;
|
|
float4 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4;
|
|
float3 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGB_5_Vector3;
|
|
float2 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_6b9b5ad9f14a49b9bc49c718430617a8_R_1_Float, _Split_6b9b5ad9f14a49b9bc49c718430617a8_G_2_Float, _Split_6b9b5ad9f14a49b9bc49c718430617a8_B_3_Float, _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGB_5_Vector3, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RG_6_Vector2);
|
|
float4 _Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4;
|
|
Unity_Add_float4(_Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4, _Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4);
|
|
float3 _Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4.xyz), _Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3);
|
|
float3 _Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3, _Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3);
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[0];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[1];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[2];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[3];
|
|
float _Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3, _Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float);
|
|
float _Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float;
|
|
Unity_Divide_float(_Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_A_4_Float, _Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float);
|
|
float _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float, float(0), float(1), _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float);
|
|
float _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float;
|
|
Unity_Lerp_float(_Split_1bfec6763d4b458398e36937b4114c29_A_4_Float, float(0), _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float, _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float);
|
|
float3 _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3, (_Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float.xxx), _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3);
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_R_1_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[0];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_G_2_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[1];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_B_3_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[2];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_A_4_Float = 0;
|
|
float4 _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4;
|
|
float3 _Combine_872906644fc84c8c8286733edba75045_RGB_5_Vector3;
|
|
float2 _Combine_872906644fc84c8c8286733edba75045_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_e22879e6c4574322ab21f6261a21bced_R_1_Float, _Split_e22879e6c4574322ab21f6261a21bced_G_2_Float, _Split_e22879e6c4574322ab21f6261a21bced_B_3_Float, _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float, _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4, _Combine_872906644fc84c8c8286733edba75045_RGB_5_Vector3, _Combine_872906644fc84c8c8286733edba75045_RG_6_Vector2);
|
|
float4 _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4;
|
|
Unity_Add_float4(_Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4, _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4, _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4);
|
|
WindPoint_1 = _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4;
|
|
}
|
|
|
|
void Unity_Power_float(float A, float B, out float Out)
|
|
{
|
|
Out = pow(A, B);
|
|
}
|
|
|
|
void Unity_Or_float(float A, float B, out float Out)
|
|
{
|
|
Out = A || B;
|
|
}
|
|
|
|
void Unity_Branch_float3(float Predicate, float3 True, float3 False, out float3 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Add_float(float A, float B, out float Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
struct Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float
|
|
{
|
|
};
|
|
|
|
void SG_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float(float3 Vector3_604F121F, float3 Vector3_C30D997B, float Vector1_A2C4B4F4, float Vector1_7F78DDD2, UnityTexture2D Texture2D_5BAC276D, UnityTexture2D Texture2D_A3874DB9, float4 Vector4_EBFF8CDE, float Vector1_B4470F9B, float Vector1_2EC6D670, float Vector1_9365F438, float Vector1_F53C4B89, float Vector1_6803B355, float Vector1_5EFF6B1A, Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float IN, out float3 direction_1, out float strength_2)
|
|
{
|
|
float4 _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_R_1_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[0];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_G_2_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[1];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_B_3_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[2];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_A_4_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[3];
|
|
float4 _Combine_39060d5de038a58eb7462ba953e69739_RGBA_4_Vector4;
|
|
float3 _Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3;
|
|
float2 _Combine_39060d5de038a58eb7462ba953e69739_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_f4f701329abd45808bbd6b61ce26dcc8_R_1_Float, _Split_f4f701329abd45808bbd6b61ce26dcc8_G_2_Float, _Split_f4f701329abd45808bbd6b61ce26dcc8_B_3_Float, float(0), _Combine_39060d5de038a58eb7462ba953e69739_RGBA_4_Vector4, _Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3, _Combine_39060d5de038a58eb7462ba953e69739_RG_6_Vector2);
|
|
float3 _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3, _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3);
|
|
float4 _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_R_1_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[0];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_G_2_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[1];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_B_3_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[2];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_A_4_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[3];
|
|
float3 _Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3, (_Split_aeb4c57f09db718e9e14c3afd38465ae_A_4_Float.xxx), _Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3);
|
|
float _Property_72aef364136bb683b08145ce7a1b59a1_Out_0_Float = Vector1_9365F438;
|
|
float _Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_72aef364136bb683b08145ce7a1b59a1_Out_0_Float, float(0), _Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean);
|
|
UnityTexture2D _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D = Texture2D_A3874DB9;
|
|
float3 _Property_f0ff7954720d018395b7da89e2e2d761_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3 = float3(float(1), float(0), float(0));
|
|
float _Property_e53ae21dcf87e286b67de750a59275e7_Out_0_Float = Vector1_9365F438;
|
|
float3 _Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3, (_Property_e53ae21dcf87e286b67de750a59275e7_Out_0_Float.xxx), _Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3);
|
|
float _Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float = Vector1_5EFF6B1A;
|
|
float3 _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3, (_Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float.xxx), _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3);
|
|
float3 _Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_f0ff7954720d018395b7da89e2e2d761_Out_0_Vector3, _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3, _Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3);
|
|
float _Property_7f2599afa6fc5b8394c8fb0389031122_Out_0_Float = Vector1_6803B355;
|
|
float3 _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3, (_Property_7f2599afa6fc5b8394c8fb0389031122_Out_0_Float.xxx), _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3);
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_R_1_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[0];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_G_2_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[1];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_B_3_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[2];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_A_4_Float = 0;
|
|
float4 _Combine_0ac20ec517f076829f01b70d67c5af02_RGBA_4_Vector4;
|
|
float3 _Combine_0ac20ec517f076829f01b70d67c5af02_RGB_5_Vector3;
|
|
float2 _Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_f4466ebe24e7fa838f5735fb1210a3dd_R_1_Float, _Split_f4466ebe24e7fa838f5735fb1210a3dd_B_3_Float, float(0), float(0), _Combine_0ac20ec517f076829f01b70d67c5af02_RGBA_4_Vector4, _Combine_0ac20ec517f076829f01b70d67c5af02_RGB_5_Vector3, _Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2);
|
|
float4 _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4 = SAMPLE_TEXTURE2D_LOD(_Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.tex, _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.samplerstate, _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.GetTransformedUV(_Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2), float(3));
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_R_5_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.r;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_G_6_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.g;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_B_7_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.b;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_A_8_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.a;
|
|
float _Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float;
|
|
Unity_Branch_float(_Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean, _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_R_5_Float, float(0), _Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float);
|
|
float _Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float;
|
|
Unity_Power_float(_Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float, float(2), _Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float);
|
|
float _Property_9592cd5ab3f8628d995c1b79e8b0e51d_Out_0_Float = Vector1_F53C4B89;
|
|
float _Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float;
|
|
Unity_Multiply_float_float(_Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float, _Property_9592cd5ab3f8628d995c1b79e8b0e51d_Out_0_Float, _Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float);
|
|
float3 _Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3((_Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float.xxx), _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3, _Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3);
|
|
float _Property_7be270a4cb312f8ebbfba142f454b30d_Out_0_Float = Vector1_9365F438;
|
|
float3 _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3, (_Property_7be270a4cb312f8ebbfba142f454b30d_Out_0_Float.xxx), _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3);
|
|
float3 _Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3;
|
|
Unity_Add_float3(_Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3, _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3, _Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3);
|
|
float4 _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_e719665c40324e89a536d165d0427a68_R_1_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[0];
|
|
float _Split_e719665c40324e89a536d165d0427a68_G_2_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[1];
|
|
float _Split_e719665c40324e89a536d165d0427a68_B_3_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[2];
|
|
float _Split_e719665c40324e89a536d165d0427a68_A_4_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[3];
|
|
float _Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Split_e719665c40324e89a536d165d0427a68_A_4_Float, float(0), _Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean);
|
|
float _Property_295a45d224dd35829c1fc35a5ac74847_Out_0_Float = Vector1_2EC6D670;
|
|
float _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_295a45d224dd35829c1fc35a5ac74847_Out_0_Float, float(0), _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean);
|
|
float _Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean;
|
|
Unity_Or_float(_Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean, _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean, _Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean);
|
|
UnityTexture2D _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D = Texture2D_5BAC276D;
|
|
float3 _Property_c82f40aba4b7f08db9a97aaccbe0e096_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3, (_Split_e719665c40324e89a536d165d0427a68_A_4_Float.xxx), _Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3);
|
|
float3 _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3, (_Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float.xxx), _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3);
|
|
float3 _Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_c82f40aba4b7f08db9a97aaccbe0e096_Out_0_Vector3, _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3, _Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3);
|
|
float _Property_1ab0df57959c6986a0602bb0abfeaf58_Out_0_Float = Vector1_B4470F9B;
|
|
float3 _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3, (_Property_1ab0df57959c6986a0602bb0abfeaf58_Out_0_Float.xxx), _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3);
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_R_1_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[0];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_G_2_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[1];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_B_3_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[2];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_A_4_Float = 0;
|
|
float4 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGBA_4_Vector4;
|
|
float3 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGB_5_Vector3;
|
|
float2 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_5ff678fef0fb61889da2a8288f7e7d15_R_1_Float, _Split_5ff678fef0fb61889da2a8288f7e7d15_B_3_Float, float(0), float(0), _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGBA_4_Vector4, _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGB_5_Vector3, _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2);
|
|
float4 _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4 = SAMPLE_TEXTURE2D_LOD(_Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.tex, _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.samplerstate, _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.GetTransformedUV(_Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2), float(3));
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_R_5_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.r;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_G_6_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.g;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_B_7_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.b;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_A_8_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.a;
|
|
float4 _Combine_3136fa3d24c46087969f5a3828ccbb98_RGBA_4_Vector4;
|
|
float3 _Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3;
|
|
float2 _Combine_3136fa3d24c46087969f5a3828ccbb98_RG_6_Vector2;
|
|
Unity_Combine_float(_SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_R_5_Float, _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_G_6_Float, _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_B_7_Float, float(0), _Combine_3136fa3d24c46087969f5a3828ccbb98_RGBA_4_Vector4, _Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3, _Combine_3136fa3d24c46087969f5a3828ccbb98_RG_6_Vector2);
|
|
float3 _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3;
|
|
Unity_Add_float3(_Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3, float3(-0.5, -0.5, -0.5), _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3);
|
|
float3 _Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3;
|
|
Unity_Branch_float3(_Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean, _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3, float3(0, 0, 0), _Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3);
|
|
float _Property_9946d066804cc584a96830f8d35269cc_Out_0_Float = Vector1_2EC6D670;
|
|
float3 _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3, (_Property_9946d066804cc584a96830f8d35269cc_Out_0_Float.xxx), _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3);
|
|
float3 _Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3;
|
|
Unity_Add_float3(_Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3, _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3, _Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3);
|
|
float _Property_4ffb3356bdb9c78c815a6e7da47e7a34_Out_0_Float = Vector1_A2C4B4F4;
|
|
float3 _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3, (_Property_4ffb3356bdb9c78c815a6e7da47e7a34_Out_0_Float.xxx), _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3);
|
|
float _Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float;
|
|
Unity_Length_float3(_Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3, _Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float);
|
|
float _Property_51d6736452f5938caf6f83cdfc7df682_Out_0_Float = Vector1_7F78DDD2;
|
|
float _Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float;
|
|
Unity_Add_float(_Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float, _Property_51d6736452f5938caf6f83cdfc7df682_Out_0_Float, _Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float);
|
|
float _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float;
|
|
Unity_Multiply_float_float(_Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float, 0.001, _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float);
|
|
direction_1 = _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3;
|
|
strength_2 = _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float;
|
|
}
|
|
|
|
void Unity_CrossProduct_float(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = cross(A, B);
|
|
}
|
|
|
|
void Unity_Comparison_Equal_float(float A, float B, out float Out)
|
|
{
|
|
Out = A == B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_DotProduct_float3(float3 A, float3 B, out float Out)
|
|
{
|
|
Out = dot(A, B);
|
|
}
|
|
|
|
void Unity_Absolute_float(float In, out float Out)
|
|
{
|
|
Out = abs(In);
|
|
}
|
|
|
|
void Unity_Maximum_float(float A, float B, out float Out)
|
|
{
|
|
Out = max(A, B);
|
|
}
|
|
|
|
void Unity_Cosine_float(float In, out float Out)
|
|
{
|
|
Out = cos(In);
|
|
}
|
|
|
|
void Unity_Sine_float(float In, out float Out)
|
|
{
|
|
Out = sin(In);
|
|
}
|
|
|
|
void Unity_Comparison_NotEqual_float(float A, float B, out float Out)
|
|
{
|
|
Out = A != B ? 1 : 0;
|
|
}
|
|
|
|
struct Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float
|
|
{
|
|
float3 WorldSpaceNormal;
|
|
float4 VertexColor;
|
|
};
|
|
|
|
void SG_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float(float Vector1_BCB03E1A, float3 Vector3_C30D997B, float Vector1_A2C4B4F4, float Vector1_7EE0F94A, float Boolean_527CB26E, float Vector1_DE1BF63A, float Vector1_7F78DDD2, float3 Vector3_DE8CC74D, UnityTexture2D Texture2D_5BAC276D, UnityTexture2D Texture2D_A3874DB9, float4 Vector4_EBFF8CDE, float Vector1_B4470F9B, float Vector1_2EC6D670, float Vector1_9365F438, float Vector1_F53C4B89, float Vector1_6803B355, float4x4 Matrix4_0617b0bd42fc46ff90b1d55303a5477f, float4 Vector4_b44806ec67ca461fbcdf009dc6092cc3, Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float IN, out float3 vertex_1, out float3 normal_2)
|
|
{
|
|
float4 _Vector4_991bdf9badea4b2bb70edc71a7338c1d_Out_0_Vector4 = float4(float(0), float(0), float(0), float(1));
|
|
float3 _Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3;
|
|
{
|
|
// Converting Position from Object to AbsoluteWorld via world space
|
|
float3 world;
|
|
world = TransformObjectToWorld((_Vector4_991bdf9badea4b2bb70edc71a7338c1d_Out_0_Vector4.xyz).xyz);
|
|
_Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3 = GetAbsolutePositionWS(world);
|
|
}
|
|
float _Distance_343883e4e5444664abed46100940f24f_Out_2_Float;
|
|
Unity_Distance_float3(_Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3, float3(0, 0, 0), _Distance_343883e4e5444664abed46100940f24f_Out_2_Float);
|
|
float _Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean;
|
|
Unity_Comparison_Less_float(_Distance_343883e4e5444664abed46100940f24f_Out_2_Float, float(0.001), _Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean);
|
|
float3 _Property_2a4ab46b1d7c45918978aae50bd32b6f_Out_0_Vector3 = Vector3_C30D997B;
|
|
float4 _Vector4_d213eb2790b34988809a251ff9c74c6b_Out_0_Vector4 = float4(float(0), float(0), float(0), float(1));
|
|
float3 _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3;
|
|
_Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3 = TransformObjectToWorld((_Vector4_d213eb2790b34988809a251ff9c74c6b_Out_0_Vector4.xyz).xyz);
|
|
float3 _Property_4a88ff8e6e6b2b84bb2818cf73a0af30_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3;
|
|
_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3 = TransformObjectToWorld(_Property_4a88ff8e6e6b2b84bb2818cf73a0af30_Out_0_Vector3.xyz);
|
|
float _Property_dfda12e25f42bd808e65c99db447e176_Out_0_Boolean = Boolean_527CB26E;
|
|
float _Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float = Vector1_7EE0F94A;
|
|
float _Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float, float(0), _Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean);
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_R_1_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[0];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_G_2_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[1];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_B_3_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[2];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_A_4_Float = 0;
|
|
float _Split_7a634ef857769683b2100876a36535a2_R_1_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[0];
|
|
float _Split_7a634ef857769683b2100876a36535a2_G_2_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[1];
|
|
float _Split_7a634ef857769683b2100876a36535a2_B_3_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[2];
|
|
float _Split_7a634ef857769683b2100876a36535a2_A_4_Float = 0;
|
|
float _Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float;
|
|
Unity_Subtract_float(_Split_05e55a8c1b8cf88f93cbafc67103b677_G_2_Float, _Split_7a634ef857769683b2100876a36535a2_G_2_Float, _Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float);
|
|
float _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean;
|
|
Unity_Comparison_Less_float(_Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float, _Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float, _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean);
|
|
float _And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean;
|
|
Unity_And_float(_Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean, _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean, _And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean);
|
|
float _Property_e5e59fcc565a8b80ac239ba87d1bcf74_Out_0_Float = Vector1_A2C4B4F4;
|
|
float _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float;
|
|
Unity_Branch_float(_And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean, float(1E-05), _Property_e5e59fcc565a8b80ac239ba87d1bcf74_Out_0_Float, _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float);
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_R_1_Float = IN.VertexColor[0];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_G_2_Float = IN.VertexColor[1];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_B_3_Float = IN.VertexColor[2];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_A_4_Float = IN.VertexColor[3];
|
|
float _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float;
|
|
Unity_Multiply_float_float(_Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float, _Split_43013162a81fc4889a1944f2a2b75f66_A_4_Float, _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float);
|
|
float _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float;
|
|
Unity_Branch_float(_Property_dfda12e25f42bd808e65c99db447e176_Out_0_Boolean, _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float, _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float, _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float);
|
|
float _Property_eaab26f57a13988a8a813ad0813c8570_Out_0_Float = Vector1_7F78DDD2;
|
|
UnityTexture2D _Property_0f02225ebee993849ea6be48328c0958_Out_0_Texture2D = Texture2D_5BAC276D;
|
|
UnityTexture2D _Property_fce16cc7b4fcf48097b94eb2d5f1b596_Out_0_Texture2D = Texture2D_A3874DB9;
|
|
float4 _Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float;
|
|
Unity_Length_float4(_Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4, _Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float);
|
|
float _Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float, float(0), _Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean);
|
|
float4 _Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4;
|
|
Unity_Branch_float4(_Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean, _Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4, float4(0, 0, 1, 1), _Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4);
|
|
float4x4 _Property_cb03cb298f0a47d4ae24d85f3c47db75_Out_0_Matrix4 = Matrix4_0617b0bd42fc46ff90b1d55303a5477f;
|
|
float4 _Property_844e35a56a864617b521872c1cee398d_Out_0_Vector4 = Vector4_b44806ec67ca461fbcdf009dc6092cc3;
|
|
Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float _WindNMPoints_071e9370484b4168b560a27fbea64a52;
|
|
float4 _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4;
|
|
SG_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float(_Property_cb03cb298f0a47d4ae24d85f3c47db75_Out_0_Matrix4, SHADERGRAPH_OBJECT_POSITION, _Property_844e35a56a864617b521872c1cee398d_Out_0_Vector4, _WindNMPoints_071e9370484b4168b560a27fbea64a52, _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4);
|
|
float4 _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4;
|
|
Unity_Add_float4(_Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4, _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4, _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4);
|
|
float _Property_02c51f4c8a859f8f88433b435d4452f6_Out_0_Float = Vector1_B4470F9B;
|
|
float _Property_6b508d48a081548385021b27896c0622_Out_0_Float = Vector1_2EC6D670;
|
|
float _Property_d73fed4fb3c7b58d892364765a30498b_Out_0_Float = Vector1_9365F438;
|
|
float _Property_c3101a1b656cac858bfa11dbe7ebd268_Out_0_Float = Vector1_F53C4B89;
|
|
float _Property_c82c2ac458938d86bcc1aae3a58cc1dc_Out_0_Float = Vector1_6803B355;
|
|
float _Property_3f5330d8bec7c681ab9563aad03c7b89_Out_0_Float = Vector1_BCB03E1A;
|
|
Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba;
|
|
float3 _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3;
|
|
float _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float;
|
|
SG_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float, _Property_eaab26f57a13988a8a813ad0813c8570_Out_0_Float, _Property_0f02225ebee993849ea6be48328c0958_Out_0_Texture2D, _Property_fce16cc7b4fcf48097b94eb2d5f1b596_Out_0_Texture2D, _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4, _Property_02c51f4c8a859f8f88433b435d4452f6_Out_0_Float, _Property_6b508d48a081548385021b27896c0622_Out_0_Float, _Property_d73fed4fb3c7b58d892364765a30498b_Out_0_Float, _Property_c3101a1b656cac858bfa11dbe7ebd268_Out_0_Float, _Property_c82c2ac458938d86bcc1aae3a58cc1dc_Out_0_Float, _Property_3f5330d8bec7c681ab9563aad03c7b89_Out_0_Float, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float);
|
|
float3 _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3;
|
|
Unity_CrossProduct_float(float3 (0, 1, 0), _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3, _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3);
|
|
float _Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean;
|
|
Unity_Comparison_Equal_float((_CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3).x, float(0), _Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean);
|
|
float3 _Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean, float3(1E-06, 1E-06, 1E-06), _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3, _Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3);
|
|
float3 _Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3, _Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3);
|
|
float3 _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3);
|
|
float _DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float;
|
|
Unity_DotProduct_float3(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3, _DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float);
|
|
float3 _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, (_DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float.xxx), _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3);
|
|
float3 _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3;
|
|
Unity_Add_float3(_Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3, _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3);
|
|
float3 _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3, _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3);
|
|
float _Distance_702b068f612c7289a99272879da274ed_Out_2_Float;
|
|
Unity_Distance_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Distance_702b068f612c7289a99272879da274ed_Out_2_Float);
|
|
float _Property_f5c255b0f666358291012b78132d6593_Out_0_Float = Vector1_DE1BF63A;
|
|
float _Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float;
|
|
Unity_Divide_float(_Distance_702b068f612c7289a99272879da274ed_Out_2_Float, _Property_f5c255b0f666358291012b78132d6593_Out_0_Float, _Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float);
|
|
float _Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float;
|
|
Unity_Absolute_float(_Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float, _Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float);
|
|
float _Float_96534b09fc72da8da7bad6ebdb2b01ab_Out_0_Float = float(1E-07);
|
|
float _Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float;
|
|
Unity_Maximum_float(_Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float, _Float_96534b09fc72da8da7bad6ebdb2b01ab_Out_0_Float, _Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float);
|
|
float _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float;
|
|
Unity_Divide_float(float(1), _Property_f5c255b0f666358291012b78132d6593_Out_0_Float, _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float);
|
|
float _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float;
|
|
Unity_Power_float(_Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float, _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float, _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float);
|
|
float _Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float;
|
|
Unity_Multiply_float_float(_WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float, _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float, _Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float);
|
|
float _Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float;
|
|
Unity_Cosine_float(_Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float, _Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float);
|
|
float3 _Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3, (_Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float.xxx), _Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3);
|
|
float3 _CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3;
|
|
Unity_CrossProduct_float(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3, _CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3);
|
|
float _Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float;
|
|
Unity_Sine_float(_Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float, _Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float);
|
|
float3 _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3, (_Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float.xxx), _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3);
|
|
float3 _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3;
|
|
Unity_Add_float3(_Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3, _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3, _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3);
|
|
float3 _Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3;
|
|
Unity_Add_float3(_Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3, _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3, _Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3);
|
|
float3 _Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3;
|
|
_Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3 = TransformWorldToObject(_Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3.xyz);
|
|
float3 _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean, _Property_2a4ab46b1d7c45918978aae50bd32b6f_Out_0_Vector3, _Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3, _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3);
|
|
float3 _Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3 = Vector3_DE8CC74D;
|
|
float _Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float;
|
|
Unity_Length_float3(_Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3, _Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float);
|
|
float _Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean;
|
|
Unity_Comparison_NotEqual_float(_Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float, float(0), _Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean);
|
|
float3 _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(IN.WorldSpaceNormal, _Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3, _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3);
|
|
float3 _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean, _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3, IN.WorldSpaceNormal, _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3);
|
|
vertex_1 = _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3;
|
|
normal_2 = _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3;
|
|
}
|
|
|
|
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_Lerp_float4(float4 A, float4 B, float4 T, out float4 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Remap_float(float In, float2 InMinMax, float2 OutMinMax, out float Out)
|
|
{
|
|
Out = OutMinMax.x + (In - InMinMax.x) * (OutMinMax.y - OutMinMax.x) / (InMinMax.y - InMinMax.x);
|
|
}
|
|
|
|
void Unity_Lerp_float3(float3 A, float3 B, float3 T, out float3 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_NormalStrength_float(float3 In, float Strength, out float3 Out)
|
|
{
|
|
Out = float3(In.rg * Strength, lerp(1, In.b, saturate(Strength)));
|
|
}
|
|
|
|
// Graph Vertex
|
|
struct VertexDescription
|
|
{
|
|
float3 Position;
|
|
float3 Normal;
|
|
float3 Tangent;
|
|
};
|
|
|
|
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
|
|
{
|
|
VertexDescription description = (VertexDescription)0;
|
|
float3 _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3;
|
|
Unity_Add_float3(IN.ObjectSpacePosition, float3(1E-07, 1E-07, 1E-07), _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3);
|
|
float _Property_084857c303b23b82b7f2702b4186fa43_Out_0_Float = _Drag;
|
|
float _Property_35ad336ee9b278808178baf539e0133f_Out_0_Float = _HeightDrag;
|
|
float _Property_476e69b3f5653a8c995133f4fccaa757_Out_0_Float = _Stiffness;
|
|
float _Property_805aa6168fe3b08ca209d8ab0fa5d2d3_Out_0_Float = _InitialBend;
|
|
float4 _Property_8e47e7fd5c1a8b88b9cf212a6f62134c_Out_0_Vector4 = _NewNormal;
|
|
UnityTexture2D _Property_3b8cd110cb76a68d88342e4cc1336e0b_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(WIND_SETTINGS_TexNoise);
|
|
UnityTexture2D _Property_a939900eb077ee8593e638c7c457b53b_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(WIND_SETTINGS_TexGust);
|
|
float4 _Property_f59f8f9dc8757f8ab1c1d173e09c0787_Out_0_Vector4 = WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float _Property_89884359995fcf8a8d80bc0e19ce75f1_Out_0_Float = WIND_SETTINGS_FlexNoiseScale;
|
|
float _Property_c460088461241a819f81fd6ab2a8fc04_Out_0_Float = WIND_SETTINGS_Turbulence;
|
|
float _Property_0ef8268ed7d75386b8735f7baab81d22_Out_0_Float = WIND_SETTINGS_GustSpeed;
|
|
float _Property_9f4dae117e65b384a057e2e17ba36791_Out_0_Float = WIND_SETTINGS_GustScale;
|
|
float _Property_8c1472d718ff81889fbd5ee5e93e5291_Out_0_Float = WIND_SETTINGS_GustWorldScale;
|
|
float4x4 _Property_d28187fe6a414fa5b58ca9948c44abca_Out_0_Matrix4 = WIND_SETTINGS_Points;
|
|
float4 _Property_18d7723e0ed14f07992a44bbeb337673_Out_0_Vector4 = WIND_SETTINGS_Points_Radius;
|
|
Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8;
|
|
_WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8.WorldSpaceNormal = IN.WorldSpaceNormal;
|
|
_WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8.VertexColor = IN.VertexColor;
|
|
float3 _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3;
|
|
float3 _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_normal_2_Vector3;
|
|
SG_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float(IN.TimeParameters.x, _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3, _Property_084857c303b23b82b7f2702b4186fa43_Out_0_Float, _Property_35ad336ee9b278808178baf539e0133f_Out_0_Float, 0, _Property_476e69b3f5653a8c995133f4fccaa757_Out_0_Float, _Property_805aa6168fe3b08ca209d8ab0fa5d2d3_Out_0_Float, (_Property_8e47e7fd5c1a8b88b9cf212a6f62134c_Out_0_Vector4.xyz), _Property_3b8cd110cb76a68d88342e4cc1336e0b_Out_0_Texture2D, _Property_a939900eb077ee8593e638c7c457b53b_Out_0_Texture2D, _Property_f59f8f9dc8757f8ab1c1d173e09c0787_Out_0_Vector4, _Property_89884359995fcf8a8d80bc0e19ce75f1_Out_0_Float, _Property_c460088461241a819f81fd6ab2a8fc04_Out_0_Float, _Property_0ef8268ed7d75386b8735f7baab81d22_Out_0_Float, _Property_9f4dae117e65b384a057e2e17ba36791_Out_0_Float, _Property_8c1472d718ff81889fbd5ee5e93e5291_Out_0_Float, _Property_d28187fe6a414fa5b58ca9948c44abca_Out_0_Matrix4, _Property_18d7723e0ed14f07992a44bbeb337673_Out_0_Vector4, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_normal_2_Vector3);
|
|
description.Position = _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3;
|
|
description.Normal = IN.ObjectSpaceNormal;
|
|
description.Tangent = IN.ObjectSpaceTangent;
|
|
return description;
|
|
}
|
|
|
|
// Graph Pixel
|
|
struct SurfaceDescription
|
|
{
|
|
float3 BaseColor;
|
|
float3 Emission;
|
|
float Alpha;
|
|
float3 BentNormal;
|
|
float Smoothness;
|
|
float Occlusion;
|
|
float3 NormalTS;
|
|
float Metallic;
|
|
};
|
|
|
|
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
|
{
|
|
SurfaceDescription surface = (SurfaceDescription)0;
|
|
UnityTexture2D _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkBaseColorMap);
|
|
float4 _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4 = _TrunkTilingOffset;
|
|
float _Split_60538633130155809820b3185c81057f_R_1_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[0];
|
|
float _Split_60538633130155809820b3185c81057f_G_2_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[1];
|
|
float _Split_60538633130155809820b3185c81057f_B_3_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[2];
|
|
float _Split_60538633130155809820b3185c81057f_A_4_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[3];
|
|
float2 _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_R_1_Float, _Split_60538633130155809820b3185c81057f_G_2_Float);
|
|
float2 _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_B_3_Float, _Split_60538633130155809820b3185c81057f_A_4_Float);
|
|
float2 _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2, _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2, _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2);
|
|
float4 _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_R_4_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_G_5_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_B_6_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_A_7_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.a;
|
|
float4 _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4 = _TrunkBaseColor;
|
|
float4 _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4, _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4, _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4);
|
|
UnityTexture2D _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkBaseColorMap);
|
|
float _Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean = _BarkUseUV3;
|
|
float4 _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4 = IN.uv3;
|
|
float4 _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4 = IN.uv0;
|
|
float4 _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4;
|
|
Unity_Branch_float4(_Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean, _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4, _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4, _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4);
|
|
float4 _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4 = _BarkTilingOffset;
|
|
float _Split_ee975774554f6480b33168eff36d8be7_R_1_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[0];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_G_2_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[1];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_B_3_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[2];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_A_4_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[3];
|
|
float2 _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_R_1_Float, _Split_ee975774554f6480b33168eff36d8be7_G_2_Float);
|
|
float2 _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_B_3_Float, _Split_ee975774554f6480b33168eff36d8be7_A_4_Float);
|
|
float2 _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float((_Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4.xy), _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2, _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2, _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2);
|
|
float4 _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_R_4_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_G_5_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_B_6_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_A_7_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.a;
|
|
float4 _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4 = _BarkBaseColor;
|
|
float4 _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4, _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4);
|
|
UnityTexture2D _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_LayerMask);
|
|
float4 _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4 = _BarkBlendMaskTilingOffset;
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[0];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[1];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[2];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[3];
|
|
float2 _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float);
|
|
float2 _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float);
|
|
float2 _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2, _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2, _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2);
|
|
float4 _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2) );
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_R_4_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_G_5_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_B_6_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.a;
|
|
float4 _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4;
|
|
Unity_Lerp_float4(_Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxxx), _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4);
|
|
UnityTexture2D _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkMaskMap);
|
|
float4 _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_B_6_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.a;
|
|
float _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float = _TrunkMetallic;
|
|
float _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float, _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float, _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float);
|
|
float _Property_8142f12b781ad08680220297dab56f14_Out_0_Float = _TrunkAORemapMin;
|
|
float _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float = _TrunkAORemapMax;
|
|
float2 _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2 = float2(_Property_8142f12b781ad08680220297dab56f14_Out_0_Float, _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float);
|
|
float _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float, float2 (0, 1), _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float);
|
|
float _Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float = _TrunkSmoothnessRemapMin;
|
|
float _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float = _TrunkSmoothnessRemapMax;
|
|
float2 _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2 = float2(_Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float, _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float);
|
|
float _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float, float2 (0, 1), _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
float3 _Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3 = float3(_Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
UnityTexture2D _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkMaskMap);
|
|
float4 _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_B_6_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.a;
|
|
float _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float = _BarkMetallic;
|
|
float _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float, _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float, _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float);
|
|
float _Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float = _BarkAORemapMin;
|
|
float _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float = _BarkAORemapMax;
|
|
float2 _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2 = float2(_Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float, _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float);
|
|
float _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float, float2 (0, 1), _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float);
|
|
float _Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float = _BarkSmoothnessRemapMin;
|
|
float _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float = _BarkSmoothnessRemapMax;
|
|
float2 _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2 = float2(_Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float, _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float);
|
|
float _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float, float2 (0, 1), _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3 = float3(_Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3;
|
|
Unity_Lerp_float3(_Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3, _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3);
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[0];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[1];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[2];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_A_4_Float = 0;
|
|
UnityTexture2D _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkNormalMap);
|
|
float4 _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4);
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_R_4_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_G_5_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_B_6_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_A_7_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.a;
|
|
float _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float = _TrunkNormalScale;
|
|
float3 _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.xyz), _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float, _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3);
|
|
UnityTexture2D _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkNormalMap);
|
|
float4 _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4);
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_R_4_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_G_5_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_B_6_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_A_7_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.a;
|
|
float _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float = _BarkNormalScale;
|
|
float3 _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.xyz), _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3);
|
|
float3 _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
Unity_Lerp_float3(_NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3);
|
|
surface.BaseColor = (_Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4.xyz);
|
|
surface.Emission = float3(0, 0, 0);
|
|
surface.Alpha = float(1);
|
|
surface.BentNormal = IN.TangentSpaceNormal;
|
|
surface.Smoothness = _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float;
|
|
surface.Occlusion = _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float;
|
|
surface.NormalTS = _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
surface.Metallic = _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float;
|
|
return surface;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Graph Inputs
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#define VFX_SRP_ATTRIBUTES AttributesMesh
|
|
#define VaryingsMeshType VaryingsMeshToPS
|
|
#define VFX_SRP_VARYINGS VaryingsMeshType
|
|
#define VFX_SRP_SURFACE_INPUTS FragInputs
|
|
#endif
|
|
|
|
VertexDescriptionInputs AttributesMeshToVertexDescriptionInputs(AttributesMesh 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.VertexColor = input.color;
|
|
output.TimeParameters = _TimeParameters.xyz; // Note: in case of animation this will be overwrite (allow to handle motion vector)
|
|
#if UNITY_ANY_INSTANCING_ENABLED
|
|
#else
|
|
#endif
|
|
|
|
return output;
|
|
}
|
|
|
|
VertexDescription GetVertexDescription(AttributesMesh input, float3 timeParameters
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
// build graph inputs
|
|
VertexDescriptionInputs vertexDescriptionInputs = AttributesMeshToVertexDescriptionInputs(input);
|
|
// Override time parameters with used one (This is required to correctly handle motion vectors for vertex animation based on time)
|
|
vertexDescriptionInputs.TimeParameters = timeParameters;
|
|
|
|
// evaluate vertex graph
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
// Fetch the vertex graph properties for the particle instance.
|
|
GetElementVertexProperties(element, properties);
|
|
|
|
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs, properties);
|
|
#else
|
|
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs);
|
|
#endif
|
|
return vertexDescription;
|
|
|
|
}
|
|
|
|
AttributesMesh ApplyMeshModification(AttributesMesh input, float3 timeParameters
|
|
#ifdef USE_CUSTOMINTERP_SUBSTRUCT
|
|
#ifdef TESSELLATION_ON
|
|
, inout VaryingsMeshToDS varyings
|
|
#else
|
|
, inout VaryingsMeshToPS varyings
|
|
#endif
|
|
#endif
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
VertexDescription vertexDescription = GetVertexDescription(input, timeParameters
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, element
|
|
#endif
|
|
);
|
|
|
|
// copy graph output to the results
|
|
input.positionOS = vertexDescription.Position;
|
|
input.normalOS = vertexDescription.Normal;
|
|
input.tangentOS.xyz = vertexDescription.Tangent;
|
|
|
|
|
|
|
|
return input;
|
|
}
|
|
|
|
#if defined(_ADD_CUSTOM_VELOCITY) // For shader graph custom velocity
|
|
// Return precomputed Velocity in object space
|
|
float3 GetCustomVelocity(AttributesMesh input
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
VertexDescription vertexDescription = GetVertexDescription(input, _TimeParameters.xyz
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, element
|
|
#endif
|
|
);
|
|
return vertexDescription.CustomVelocity;
|
|
}
|
|
#endif
|
|
|
|
FragInputs BuildFragInputs(VaryingsMeshToPS input)
|
|
{
|
|
FragInputs output;
|
|
ZERO_INITIALIZE(FragInputs, output);
|
|
|
|
// Init to some default value to make the computer quiet (else it output 'divide by zero' warning even if value is not used).
|
|
// TODO: this is a really poor workaround, but the variable is used in a bunch of places
|
|
// to compute normals which are then passed on elsewhere to compute other values...
|
|
output.tangentToWorld = k_identity3x3;
|
|
output.positionSS = input.positionCS; // input.positionCS is SV_Position
|
|
|
|
output.texCoord0 = input.texCoord0;
|
|
output.texCoord3 = input.texCoord3;
|
|
|
|
#if UNITY_ANY_INSTANCING_ENABLED
|
|
#else
|
|
#endif
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
// FragInputs from VFX come from two places: Interpolator or CBuffer.
|
|
#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
|
|
|
|
// splice point to copy custom interpolator fields from varyings to frag inputs
|
|
|
|
|
|
return output;
|
|
}
|
|
|
|
// existing HDRP code uses the combined function to go directly from packed to frag inputs
|
|
FragInputs UnpackVaryingsMeshToFragInputs(PackedVaryingsMeshToPS input)
|
|
{
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
#if defined(HAVE_VFX_MODIFICATION) && defined(UNITY_INSTANCING_ENABLED)
|
|
unity_InstanceID = input.instanceID;
|
|
#endif
|
|
VaryingsMeshToPS unpacked = UnpackVaryingsMeshToPS(input);
|
|
return BuildFragInputs(unpacked);
|
|
}
|
|
SurfaceDescriptionInputs FragInputsToSurfaceDescriptionInputs(FragInputs input, float3 viewWS)
|
|
{
|
|
SurfaceDescriptionInputs output;
|
|
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
|
|
|
#if defined(SHADER_STAGE_RAY_TRACING)
|
|
#else
|
|
#endif
|
|
output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
|
|
|
|
#if UNITY_UV_STARTS_AT_TOP
|
|
#else
|
|
#endif
|
|
|
|
|
|
output.uv0 = input.texCoord0;
|
|
output.uv3 = input.texCoord3;
|
|
|
|
// splice point to copy frag inputs custom interpolator pack into the SDI
|
|
|
|
|
|
return output;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Surface Data (Specific Material)
|
|
|
|
void ApplyDecalToSurfaceDataNoNormal(DecalSurfaceData decalSurfaceData, inout SurfaceData surfaceData);
|
|
|
|
void ApplyDecalAndGetNormal(FragInputs fragInputs, PositionInputs posInput, SurfaceDescription surfaceDescription,
|
|
inout SurfaceData surfaceData)
|
|
{
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
#ifdef DECAL_NORMAL_BLENDING
|
|
// SG nodes don't ouptut surface gradients, so if decals require surf grad blending, we have to convert
|
|
// the normal to gradient before applying the decal. We then have to resolve the gradient back to world space
|
|
float3 normalTS;
|
|
|
|
normalTS = SurfaceGradientFromTangentSpaceNormalAndFromTBN(surfaceDescription.NormalTS,
|
|
fragInputs.tangentToWorld[0], fragInputs.tangentToWorld[1]);
|
|
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, fragInputs.tangentToWorld[2], normalTS);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
|
|
GetNormalWS_SG(fragInputs, normalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
#else
|
|
// normal delivered to master node
|
|
GetNormalWS(fragInputs, surfaceDescription.NormalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Both uses and modifies 'surfaceData.normalWS'.
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, surfaceData.normalWS.xyz);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
#endif
|
|
}
|
|
void BuildSurfaceData(FragInputs fragInputs, inout SurfaceDescription surfaceDescription, float3 V, PositionInputs posInput, out SurfaceData surfaceData, out float3 bentNormalWS)
|
|
{
|
|
ZERO_INITIALIZE(SurfaceData, surfaceData);
|
|
|
|
// specularOcclusion need to be init ahead of decal to quiet the compiler that modify the SurfaceData struct
|
|
// however specularOcclusion can come from the graph, so need to be init here so it can be override.
|
|
surfaceData.specularOcclusion = 1.0;
|
|
surfaceData.thickness = 0.0;
|
|
|
|
surfaceData.baseColor = surfaceDescription.BaseColor;
|
|
surfaceData.perceptualSmoothness = surfaceDescription.Smoothness;
|
|
surfaceData.ambientOcclusion = surfaceDescription.Occlusion;
|
|
surfaceData.metallic = surfaceDescription.Metallic;
|
|
|
|
#if defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE) || defined(_REFRACTION_THIN)
|
|
if (_EnableSSRefraction)
|
|
{
|
|
|
|
surfaceData.transmittanceMask = (1.0 - surfaceDescription.Alpha);
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
else
|
|
{
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
#else
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
#endif
|
|
|
|
// These static material feature allow compile time optimization
|
|
surfaceData.materialFeatures = MATERIALFEATUREFLAGS_LIT_STANDARD;
|
|
#ifdef _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SUBSURFACE_SCATTERING;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_COLORED_TRANSMISSION;
|
|
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_ANISOTROPY
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_ANISOTROPY;
|
|
|
|
// Initialize the normal to something non-zero to avoid a div-zero warning for anisotropy.
|
|
surfaceData.normalWS = float3(0, 1, 0);
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_IRIDESCENCE
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_IRIDESCENCE;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SPECULAR_COLOR;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_CLEAR_COAT
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_CLEAR_COAT;
|
|
#endif
|
|
|
|
#if defined (_MATERIAL_FEATURE_SPECULAR_COLOR) && defined (_ENERGY_CONSERVING_SPECULAR)
|
|
// Require to have setup baseColor
|
|
// Reproduce the energy conservation done in legacy Unity. Not ideal but better for compatibility and users can unchek it
|
|
surfaceData.baseColor *= (1.0 - Max3(surfaceData.specularColor.r, surfaceData.specularColor.g, surfaceData.specularColor.b));
|
|
#endif
|
|
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
ApplyDecalAndGetNormal(fragInputs, posInput, surfaceDescription, surfaceData);
|
|
|
|
surfaceData.geomNormalWS = fragInputs.tangentToWorld[2];
|
|
|
|
surfaceData.tangentWS = normalize(fragInputs.tangentToWorld[0].xyz); // The tangent is not normalize in tangentToWorld for mikkt. TODO: Check if it expected that we normalize with Morten. Tag: SURFACE_GRADIENT
|
|
|
|
|
|
bentNormalWS = surfaceData.normalWS;
|
|
|
|
surfaceData.tangentWS = Orthonormalize(surfaceData.tangentWS, surfaceData.normalWS);
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
// Mipmap mode debugging isn't supported with ray tracing as it relies on derivatives
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD0
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG(posInput.positionSS, fragInputs.texCoord0);
|
|
#else
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG_NO_UV(posInput.positionSS);
|
|
#endif
|
|
surfaceData.metallic = 0;
|
|
}
|
|
#endif
|
|
|
|
// We need to call ApplyDebugToSurfaceData after filling the surfaceData and before filling builtinData
|
|
// as it can modify attribute use for static lighting
|
|
ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData);
|
|
#endif
|
|
|
|
// By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion.
|
|
// If user provide bent normal then we process a better term
|
|
#if defined(_SPECULAR_OCCLUSION_CUSTOM)
|
|
// Just use the value passed through via the slot (not active otherwise)
|
|
#elif defined(_SPECULAR_OCCLUSION_FROM_AO_BENT_NORMAL)
|
|
// If we have bent normal and ambient occlusion, process a specular occlusion
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromBentAO(V, bentNormalWS, surfaceData.normalWS, surfaceData.ambientOcclusion, PerceptualSmoothnessToPerceptualRoughness(surfaceData.perceptualSmoothness));
|
|
#elif defined(_AMBIENT_OCCLUSION) && defined(_SPECULAR_OCCLUSION_FROM_AO)
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness));
|
|
#endif
|
|
|
|
#if defined(_ENABLE_GEOMETRIC_SPECULAR_AA) && !defined(SHADER_STAGE_RAY_TRACING)
|
|
surfaceData.perceptualSmoothness = GeometricNormalFiltering(surfaceData.perceptualSmoothness, fragInputs.tangentToWorld[2], surfaceDescription.SpecularAAScreenSpaceVariance, surfaceDescription.SpecularAAThreshold);
|
|
#endif
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Get Surface And BuiltinData
|
|
|
|
void GetSurfaceAndBuiltinData(FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData RAY_TRACING_OPTIONAL_PARAMETERS)
|
|
{
|
|
// Don't dither if displaced tessellation (we're fading out the displacement instead to match the next LOD)
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && !defined(_TESSELLATION_DISPLACEMENT)
|
|
#ifdef LOD_FADE_CROSSFADE // enable dithering LOD transition if user select CrossFade transition in LOD group
|
|
LODDitheringTransition(ComputeFadeMaskSeed(V, posInput.positionSS), unity_LODFade.x);
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
#ifdef _DOUBLESIDED_ON
|
|
float3 doubleSidedConstants = _DoubleSidedConstants.xyz;
|
|
#else
|
|
float3 doubleSidedConstants = float3(1.0, 1.0, 1.0);
|
|
#endif
|
|
|
|
ApplyDoubleSidedFlipOrMirror(fragInputs, doubleSidedConstants); // Apply double sided flip on the vertex normal
|
|
#endif // SHADER_UNLIT
|
|
|
|
SurfaceDescriptionInputs surfaceDescriptionInputs = FragInputsToSurfaceDescriptionInputs(fragInputs, V);
|
|
|
|
#if defined(HAVE_VFX_MODIFICATION)
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
GetElementPixelProperties(fragInputs, properties);
|
|
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs, properties);
|
|
#else
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs);
|
|
#endif
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
surfaceDescription.Alpha = 1.0f;
|
|
}
|
|
#endif
|
|
|
|
// Perform alpha test very early to save performance (a killed pixel will not sample textures)
|
|
// TODO: split graph evaluation to grab just alpha dependencies first? tricky..
|
|
#ifdef _ALPHATEST_ON
|
|
float alphaCutoff = surfaceDescription.AlphaClipThreshold;
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
// The TransparentDepthPrepass is also used with SSR transparent.
|
|
// If an artists enable transaprent SSR but not the TransparentDepthPrepass itself, then we use AlphaClipThreshold
|
|
// otherwise if TransparentDepthPrepass is enabled we use AlphaClipThresholdDepthPrepass
|
|
#elif SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_POSTPASS
|
|
// DepthPostpass always use its own alpha threshold
|
|
alphaCutoff = surfaceDescription.AlphaClipThresholdDepthPostpass;
|
|
#elif (SHADERPASS == SHADERPASS_SHADOWS) || (SHADERPASS == SHADERPASS_RAYTRACING_VISIBILITY)
|
|
// If use shadow threshold isn't enable we don't allow any test
|
|
#endif
|
|
|
|
GENERIC_ALPHA_TEST(surfaceDescription.Alpha, alphaCutoff);
|
|
#endif
|
|
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && _DEPTHOFFSET_ON
|
|
ApplyDepthOffsetPositionInput(V, surfaceDescription.DepthOffset, GetViewForwardDir(), GetWorldToHClipMatrix(), posInput);
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
float3 bentNormalWS;
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData, bentNormalWS);
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD1
|
|
float4 lightmapTexCoord1 = fragInputs.texCoord1;
|
|
#else
|
|
float4 lightmapTexCoord1 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD2
|
|
float4 lightmapTexCoord2 = fragInputs.texCoord2;
|
|
#else
|
|
float4 lightmapTexCoord2 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Builtin Data
|
|
// For back lighting we use the oposite vertex normal
|
|
InitBuiltinData(posInput, alpha, bentNormalWS, -fragInputs.tangentToWorld[2], lightmapTexCoord1, lightmapTexCoord2, builtinData);
|
|
|
|
#else
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData);
|
|
|
|
ZERO_BUILTIN_INITIALIZE(builtinData); // No call to InitBuiltinData as we don't have any lighting
|
|
builtinData.opacity = surfaceDescription.Alpha;
|
|
|
|
#if defined(DEBUG_DISPLAY)
|
|
// Light Layers are currently not used for the Unlit shader (because it is not lit)
|
|
// But Unlit objects do cast shadows according to their rendering layer mask, which is what we want to
|
|
// display in the light layers visualization mode, therefore we need the renderingLayers
|
|
builtinData.renderingLayers = GetMeshRenderingLayerMask();
|
|
#endif
|
|
|
|
#endif // SHADER_UNLIT
|
|
|
|
#ifdef _ALPHATEST_ON
|
|
// Used for sharpening by alpha to mask - Alpha to covertage is only used with depth only and forward pass (no shadow pass, no transparent pass)
|
|
builtinData.alphaClipTreshold = alphaCutoff;
|
|
#endif
|
|
|
|
// override sampleBakedGI - not used by Unlit
|
|
// When overriding GI, we need to force the isLightmap flag to make sure we don't add APV (sampled in the lightloop) on top of the overridden value (set at GBuffer stage)
|
|
|
|
builtinData.emissiveColor = surfaceDescription.Emission;
|
|
|
|
// Note this will not fully work on transparent surfaces (can check with _SURFACE_TYPE_TRANSPARENT define)
|
|
// We will always overwrite vt feeback with the nearest. So behind transparent surfaces vt will not be resolved
|
|
// This is a limitation of the current MRT approach.
|
|
#ifdef UNITY_VIRTUAL_TEXTURING
|
|
#endif
|
|
|
|
#if _DEPTHOFFSET_ON
|
|
builtinData.depthOffset = surfaceDescription.DepthOffset;
|
|
#endif
|
|
|
|
// TODO: We should generate distortion / distortionBlur for non distortion pass
|
|
#if (SHADERPASS == SHADERPASS_DISTORTION)
|
|
builtinData.distortion = surfaceDescription.Distortion;
|
|
builtinData.distortionBlur = surfaceDescription.DistortionBlur;
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// PostInitBuiltinData call ApplyDebugToBuiltinData
|
|
PostInitBuiltinData(V, posInput, surfaceData, builtinData);
|
|
#else
|
|
ApplyDebugToBuiltinData(builtinData);
|
|
#endif
|
|
|
|
RAY_TRACING_OPTIONAL_ALPHA_TEST_PASS
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Main
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDepthOnly.hlsl"
|
|
|
|
// --------------------------------------------------
|
|
// Visual Effect Vertex Invocations
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/VisualEffectVertex.hlsl"
|
|
#else
|
|
#endif
|
|
#endif
|
|
|
|
ENDHLSL
|
|
}
|
|
Pass
|
|
{
|
|
Name "MotionVectors"
|
|
Tags
|
|
{
|
|
"LightMode" = "MotionVectors"
|
|
}
|
|
|
|
// Render State
|
|
Cull [_CullMode]
|
|
ZWrite On
|
|
Stencil
|
|
{
|
|
WriteMask [_StencilWriteMaskMV]
|
|
Ref [_StencilRefMV]
|
|
CompFront Always
|
|
PassFront Replace
|
|
CompBack Always
|
|
PassBack Replace
|
|
}
|
|
|
|
// Debug
|
|
// <None>
|
|
|
|
// --------------------------------------------------
|
|
// Pass
|
|
|
|
HLSLPROGRAM
|
|
|
|
// Pragmas
|
|
#pragma multi_compile _ DOTS_INSTANCING_ON
|
|
#pragma instancing_options renderinglayer
|
|
#pragma target 4.5
|
|
#pragma vertex Vert
|
|
#pragma fragment Frag
|
|
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
|
|
#pragma multi_compile_instancing
|
|
|
|
// Keywords
|
|
#pragma multi_compile_fragment _ WRITE_MSAA_DEPTH
|
|
#pragma shader_feature _ _SURFACE_TYPE_TRANSPARENT
|
|
#pragma shader_feature_local _ _DOUBLESIDED_ON
|
|
#pragma shader_feature_local _ _ADD_PRECOMPUTED_VELOCITY
|
|
#pragma shader_feature_local _ _TRANSPARENT_WRITES_MOTION_VEC _TRANSPARENT_REFRACTIVE_SORT
|
|
#pragma shader_feature_local_fragment _ _ENABLE_FOG_ON_TRANSPARENT
|
|
#pragma multi_compile _ LOD_FADE_CROSSFADE
|
|
#pragma multi_compile _ WRITE_NORMAL_BUFFER
|
|
#pragma shader_feature_local_fragment _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma multi_compile_fragment _ WRITE_DECAL_BUFFER_AND_RENDERING_LAYER
|
|
#pragma shader_feature_local _ _REFRACTION_PLANE _REFRACTION_SPHERE _REFRACTION_THIN
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// GraphKeywords: <None>
|
|
|
|
// Defines
|
|
#define SHADERPASS SHADERPASS_MOTION_VECTORS
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
|
|
// For custom interpolators to inject a substruct definition before FragInputs definition,
|
|
// allowing for FragInputs to capture CI's intended for ShaderGraph's SDI.
|
|
struct CustomInterpolators
|
|
{
|
|
};
|
|
#define USE_CUSTOMINTERP_SUBSTRUCT
|
|
|
|
|
|
|
|
// TODO: Merge FragInputsVFX substruct with CustomInterpolators.
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
struct FragInputsVFX
|
|
{
|
|
/* WARNING: $splice Could not find named fragment 'FragInputsVFX' */
|
|
};
|
|
#endif
|
|
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/GeometricTools.hlsl" // Required by Tessellation.hlsl
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Tessellation.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" // Required to be include before we include properties as it define DECLARE_STACK_CB
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl" // Required before including properties as it defines UNITY_TEXTURE_STREAMING_DEBUG_VARS
|
|
// Always include Shader Graph version
|
|
// Always include last to avoid double macros
|
|
#include "Packages/com.unity.shadergraph/ShaderGraphLibrary/Functions.hlsl" // Need to be here for Gradient struct definition
|
|
|
|
// --------------------------------------------------
|
|
// Defines
|
|
|
|
// Attribute
|
|
#define ATTRIBUTES_NEED_NORMAL
|
|
#define ATTRIBUTES_NEED_TANGENT
|
|
#define ATTRIBUTES_NEED_TEXCOORD0
|
|
#define ATTRIBUTES_NEED_TEXCOORD3
|
|
#define ATTRIBUTES_NEED_COLOR
|
|
#define VARYINGS_NEED_POSITION_WS
|
|
#define VARYINGS_NEED_TANGENT_TO_WORLD
|
|
#define VARYINGS_NEED_TEXCOORD0
|
|
#define VARYINGS_NEED_TEXCOORD3
|
|
|
|
#define HAVE_MESH_MODIFICATION
|
|
|
|
//Strip down the FragInputs.hlsl (on graphics), so we can only optimize the interpolators we use.
|
|
//if by accident something requests contents of FragInputs.hlsl, it will be caught as a compiler error
|
|
//Frag inputs stripping is only enabled when FRAG_INPUTS_ENABLE_STRIPPING is set
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && SHADERPASS != SHADERPASS_RAYTRACING_GBUFFER && SHADERPASS != SHADERPASS_FULL_SCREEN_DEBUG
|
|
#define FRAG_INPUTS_ENABLE_STRIPPING
|
|
#endif
|
|
#define FRAG_INPUTS_USE_TEXCOORD0
|
|
#define FRAG_INPUTS_USE_TEXCOORD3
|
|
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl"
|
|
|
|
|
|
|
|
|
|
// Following two define are a workaround introduce in 10.1.x for RaytracingQualityNode
|
|
// The ShaderGraph don't support correctly migration of this node as it serialize all the node data
|
|
// in the json file making it impossible to uprgrade. Until we get a fix, we do a workaround here
|
|
// to still allow us to rename the field and keyword of this node without breaking existing code.
|
|
#ifdef RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define RAYTRACING_SHADER_GRAPH_HIGH
|
|
#endif
|
|
|
|
#ifdef RAYTRACING_SHADER_GRAPH_RAYTRACED
|
|
#define RAYTRACING_SHADER_GRAPH_LOW
|
|
#endif
|
|
// end
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// We need isFrontFace when using double sided - it is not required for unlit as in case of unlit double sided only drive the cullmode
|
|
// VARYINGS_NEED_CULLFACE can be define by VaryingsMeshToPS.FaceSign input if a IsFrontFace Node is included in the shader graph.
|
|
#if defined(_DOUBLESIDED_ON) && !defined(VARYINGS_NEED_CULLFACE)
|
|
#define VARYINGS_NEED_CULLFACE
|
|
#endif
|
|
#endif
|
|
|
|
// Specific Material Define
|
|
#define _AMBIENT_OCCLUSION 1
|
|
#define _SPECULAR_OCCLUSION_FROM_AO 1
|
|
#define _ENERGY_CONSERVING_SPECULAR 1
|
|
|
|
#if _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// Colored Transmission doesn't support clear coat
|
|
#undef _MATERIAL_FEATURE_CLEAR_COAT
|
|
#endif
|
|
|
|
// If we use subsurface scattering, enable output split lighting (for forward pass)
|
|
#if defined(_MATERIAL_FEATURE_SUBSURFACE_SCATTERING) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define OUTPUT_SPLIT_LIGHTING
|
|
#endif
|
|
|
|
// This shader support recursive rendering for raytracing
|
|
#define HAVE_RECURSIVE_RENDERING
|
|
|
|
// In Path Tracing, For all single-sided, refractive materials, we want to force a thin refraction model
|
|
#if (SHADERPASS == SHADERPASS_PATH_TRACING) && !defined(_DOUBLESIDED_ON) && (defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE))
|
|
#undef _REFRACTION_PLANE
|
|
#undef _REFRACTION_SPHERE
|
|
#define _REFRACTION_THIN
|
|
#endif
|
|
// Caution: we can use the define SHADER_UNLIT onlit after the above Material include as it is the Unlit template who define it
|
|
|
|
// To handle SSR on transparent correctly with a possibility to enable/disable it per framesettings
|
|
// we should have a code like this:
|
|
// if !defined(_DISABLE_SSR_TRANSPARENT)
|
|
// pragma multi_compile _ WRITE_NORMAL_BUFFER
|
|
// endif
|
|
// i.e we enable the multicompile only if we can receive SSR or not, and then C# code drive
|
|
// it based on if SSR transparent in frame settings and not (and stripper can strip it).
|
|
// this is currently not possible with our current preprocessor as _DISABLE_SSR_TRANSPARENT is a keyword not a define
|
|
// so instead we used this and chose to pay the extra cost of normal write even if SSR transaprent is disabled.
|
|
// Ideally the shader graph generator should handle it but condition below can't be handle correctly for now.
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
#if !defined(_DISABLE_SSR_TRANSPARENT) && !defined(SHADER_UNLIT)
|
|
#define WRITE_NORMAL_BUFFER
|
|
#endif
|
|
#endif
|
|
|
|
// See Lit.shader
|
|
#if SHADERPASS == SHADERPASS_MOTION_VECTORS && defined(WRITE_DECAL_BUFFER_AND_RENDERING_LAYER)
|
|
#define WRITE_DECAL_BUFFER
|
|
#endif
|
|
|
|
#ifndef DEBUG_DISPLAY
|
|
// In case of opaque we don't want to perform the alpha test, it is done in depth prepass and we use depth equal for ztest (setup from UI)
|
|
// Don't do it with debug display mode as it is possible there is no depth prepass in this case
|
|
#if !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#if SHADERPASS == SHADERPASS_FORWARD
|
|
#define SHADERPASS_FORWARD_BYPASS_ALPHA_TEST
|
|
#elif SHADERPASS == SHADERPASS_GBUFFER
|
|
#define SHADERPASS_GBUFFER_BYPASS_ALPHA_TEST
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
// Define _DEFERRED_CAPABLE_MATERIAL for shader capable to run in deferred pass
|
|
#if defined(SHADER_LIT) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _DEFERRED_CAPABLE_MATERIAL
|
|
#endif
|
|
|
|
// Translate transparent motion vector define
|
|
#if (defined(_TRANSPARENT_WRITES_MOTION_VEC) || defined(_TRANSPARENT_REFRACTIVE_SORT)) && defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _WRITE_TRANSPARENT_MOTION_VECTOR
|
|
#endif
|
|
|
|
// -- Graph Properties
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _TrunkBaseColor;
|
|
float4 _TrunkBaseColorMap_TexelSize;
|
|
float4 _TrunkTilingOffset;
|
|
float4 _TrunkNormalMap_TexelSize;
|
|
float _TrunkNormalScale;
|
|
float4 _TrunkMaskMap_TexelSize;
|
|
float _TrunkMetallic;
|
|
float _TrunkAORemapMin;
|
|
float _TrunkAORemapMax;
|
|
float _TrunkSmoothnessRemapMin;
|
|
float _TrunkSmoothnessRemapMax;
|
|
float4 _LayerMask_TexelSize;
|
|
float4 _BarkBlendMaskTilingOffset;
|
|
float4 _BarkBaseColor;
|
|
float4 _BarkBaseColorMap_TexelSize;
|
|
float _BarkUseUV3;
|
|
float4 _BarkTilingOffset;
|
|
float4 _BarkNormalMap_TexelSize;
|
|
float _BarkNormalScale;
|
|
float4 _BarkMaskMap_TexelSize;
|
|
float _BarkMetallic;
|
|
float _BarkSmoothnessRemapMin;
|
|
float _BarkSmoothnessRemapMax;
|
|
float _BarkAORemapMin;
|
|
float _BarkAORemapMax;
|
|
float _Stiffness;
|
|
float _InitialBend;
|
|
float _Drag;
|
|
float _HeightDrag;
|
|
float4 _NewNormal;
|
|
float4 _EmissionColor;
|
|
float _UseShadowThreshold;
|
|
float4 _DoubleSidedConstants;
|
|
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
|
float _BlendMode;
|
|
float _EnableBlendModePreserveSpecularLighting;
|
|
float _RayTracing;
|
|
float _RefractionModel;
|
|
float _MaterialID;
|
|
float _MaterialTypeMask;
|
|
CBUFFER_END
|
|
|
|
|
|
// Object and Global properties
|
|
SAMPLER(SamplerState_Linear_Repeat);
|
|
SAMPLER(SamplerState_Linear_Repeat_Aniso8);
|
|
TEXTURE2D(_TrunkBaseColorMap);
|
|
SAMPLER(sampler_TrunkBaseColorMap);
|
|
TEXTURE2D(_TrunkNormalMap);
|
|
SAMPLER(sampler_TrunkNormalMap);
|
|
TEXTURE2D(_TrunkMaskMap);
|
|
SAMPLER(sampler_TrunkMaskMap);
|
|
TEXTURE2D(_LayerMask);
|
|
SAMPLER(sampler_LayerMask);
|
|
TEXTURE2D(_BarkBaseColorMap);
|
|
SAMPLER(sampler_BarkBaseColorMap);
|
|
TEXTURE2D(_BarkNormalMap);
|
|
SAMPLER(sampler_BarkNormalMap);
|
|
TEXTURE2D(_BarkMaskMap);
|
|
SAMPLER(sampler_BarkMaskMap);
|
|
TEXTURE2D(WIND_SETTINGS_TexNoise);
|
|
SAMPLER(samplerWIND_SETTINGS_TexNoise);
|
|
float4 WIND_SETTINGS_TexNoise_TexelSize;
|
|
TEXTURE2D(WIND_SETTINGS_TexGust);
|
|
SAMPLER(samplerWIND_SETTINGS_TexGust);
|
|
float4 WIND_SETTINGS_TexGust_TexelSize;
|
|
float4 WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float WIND_SETTINGS_FlexNoiseScale;
|
|
float WIND_SETTINGS_ShiverNoiseScale;
|
|
float WIND_SETTINGS_Turbulence;
|
|
float WIND_SETTINGS_GustSpeed;
|
|
float WIND_SETTINGS_GustScale;
|
|
float WIND_SETTINGS_GustWorldScale;
|
|
float4x4 WIND_SETTINGS_Points;
|
|
float4 WIND_SETTINGS_Points_Radius;
|
|
|
|
// -- Property used by ScenePickingPass
|
|
#ifdef SCENEPICKINGPASS
|
|
float4 _SelectionID;
|
|
#endif
|
|
|
|
// -- Properties used by SceneSelectionPass
|
|
#ifdef SCENESELECTIONPASS
|
|
int _ObjectId;
|
|
int _PassValue;
|
|
#endif
|
|
|
|
// Includes
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/NormalSurfaceGradient.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDecalData.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
// GraphIncludes: <None>
|
|
|
|
// --------------------------------------------------
|
|
// Structs and Packing
|
|
|
|
struct AttributesMesh
|
|
{
|
|
float3 positionOS : POSITION;
|
|
float3 normalOS : NORMAL;
|
|
float4 tangentOS : TANGENT;
|
|
float4 uv0 : TEXCOORD0;
|
|
float4 uv3 : TEXCOORD3;
|
|
float4 color : COLOR;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(ATTRIBUTES_NEED_INSTANCEID)
|
|
uint instanceID : INSTANCEID_SEMANTIC;
|
|
#endif
|
|
};
|
|
struct VaryingsMeshToPS
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
float3 positionRWS;
|
|
float3 normalWS;
|
|
float4 tangentWS;
|
|
float4 texCoord0;
|
|
float4 texCoord3;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
uint instanceID : CUSTOM_INSTANCE_ID;
|
|
#endif
|
|
};
|
|
struct VertexDescriptionInputs
|
|
{
|
|
float3 ObjectSpaceNormal;
|
|
float3 WorldSpaceNormal;
|
|
float3 ObjectSpaceTangent;
|
|
float3 ObjectSpacePosition;
|
|
float4 VertexColor;
|
|
float3 TimeParameters;
|
|
};
|
|
struct SurfaceDescriptionInputs
|
|
{
|
|
float3 TangentSpaceNormal;
|
|
float4 uv0;
|
|
float4 uv3;
|
|
};
|
|
struct PackedVaryingsMeshToPS
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
float4 tangentWS : INTERP0;
|
|
float4 texCoord0 : INTERP1;
|
|
float4 texCoord3 : INTERP2;
|
|
float3 positionRWS : INTERP3;
|
|
float3 normalWS : INTERP4;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
uint instanceID : CUSTOM_INSTANCE_ID;
|
|
#endif
|
|
};
|
|
|
|
PackedVaryingsMeshToPS PackVaryingsMeshToPS (VaryingsMeshToPS input)
|
|
{
|
|
PackedVaryingsMeshToPS output;
|
|
ZERO_INITIALIZE(PackedVaryingsMeshToPS, output);
|
|
output.positionCS = input.positionCS;
|
|
output.tangentWS.xyzw = input.tangentWS;
|
|
output.texCoord0.xyzw = input.texCoord0;
|
|
output.texCoord3.xyzw = input.texCoord3;
|
|
output.positionRWS.xyz = input.positionRWS;
|
|
output.normalWS.xyz = input.normalWS;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
output.instanceID = input.instanceID;
|
|
#endif
|
|
return output;
|
|
}
|
|
|
|
VaryingsMeshToPS UnpackVaryingsMeshToPS (PackedVaryingsMeshToPS input)
|
|
{
|
|
VaryingsMeshToPS output;
|
|
output.positionCS = input.positionCS;
|
|
output.tangentWS = input.tangentWS.xyzw;
|
|
output.texCoord0 = input.texCoord0.xyzw;
|
|
output.texCoord3 = input.texCoord3.xyzw;
|
|
output.positionRWS = input.positionRWS.xyz;
|
|
output.normalWS = input.normalWS.xyz;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
output.instanceID = input.instanceID;
|
|
#endif
|
|
return output;
|
|
}
|
|
|
|
|
|
// --------------------------------------------------
|
|
// Graph
|
|
|
|
|
|
// Graph Functions
|
|
|
|
void Unity_Add_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
void Unity_Distance_float3(float3 A, float3 B, out float Out)
|
|
{
|
|
Out = distance(A, B);
|
|
}
|
|
|
|
void Unity_Comparison_Less_float(float A, float B, out float Out)
|
|
{
|
|
Out = A < B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_Comparison_Greater_float(float A, float B, out float Out)
|
|
{
|
|
Out = A > B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_Subtract_float(float A, float B, out float Out)
|
|
{
|
|
Out = A - B;
|
|
}
|
|
|
|
void Unity_And_float(float A, float B, out float Out)
|
|
{
|
|
Out = A && B;
|
|
}
|
|
|
|
void Unity_Branch_float(float Predicate, float True, float False, out float Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Multiply_float_float(float A, float B, out float Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Length_float4(float4 In, out float Out)
|
|
{
|
|
Out = length(In);
|
|
}
|
|
|
|
void Unity_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Subtract_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A - B;
|
|
}
|
|
|
|
void Unity_Normalize_float3(float3 In, out float3 Out)
|
|
{
|
|
Out = normalize(In);
|
|
}
|
|
|
|
void Unity_Length_float3(float3 In, out float Out)
|
|
{
|
|
Out = length(In);
|
|
}
|
|
|
|
void Unity_Divide_float(float A, float B, out float Out)
|
|
{
|
|
Out = A / B;
|
|
}
|
|
|
|
void Unity_Clamp_float(float In, float Min, float Max, out float Out)
|
|
{
|
|
Out = clamp(In, Min, Max);
|
|
}
|
|
|
|
void Unity_Lerp_float(float A, float B, float T, out float Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Multiply_float3_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Combine_float(float R, float G, float B, float A, out float4 RGBA, out float3 RGB, out float2 RG)
|
|
{
|
|
RGBA = float4(R, G, B, A);
|
|
RGB = float3(R, G, B);
|
|
RG = float2(R, G);
|
|
}
|
|
|
|
void Unity_Add_float4(float4 A, float4 B, out float4 Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
struct Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float
|
|
{
|
|
};
|
|
|
|
void SG_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float(float4x4 Matrix4_cb72bb33b7a84dfda97778a514f9b60f, float3 Vector3_90379ebf40aa468b8362f8d265f4f234, float4 Vector4_159bb4232f82428893101734a03e2a1e, Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float IN, out float4 WindPoint_1)
|
|
{
|
|
float3 _Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3 = Vector3_90379ebf40aa468b8362f8d265f4f234;
|
|
float4x4 _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4 = Matrix4_cb72bb33b7a84dfda97778a514f9b60f;
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].r);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].g);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].b);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].a);
|
|
float3 _Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4.xyz), _Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3);
|
|
float3 _Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3, _Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3);
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[0];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[1];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[2];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[3];
|
|
float _Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3, _Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float);
|
|
float4 _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4 = Vector4_159bb4232f82428893101734a03e2a1e;
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_R_1_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[0];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_G_2_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[1];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_B_3_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[2];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_A_4_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[3];
|
|
float _Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float;
|
|
Unity_Divide_float(_Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_R_1_Float, _Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float);
|
|
float _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float, float(0), float(1), _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float);
|
|
float _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float;
|
|
Unity_Lerp_float(_Split_d6e088f9ab90466583adc22ea79eb8cc_A_4_Float, float(0), _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float, _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float);
|
|
float3 _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3, (_Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float.xxx), _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3);
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_R_1_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[0];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_G_2_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[1];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_B_3_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[2];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_A_4_Float = 0;
|
|
float4 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4;
|
|
float3 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGB_5_Vector3;
|
|
float2 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_ef99a48850fe4f8f8e30e870c5e2ee09_R_1_Float, _Split_ef99a48850fe4f8f8e30e870c5e2ee09_G_2_Float, _Split_ef99a48850fe4f8f8e30e870c5e2ee09_B_3_Float, _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGB_5_Vector3, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RG_6_Vector2);
|
|
float3 _Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4.xyz), _Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3);
|
|
float3 _Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3, _Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3);
|
|
float _Split_8bbd5052350846968bf312362efd9f01_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[0];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[1];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[2];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[3];
|
|
float _Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3, _Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float);
|
|
float _Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float;
|
|
Unity_Divide_float(_Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_G_2_Float, _Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float);
|
|
float _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float, float(0), float(1), _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float);
|
|
float _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float;
|
|
Unity_Lerp_float(_Split_8bbd5052350846968bf312362efd9f01_A_4_Float, float(0), _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float, _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float);
|
|
float3 _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3, (_Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float.xxx), _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3);
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_R_1_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[0];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_G_2_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[1];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_B_3_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[2];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_A_4_Float = 0;
|
|
float4 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4;
|
|
float3 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGB_5_Vector3;
|
|
float2 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_ab8841795f594d3a90b87ac9fcc98d38_R_1_Float, _Split_ab8841795f594d3a90b87ac9fcc98d38_G_2_Float, _Split_ab8841795f594d3a90b87ac9fcc98d38_B_3_Float, _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGB_5_Vector3, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RG_6_Vector2);
|
|
float4 _Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4;
|
|
Unity_Add_float4(_Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4, _Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4);
|
|
float3 _Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4.xyz), _Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3);
|
|
float3 _Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3, _Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3);
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[0];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[1];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[2];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[3];
|
|
float _Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3, _Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float);
|
|
float _Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float;
|
|
Unity_Divide_float(_Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_B_3_Float, _Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float);
|
|
float _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float, float(0), float(1), _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float);
|
|
float _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float;
|
|
Unity_Lerp_float(_Split_fa21a8022f944854903e06c07c6f079c_A_4_Float, float(0), _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float, _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float);
|
|
float3 _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3, (_Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float.xxx), _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3);
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_R_1_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[0];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_G_2_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[1];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_B_3_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[2];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_A_4_Float = 0;
|
|
float4 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4;
|
|
float3 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGB_5_Vector3;
|
|
float2 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_6b9b5ad9f14a49b9bc49c718430617a8_R_1_Float, _Split_6b9b5ad9f14a49b9bc49c718430617a8_G_2_Float, _Split_6b9b5ad9f14a49b9bc49c718430617a8_B_3_Float, _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGB_5_Vector3, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RG_6_Vector2);
|
|
float4 _Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4;
|
|
Unity_Add_float4(_Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4, _Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4);
|
|
float3 _Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4.xyz), _Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3);
|
|
float3 _Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3, _Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3);
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[0];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[1];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[2];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[3];
|
|
float _Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3, _Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float);
|
|
float _Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float;
|
|
Unity_Divide_float(_Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_A_4_Float, _Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float);
|
|
float _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float, float(0), float(1), _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float);
|
|
float _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float;
|
|
Unity_Lerp_float(_Split_1bfec6763d4b458398e36937b4114c29_A_4_Float, float(0), _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float, _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float);
|
|
float3 _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3, (_Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float.xxx), _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3);
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_R_1_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[0];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_G_2_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[1];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_B_3_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[2];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_A_4_Float = 0;
|
|
float4 _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4;
|
|
float3 _Combine_872906644fc84c8c8286733edba75045_RGB_5_Vector3;
|
|
float2 _Combine_872906644fc84c8c8286733edba75045_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_e22879e6c4574322ab21f6261a21bced_R_1_Float, _Split_e22879e6c4574322ab21f6261a21bced_G_2_Float, _Split_e22879e6c4574322ab21f6261a21bced_B_3_Float, _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float, _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4, _Combine_872906644fc84c8c8286733edba75045_RGB_5_Vector3, _Combine_872906644fc84c8c8286733edba75045_RG_6_Vector2);
|
|
float4 _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4;
|
|
Unity_Add_float4(_Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4, _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4, _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4);
|
|
WindPoint_1 = _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4;
|
|
}
|
|
|
|
void Unity_Power_float(float A, float B, out float Out)
|
|
{
|
|
Out = pow(A, B);
|
|
}
|
|
|
|
void Unity_Or_float(float A, float B, out float Out)
|
|
{
|
|
Out = A || B;
|
|
}
|
|
|
|
void Unity_Branch_float3(float Predicate, float3 True, float3 False, out float3 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Add_float(float A, float B, out float Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
struct Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float
|
|
{
|
|
};
|
|
|
|
void SG_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float(float3 Vector3_604F121F, float3 Vector3_C30D997B, float Vector1_A2C4B4F4, float Vector1_7F78DDD2, UnityTexture2D Texture2D_5BAC276D, UnityTexture2D Texture2D_A3874DB9, float4 Vector4_EBFF8CDE, float Vector1_B4470F9B, float Vector1_2EC6D670, float Vector1_9365F438, float Vector1_F53C4B89, float Vector1_6803B355, float Vector1_5EFF6B1A, Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float IN, out float3 direction_1, out float strength_2)
|
|
{
|
|
float4 _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_R_1_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[0];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_G_2_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[1];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_B_3_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[2];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_A_4_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[3];
|
|
float4 _Combine_39060d5de038a58eb7462ba953e69739_RGBA_4_Vector4;
|
|
float3 _Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3;
|
|
float2 _Combine_39060d5de038a58eb7462ba953e69739_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_f4f701329abd45808bbd6b61ce26dcc8_R_1_Float, _Split_f4f701329abd45808bbd6b61ce26dcc8_G_2_Float, _Split_f4f701329abd45808bbd6b61ce26dcc8_B_3_Float, float(0), _Combine_39060d5de038a58eb7462ba953e69739_RGBA_4_Vector4, _Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3, _Combine_39060d5de038a58eb7462ba953e69739_RG_6_Vector2);
|
|
float3 _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3, _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3);
|
|
float4 _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_R_1_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[0];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_G_2_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[1];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_B_3_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[2];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_A_4_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[3];
|
|
float3 _Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3, (_Split_aeb4c57f09db718e9e14c3afd38465ae_A_4_Float.xxx), _Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3);
|
|
float _Property_72aef364136bb683b08145ce7a1b59a1_Out_0_Float = Vector1_9365F438;
|
|
float _Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_72aef364136bb683b08145ce7a1b59a1_Out_0_Float, float(0), _Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean);
|
|
UnityTexture2D _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D = Texture2D_A3874DB9;
|
|
float3 _Property_f0ff7954720d018395b7da89e2e2d761_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3 = float3(float(1), float(0), float(0));
|
|
float _Property_e53ae21dcf87e286b67de750a59275e7_Out_0_Float = Vector1_9365F438;
|
|
float3 _Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3, (_Property_e53ae21dcf87e286b67de750a59275e7_Out_0_Float.xxx), _Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3);
|
|
float _Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float = Vector1_5EFF6B1A;
|
|
float3 _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3, (_Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float.xxx), _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3);
|
|
float3 _Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_f0ff7954720d018395b7da89e2e2d761_Out_0_Vector3, _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3, _Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3);
|
|
float _Property_7f2599afa6fc5b8394c8fb0389031122_Out_0_Float = Vector1_6803B355;
|
|
float3 _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3, (_Property_7f2599afa6fc5b8394c8fb0389031122_Out_0_Float.xxx), _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3);
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_R_1_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[0];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_G_2_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[1];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_B_3_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[2];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_A_4_Float = 0;
|
|
float4 _Combine_0ac20ec517f076829f01b70d67c5af02_RGBA_4_Vector4;
|
|
float3 _Combine_0ac20ec517f076829f01b70d67c5af02_RGB_5_Vector3;
|
|
float2 _Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_f4466ebe24e7fa838f5735fb1210a3dd_R_1_Float, _Split_f4466ebe24e7fa838f5735fb1210a3dd_B_3_Float, float(0), float(0), _Combine_0ac20ec517f076829f01b70d67c5af02_RGBA_4_Vector4, _Combine_0ac20ec517f076829f01b70d67c5af02_RGB_5_Vector3, _Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2);
|
|
float4 _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4 = SAMPLE_TEXTURE2D_LOD(_Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.tex, _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.samplerstate, _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.GetTransformedUV(_Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2), float(3));
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_R_5_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.r;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_G_6_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.g;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_B_7_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.b;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_A_8_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.a;
|
|
float _Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float;
|
|
Unity_Branch_float(_Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean, _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_R_5_Float, float(0), _Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float);
|
|
float _Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float;
|
|
Unity_Power_float(_Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float, float(2), _Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float);
|
|
float _Property_9592cd5ab3f8628d995c1b79e8b0e51d_Out_0_Float = Vector1_F53C4B89;
|
|
float _Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float;
|
|
Unity_Multiply_float_float(_Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float, _Property_9592cd5ab3f8628d995c1b79e8b0e51d_Out_0_Float, _Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float);
|
|
float3 _Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3((_Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float.xxx), _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3, _Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3);
|
|
float _Property_7be270a4cb312f8ebbfba142f454b30d_Out_0_Float = Vector1_9365F438;
|
|
float3 _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3, (_Property_7be270a4cb312f8ebbfba142f454b30d_Out_0_Float.xxx), _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3);
|
|
float3 _Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3;
|
|
Unity_Add_float3(_Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3, _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3, _Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3);
|
|
float4 _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_e719665c40324e89a536d165d0427a68_R_1_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[0];
|
|
float _Split_e719665c40324e89a536d165d0427a68_G_2_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[1];
|
|
float _Split_e719665c40324e89a536d165d0427a68_B_3_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[2];
|
|
float _Split_e719665c40324e89a536d165d0427a68_A_4_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[3];
|
|
float _Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Split_e719665c40324e89a536d165d0427a68_A_4_Float, float(0), _Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean);
|
|
float _Property_295a45d224dd35829c1fc35a5ac74847_Out_0_Float = Vector1_2EC6D670;
|
|
float _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_295a45d224dd35829c1fc35a5ac74847_Out_0_Float, float(0), _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean);
|
|
float _Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean;
|
|
Unity_Or_float(_Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean, _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean, _Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean);
|
|
UnityTexture2D _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D = Texture2D_5BAC276D;
|
|
float3 _Property_c82f40aba4b7f08db9a97aaccbe0e096_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3, (_Split_e719665c40324e89a536d165d0427a68_A_4_Float.xxx), _Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3);
|
|
float3 _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3, (_Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float.xxx), _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3);
|
|
float3 _Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_c82f40aba4b7f08db9a97aaccbe0e096_Out_0_Vector3, _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3, _Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3);
|
|
float _Property_1ab0df57959c6986a0602bb0abfeaf58_Out_0_Float = Vector1_B4470F9B;
|
|
float3 _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3, (_Property_1ab0df57959c6986a0602bb0abfeaf58_Out_0_Float.xxx), _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3);
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_R_1_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[0];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_G_2_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[1];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_B_3_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[2];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_A_4_Float = 0;
|
|
float4 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGBA_4_Vector4;
|
|
float3 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGB_5_Vector3;
|
|
float2 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_5ff678fef0fb61889da2a8288f7e7d15_R_1_Float, _Split_5ff678fef0fb61889da2a8288f7e7d15_B_3_Float, float(0), float(0), _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGBA_4_Vector4, _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGB_5_Vector3, _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2);
|
|
float4 _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4 = SAMPLE_TEXTURE2D_LOD(_Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.tex, _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.samplerstate, _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.GetTransformedUV(_Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2), float(3));
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_R_5_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.r;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_G_6_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.g;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_B_7_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.b;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_A_8_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.a;
|
|
float4 _Combine_3136fa3d24c46087969f5a3828ccbb98_RGBA_4_Vector4;
|
|
float3 _Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3;
|
|
float2 _Combine_3136fa3d24c46087969f5a3828ccbb98_RG_6_Vector2;
|
|
Unity_Combine_float(_SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_R_5_Float, _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_G_6_Float, _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_B_7_Float, float(0), _Combine_3136fa3d24c46087969f5a3828ccbb98_RGBA_4_Vector4, _Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3, _Combine_3136fa3d24c46087969f5a3828ccbb98_RG_6_Vector2);
|
|
float3 _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3;
|
|
Unity_Add_float3(_Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3, float3(-0.5, -0.5, -0.5), _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3);
|
|
float3 _Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3;
|
|
Unity_Branch_float3(_Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean, _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3, float3(0, 0, 0), _Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3);
|
|
float _Property_9946d066804cc584a96830f8d35269cc_Out_0_Float = Vector1_2EC6D670;
|
|
float3 _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3, (_Property_9946d066804cc584a96830f8d35269cc_Out_0_Float.xxx), _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3);
|
|
float3 _Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3;
|
|
Unity_Add_float3(_Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3, _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3, _Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3);
|
|
float _Property_4ffb3356bdb9c78c815a6e7da47e7a34_Out_0_Float = Vector1_A2C4B4F4;
|
|
float3 _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3, (_Property_4ffb3356bdb9c78c815a6e7da47e7a34_Out_0_Float.xxx), _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3);
|
|
float _Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float;
|
|
Unity_Length_float3(_Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3, _Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float);
|
|
float _Property_51d6736452f5938caf6f83cdfc7df682_Out_0_Float = Vector1_7F78DDD2;
|
|
float _Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float;
|
|
Unity_Add_float(_Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float, _Property_51d6736452f5938caf6f83cdfc7df682_Out_0_Float, _Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float);
|
|
float _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float;
|
|
Unity_Multiply_float_float(_Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float, 0.001, _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float);
|
|
direction_1 = _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3;
|
|
strength_2 = _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float;
|
|
}
|
|
|
|
void Unity_CrossProduct_float(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = cross(A, B);
|
|
}
|
|
|
|
void Unity_Comparison_Equal_float(float A, float B, out float Out)
|
|
{
|
|
Out = A == B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_DotProduct_float3(float3 A, float3 B, out float Out)
|
|
{
|
|
Out = dot(A, B);
|
|
}
|
|
|
|
void Unity_Absolute_float(float In, out float Out)
|
|
{
|
|
Out = abs(In);
|
|
}
|
|
|
|
void Unity_Maximum_float(float A, float B, out float Out)
|
|
{
|
|
Out = max(A, B);
|
|
}
|
|
|
|
void Unity_Cosine_float(float In, out float Out)
|
|
{
|
|
Out = cos(In);
|
|
}
|
|
|
|
void Unity_Sine_float(float In, out float Out)
|
|
{
|
|
Out = sin(In);
|
|
}
|
|
|
|
void Unity_Comparison_NotEqual_float(float A, float B, out float Out)
|
|
{
|
|
Out = A != B ? 1 : 0;
|
|
}
|
|
|
|
struct Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float
|
|
{
|
|
float3 WorldSpaceNormal;
|
|
float4 VertexColor;
|
|
};
|
|
|
|
void SG_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float(float Vector1_BCB03E1A, float3 Vector3_C30D997B, float Vector1_A2C4B4F4, float Vector1_7EE0F94A, float Boolean_527CB26E, float Vector1_DE1BF63A, float Vector1_7F78DDD2, float3 Vector3_DE8CC74D, UnityTexture2D Texture2D_5BAC276D, UnityTexture2D Texture2D_A3874DB9, float4 Vector4_EBFF8CDE, float Vector1_B4470F9B, float Vector1_2EC6D670, float Vector1_9365F438, float Vector1_F53C4B89, float Vector1_6803B355, float4x4 Matrix4_0617b0bd42fc46ff90b1d55303a5477f, float4 Vector4_b44806ec67ca461fbcdf009dc6092cc3, Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float IN, out float3 vertex_1, out float3 normal_2)
|
|
{
|
|
float4 _Vector4_991bdf9badea4b2bb70edc71a7338c1d_Out_0_Vector4 = float4(float(0), float(0), float(0), float(1));
|
|
float3 _Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3;
|
|
{
|
|
// Converting Position from Object to AbsoluteWorld via world space
|
|
float3 world;
|
|
world = TransformObjectToWorld((_Vector4_991bdf9badea4b2bb70edc71a7338c1d_Out_0_Vector4.xyz).xyz);
|
|
_Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3 = GetAbsolutePositionWS(world);
|
|
}
|
|
float _Distance_343883e4e5444664abed46100940f24f_Out_2_Float;
|
|
Unity_Distance_float3(_Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3, float3(0, 0, 0), _Distance_343883e4e5444664abed46100940f24f_Out_2_Float);
|
|
float _Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean;
|
|
Unity_Comparison_Less_float(_Distance_343883e4e5444664abed46100940f24f_Out_2_Float, float(0.001), _Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean);
|
|
float3 _Property_2a4ab46b1d7c45918978aae50bd32b6f_Out_0_Vector3 = Vector3_C30D997B;
|
|
float4 _Vector4_d213eb2790b34988809a251ff9c74c6b_Out_0_Vector4 = float4(float(0), float(0), float(0), float(1));
|
|
float3 _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3;
|
|
_Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3 = TransformObjectToWorld((_Vector4_d213eb2790b34988809a251ff9c74c6b_Out_0_Vector4.xyz).xyz);
|
|
float3 _Property_4a88ff8e6e6b2b84bb2818cf73a0af30_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3;
|
|
_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3 = TransformObjectToWorld(_Property_4a88ff8e6e6b2b84bb2818cf73a0af30_Out_0_Vector3.xyz);
|
|
float _Property_dfda12e25f42bd808e65c99db447e176_Out_0_Boolean = Boolean_527CB26E;
|
|
float _Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float = Vector1_7EE0F94A;
|
|
float _Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float, float(0), _Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean);
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_R_1_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[0];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_G_2_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[1];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_B_3_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[2];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_A_4_Float = 0;
|
|
float _Split_7a634ef857769683b2100876a36535a2_R_1_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[0];
|
|
float _Split_7a634ef857769683b2100876a36535a2_G_2_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[1];
|
|
float _Split_7a634ef857769683b2100876a36535a2_B_3_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[2];
|
|
float _Split_7a634ef857769683b2100876a36535a2_A_4_Float = 0;
|
|
float _Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float;
|
|
Unity_Subtract_float(_Split_05e55a8c1b8cf88f93cbafc67103b677_G_2_Float, _Split_7a634ef857769683b2100876a36535a2_G_2_Float, _Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float);
|
|
float _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean;
|
|
Unity_Comparison_Less_float(_Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float, _Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float, _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean);
|
|
float _And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean;
|
|
Unity_And_float(_Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean, _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean, _And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean);
|
|
float _Property_e5e59fcc565a8b80ac239ba87d1bcf74_Out_0_Float = Vector1_A2C4B4F4;
|
|
float _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float;
|
|
Unity_Branch_float(_And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean, float(1E-05), _Property_e5e59fcc565a8b80ac239ba87d1bcf74_Out_0_Float, _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float);
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_R_1_Float = IN.VertexColor[0];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_G_2_Float = IN.VertexColor[1];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_B_3_Float = IN.VertexColor[2];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_A_4_Float = IN.VertexColor[3];
|
|
float _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float;
|
|
Unity_Multiply_float_float(_Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float, _Split_43013162a81fc4889a1944f2a2b75f66_A_4_Float, _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float);
|
|
float _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float;
|
|
Unity_Branch_float(_Property_dfda12e25f42bd808e65c99db447e176_Out_0_Boolean, _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float, _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float, _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float);
|
|
float _Property_eaab26f57a13988a8a813ad0813c8570_Out_0_Float = Vector1_7F78DDD2;
|
|
UnityTexture2D _Property_0f02225ebee993849ea6be48328c0958_Out_0_Texture2D = Texture2D_5BAC276D;
|
|
UnityTexture2D _Property_fce16cc7b4fcf48097b94eb2d5f1b596_Out_0_Texture2D = Texture2D_A3874DB9;
|
|
float4 _Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float;
|
|
Unity_Length_float4(_Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4, _Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float);
|
|
float _Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float, float(0), _Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean);
|
|
float4 _Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4;
|
|
Unity_Branch_float4(_Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean, _Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4, float4(0, 0, 1, 1), _Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4);
|
|
float4x4 _Property_cb03cb298f0a47d4ae24d85f3c47db75_Out_0_Matrix4 = Matrix4_0617b0bd42fc46ff90b1d55303a5477f;
|
|
float4 _Property_844e35a56a864617b521872c1cee398d_Out_0_Vector4 = Vector4_b44806ec67ca461fbcdf009dc6092cc3;
|
|
Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float _WindNMPoints_071e9370484b4168b560a27fbea64a52;
|
|
float4 _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4;
|
|
SG_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float(_Property_cb03cb298f0a47d4ae24d85f3c47db75_Out_0_Matrix4, SHADERGRAPH_OBJECT_POSITION, _Property_844e35a56a864617b521872c1cee398d_Out_0_Vector4, _WindNMPoints_071e9370484b4168b560a27fbea64a52, _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4);
|
|
float4 _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4;
|
|
Unity_Add_float4(_Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4, _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4, _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4);
|
|
float _Property_02c51f4c8a859f8f88433b435d4452f6_Out_0_Float = Vector1_B4470F9B;
|
|
float _Property_6b508d48a081548385021b27896c0622_Out_0_Float = Vector1_2EC6D670;
|
|
float _Property_d73fed4fb3c7b58d892364765a30498b_Out_0_Float = Vector1_9365F438;
|
|
float _Property_c3101a1b656cac858bfa11dbe7ebd268_Out_0_Float = Vector1_F53C4B89;
|
|
float _Property_c82c2ac458938d86bcc1aae3a58cc1dc_Out_0_Float = Vector1_6803B355;
|
|
float _Property_3f5330d8bec7c681ab9563aad03c7b89_Out_0_Float = Vector1_BCB03E1A;
|
|
Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba;
|
|
float3 _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3;
|
|
float _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float;
|
|
SG_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float, _Property_eaab26f57a13988a8a813ad0813c8570_Out_0_Float, _Property_0f02225ebee993849ea6be48328c0958_Out_0_Texture2D, _Property_fce16cc7b4fcf48097b94eb2d5f1b596_Out_0_Texture2D, _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4, _Property_02c51f4c8a859f8f88433b435d4452f6_Out_0_Float, _Property_6b508d48a081548385021b27896c0622_Out_0_Float, _Property_d73fed4fb3c7b58d892364765a30498b_Out_0_Float, _Property_c3101a1b656cac858bfa11dbe7ebd268_Out_0_Float, _Property_c82c2ac458938d86bcc1aae3a58cc1dc_Out_0_Float, _Property_3f5330d8bec7c681ab9563aad03c7b89_Out_0_Float, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float);
|
|
float3 _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3;
|
|
Unity_CrossProduct_float(float3 (0, 1, 0), _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3, _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3);
|
|
float _Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean;
|
|
Unity_Comparison_Equal_float((_CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3).x, float(0), _Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean);
|
|
float3 _Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean, float3(1E-06, 1E-06, 1E-06), _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3, _Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3);
|
|
float3 _Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3, _Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3);
|
|
float3 _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3);
|
|
float _DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float;
|
|
Unity_DotProduct_float3(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3, _DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float);
|
|
float3 _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, (_DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float.xxx), _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3);
|
|
float3 _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3;
|
|
Unity_Add_float3(_Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3, _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3);
|
|
float3 _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3, _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3);
|
|
float _Distance_702b068f612c7289a99272879da274ed_Out_2_Float;
|
|
Unity_Distance_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Distance_702b068f612c7289a99272879da274ed_Out_2_Float);
|
|
float _Property_f5c255b0f666358291012b78132d6593_Out_0_Float = Vector1_DE1BF63A;
|
|
float _Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float;
|
|
Unity_Divide_float(_Distance_702b068f612c7289a99272879da274ed_Out_2_Float, _Property_f5c255b0f666358291012b78132d6593_Out_0_Float, _Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float);
|
|
float _Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float;
|
|
Unity_Absolute_float(_Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float, _Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float);
|
|
float _Float_96534b09fc72da8da7bad6ebdb2b01ab_Out_0_Float = float(1E-07);
|
|
float _Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float;
|
|
Unity_Maximum_float(_Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float, _Float_96534b09fc72da8da7bad6ebdb2b01ab_Out_0_Float, _Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float);
|
|
float _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float;
|
|
Unity_Divide_float(float(1), _Property_f5c255b0f666358291012b78132d6593_Out_0_Float, _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float);
|
|
float _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float;
|
|
Unity_Power_float(_Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float, _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float, _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float);
|
|
float _Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float;
|
|
Unity_Multiply_float_float(_WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float, _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float, _Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float);
|
|
float _Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float;
|
|
Unity_Cosine_float(_Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float, _Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float);
|
|
float3 _Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3, (_Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float.xxx), _Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3);
|
|
float3 _CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3;
|
|
Unity_CrossProduct_float(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3, _CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3);
|
|
float _Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float;
|
|
Unity_Sine_float(_Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float, _Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float);
|
|
float3 _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3, (_Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float.xxx), _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3);
|
|
float3 _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3;
|
|
Unity_Add_float3(_Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3, _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3, _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3);
|
|
float3 _Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3;
|
|
Unity_Add_float3(_Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3, _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3, _Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3);
|
|
float3 _Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3;
|
|
_Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3 = TransformWorldToObject(_Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3.xyz);
|
|
float3 _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean, _Property_2a4ab46b1d7c45918978aae50bd32b6f_Out_0_Vector3, _Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3, _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3);
|
|
float3 _Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3 = Vector3_DE8CC74D;
|
|
float _Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float;
|
|
Unity_Length_float3(_Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3, _Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float);
|
|
float _Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean;
|
|
Unity_Comparison_NotEqual_float(_Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float, float(0), _Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean);
|
|
float3 _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(IN.WorldSpaceNormal, _Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3, _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3);
|
|
float3 _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean, _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3, IN.WorldSpaceNormal, _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3);
|
|
vertex_1 = _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3;
|
|
normal_2 = _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3;
|
|
}
|
|
|
|
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_Lerp_float4(float4 A, float4 B, float4 T, out float4 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Remap_float(float In, float2 InMinMax, float2 OutMinMax, out float Out)
|
|
{
|
|
Out = OutMinMax.x + (In - InMinMax.x) * (OutMinMax.y - OutMinMax.x) / (InMinMax.y - InMinMax.x);
|
|
}
|
|
|
|
void Unity_Lerp_float3(float3 A, float3 B, float3 T, out float3 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_NormalStrength_float(float3 In, float Strength, out float3 Out)
|
|
{
|
|
Out = float3(In.rg * Strength, lerp(1, In.b, saturate(Strength)));
|
|
}
|
|
|
|
// Graph Vertex
|
|
struct VertexDescription
|
|
{
|
|
float3 Position;
|
|
float3 Normal;
|
|
float3 Tangent;
|
|
};
|
|
|
|
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
|
|
{
|
|
VertexDescription description = (VertexDescription)0;
|
|
float3 _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3;
|
|
Unity_Add_float3(IN.ObjectSpacePosition, float3(1E-07, 1E-07, 1E-07), _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3);
|
|
float _Property_084857c303b23b82b7f2702b4186fa43_Out_0_Float = _Drag;
|
|
float _Property_35ad336ee9b278808178baf539e0133f_Out_0_Float = _HeightDrag;
|
|
float _Property_476e69b3f5653a8c995133f4fccaa757_Out_0_Float = _Stiffness;
|
|
float _Property_805aa6168fe3b08ca209d8ab0fa5d2d3_Out_0_Float = _InitialBend;
|
|
float4 _Property_8e47e7fd5c1a8b88b9cf212a6f62134c_Out_0_Vector4 = _NewNormal;
|
|
UnityTexture2D _Property_3b8cd110cb76a68d88342e4cc1336e0b_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(WIND_SETTINGS_TexNoise);
|
|
UnityTexture2D _Property_a939900eb077ee8593e638c7c457b53b_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(WIND_SETTINGS_TexGust);
|
|
float4 _Property_f59f8f9dc8757f8ab1c1d173e09c0787_Out_0_Vector4 = WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float _Property_89884359995fcf8a8d80bc0e19ce75f1_Out_0_Float = WIND_SETTINGS_FlexNoiseScale;
|
|
float _Property_c460088461241a819f81fd6ab2a8fc04_Out_0_Float = WIND_SETTINGS_Turbulence;
|
|
float _Property_0ef8268ed7d75386b8735f7baab81d22_Out_0_Float = WIND_SETTINGS_GustSpeed;
|
|
float _Property_9f4dae117e65b384a057e2e17ba36791_Out_0_Float = WIND_SETTINGS_GustScale;
|
|
float _Property_8c1472d718ff81889fbd5ee5e93e5291_Out_0_Float = WIND_SETTINGS_GustWorldScale;
|
|
float4x4 _Property_d28187fe6a414fa5b58ca9948c44abca_Out_0_Matrix4 = WIND_SETTINGS_Points;
|
|
float4 _Property_18d7723e0ed14f07992a44bbeb337673_Out_0_Vector4 = WIND_SETTINGS_Points_Radius;
|
|
Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8;
|
|
_WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8.WorldSpaceNormal = IN.WorldSpaceNormal;
|
|
_WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8.VertexColor = IN.VertexColor;
|
|
float3 _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3;
|
|
float3 _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_normal_2_Vector3;
|
|
SG_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float(IN.TimeParameters.x, _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3, _Property_084857c303b23b82b7f2702b4186fa43_Out_0_Float, _Property_35ad336ee9b278808178baf539e0133f_Out_0_Float, 0, _Property_476e69b3f5653a8c995133f4fccaa757_Out_0_Float, _Property_805aa6168fe3b08ca209d8ab0fa5d2d3_Out_0_Float, (_Property_8e47e7fd5c1a8b88b9cf212a6f62134c_Out_0_Vector4.xyz), _Property_3b8cd110cb76a68d88342e4cc1336e0b_Out_0_Texture2D, _Property_a939900eb077ee8593e638c7c457b53b_Out_0_Texture2D, _Property_f59f8f9dc8757f8ab1c1d173e09c0787_Out_0_Vector4, _Property_89884359995fcf8a8d80bc0e19ce75f1_Out_0_Float, _Property_c460088461241a819f81fd6ab2a8fc04_Out_0_Float, _Property_0ef8268ed7d75386b8735f7baab81d22_Out_0_Float, _Property_9f4dae117e65b384a057e2e17ba36791_Out_0_Float, _Property_8c1472d718ff81889fbd5ee5e93e5291_Out_0_Float, _Property_d28187fe6a414fa5b58ca9948c44abca_Out_0_Matrix4, _Property_18d7723e0ed14f07992a44bbeb337673_Out_0_Vector4, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_normal_2_Vector3);
|
|
description.Position = _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3;
|
|
description.Normal = IN.ObjectSpaceNormal;
|
|
description.Tangent = IN.ObjectSpaceTangent;
|
|
return description;
|
|
}
|
|
|
|
// Graph Pixel
|
|
struct SurfaceDescription
|
|
{
|
|
float3 BaseColor;
|
|
float3 Emission;
|
|
float Alpha;
|
|
float3 BentNormal;
|
|
float Smoothness;
|
|
float Occlusion;
|
|
float3 NormalTS;
|
|
float Metallic;
|
|
};
|
|
|
|
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
|
{
|
|
SurfaceDescription surface = (SurfaceDescription)0;
|
|
UnityTexture2D _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkBaseColorMap);
|
|
float4 _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4 = _TrunkTilingOffset;
|
|
float _Split_60538633130155809820b3185c81057f_R_1_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[0];
|
|
float _Split_60538633130155809820b3185c81057f_G_2_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[1];
|
|
float _Split_60538633130155809820b3185c81057f_B_3_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[2];
|
|
float _Split_60538633130155809820b3185c81057f_A_4_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[3];
|
|
float2 _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_R_1_Float, _Split_60538633130155809820b3185c81057f_G_2_Float);
|
|
float2 _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_B_3_Float, _Split_60538633130155809820b3185c81057f_A_4_Float);
|
|
float2 _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2, _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2, _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2);
|
|
float4 _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_R_4_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_G_5_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_B_6_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_A_7_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.a;
|
|
float4 _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4 = _TrunkBaseColor;
|
|
float4 _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4, _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4, _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4);
|
|
UnityTexture2D _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkBaseColorMap);
|
|
float _Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean = _BarkUseUV3;
|
|
float4 _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4 = IN.uv3;
|
|
float4 _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4 = IN.uv0;
|
|
float4 _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4;
|
|
Unity_Branch_float4(_Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean, _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4, _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4, _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4);
|
|
float4 _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4 = _BarkTilingOffset;
|
|
float _Split_ee975774554f6480b33168eff36d8be7_R_1_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[0];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_G_2_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[1];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_B_3_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[2];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_A_4_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[3];
|
|
float2 _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_R_1_Float, _Split_ee975774554f6480b33168eff36d8be7_G_2_Float);
|
|
float2 _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_B_3_Float, _Split_ee975774554f6480b33168eff36d8be7_A_4_Float);
|
|
float2 _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float((_Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4.xy), _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2, _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2, _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2);
|
|
float4 _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_R_4_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_G_5_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_B_6_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_A_7_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.a;
|
|
float4 _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4 = _BarkBaseColor;
|
|
float4 _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4, _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4);
|
|
UnityTexture2D _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_LayerMask);
|
|
float4 _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4 = _BarkBlendMaskTilingOffset;
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[0];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[1];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[2];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[3];
|
|
float2 _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float);
|
|
float2 _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float);
|
|
float2 _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2, _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2, _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2);
|
|
float4 _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2) );
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_R_4_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_G_5_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_B_6_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.a;
|
|
float4 _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4;
|
|
Unity_Lerp_float4(_Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxxx), _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4);
|
|
UnityTexture2D _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkMaskMap);
|
|
float4 _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_B_6_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.a;
|
|
float _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float = _TrunkMetallic;
|
|
float _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float, _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float, _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float);
|
|
float _Property_8142f12b781ad08680220297dab56f14_Out_0_Float = _TrunkAORemapMin;
|
|
float _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float = _TrunkAORemapMax;
|
|
float2 _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2 = float2(_Property_8142f12b781ad08680220297dab56f14_Out_0_Float, _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float);
|
|
float _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float, float2 (0, 1), _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float);
|
|
float _Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float = _TrunkSmoothnessRemapMin;
|
|
float _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float = _TrunkSmoothnessRemapMax;
|
|
float2 _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2 = float2(_Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float, _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float);
|
|
float _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float, float2 (0, 1), _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
float3 _Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3 = float3(_Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
UnityTexture2D _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkMaskMap);
|
|
float4 _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_B_6_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.a;
|
|
float _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float = _BarkMetallic;
|
|
float _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float, _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float, _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float);
|
|
float _Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float = _BarkAORemapMin;
|
|
float _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float = _BarkAORemapMax;
|
|
float2 _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2 = float2(_Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float, _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float);
|
|
float _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float, float2 (0, 1), _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float);
|
|
float _Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float = _BarkSmoothnessRemapMin;
|
|
float _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float = _BarkSmoothnessRemapMax;
|
|
float2 _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2 = float2(_Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float, _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float);
|
|
float _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float, float2 (0, 1), _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3 = float3(_Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3;
|
|
Unity_Lerp_float3(_Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3, _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3);
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[0];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[1];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[2];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_A_4_Float = 0;
|
|
UnityTexture2D _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkNormalMap);
|
|
float4 _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4);
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_R_4_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_G_5_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_B_6_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_A_7_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.a;
|
|
float _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float = _TrunkNormalScale;
|
|
float3 _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.xyz), _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float, _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3);
|
|
UnityTexture2D _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkNormalMap);
|
|
float4 _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4);
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_R_4_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_G_5_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_B_6_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_A_7_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.a;
|
|
float _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float = _BarkNormalScale;
|
|
float3 _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.xyz), _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3);
|
|
float3 _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
Unity_Lerp_float3(_NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3);
|
|
surface.BaseColor = (_Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4.xyz);
|
|
surface.Emission = float3(0, 0, 0);
|
|
surface.Alpha = float(1);
|
|
surface.BentNormal = IN.TangentSpaceNormal;
|
|
surface.Smoothness = _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float;
|
|
surface.Occlusion = _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float;
|
|
surface.NormalTS = _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
surface.Metallic = _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float;
|
|
return surface;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Graph Inputs
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#define VFX_SRP_ATTRIBUTES AttributesMesh
|
|
#define VaryingsMeshType VaryingsMeshToPS
|
|
#define VFX_SRP_VARYINGS VaryingsMeshType
|
|
#define VFX_SRP_SURFACE_INPUTS FragInputs
|
|
#endif
|
|
|
|
VertexDescriptionInputs AttributesMeshToVertexDescriptionInputs(AttributesMesh 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.VertexColor = input.color;
|
|
output.TimeParameters = _TimeParameters.xyz; // Note: in case of animation this will be overwrite (allow to handle motion vector)
|
|
#if UNITY_ANY_INSTANCING_ENABLED
|
|
#else
|
|
#endif
|
|
|
|
return output;
|
|
}
|
|
|
|
VertexDescription GetVertexDescription(AttributesMesh input, float3 timeParameters
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
// build graph inputs
|
|
VertexDescriptionInputs vertexDescriptionInputs = AttributesMeshToVertexDescriptionInputs(input);
|
|
// Override time parameters with used one (This is required to correctly handle motion vectors for vertex animation based on time)
|
|
vertexDescriptionInputs.TimeParameters = timeParameters;
|
|
|
|
// evaluate vertex graph
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
// Fetch the vertex graph properties for the particle instance.
|
|
GetElementVertexProperties(element, properties);
|
|
|
|
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs, properties);
|
|
#else
|
|
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs);
|
|
#endif
|
|
return vertexDescription;
|
|
|
|
}
|
|
|
|
AttributesMesh ApplyMeshModification(AttributesMesh input, float3 timeParameters
|
|
#ifdef USE_CUSTOMINTERP_SUBSTRUCT
|
|
#ifdef TESSELLATION_ON
|
|
, inout VaryingsMeshToDS varyings
|
|
#else
|
|
, inout VaryingsMeshToPS varyings
|
|
#endif
|
|
#endif
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
VertexDescription vertexDescription = GetVertexDescription(input, timeParameters
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, element
|
|
#endif
|
|
);
|
|
|
|
// copy graph output to the results
|
|
input.positionOS = vertexDescription.Position;
|
|
input.normalOS = vertexDescription.Normal;
|
|
input.tangentOS.xyz = vertexDescription.Tangent;
|
|
|
|
|
|
|
|
return input;
|
|
}
|
|
|
|
#if defined(_ADD_CUSTOM_VELOCITY) // For shader graph custom velocity
|
|
// Return precomputed Velocity in object space
|
|
float3 GetCustomVelocity(AttributesMesh input
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
VertexDescription vertexDescription = GetVertexDescription(input, _TimeParameters.xyz
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, element
|
|
#endif
|
|
);
|
|
return vertexDescription.CustomVelocity;
|
|
}
|
|
#endif
|
|
|
|
FragInputs BuildFragInputs(VaryingsMeshToPS input)
|
|
{
|
|
FragInputs output;
|
|
ZERO_INITIALIZE(FragInputs, output);
|
|
|
|
// Init to some default value to make the computer quiet (else it output 'divide by zero' warning even if value is not used).
|
|
// TODO: this is a really poor workaround, but the variable is used in a bunch of places
|
|
// to compute normals which are then passed on elsewhere to compute other values...
|
|
output.tangentToWorld = k_identity3x3;
|
|
output.positionSS = input.positionCS; // input.positionCS is SV_Position
|
|
|
|
output.positionRWS = input.positionRWS;
|
|
output.tangentToWorld = BuildTangentToWorld(input.tangentWS, input.normalWS);
|
|
output.texCoord0 = input.texCoord0;
|
|
output.texCoord3 = input.texCoord3;
|
|
|
|
#if UNITY_ANY_INSTANCING_ENABLED
|
|
#else
|
|
#endif
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
// FragInputs from VFX come from two places: Interpolator or CBuffer.
|
|
#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
|
|
|
|
// splice point to copy custom interpolator fields from varyings to frag inputs
|
|
|
|
|
|
return output;
|
|
}
|
|
|
|
// existing HDRP code uses the combined function to go directly from packed to frag inputs
|
|
FragInputs UnpackVaryingsMeshToFragInputs(PackedVaryingsMeshToPS input)
|
|
{
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
#if defined(HAVE_VFX_MODIFICATION) && defined(UNITY_INSTANCING_ENABLED)
|
|
unity_InstanceID = input.instanceID;
|
|
#endif
|
|
VaryingsMeshToPS unpacked = UnpackVaryingsMeshToPS(input);
|
|
return BuildFragInputs(unpacked);
|
|
}
|
|
SurfaceDescriptionInputs FragInputsToSurfaceDescriptionInputs(FragInputs input, float3 viewWS)
|
|
{
|
|
SurfaceDescriptionInputs output;
|
|
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
|
|
|
#if defined(SHADER_STAGE_RAY_TRACING)
|
|
#else
|
|
#endif
|
|
output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
|
|
|
|
#if UNITY_UV_STARTS_AT_TOP
|
|
#else
|
|
#endif
|
|
|
|
|
|
output.uv0 = input.texCoord0;
|
|
output.uv3 = input.texCoord3;
|
|
|
|
// splice point to copy frag inputs custom interpolator pack into the SDI
|
|
|
|
|
|
return output;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Surface Data (Specific Material)
|
|
|
|
void ApplyDecalToSurfaceDataNoNormal(DecalSurfaceData decalSurfaceData, inout SurfaceData surfaceData);
|
|
|
|
void ApplyDecalAndGetNormal(FragInputs fragInputs, PositionInputs posInput, SurfaceDescription surfaceDescription,
|
|
inout SurfaceData surfaceData)
|
|
{
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
#ifdef DECAL_NORMAL_BLENDING
|
|
// SG nodes don't ouptut surface gradients, so if decals require surf grad blending, we have to convert
|
|
// the normal to gradient before applying the decal. We then have to resolve the gradient back to world space
|
|
float3 normalTS;
|
|
|
|
normalTS = SurfaceGradientFromTangentSpaceNormalAndFromTBN(surfaceDescription.NormalTS,
|
|
fragInputs.tangentToWorld[0], fragInputs.tangentToWorld[1]);
|
|
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, fragInputs.tangentToWorld[2], normalTS);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
|
|
GetNormalWS_SG(fragInputs, normalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
#else
|
|
// normal delivered to master node
|
|
GetNormalWS(fragInputs, surfaceDescription.NormalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Both uses and modifies 'surfaceData.normalWS'.
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, surfaceData.normalWS.xyz);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
#endif
|
|
}
|
|
void BuildSurfaceData(FragInputs fragInputs, inout SurfaceDescription surfaceDescription, float3 V, PositionInputs posInput, out SurfaceData surfaceData, out float3 bentNormalWS)
|
|
{
|
|
ZERO_INITIALIZE(SurfaceData, surfaceData);
|
|
|
|
// specularOcclusion need to be init ahead of decal to quiet the compiler that modify the SurfaceData struct
|
|
// however specularOcclusion can come from the graph, so need to be init here so it can be override.
|
|
surfaceData.specularOcclusion = 1.0;
|
|
surfaceData.thickness = 0.0;
|
|
|
|
surfaceData.baseColor = surfaceDescription.BaseColor;
|
|
surfaceData.perceptualSmoothness = surfaceDescription.Smoothness;
|
|
surfaceData.ambientOcclusion = surfaceDescription.Occlusion;
|
|
surfaceData.metallic = surfaceDescription.Metallic;
|
|
|
|
#if defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE) || defined(_REFRACTION_THIN)
|
|
if (_EnableSSRefraction)
|
|
{
|
|
|
|
surfaceData.transmittanceMask = (1.0 - surfaceDescription.Alpha);
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
else
|
|
{
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
#else
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
#endif
|
|
|
|
// These static material feature allow compile time optimization
|
|
surfaceData.materialFeatures = MATERIALFEATUREFLAGS_LIT_STANDARD;
|
|
#ifdef _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SUBSURFACE_SCATTERING;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_COLORED_TRANSMISSION;
|
|
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_ANISOTROPY
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_ANISOTROPY;
|
|
|
|
// Initialize the normal to something non-zero to avoid a div-zero warning for anisotropy.
|
|
surfaceData.normalWS = float3(0, 1, 0);
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_IRIDESCENCE
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_IRIDESCENCE;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SPECULAR_COLOR;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_CLEAR_COAT
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_CLEAR_COAT;
|
|
#endif
|
|
|
|
#if defined (_MATERIAL_FEATURE_SPECULAR_COLOR) && defined (_ENERGY_CONSERVING_SPECULAR)
|
|
// Require to have setup baseColor
|
|
// Reproduce the energy conservation done in legacy Unity. Not ideal but better for compatibility and users can unchek it
|
|
surfaceData.baseColor *= (1.0 - Max3(surfaceData.specularColor.r, surfaceData.specularColor.g, surfaceData.specularColor.b));
|
|
#endif
|
|
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
ApplyDecalAndGetNormal(fragInputs, posInput, surfaceDescription, surfaceData);
|
|
|
|
surfaceData.geomNormalWS = fragInputs.tangentToWorld[2];
|
|
|
|
surfaceData.tangentWS = normalize(fragInputs.tangentToWorld[0].xyz); // The tangent is not normalize in tangentToWorld for mikkt. TODO: Check if it expected that we normalize with Morten. Tag: SURFACE_GRADIENT
|
|
|
|
|
|
bentNormalWS = surfaceData.normalWS;
|
|
|
|
surfaceData.tangentWS = Orthonormalize(surfaceData.tangentWS, surfaceData.normalWS);
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
// Mipmap mode debugging isn't supported with ray tracing as it relies on derivatives
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD0
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG(posInput.positionSS, fragInputs.texCoord0);
|
|
#else
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG_NO_UV(posInput.positionSS);
|
|
#endif
|
|
surfaceData.metallic = 0;
|
|
}
|
|
#endif
|
|
|
|
// We need to call ApplyDebugToSurfaceData after filling the surfaceData and before filling builtinData
|
|
// as it can modify attribute use for static lighting
|
|
ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData);
|
|
#endif
|
|
|
|
// By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion.
|
|
// If user provide bent normal then we process a better term
|
|
#if defined(_SPECULAR_OCCLUSION_CUSTOM)
|
|
// Just use the value passed through via the slot (not active otherwise)
|
|
#elif defined(_SPECULAR_OCCLUSION_FROM_AO_BENT_NORMAL)
|
|
// If we have bent normal and ambient occlusion, process a specular occlusion
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromBentAO(V, bentNormalWS, surfaceData.normalWS, surfaceData.ambientOcclusion, PerceptualSmoothnessToPerceptualRoughness(surfaceData.perceptualSmoothness));
|
|
#elif defined(_AMBIENT_OCCLUSION) && defined(_SPECULAR_OCCLUSION_FROM_AO)
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness));
|
|
#endif
|
|
|
|
#if defined(_ENABLE_GEOMETRIC_SPECULAR_AA) && !defined(SHADER_STAGE_RAY_TRACING)
|
|
surfaceData.perceptualSmoothness = GeometricNormalFiltering(surfaceData.perceptualSmoothness, fragInputs.tangentToWorld[2], surfaceDescription.SpecularAAScreenSpaceVariance, surfaceDescription.SpecularAAThreshold);
|
|
#endif
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Get Surface And BuiltinData
|
|
|
|
void GetSurfaceAndBuiltinData(FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData RAY_TRACING_OPTIONAL_PARAMETERS)
|
|
{
|
|
// Don't dither if displaced tessellation (we're fading out the displacement instead to match the next LOD)
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && !defined(_TESSELLATION_DISPLACEMENT)
|
|
#ifdef LOD_FADE_CROSSFADE // enable dithering LOD transition if user select CrossFade transition in LOD group
|
|
LODDitheringTransition(ComputeFadeMaskSeed(V, posInput.positionSS), unity_LODFade.x);
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
#ifdef _DOUBLESIDED_ON
|
|
float3 doubleSidedConstants = _DoubleSidedConstants.xyz;
|
|
#else
|
|
float3 doubleSidedConstants = float3(1.0, 1.0, 1.0);
|
|
#endif
|
|
|
|
ApplyDoubleSidedFlipOrMirror(fragInputs, doubleSidedConstants); // Apply double sided flip on the vertex normal
|
|
#endif // SHADER_UNLIT
|
|
|
|
SurfaceDescriptionInputs surfaceDescriptionInputs = FragInputsToSurfaceDescriptionInputs(fragInputs, V);
|
|
|
|
#if defined(HAVE_VFX_MODIFICATION)
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
GetElementPixelProperties(fragInputs, properties);
|
|
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs, properties);
|
|
#else
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs);
|
|
#endif
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
surfaceDescription.Alpha = 1.0f;
|
|
}
|
|
#endif
|
|
|
|
// Perform alpha test very early to save performance (a killed pixel will not sample textures)
|
|
// TODO: split graph evaluation to grab just alpha dependencies first? tricky..
|
|
#ifdef _ALPHATEST_ON
|
|
float alphaCutoff = surfaceDescription.AlphaClipThreshold;
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
// The TransparentDepthPrepass is also used with SSR transparent.
|
|
// If an artists enable transaprent SSR but not the TransparentDepthPrepass itself, then we use AlphaClipThreshold
|
|
// otherwise if TransparentDepthPrepass is enabled we use AlphaClipThresholdDepthPrepass
|
|
#elif SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_POSTPASS
|
|
// DepthPostpass always use its own alpha threshold
|
|
alphaCutoff = surfaceDescription.AlphaClipThresholdDepthPostpass;
|
|
#elif (SHADERPASS == SHADERPASS_SHADOWS) || (SHADERPASS == SHADERPASS_RAYTRACING_VISIBILITY)
|
|
// If use shadow threshold isn't enable we don't allow any test
|
|
#endif
|
|
|
|
GENERIC_ALPHA_TEST(surfaceDescription.Alpha, alphaCutoff);
|
|
#endif
|
|
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && _DEPTHOFFSET_ON
|
|
ApplyDepthOffsetPositionInput(V, surfaceDescription.DepthOffset, GetViewForwardDir(), GetWorldToHClipMatrix(), posInput);
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
float3 bentNormalWS;
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData, bentNormalWS);
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD1
|
|
float4 lightmapTexCoord1 = fragInputs.texCoord1;
|
|
#else
|
|
float4 lightmapTexCoord1 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD2
|
|
float4 lightmapTexCoord2 = fragInputs.texCoord2;
|
|
#else
|
|
float4 lightmapTexCoord2 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Builtin Data
|
|
// For back lighting we use the oposite vertex normal
|
|
InitBuiltinData(posInput, alpha, bentNormalWS, -fragInputs.tangentToWorld[2], lightmapTexCoord1, lightmapTexCoord2, builtinData);
|
|
|
|
#else
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData);
|
|
|
|
ZERO_BUILTIN_INITIALIZE(builtinData); // No call to InitBuiltinData as we don't have any lighting
|
|
builtinData.opacity = surfaceDescription.Alpha;
|
|
|
|
#if defined(DEBUG_DISPLAY)
|
|
// Light Layers are currently not used for the Unlit shader (because it is not lit)
|
|
// But Unlit objects do cast shadows according to their rendering layer mask, which is what we want to
|
|
// display in the light layers visualization mode, therefore we need the renderingLayers
|
|
builtinData.renderingLayers = GetMeshRenderingLayerMask();
|
|
#endif
|
|
|
|
#endif // SHADER_UNLIT
|
|
|
|
#ifdef _ALPHATEST_ON
|
|
// Used for sharpening by alpha to mask - Alpha to covertage is only used with depth only and forward pass (no shadow pass, no transparent pass)
|
|
builtinData.alphaClipTreshold = alphaCutoff;
|
|
#endif
|
|
|
|
// override sampleBakedGI - not used by Unlit
|
|
// When overriding GI, we need to force the isLightmap flag to make sure we don't add APV (sampled in the lightloop) on top of the overridden value (set at GBuffer stage)
|
|
|
|
builtinData.emissiveColor = surfaceDescription.Emission;
|
|
|
|
// Note this will not fully work on transparent surfaces (can check with _SURFACE_TYPE_TRANSPARENT define)
|
|
// We will always overwrite vt feeback with the nearest. So behind transparent surfaces vt will not be resolved
|
|
// This is a limitation of the current MRT approach.
|
|
#ifdef UNITY_VIRTUAL_TEXTURING
|
|
#endif
|
|
|
|
#if _DEPTHOFFSET_ON
|
|
builtinData.depthOffset = surfaceDescription.DepthOffset;
|
|
#endif
|
|
|
|
// TODO: We should generate distortion / distortionBlur for non distortion pass
|
|
#if (SHADERPASS == SHADERPASS_DISTORTION)
|
|
builtinData.distortion = surfaceDescription.Distortion;
|
|
builtinData.distortionBlur = surfaceDescription.DistortionBlur;
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// PostInitBuiltinData call ApplyDebugToBuiltinData
|
|
PostInitBuiltinData(V, posInput, surfaceData, builtinData);
|
|
#else
|
|
ApplyDebugToBuiltinData(builtinData);
|
|
#endif
|
|
|
|
RAY_TRACING_OPTIONAL_ALPHA_TEST_PASS
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Main
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassMotionVectors.hlsl"
|
|
|
|
// --------------------------------------------------
|
|
// Visual Effect Vertex Invocations
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/VisualEffectVertex.hlsl"
|
|
#else
|
|
#endif
|
|
#endif
|
|
|
|
ENDHLSL
|
|
}
|
|
Pass
|
|
{
|
|
Name "TransparentDepthPrepass"
|
|
Tags
|
|
{
|
|
"LightMode" = "TransparentDepthPrepass"
|
|
}
|
|
|
|
// Render State
|
|
Cull [_CullMode]
|
|
Blend One Zero
|
|
ZWrite On
|
|
Stencil
|
|
{
|
|
WriteMask [_StencilWriteMaskDepth]
|
|
Ref [_StencilRefDepth]
|
|
CompFront Always
|
|
PassFront Replace
|
|
CompBack Always
|
|
PassBack Replace
|
|
}
|
|
|
|
// Debug
|
|
// <None>
|
|
|
|
// --------------------------------------------------
|
|
// Pass
|
|
|
|
HLSLPROGRAM
|
|
|
|
// Pragmas
|
|
#pragma multi_compile _ DOTS_INSTANCING_ON
|
|
#pragma instancing_options renderinglayer
|
|
#pragma target 4.5
|
|
#pragma vertex Vert
|
|
#pragma fragment Frag
|
|
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
|
|
#pragma multi_compile_instancing
|
|
|
|
// Keywords
|
|
#pragma shader_feature _ _SURFACE_TYPE_TRANSPARENT
|
|
#pragma shader_feature_local _ _DOUBLESIDED_ON
|
|
#pragma shader_feature_local _ _ADD_PRECOMPUTED_VELOCITY
|
|
#pragma shader_feature_local _ _TRANSPARENT_WRITES_MOTION_VEC _TRANSPARENT_REFRACTIVE_SORT
|
|
#pragma shader_feature_local_fragment _ _ENABLE_FOG_ON_TRANSPARENT
|
|
#pragma multi_compile _ LOD_FADE_CROSSFADE
|
|
#pragma shader_feature_local_fragment _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local _ _REFRACTION_PLANE _REFRACTION_SPHERE _REFRACTION_THIN
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// GraphKeywords: <None>
|
|
|
|
// Defines
|
|
#define SHADERPASS SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
#define RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
|
|
// For custom interpolators to inject a substruct definition before FragInputs definition,
|
|
// allowing for FragInputs to capture CI's intended for ShaderGraph's SDI.
|
|
struct CustomInterpolators
|
|
{
|
|
};
|
|
#define USE_CUSTOMINTERP_SUBSTRUCT
|
|
|
|
|
|
|
|
// TODO: Merge FragInputsVFX substruct with CustomInterpolators.
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
struct FragInputsVFX
|
|
{
|
|
/* WARNING: $splice Could not find named fragment 'FragInputsVFX' */
|
|
};
|
|
#endif
|
|
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/GeometricTools.hlsl" // Required by Tessellation.hlsl
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Tessellation.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" // Required to be include before we include properties as it define DECLARE_STACK_CB
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl" // Required before including properties as it defines UNITY_TEXTURE_STREAMING_DEBUG_VARS
|
|
// Always include Shader Graph version
|
|
// Always include last to avoid double macros
|
|
#include "Packages/com.unity.shadergraph/ShaderGraphLibrary/Functions.hlsl" // Need to be here for Gradient struct definition
|
|
|
|
// --------------------------------------------------
|
|
// Defines
|
|
|
|
// Attribute
|
|
#define ATTRIBUTES_NEED_NORMAL
|
|
#define ATTRIBUTES_NEED_TANGENT
|
|
#define ATTRIBUTES_NEED_TEXCOORD0
|
|
#define ATTRIBUTES_NEED_TEXCOORD3
|
|
#define ATTRIBUTES_NEED_COLOR
|
|
#define VARYINGS_NEED_TANGENT_TO_WORLD
|
|
#define VARYINGS_NEED_TEXCOORD0
|
|
#define VARYINGS_NEED_TEXCOORD3
|
|
|
|
#define HAVE_MESH_MODIFICATION
|
|
|
|
//Strip down the FragInputs.hlsl (on graphics), so we can only optimize the interpolators we use.
|
|
//if by accident something requests contents of FragInputs.hlsl, it will be caught as a compiler error
|
|
//Frag inputs stripping is only enabled when FRAG_INPUTS_ENABLE_STRIPPING is set
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && SHADERPASS != SHADERPASS_RAYTRACING_GBUFFER && SHADERPASS != SHADERPASS_FULL_SCREEN_DEBUG
|
|
#define FRAG_INPUTS_ENABLE_STRIPPING
|
|
#endif
|
|
#define FRAG_INPUTS_USE_TEXCOORD0
|
|
#define FRAG_INPUTS_USE_TEXCOORD3
|
|
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl"
|
|
|
|
|
|
|
|
|
|
// Following two define are a workaround introduce in 10.1.x for RaytracingQualityNode
|
|
// The ShaderGraph don't support correctly migration of this node as it serialize all the node data
|
|
// in the json file making it impossible to uprgrade. Until we get a fix, we do a workaround here
|
|
// to still allow us to rename the field and keyword of this node without breaking existing code.
|
|
#ifdef RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define RAYTRACING_SHADER_GRAPH_HIGH
|
|
#endif
|
|
|
|
#ifdef RAYTRACING_SHADER_GRAPH_RAYTRACED
|
|
#define RAYTRACING_SHADER_GRAPH_LOW
|
|
#endif
|
|
// end
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// We need isFrontFace when using double sided - it is not required for unlit as in case of unlit double sided only drive the cullmode
|
|
// VARYINGS_NEED_CULLFACE can be define by VaryingsMeshToPS.FaceSign input if a IsFrontFace Node is included in the shader graph.
|
|
#if defined(_DOUBLESIDED_ON) && !defined(VARYINGS_NEED_CULLFACE)
|
|
#define VARYINGS_NEED_CULLFACE
|
|
#endif
|
|
#endif
|
|
|
|
// Specific Material Define
|
|
#define _SPECULAR_OCCLUSION_FROM_AO 1
|
|
#define _ENERGY_CONSERVING_SPECULAR 1
|
|
|
|
#if _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// Colored Transmission doesn't support clear coat
|
|
#undef _MATERIAL_FEATURE_CLEAR_COAT
|
|
#endif
|
|
|
|
// If we use subsurface scattering, enable output split lighting (for forward pass)
|
|
#if defined(_MATERIAL_FEATURE_SUBSURFACE_SCATTERING) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define OUTPUT_SPLIT_LIGHTING
|
|
#endif
|
|
|
|
// This shader support recursive rendering for raytracing
|
|
#define HAVE_RECURSIVE_RENDERING
|
|
|
|
// In Path Tracing, For all single-sided, refractive materials, we want to force a thin refraction model
|
|
#if (SHADERPASS == SHADERPASS_PATH_TRACING) && !defined(_DOUBLESIDED_ON) && (defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE))
|
|
#undef _REFRACTION_PLANE
|
|
#undef _REFRACTION_SPHERE
|
|
#define _REFRACTION_THIN
|
|
#endif
|
|
// Caution: we can use the define SHADER_UNLIT onlit after the above Material include as it is the Unlit template who define it
|
|
|
|
// To handle SSR on transparent correctly with a possibility to enable/disable it per framesettings
|
|
// we should have a code like this:
|
|
// if !defined(_DISABLE_SSR_TRANSPARENT)
|
|
// pragma multi_compile _ WRITE_NORMAL_BUFFER
|
|
// endif
|
|
// i.e we enable the multicompile only if we can receive SSR or not, and then C# code drive
|
|
// it based on if SSR transparent in frame settings and not (and stripper can strip it).
|
|
// this is currently not possible with our current preprocessor as _DISABLE_SSR_TRANSPARENT is a keyword not a define
|
|
// so instead we used this and chose to pay the extra cost of normal write even if SSR transaprent is disabled.
|
|
// Ideally the shader graph generator should handle it but condition below can't be handle correctly for now.
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
#if !defined(_DISABLE_SSR_TRANSPARENT) && !defined(SHADER_UNLIT)
|
|
#define WRITE_NORMAL_BUFFER
|
|
#endif
|
|
#endif
|
|
|
|
// See Lit.shader
|
|
#if SHADERPASS == SHADERPASS_MOTION_VECTORS && defined(WRITE_DECAL_BUFFER_AND_RENDERING_LAYER)
|
|
#define WRITE_DECAL_BUFFER
|
|
#endif
|
|
|
|
#ifndef DEBUG_DISPLAY
|
|
// In case of opaque we don't want to perform the alpha test, it is done in depth prepass and we use depth equal for ztest (setup from UI)
|
|
// Don't do it with debug display mode as it is possible there is no depth prepass in this case
|
|
#if !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#if SHADERPASS == SHADERPASS_FORWARD
|
|
#define SHADERPASS_FORWARD_BYPASS_ALPHA_TEST
|
|
#elif SHADERPASS == SHADERPASS_GBUFFER
|
|
#define SHADERPASS_GBUFFER_BYPASS_ALPHA_TEST
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
// Define _DEFERRED_CAPABLE_MATERIAL for shader capable to run in deferred pass
|
|
#if defined(SHADER_LIT) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _DEFERRED_CAPABLE_MATERIAL
|
|
#endif
|
|
|
|
// Translate transparent motion vector define
|
|
#if (defined(_TRANSPARENT_WRITES_MOTION_VEC) || defined(_TRANSPARENT_REFRACTIVE_SORT)) && defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _WRITE_TRANSPARENT_MOTION_VECTOR
|
|
#endif
|
|
|
|
// -- Graph Properties
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _TrunkBaseColor;
|
|
float4 _TrunkBaseColorMap_TexelSize;
|
|
float4 _TrunkTilingOffset;
|
|
float4 _TrunkNormalMap_TexelSize;
|
|
float _TrunkNormalScale;
|
|
float4 _TrunkMaskMap_TexelSize;
|
|
float _TrunkMetallic;
|
|
float _TrunkAORemapMin;
|
|
float _TrunkAORemapMax;
|
|
float _TrunkSmoothnessRemapMin;
|
|
float _TrunkSmoothnessRemapMax;
|
|
float4 _LayerMask_TexelSize;
|
|
float4 _BarkBlendMaskTilingOffset;
|
|
float4 _BarkBaseColor;
|
|
float4 _BarkBaseColorMap_TexelSize;
|
|
float _BarkUseUV3;
|
|
float4 _BarkTilingOffset;
|
|
float4 _BarkNormalMap_TexelSize;
|
|
float _BarkNormalScale;
|
|
float4 _BarkMaskMap_TexelSize;
|
|
float _BarkMetallic;
|
|
float _BarkSmoothnessRemapMin;
|
|
float _BarkSmoothnessRemapMax;
|
|
float _BarkAORemapMin;
|
|
float _BarkAORemapMax;
|
|
float _Stiffness;
|
|
float _InitialBend;
|
|
float _Drag;
|
|
float _HeightDrag;
|
|
float4 _NewNormal;
|
|
float4 _EmissionColor;
|
|
float _UseShadowThreshold;
|
|
float4 _DoubleSidedConstants;
|
|
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
|
float _BlendMode;
|
|
float _EnableBlendModePreserveSpecularLighting;
|
|
float _RayTracing;
|
|
float _RefractionModel;
|
|
float _MaterialID;
|
|
float _MaterialTypeMask;
|
|
CBUFFER_END
|
|
|
|
|
|
// Object and Global properties
|
|
SAMPLER(SamplerState_Linear_Repeat);
|
|
SAMPLER(SamplerState_Linear_Repeat_Aniso8);
|
|
TEXTURE2D(_TrunkBaseColorMap);
|
|
SAMPLER(sampler_TrunkBaseColorMap);
|
|
TEXTURE2D(_TrunkNormalMap);
|
|
SAMPLER(sampler_TrunkNormalMap);
|
|
TEXTURE2D(_TrunkMaskMap);
|
|
SAMPLER(sampler_TrunkMaskMap);
|
|
TEXTURE2D(_LayerMask);
|
|
SAMPLER(sampler_LayerMask);
|
|
TEXTURE2D(_BarkBaseColorMap);
|
|
SAMPLER(sampler_BarkBaseColorMap);
|
|
TEXTURE2D(_BarkNormalMap);
|
|
SAMPLER(sampler_BarkNormalMap);
|
|
TEXTURE2D(_BarkMaskMap);
|
|
SAMPLER(sampler_BarkMaskMap);
|
|
TEXTURE2D(WIND_SETTINGS_TexNoise);
|
|
SAMPLER(samplerWIND_SETTINGS_TexNoise);
|
|
float4 WIND_SETTINGS_TexNoise_TexelSize;
|
|
TEXTURE2D(WIND_SETTINGS_TexGust);
|
|
SAMPLER(samplerWIND_SETTINGS_TexGust);
|
|
float4 WIND_SETTINGS_TexGust_TexelSize;
|
|
float4 WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float WIND_SETTINGS_FlexNoiseScale;
|
|
float WIND_SETTINGS_ShiverNoiseScale;
|
|
float WIND_SETTINGS_Turbulence;
|
|
float WIND_SETTINGS_GustSpeed;
|
|
float WIND_SETTINGS_GustScale;
|
|
float WIND_SETTINGS_GustWorldScale;
|
|
float4x4 WIND_SETTINGS_Points;
|
|
float4 WIND_SETTINGS_Points_Radius;
|
|
|
|
// -- Property used by ScenePickingPass
|
|
#ifdef SCENEPICKINGPASS
|
|
float4 _SelectionID;
|
|
#endif
|
|
|
|
// -- Properties used by SceneSelectionPass
|
|
#ifdef SCENESELECTIONPASS
|
|
int _ObjectId;
|
|
int _PassValue;
|
|
#endif
|
|
|
|
// Includes
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/NormalSurfaceGradient.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDecalData.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
// GraphIncludes: <None>
|
|
|
|
// --------------------------------------------------
|
|
// Structs and Packing
|
|
|
|
struct AttributesMesh
|
|
{
|
|
float3 positionOS : POSITION;
|
|
float3 normalOS : NORMAL;
|
|
float4 tangentOS : TANGENT;
|
|
float4 uv0 : TEXCOORD0;
|
|
float4 uv3 : TEXCOORD3;
|
|
float4 color : COLOR;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(ATTRIBUTES_NEED_INSTANCEID)
|
|
uint instanceID : INSTANCEID_SEMANTIC;
|
|
#endif
|
|
};
|
|
struct VaryingsMeshToPS
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
float3 normalWS;
|
|
float4 tangentWS;
|
|
float4 texCoord0;
|
|
float4 texCoord3;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
uint instanceID : CUSTOM_INSTANCE_ID;
|
|
#endif
|
|
};
|
|
struct VertexDescriptionInputs
|
|
{
|
|
float3 ObjectSpaceNormal;
|
|
float3 WorldSpaceNormal;
|
|
float3 ObjectSpaceTangent;
|
|
float3 ObjectSpacePosition;
|
|
float4 VertexColor;
|
|
float3 TimeParameters;
|
|
};
|
|
struct SurfaceDescriptionInputs
|
|
{
|
|
float3 TangentSpaceNormal;
|
|
float4 uv0;
|
|
float4 uv3;
|
|
};
|
|
struct PackedVaryingsMeshToPS
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
float4 tangentWS : INTERP0;
|
|
float4 texCoord0 : INTERP1;
|
|
float4 texCoord3 : INTERP2;
|
|
float3 normalWS : INTERP3;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
uint instanceID : CUSTOM_INSTANCE_ID;
|
|
#endif
|
|
};
|
|
|
|
PackedVaryingsMeshToPS PackVaryingsMeshToPS (VaryingsMeshToPS input)
|
|
{
|
|
PackedVaryingsMeshToPS output;
|
|
ZERO_INITIALIZE(PackedVaryingsMeshToPS, output);
|
|
output.positionCS = input.positionCS;
|
|
output.tangentWS.xyzw = input.tangentWS;
|
|
output.texCoord0.xyzw = input.texCoord0;
|
|
output.texCoord3.xyzw = input.texCoord3;
|
|
output.normalWS.xyz = input.normalWS;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
output.instanceID = input.instanceID;
|
|
#endif
|
|
return output;
|
|
}
|
|
|
|
VaryingsMeshToPS UnpackVaryingsMeshToPS (PackedVaryingsMeshToPS input)
|
|
{
|
|
VaryingsMeshToPS output;
|
|
output.positionCS = input.positionCS;
|
|
output.tangentWS = input.tangentWS.xyzw;
|
|
output.texCoord0 = input.texCoord0.xyzw;
|
|
output.texCoord3 = input.texCoord3.xyzw;
|
|
output.normalWS = input.normalWS.xyz;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
output.instanceID = input.instanceID;
|
|
#endif
|
|
return output;
|
|
}
|
|
|
|
|
|
// --------------------------------------------------
|
|
// Graph
|
|
|
|
|
|
// Graph Functions
|
|
|
|
void Unity_Add_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
void Unity_Distance_float3(float3 A, float3 B, out float Out)
|
|
{
|
|
Out = distance(A, B);
|
|
}
|
|
|
|
void Unity_Comparison_Less_float(float A, float B, out float Out)
|
|
{
|
|
Out = A < B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_Comparison_Greater_float(float A, float B, out float Out)
|
|
{
|
|
Out = A > B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_Subtract_float(float A, float B, out float Out)
|
|
{
|
|
Out = A - B;
|
|
}
|
|
|
|
void Unity_And_float(float A, float B, out float Out)
|
|
{
|
|
Out = A && B;
|
|
}
|
|
|
|
void Unity_Branch_float(float Predicate, float True, float False, out float Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Multiply_float_float(float A, float B, out float Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Length_float4(float4 In, out float Out)
|
|
{
|
|
Out = length(In);
|
|
}
|
|
|
|
void Unity_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Subtract_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A - B;
|
|
}
|
|
|
|
void Unity_Normalize_float3(float3 In, out float3 Out)
|
|
{
|
|
Out = normalize(In);
|
|
}
|
|
|
|
void Unity_Length_float3(float3 In, out float Out)
|
|
{
|
|
Out = length(In);
|
|
}
|
|
|
|
void Unity_Divide_float(float A, float B, out float Out)
|
|
{
|
|
Out = A / B;
|
|
}
|
|
|
|
void Unity_Clamp_float(float In, float Min, float Max, out float Out)
|
|
{
|
|
Out = clamp(In, Min, Max);
|
|
}
|
|
|
|
void Unity_Lerp_float(float A, float B, float T, out float Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Multiply_float3_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Combine_float(float R, float G, float B, float A, out float4 RGBA, out float3 RGB, out float2 RG)
|
|
{
|
|
RGBA = float4(R, G, B, A);
|
|
RGB = float3(R, G, B);
|
|
RG = float2(R, G);
|
|
}
|
|
|
|
void Unity_Add_float4(float4 A, float4 B, out float4 Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
struct Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float
|
|
{
|
|
};
|
|
|
|
void SG_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float(float4x4 Matrix4_cb72bb33b7a84dfda97778a514f9b60f, float3 Vector3_90379ebf40aa468b8362f8d265f4f234, float4 Vector4_159bb4232f82428893101734a03e2a1e, Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float IN, out float4 WindPoint_1)
|
|
{
|
|
float3 _Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3 = Vector3_90379ebf40aa468b8362f8d265f4f234;
|
|
float4x4 _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4 = Matrix4_cb72bb33b7a84dfda97778a514f9b60f;
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].r);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].g);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].b);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].a);
|
|
float3 _Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4.xyz), _Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3);
|
|
float3 _Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3, _Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3);
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[0];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[1];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[2];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[3];
|
|
float _Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3, _Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float);
|
|
float4 _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4 = Vector4_159bb4232f82428893101734a03e2a1e;
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_R_1_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[0];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_G_2_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[1];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_B_3_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[2];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_A_4_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[3];
|
|
float _Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float;
|
|
Unity_Divide_float(_Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_R_1_Float, _Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float);
|
|
float _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float, float(0), float(1), _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float);
|
|
float _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float;
|
|
Unity_Lerp_float(_Split_d6e088f9ab90466583adc22ea79eb8cc_A_4_Float, float(0), _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float, _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float);
|
|
float3 _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3, (_Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float.xxx), _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3);
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_R_1_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[0];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_G_2_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[1];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_B_3_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[2];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_A_4_Float = 0;
|
|
float4 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4;
|
|
float3 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGB_5_Vector3;
|
|
float2 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_ef99a48850fe4f8f8e30e870c5e2ee09_R_1_Float, _Split_ef99a48850fe4f8f8e30e870c5e2ee09_G_2_Float, _Split_ef99a48850fe4f8f8e30e870c5e2ee09_B_3_Float, _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGB_5_Vector3, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RG_6_Vector2);
|
|
float3 _Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4.xyz), _Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3);
|
|
float3 _Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3, _Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3);
|
|
float _Split_8bbd5052350846968bf312362efd9f01_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[0];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[1];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[2];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[3];
|
|
float _Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3, _Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float);
|
|
float _Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float;
|
|
Unity_Divide_float(_Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_G_2_Float, _Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float);
|
|
float _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float, float(0), float(1), _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float);
|
|
float _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float;
|
|
Unity_Lerp_float(_Split_8bbd5052350846968bf312362efd9f01_A_4_Float, float(0), _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float, _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float);
|
|
float3 _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3, (_Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float.xxx), _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3);
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_R_1_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[0];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_G_2_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[1];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_B_3_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[2];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_A_4_Float = 0;
|
|
float4 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4;
|
|
float3 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGB_5_Vector3;
|
|
float2 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_ab8841795f594d3a90b87ac9fcc98d38_R_1_Float, _Split_ab8841795f594d3a90b87ac9fcc98d38_G_2_Float, _Split_ab8841795f594d3a90b87ac9fcc98d38_B_3_Float, _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGB_5_Vector3, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RG_6_Vector2);
|
|
float4 _Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4;
|
|
Unity_Add_float4(_Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4, _Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4);
|
|
float3 _Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4.xyz), _Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3);
|
|
float3 _Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3, _Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3);
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[0];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[1];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[2];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[3];
|
|
float _Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3, _Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float);
|
|
float _Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float;
|
|
Unity_Divide_float(_Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_B_3_Float, _Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float);
|
|
float _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float, float(0), float(1), _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float);
|
|
float _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float;
|
|
Unity_Lerp_float(_Split_fa21a8022f944854903e06c07c6f079c_A_4_Float, float(0), _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float, _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float);
|
|
float3 _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3, (_Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float.xxx), _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3);
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_R_1_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[0];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_G_2_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[1];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_B_3_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[2];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_A_4_Float = 0;
|
|
float4 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4;
|
|
float3 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGB_5_Vector3;
|
|
float2 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_6b9b5ad9f14a49b9bc49c718430617a8_R_1_Float, _Split_6b9b5ad9f14a49b9bc49c718430617a8_G_2_Float, _Split_6b9b5ad9f14a49b9bc49c718430617a8_B_3_Float, _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGB_5_Vector3, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RG_6_Vector2);
|
|
float4 _Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4;
|
|
Unity_Add_float4(_Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4, _Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4);
|
|
float3 _Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4.xyz), _Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3);
|
|
float3 _Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3, _Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3);
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[0];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[1];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[2];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[3];
|
|
float _Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3, _Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float);
|
|
float _Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float;
|
|
Unity_Divide_float(_Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_A_4_Float, _Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float);
|
|
float _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float, float(0), float(1), _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float);
|
|
float _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float;
|
|
Unity_Lerp_float(_Split_1bfec6763d4b458398e36937b4114c29_A_4_Float, float(0), _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float, _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float);
|
|
float3 _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3, (_Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float.xxx), _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3);
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_R_1_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[0];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_G_2_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[1];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_B_3_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[2];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_A_4_Float = 0;
|
|
float4 _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4;
|
|
float3 _Combine_872906644fc84c8c8286733edba75045_RGB_5_Vector3;
|
|
float2 _Combine_872906644fc84c8c8286733edba75045_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_e22879e6c4574322ab21f6261a21bced_R_1_Float, _Split_e22879e6c4574322ab21f6261a21bced_G_2_Float, _Split_e22879e6c4574322ab21f6261a21bced_B_3_Float, _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float, _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4, _Combine_872906644fc84c8c8286733edba75045_RGB_5_Vector3, _Combine_872906644fc84c8c8286733edba75045_RG_6_Vector2);
|
|
float4 _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4;
|
|
Unity_Add_float4(_Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4, _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4, _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4);
|
|
WindPoint_1 = _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4;
|
|
}
|
|
|
|
void Unity_Power_float(float A, float B, out float Out)
|
|
{
|
|
Out = pow(A, B);
|
|
}
|
|
|
|
void Unity_Or_float(float A, float B, out float Out)
|
|
{
|
|
Out = A || B;
|
|
}
|
|
|
|
void Unity_Branch_float3(float Predicate, float3 True, float3 False, out float3 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Add_float(float A, float B, out float Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
struct Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float
|
|
{
|
|
};
|
|
|
|
void SG_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float(float3 Vector3_604F121F, float3 Vector3_C30D997B, float Vector1_A2C4B4F4, float Vector1_7F78DDD2, UnityTexture2D Texture2D_5BAC276D, UnityTexture2D Texture2D_A3874DB9, float4 Vector4_EBFF8CDE, float Vector1_B4470F9B, float Vector1_2EC6D670, float Vector1_9365F438, float Vector1_F53C4B89, float Vector1_6803B355, float Vector1_5EFF6B1A, Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float IN, out float3 direction_1, out float strength_2)
|
|
{
|
|
float4 _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_R_1_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[0];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_G_2_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[1];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_B_3_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[2];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_A_4_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[3];
|
|
float4 _Combine_39060d5de038a58eb7462ba953e69739_RGBA_4_Vector4;
|
|
float3 _Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3;
|
|
float2 _Combine_39060d5de038a58eb7462ba953e69739_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_f4f701329abd45808bbd6b61ce26dcc8_R_1_Float, _Split_f4f701329abd45808bbd6b61ce26dcc8_G_2_Float, _Split_f4f701329abd45808bbd6b61ce26dcc8_B_3_Float, float(0), _Combine_39060d5de038a58eb7462ba953e69739_RGBA_4_Vector4, _Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3, _Combine_39060d5de038a58eb7462ba953e69739_RG_6_Vector2);
|
|
float3 _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3, _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3);
|
|
float4 _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_R_1_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[0];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_G_2_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[1];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_B_3_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[2];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_A_4_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[3];
|
|
float3 _Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3, (_Split_aeb4c57f09db718e9e14c3afd38465ae_A_4_Float.xxx), _Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3);
|
|
float _Property_72aef364136bb683b08145ce7a1b59a1_Out_0_Float = Vector1_9365F438;
|
|
float _Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_72aef364136bb683b08145ce7a1b59a1_Out_0_Float, float(0), _Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean);
|
|
UnityTexture2D _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D = Texture2D_A3874DB9;
|
|
float3 _Property_f0ff7954720d018395b7da89e2e2d761_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3 = float3(float(1), float(0), float(0));
|
|
float _Property_e53ae21dcf87e286b67de750a59275e7_Out_0_Float = Vector1_9365F438;
|
|
float3 _Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3, (_Property_e53ae21dcf87e286b67de750a59275e7_Out_0_Float.xxx), _Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3);
|
|
float _Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float = Vector1_5EFF6B1A;
|
|
float3 _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3, (_Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float.xxx), _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3);
|
|
float3 _Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_f0ff7954720d018395b7da89e2e2d761_Out_0_Vector3, _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3, _Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3);
|
|
float _Property_7f2599afa6fc5b8394c8fb0389031122_Out_0_Float = Vector1_6803B355;
|
|
float3 _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3, (_Property_7f2599afa6fc5b8394c8fb0389031122_Out_0_Float.xxx), _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3);
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_R_1_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[0];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_G_2_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[1];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_B_3_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[2];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_A_4_Float = 0;
|
|
float4 _Combine_0ac20ec517f076829f01b70d67c5af02_RGBA_4_Vector4;
|
|
float3 _Combine_0ac20ec517f076829f01b70d67c5af02_RGB_5_Vector3;
|
|
float2 _Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_f4466ebe24e7fa838f5735fb1210a3dd_R_1_Float, _Split_f4466ebe24e7fa838f5735fb1210a3dd_B_3_Float, float(0), float(0), _Combine_0ac20ec517f076829f01b70d67c5af02_RGBA_4_Vector4, _Combine_0ac20ec517f076829f01b70d67c5af02_RGB_5_Vector3, _Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2);
|
|
float4 _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4 = SAMPLE_TEXTURE2D_LOD(_Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.tex, _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.samplerstate, _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.GetTransformedUV(_Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2), float(3));
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_R_5_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.r;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_G_6_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.g;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_B_7_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.b;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_A_8_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.a;
|
|
float _Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float;
|
|
Unity_Branch_float(_Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean, _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_R_5_Float, float(0), _Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float);
|
|
float _Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float;
|
|
Unity_Power_float(_Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float, float(2), _Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float);
|
|
float _Property_9592cd5ab3f8628d995c1b79e8b0e51d_Out_0_Float = Vector1_F53C4B89;
|
|
float _Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float;
|
|
Unity_Multiply_float_float(_Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float, _Property_9592cd5ab3f8628d995c1b79e8b0e51d_Out_0_Float, _Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float);
|
|
float3 _Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3((_Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float.xxx), _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3, _Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3);
|
|
float _Property_7be270a4cb312f8ebbfba142f454b30d_Out_0_Float = Vector1_9365F438;
|
|
float3 _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3, (_Property_7be270a4cb312f8ebbfba142f454b30d_Out_0_Float.xxx), _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3);
|
|
float3 _Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3;
|
|
Unity_Add_float3(_Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3, _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3, _Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3);
|
|
float4 _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_e719665c40324e89a536d165d0427a68_R_1_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[0];
|
|
float _Split_e719665c40324e89a536d165d0427a68_G_2_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[1];
|
|
float _Split_e719665c40324e89a536d165d0427a68_B_3_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[2];
|
|
float _Split_e719665c40324e89a536d165d0427a68_A_4_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[3];
|
|
float _Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Split_e719665c40324e89a536d165d0427a68_A_4_Float, float(0), _Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean);
|
|
float _Property_295a45d224dd35829c1fc35a5ac74847_Out_0_Float = Vector1_2EC6D670;
|
|
float _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_295a45d224dd35829c1fc35a5ac74847_Out_0_Float, float(0), _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean);
|
|
float _Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean;
|
|
Unity_Or_float(_Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean, _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean, _Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean);
|
|
UnityTexture2D _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D = Texture2D_5BAC276D;
|
|
float3 _Property_c82f40aba4b7f08db9a97aaccbe0e096_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3, (_Split_e719665c40324e89a536d165d0427a68_A_4_Float.xxx), _Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3);
|
|
float3 _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3, (_Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float.xxx), _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3);
|
|
float3 _Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_c82f40aba4b7f08db9a97aaccbe0e096_Out_0_Vector3, _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3, _Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3);
|
|
float _Property_1ab0df57959c6986a0602bb0abfeaf58_Out_0_Float = Vector1_B4470F9B;
|
|
float3 _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3, (_Property_1ab0df57959c6986a0602bb0abfeaf58_Out_0_Float.xxx), _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3);
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_R_1_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[0];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_G_2_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[1];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_B_3_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[2];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_A_4_Float = 0;
|
|
float4 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGBA_4_Vector4;
|
|
float3 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGB_5_Vector3;
|
|
float2 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_5ff678fef0fb61889da2a8288f7e7d15_R_1_Float, _Split_5ff678fef0fb61889da2a8288f7e7d15_B_3_Float, float(0), float(0), _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGBA_4_Vector4, _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGB_5_Vector3, _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2);
|
|
float4 _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4 = SAMPLE_TEXTURE2D_LOD(_Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.tex, _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.samplerstate, _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.GetTransformedUV(_Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2), float(3));
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_R_5_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.r;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_G_6_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.g;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_B_7_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.b;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_A_8_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.a;
|
|
float4 _Combine_3136fa3d24c46087969f5a3828ccbb98_RGBA_4_Vector4;
|
|
float3 _Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3;
|
|
float2 _Combine_3136fa3d24c46087969f5a3828ccbb98_RG_6_Vector2;
|
|
Unity_Combine_float(_SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_R_5_Float, _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_G_6_Float, _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_B_7_Float, float(0), _Combine_3136fa3d24c46087969f5a3828ccbb98_RGBA_4_Vector4, _Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3, _Combine_3136fa3d24c46087969f5a3828ccbb98_RG_6_Vector2);
|
|
float3 _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3;
|
|
Unity_Add_float3(_Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3, float3(-0.5, -0.5, -0.5), _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3);
|
|
float3 _Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3;
|
|
Unity_Branch_float3(_Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean, _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3, float3(0, 0, 0), _Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3);
|
|
float _Property_9946d066804cc584a96830f8d35269cc_Out_0_Float = Vector1_2EC6D670;
|
|
float3 _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3, (_Property_9946d066804cc584a96830f8d35269cc_Out_0_Float.xxx), _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3);
|
|
float3 _Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3;
|
|
Unity_Add_float3(_Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3, _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3, _Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3);
|
|
float _Property_4ffb3356bdb9c78c815a6e7da47e7a34_Out_0_Float = Vector1_A2C4B4F4;
|
|
float3 _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3, (_Property_4ffb3356bdb9c78c815a6e7da47e7a34_Out_0_Float.xxx), _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3);
|
|
float _Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float;
|
|
Unity_Length_float3(_Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3, _Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float);
|
|
float _Property_51d6736452f5938caf6f83cdfc7df682_Out_0_Float = Vector1_7F78DDD2;
|
|
float _Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float;
|
|
Unity_Add_float(_Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float, _Property_51d6736452f5938caf6f83cdfc7df682_Out_0_Float, _Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float);
|
|
float _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float;
|
|
Unity_Multiply_float_float(_Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float, 0.001, _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float);
|
|
direction_1 = _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3;
|
|
strength_2 = _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float;
|
|
}
|
|
|
|
void Unity_CrossProduct_float(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = cross(A, B);
|
|
}
|
|
|
|
void Unity_Comparison_Equal_float(float A, float B, out float Out)
|
|
{
|
|
Out = A == B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_DotProduct_float3(float3 A, float3 B, out float Out)
|
|
{
|
|
Out = dot(A, B);
|
|
}
|
|
|
|
void Unity_Absolute_float(float In, out float Out)
|
|
{
|
|
Out = abs(In);
|
|
}
|
|
|
|
void Unity_Maximum_float(float A, float B, out float Out)
|
|
{
|
|
Out = max(A, B);
|
|
}
|
|
|
|
void Unity_Cosine_float(float In, out float Out)
|
|
{
|
|
Out = cos(In);
|
|
}
|
|
|
|
void Unity_Sine_float(float In, out float Out)
|
|
{
|
|
Out = sin(In);
|
|
}
|
|
|
|
void Unity_Comparison_NotEqual_float(float A, float B, out float Out)
|
|
{
|
|
Out = A != B ? 1 : 0;
|
|
}
|
|
|
|
struct Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float
|
|
{
|
|
float3 WorldSpaceNormal;
|
|
float4 VertexColor;
|
|
};
|
|
|
|
void SG_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float(float Vector1_BCB03E1A, float3 Vector3_C30D997B, float Vector1_A2C4B4F4, float Vector1_7EE0F94A, float Boolean_527CB26E, float Vector1_DE1BF63A, float Vector1_7F78DDD2, float3 Vector3_DE8CC74D, UnityTexture2D Texture2D_5BAC276D, UnityTexture2D Texture2D_A3874DB9, float4 Vector4_EBFF8CDE, float Vector1_B4470F9B, float Vector1_2EC6D670, float Vector1_9365F438, float Vector1_F53C4B89, float Vector1_6803B355, float4x4 Matrix4_0617b0bd42fc46ff90b1d55303a5477f, float4 Vector4_b44806ec67ca461fbcdf009dc6092cc3, Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float IN, out float3 vertex_1, out float3 normal_2)
|
|
{
|
|
float4 _Vector4_991bdf9badea4b2bb70edc71a7338c1d_Out_0_Vector4 = float4(float(0), float(0), float(0), float(1));
|
|
float3 _Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3;
|
|
{
|
|
// Converting Position from Object to AbsoluteWorld via world space
|
|
float3 world;
|
|
world = TransformObjectToWorld((_Vector4_991bdf9badea4b2bb70edc71a7338c1d_Out_0_Vector4.xyz).xyz);
|
|
_Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3 = GetAbsolutePositionWS(world);
|
|
}
|
|
float _Distance_343883e4e5444664abed46100940f24f_Out_2_Float;
|
|
Unity_Distance_float3(_Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3, float3(0, 0, 0), _Distance_343883e4e5444664abed46100940f24f_Out_2_Float);
|
|
float _Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean;
|
|
Unity_Comparison_Less_float(_Distance_343883e4e5444664abed46100940f24f_Out_2_Float, float(0.001), _Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean);
|
|
float3 _Property_2a4ab46b1d7c45918978aae50bd32b6f_Out_0_Vector3 = Vector3_C30D997B;
|
|
float4 _Vector4_d213eb2790b34988809a251ff9c74c6b_Out_0_Vector4 = float4(float(0), float(0), float(0), float(1));
|
|
float3 _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3;
|
|
_Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3 = TransformObjectToWorld((_Vector4_d213eb2790b34988809a251ff9c74c6b_Out_0_Vector4.xyz).xyz);
|
|
float3 _Property_4a88ff8e6e6b2b84bb2818cf73a0af30_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3;
|
|
_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3 = TransformObjectToWorld(_Property_4a88ff8e6e6b2b84bb2818cf73a0af30_Out_0_Vector3.xyz);
|
|
float _Property_dfda12e25f42bd808e65c99db447e176_Out_0_Boolean = Boolean_527CB26E;
|
|
float _Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float = Vector1_7EE0F94A;
|
|
float _Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float, float(0), _Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean);
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_R_1_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[0];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_G_2_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[1];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_B_3_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[2];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_A_4_Float = 0;
|
|
float _Split_7a634ef857769683b2100876a36535a2_R_1_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[0];
|
|
float _Split_7a634ef857769683b2100876a36535a2_G_2_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[1];
|
|
float _Split_7a634ef857769683b2100876a36535a2_B_3_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[2];
|
|
float _Split_7a634ef857769683b2100876a36535a2_A_4_Float = 0;
|
|
float _Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float;
|
|
Unity_Subtract_float(_Split_05e55a8c1b8cf88f93cbafc67103b677_G_2_Float, _Split_7a634ef857769683b2100876a36535a2_G_2_Float, _Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float);
|
|
float _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean;
|
|
Unity_Comparison_Less_float(_Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float, _Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float, _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean);
|
|
float _And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean;
|
|
Unity_And_float(_Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean, _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean, _And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean);
|
|
float _Property_e5e59fcc565a8b80ac239ba87d1bcf74_Out_0_Float = Vector1_A2C4B4F4;
|
|
float _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float;
|
|
Unity_Branch_float(_And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean, float(1E-05), _Property_e5e59fcc565a8b80ac239ba87d1bcf74_Out_0_Float, _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float);
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_R_1_Float = IN.VertexColor[0];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_G_2_Float = IN.VertexColor[1];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_B_3_Float = IN.VertexColor[2];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_A_4_Float = IN.VertexColor[3];
|
|
float _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float;
|
|
Unity_Multiply_float_float(_Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float, _Split_43013162a81fc4889a1944f2a2b75f66_A_4_Float, _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float);
|
|
float _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float;
|
|
Unity_Branch_float(_Property_dfda12e25f42bd808e65c99db447e176_Out_0_Boolean, _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float, _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float, _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float);
|
|
float _Property_eaab26f57a13988a8a813ad0813c8570_Out_0_Float = Vector1_7F78DDD2;
|
|
UnityTexture2D _Property_0f02225ebee993849ea6be48328c0958_Out_0_Texture2D = Texture2D_5BAC276D;
|
|
UnityTexture2D _Property_fce16cc7b4fcf48097b94eb2d5f1b596_Out_0_Texture2D = Texture2D_A3874DB9;
|
|
float4 _Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float;
|
|
Unity_Length_float4(_Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4, _Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float);
|
|
float _Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float, float(0), _Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean);
|
|
float4 _Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4;
|
|
Unity_Branch_float4(_Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean, _Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4, float4(0, 0, 1, 1), _Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4);
|
|
float4x4 _Property_cb03cb298f0a47d4ae24d85f3c47db75_Out_0_Matrix4 = Matrix4_0617b0bd42fc46ff90b1d55303a5477f;
|
|
float4 _Property_844e35a56a864617b521872c1cee398d_Out_0_Vector4 = Vector4_b44806ec67ca461fbcdf009dc6092cc3;
|
|
Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float _WindNMPoints_071e9370484b4168b560a27fbea64a52;
|
|
float4 _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4;
|
|
SG_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float(_Property_cb03cb298f0a47d4ae24d85f3c47db75_Out_0_Matrix4, SHADERGRAPH_OBJECT_POSITION, _Property_844e35a56a864617b521872c1cee398d_Out_0_Vector4, _WindNMPoints_071e9370484b4168b560a27fbea64a52, _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4);
|
|
float4 _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4;
|
|
Unity_Add_float4(_Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4, _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4, _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4);
|
|
float _Property_02c51f4c8a859f8f88433b435d4452f6_Out_0_Float = Vector1_B4470F9B;
|
|
float _Property_6b508d48a081548385021b27896c0622_Out_0_Float = Vector1_2EC6D670;
|
|
float _Property_d73fed4fb3c7b58d892364765a30498b_Out_0_Float = Vector1_9365F438;
|
|
float _Property_c3101a1b656cac858bfa11dbe7ebd268_Out_0_Float = Vector1_F53C4B89;
|
|
float _Property_c82c2ac458938d86bcc1aae3a58cc1dc_Out_0_Float = Vector1_6803B355;
|
|
float _Property_3f5330d8bec7c681ab9563aad03c7b89_Out_0_Float = Vector1_BCB03E1A;
|
|
Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba;
|
|
float3 _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3;
|
|
float _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float;
|
|
SG_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float, _Property_eaab26f57a13988a8a813ad0813c8570_Out_0_Float, _Property_0f02225ebee993849ea6be48328c0958_Out_0_Texture2D, _Property_fce16cc7b4fcf48097b94eb2d5f1b596_Out_0_Texture2D, _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4, _Property_02c51f4c8a859f8f88433b435d4452f6_Out_0_Float, _Property_6b508d48a081548385021b27896c0622_Out_0_Float, _Property_d73fed4fb3c7b58d892364765a30498b_Out_0_Float, _Property_c3101a1b656cac858bfa11dbe7ebd268_Out_0_Float, _Property_c82c2ac458938d86bcc1aae3a58cc1dc_Out_0_Float, _Property_3f5330d8bec7c681ab9563aad03c7b89_Out_0_Float, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float);
|
|
float3 _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3;
|
|
Unity_CrossProduct_float(float3 (0, 1, 0), _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3, _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3);
|
|
float _Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean;
|
|
Unity_Comparison_Equal_float((_CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3).x, float(0), _Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean);
|
|
float3 _Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean, float3(1E-06, 1E-06, 1E-06), _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3, _Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3);
|
|
float3 _Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3, _Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3);
|
|
float3 _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3);
|
|
float _DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float;
|
|
Unity_DotProduct_float3(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3, _DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float);
|
|
float3 _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, (_DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float.xxx), _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3);
|
|
float3 _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3;
|
|
Unity_Add_float3(_Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3, _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3);
|
|
float3 _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3, _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3);
|
|
float _Distance_702b068f612c7289a99272879da274ed_Out_2_Float;
|
|
Unity_Distance_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Distance_702b068f612c7289a99272879da274ed_Out_2_Float);
|
|
float _Property_f5c255b0f666358291012b78132d6593_Out_0_Float = Vector1_DE1BF63A;
|
|
float _Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float;
|
|
Unity_Divide_float(_Distance_702b068f612c7289a99272879da274ed_Out_2_Float, _Property_f5c255b0f666358291012b78132d6593_Out_0_Float, _Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float);
|
|
float _Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float;
|
|
Unity_Absolute_float(_Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float, _Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float);
|
|
float _Float_96534b09fc72da8da7bad6ebdb2b01ab_Out_0_Float = float(1E-07);
|
|
float _Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float;
|
|
Unity_Maximum_float(_Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float, _Float_96534b09fc72da8da7bad6ebdb2b01ab_Out_0_Float, _Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float);
|
|
float _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float;
|
|
Unity_Divide_float(float(1), _Property_f5c255b0f666358291012b78132d6593_Out_0_Float, _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float);
|
|
float _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float;
|
|
Unity_Power_float(_Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float, _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float, _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float);
|
|
float _Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float;
|
|
Unity_Multiply_float_float(_WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float, _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float, _Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float);
|
|
float _Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float;
|
|
Unity_Cosine_float(_Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float, _Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float);
|
|
float3 _Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3, (_Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float.xxx), _Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3);
|
|
float3 _CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3;
|
|
Unity_CrossProduct_float(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3, _CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3);
|
|
float _Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float;
|
|
Unity_Sine_float(_Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float, _Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float);
|
|
float3 _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3, (_Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float.xxx), _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3);
|
|
float3 _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3;
|
|
Unity_Add_float3(_Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3, _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3, _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3);
|
|
float3 _Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3;
|
|
Unity_Add_float3(_Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3, _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3, _Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3);
|
|
float3 _Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3;
|
|
_Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3 = TransformWorldToObject(_Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3.xyz);
|
|
float3 _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean, _Property_2a4ab46b1d7c45918978aae50bd32b6f_Out_0_Vector3, _Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3, _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3);
|
|
float3 _Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3 = Vector3_DE8CC74D;
|
|
float _Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float;
|
|
Unity_Length_float3(_Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3, _Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float);
|
|
float _Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean;
|
|
Unity_Comparison_NotEqual_float(_Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float, float(0), _Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean);
|
|
float3 _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(IN.WorldSpaceNormal, _Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3, _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3);
|
|
float3 _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean, _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3, IN.WorldSpaceNormal, _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3);
|
|
vertex_1 = _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3;
|
|
normal_2 = _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3;
|
|
}
|
|
|
|
void Unity_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
|
|
{
|
|
Out = UV * Tiling + Offset;
|
|
}
|
|
|
|
void Unity_NormalStrength_float(float3 In, float Strength, out float3 Out)
|
|
{
|
|
Out = float3(In.rg * Strength, lerp(1, In.b, saturate(Strength)));
|
|
}
|
|
|
|
void Unity_Lerp_float3(float3 A, float3 B, float3 T, out float3 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Remap_float(float In, float2 InMinMax, float2 OutMinMax, out float Out)
|
|
{
|
|
Out = OutMinMax.x + (In - InMinMax.x) * (OutMinMax.y - OutMinMax.x) / (InMinMax.y - InMinMax.x);
|
|
}
|
|
|
|
// Graph Vertex
|
|
struct VertexDescription
|
|
{
|
|
float3 Position;
|
|
float3 Normal;
|
|
float3 Tangent;
|
|
};
|
|
|
|
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
|
|
{
|
|
VertexDescription description = (VertexDescription)0;
|
|
float3 _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3;
|
|
Unity_Add_float3(IN.ObjectSpacePosition, float3(1E-07, 1E-07, 1E-07), _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3);
|
|
float _Property_084857c303b23b82b7f2702b4186fa43_Out_0_Float = _Drag;
|
|
float _Property_35ad336ee9b278808178baf539e0133f_Out_0_Float = _HeightDrag;
|
|
float _Property_476e69b3f5653a8c995133f4fccaa757_Out_0_Float = _Stiffness;
|
|
float _Property_805aa6168fe3b08ca209d8ab0fa5d2d3_Out_0_Float = _InitialBend;
|
|
float4 _Property_8e47e7fd5c1a8b88b9cf212a6f62134c_Out_0_Vector4 = _NewNormal;
|
|
UnityTexture2D _Property_3b8cd110cb76a68d88342e4cc1336e0b_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(WIND_SETTINGS_TexNoise);
|
|
UnityTexture2D _Property_a939900eb077ee8593e638c7c457b53b_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(WIND_SETTINGS_TexGust);
|
|
float4 _Property_f59f8f9dc8757f8ab1c1d173e09c0787_Out_0_Vector4 = WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float _Property_89884359995fcf8a8d80bc0e19ce75f1_Out_0_Float = WIND_SETTINGS_FlexNoiseScale;
|
|
float _Property_c460088461241a819f81fd6ab2a8fc04_Out_0_Float = WIND_SETTINGS_Turbulence;
|
|
float _Property_0ef8268ed7d75386b8735f7baab81d22_Out_0_Float = WIND_SETTINGS_GustSpeed;
|
|
float _Property_9f4dae117e65b384a057e2e17ba36791_Out_0_Float = WIND_SETTINGS_GustScale;
|
|
float _Property_8c1472d718ff81889fbd5ee5e93e5291_Out_0_Float = WIND_SETTINGS_GustWorldScale;
|
|
float4x4 _Property_d28187fe6a414fa5b58ca9948c44abca_Out_0_Matrix4 = WIND_SETTINGS_Points;
|
|
float4 _Property_18d7723e0ed14f07992a44bbeb337673_Out_0_Vector4 = WIND_SETTINGS_Points_Radius;
|
|
Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8;
|
|
_WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8.WorldSpaceNormal = IN.WorldSpaceNormal;
|
|
_WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8.VertexColor = IN.VertexColor;
|
|
float3 _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3;
|
|
float3 _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_normal_2_Vector3;
|
|
SG_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float(IN.TimeParameters.x, _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3, _Property_084857c303b23b82b7f2702b4186fa43_Out_0_Float, _Property_35ad336ee9b278808178baf539e0133f_Out_0_Float, 0, _Property_476e69b3f5653a8c995133f4fccaa757_Out_0_Float, _Property_805aa6168fe3b08ca209d8ab0fa5d2d3_Out_0_Float, (_Property_8e47e7fd5c1a8b88b9cf212a6f62134c_Out_0_Vector4.xyz), _Property_3b8cd110cb76a68d88342e4cc1336e0b_Out_0_Texture2D, _Property_a939900eb077ee8593e638c7c457b53b_Out_0_Texture2D, _Property_f59f8f9dc8757f8ab1c1d173e09c0787_Out_0_Vector4, _Property_89884359995fcf8a8d80bc0e19ce75f1_Out_0_Float, _Property_c460088461241a819f81fd6ab2a8fc04_Out_0_Float, _Property_0ef8268ed7d75386b8735f7baab81d22_Out_0_Float, _Property_9f4dae117e65b384a057e2e17ba36791_Out_0_Float, _Property_8c1472d718ff81889fbd5ee5e93e5291_Out_0_Float, _Property_d28187fe6a414fa5b58ca9948c44abca_Out_0_Matrix4, _Property_18d7723e0ed14f07992a44bbeb337673_Out_0_Vector4, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_normal_2_Vector3);
|
|
description.Position = _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3;
|
|
description.Normal = IN.ObjectSpaceNormal;
|
|
description.Tangent = IN.ObjectSpaceTangent;
|
|
return description;
|
|
}
|
|
|
|
// Graph Pixel
|
|
struct SurfaceDescription
|
|
{
|
|
float Alpha;
|
|
float3 NormalTS;
|
|
float Smoothness;
|
|
};
|
|
|
|
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
|
{
|
|
SurfaceDescription surface = (SurfaceDescription)0;
|
|
UnityTexture2D _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkNormalMap);
|
|
float4 _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4 = _TrunkTilingOffset;
|
|
float _Split_60538633130155809820b3185c81057f_R_1_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[0];
|
|
float _Split_60538633130155809820b3185c81057f_G_2_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[1];
|
|
float _Split_60538633130155809820b3185c81057f_B_3_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[2];
|
|
float _Split_60538633130155809820b3185c81057f_A_4_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[3];
|
|
float2 _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_R_1_Float, _Split_60538633130155809820b3185c81057f_G_2_Float);
|
|
float2 _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_B_3_Float, _Split_60538633130155809820b3185c81057f_A_4_Float);
|
|
float2 _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2, _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2, _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2);
|
|
float4 _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4);
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_R_4_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_G_5_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_B_6_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_A_7_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.a;
|
|
float _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float = _TrunkNormalScale;
|
|
float3 _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.xyz), _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float, _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3);
|
|
UnityTexture2D _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkNormalMap);
|
|
float _Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean = _BarkUseUV3;
|
|
float4 _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4 = IN.uv3;
|
|
float4 _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4 = IN.uv0;
|
|
float4 _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4;
|
|
Unity_Branch_float4(_Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean, _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4, _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4, _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4);
|
|
float4 _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4 = _BarkTilingOffset;
|
|
float _Split_ee975774554f6480b33168eff36d8be7_R_1_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[0];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_G_2_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[1];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_B_3_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[2];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_A_4_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[3];
|
|
float2 _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_R_1_Float, _Split_ee975774554f6480b33168eff36d8be7_G_2_Float);
|
|
float2 _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_B_3_Float, _Split_ee975774554f6480b33168eff36d8be7_A_4_Float);
|
|
float2 _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float((_Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4.xy), _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2, _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2, _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2);
|
|
float4 _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4);
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_R_4_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_G_5_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_B_6_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_A_7_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.a;
|
|
float _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float = _BarkNormalScale;
|
|
float3 _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.xyz), _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3);
|
|
UnityTexture2D _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_LayerMask);
|
|
float4 _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4 = _BarkBlendMaskTilingOffset;
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[0];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[1];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[2];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[3];
|
|
float2 _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float);
|
|
float2 _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float);
|
|
float2 _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2, _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2, _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2);
|
|
float4 _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2) );
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_R_4_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_G_5_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_B_6_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.a;
|
|
float3 _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
Unity_Lerp_float3(_NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3);
|
|
UnityTexture2D _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkMaskMap);
|
|
float4 _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_B_6_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.a;
|
|
float _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float = _TrunkMetallic;
|
|
float _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float, _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float, _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float);
|
|
float _Property_8142f12b781ad08680220297dab56f14_Out_0_Float = _TrunkAORemapMin;
|
|
float _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float = _TrunkAORemapMax;
|
|
float2 _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2 = float2(_Property_8142f12b781ad08680220297dab56f14_Out_0_Float, _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float);
|
|
float _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float, float2 (0, 1), _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float);
|
|
float _Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float = _TrunkSmoothnessRemapMin;
|
|
float _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float = _TrunkSmoothnessRemapMax;
|
|
float2 _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2 = float2(_Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float, _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float);
|
|
float _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float, float2 (0, 1), _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
float3 _Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3 = float3(_Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
UnityTexture2D _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkMaskMap);
|
|
float4 _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_B_6_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.a;
|
|
float _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float = _BarkMetallic;
|
|
float _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float, _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float, _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float);
|
|
float _Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float = _BarkAORemapMin;
|
|
float _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float = _BarkAORemapMax;
|
|
float2 _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2 = float2(_Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float, _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float);
|
|
float _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float, float2 (0, 1), _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float);
|
|
float _Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float = _BarkSmoothnessRemapMin;
|
|
float _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float = _BarkSmoothnessRemapMax;
|
|
float2 _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2 = float2(_Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float, _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float);
|
|
float _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float, float2 (0, 1), _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3 = float3(_Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3;
|
|
Unity_Lerp_float3(_Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3, _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3);
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[0];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[1];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[2];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_A_4_Float = 0;
|
|
surface.Alpha = float(1);
|
|
surface.NormalTS = _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
surface.Smoothness = _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float;
|
|
return surface;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Graph Inputs
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#define VFX_SRP_ATTRIBUTES AttributesMesh
|
|
#define VaryingsMeshType VaryingsMeshToPS
|
|
#define VFX_SRP_VARYINGS VaryingsMeshType
|
|
#define VFX_SRP_SURFACE_INPUTS FragInputs
|
|
#endif
|
|
|
|
VertexDescriptionInputs AttributesMeshToVertexDescriptionInputs(AttributesMesh 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.VertexColor = input.color;
|
|
output.TimeParameters = _TimeParameters.xyz; // Note: in case of animation this will be overwrite (allow to handle motion vector)
|
|
#if UNITY_ANY_INSTANCING_ENABLED
|
|
#else
|
|
#endif
|
|
|
|
return output;
|
|
}
|
|
|
|
VertexDescription GetVertexDescription(AttributesMesh input, float3 timeParameters
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
// build graph inputs
|
|
VertexDescriptionInputs vertexDescriptionInputs = AttributesMeshToVertexDescriptionInputs(input);
|
|
// Override time parameters with used one (This is required to correctly handle motion vectors for vertex animation based on time)
|
|
vertexDescriptionInputs.TimeParameters = timeParameters;
|
|
|
|
// evaluate vertex graph
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
// Fetch the vertex graph properties for the particle instance.
|
|
GetElementVertexProperties(element, properties);
|
|
|
|
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs, properties);
|
|
#else
|
|
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs);
|
|
#endif
|
|
return vertexDescription;
|
|
|
|
}
|
|
|
|
AttributesMesh ApplyMeshModification(AttributesMesh input, float3 timeParameters
|
|
#ifdef USE_CUSTOMINTERP_SUBSTRUCT
|
|
#ifdef TESSELLATION_ON
|
|
, inout VaryingsMeshToDS varyings
|
|
#else
|
|
, inout VaryingsMeshToPS varyings
|
|
#endif
|
|
#endif
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
VertexDescription vertexDescription = GetVertexDescription(input, timeParameters
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, element
|
|
#endif
|
|
);
|
|
|
|
// copy graph output to the results
|
|
input.positionOS = vertexDescription.Position;
|
|
input.normalOS = vertexDescription.Normal;
|
|
input.tangentOS.xyz = vertexDescription.Tangent;
|
|
|
|
|
|
|
|
return input;
|
|
}
|
|
|
|
#if defined(_ADD_CUSTOM_VELOCITY) // For shader graph custom velocity
|
|
// Return precomputed Velocity in object space
|
|
float3 GetCustomVelocity(AttributesMesh input
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
VertexDescription vertexDescription = GetVertexDescription(input, _TimeParameters.xyz
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, element
|
|
#endif
|
|
);
|
|
return vertexDescription.CustomVelocity;
|
|
}
|
|
#endif
|
|
|
|
FragInputs BuildFragInputs(VaryingsMeshToPS input)
|
|
{
|
|
FragInputs output;
|
|
ZERO_INITIALIZE(FragInputs, output);
|
|
|
|
// Init to some default value to make the computer quiet (else it output 'divide by zero' warning even if value is not used).
|
|
// TODO: this is a really poor workaround, but the variable is used in a bunch of places
|
|
// to compute normals which are then passed on elsewhere to compute other values...
|
|
output.tangentToWorld = k_identity3x3;
|
|
output.positionSS = input.positionCS; // input.positionCS is SV_Position
|
|
|
|
output.tangentToWorld = BuildTangentToWorld(input.tangentWS, input.normalWS);
|
|
output.texCoord0 = input.texCoord0;
|
|
output.texCoord3 = input.texCoord3;
|
|
|
|
#if UNITY_ANY_INSTANCING_ENABLED
|
|
#else
|
|
#endif
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
// FragInputs from VFX come from two places: Interpolator or CBuffer.
|
|
#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
|
|
|
|
// splice point to copy custom interpolator fields from varyings to frag inputs
|
|
|
|
|
|
return output;
|
|
}
|
|
|
|
// existing HDRP code uses the combined function to go directly from packed to frag inputs
|
|
FragInputs UnpackVaryingsMeshToFragInputs(PackedVaryingsMeshToPS input)
|
|
{
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
#if defined(HAVE_VFX_MODIFICATION) && defined(UNITY_INSTANCING_ENABLED)
|
|
unity_InstanceID = input.instanceID;
|
|
#endif
|
|
VaryingsMeshToPS unpacked = UnpackVaryingsMeshToPS(input);
|
|
return BuildFragInputs(unpacked);
|
|
}
|
|
SurfaceDescriptionInputs FragInputsToSurfaceDescriptionInputs(FragInputs input, float3 viewWS)
|
|
{
|
|
SurfaceDescriptionInputs output;
|
|
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
|
|
|
#if defined(SHADER_STAGE_RAY_TRACING)
|
|
#else
|
|
#endif
|
|
output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
|
|
|
|
#if UNITY_UV_STARTS_AT_TOP
|
|
#else
|
|
#endif
|
|
|
|
|
|
output.uv0 = input.texCoord0;
|
|
output.uv3 = input.texCoord3;
|
|
|
|
// splice point to copy frag inputs custom interpolator pack into the SDI
|
|
|
|
|
|
return output;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Surface Data (Specific Material)
|
|
|
|
void ApplyDecalToSurfaceDataNoNormal(DecalSurfaceData decalSurfaceData, inout SurfaceData surfaceData);
|
|
|
|
void ApplyDecalAndGetNormal(FragInputs fragInputs, PositionInputs posInput, SurfaceDescription surfaceDescription,
|
|
inout SurfaceData surfaceData)
|
|
{
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
#ifdef DECAL_NORMAL_BLENDING
|
|
// SG nodes don't ouptut surface gradients, so if decals require surf grad blending, we have to convert
|
|
// the normal to gradient before applying the decal. We then have to resolve the gradient back to world space
|
|
float3 normalTS;
|
|
|
|
normalTS = SurfaceGradientFromTangentSpaceNormalAndFromTBN(surfaceDescription.NormalTS,
|
|
fragInputs.tangentToWorld[0], fragInputs.tangentToWorld[1]);
|
|
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, fragInputs.tangentToWorld[2], normalTS);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
|
|
GetNormalWS_SG(fragInputs, normalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
#else
|
|
// normal delivered to master node
|
|
GetNormalWS(fragInputs, surfaceDescription.NormalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Both uses and modifies 'surfaceData.normalWS'.
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, surfaceData.normalWS.xyz);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
#endif
|
|
}
|
|
void BuildSurfaceData(FragInputs fragInputs, inout SurfaceDescription surfaceDescription, float3 V, PositionInputs posInput, out SurfaceData surfaceData, out float3 bentNormalWS)
|
|
{
|
|
ZERO_INITIALIZE(SurfaceData, surfaceData);
|
|
|
|
// specularOcclusion need to be init ahead of decal to quiet the compiler that modify the SurfaceData struct
|
|
// however specularOcclusion can come from the graph, so need to be init here so it can be override.
|
|
surfaceData.specularOcclusion = 1.0;
|
|
surfaceData.thickness = 0.0;
|
|
|
|
surfaceData.perceptualSmoothness = surfaceDescription.Smoothness;
|
|
|
|
#if defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE) || defined(_REFRACTION_THIN)
|
|
if (_EnableSSRefraction)
|
|
{
|
|
|
|
surfaceData.transmittanceMask = (1.0 - surfaceDescription.Alpha);
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
else
|
|
{
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
#else
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
#endif
|
|
|
|
// These static material feature allow compile time optimization
|
|
surfaceData.materialFeatures = MATERIALFEATUREFLAGS_LIT_STANDARD;
|
|
#ifdef _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SUBSURFACE_SCATTERING;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_COLORED_TRANSMISSION;
|
|
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_ANISOTROPY
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_ANISOTROPY;
|
|
|
|
// Initialize the normal to something non-zero to avoid a div-zero warning for anisotropy.
|
|
surfaceData.normalWS = float3(0, 1, 0);
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_IRIDESCENCE
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_IRIDESCENCE;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SPECULAR_COLOR;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_CLEAR_COAT
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_CLEAR_COAT;
|
|
#endif
|
|
|
|
#if defined (_MATERIAL_FEATURE_SPECULAR_COLOR) && defined (_ENERGY_CONSERVING_SPECULAR)
|
|
// Require to have setup baseColor
|
|
// Reproduce the energy conservation done in legacy Unity. Not ideal but better for compatibility and users can unchek it
|
|
surfaceData.baseColor *= (1.0 - Max3(surfaceData.specularColor.r, surfaceData.specularColor.g, surfaceData.specularColor.b));
|
|
#endif
|
|
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
ApplyDecalAndGetNormal(fragInputs, posInput, surfaceDescription, surfaceData);
|
|
|
|
surfaceData.geomNormalWS = fragInputs.tangentToWorld[2];
|
|
|
|
surfaceData.tangentWS = normalize(fragInputs.tangentToWorld[0].xyz); // The tangent is not normalize in tangentToWorld for mikkt. TODO: Check if it expected that we normalize with Morten. Tag: SURFACE_GRADIENT
|
|
|
|
|
|
bentNormalWS = surfaceData.normalWS;
|
|
|
|
surfaceData.tangentWS = Orthonormalize(surfaceData.tangentWS, surfaceData.normalWS);
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
// Mipmap mode debugging isn't supported with ray tracing as it relies on derivatives
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD0
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG(posInput.positionSS, fragInputs.texCoord0);
|
|
#else
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG_NO_UV(posInput.positionSS);
|
|
#endif
|
|
surfaceData.metallic = 0;
|
|
}
|
|
#endif
|
|
|
|
// We need to call ApplyDebugToSurfaceData after filling the surfaceData and before filling builtinData
|
|
// as it can modify attribute use for static lighting
|
|
ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData);
|
|
#endif
|
|
|
|
// By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion.
|
|
// If user provide bent normal then we process a better term
|
|
#if defined(_SPECULAR_OCCLUSION_CUSTOM)
|
|
// Just use the value passed through via the slot (not active otherwise)
|
|
#elif defined(_SPECULAR_OCCLUSION_FROM_AO_BENT_NORMAL)
|
|
// If we have bent normal and ambient occlusion, process a specular occlusion
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromBentAO(V, bentNormalWS, surfaceData.normalWS, surfaceData.ambientOcclusion, PerceptualSmoothnessToPerceptualRoughness(surfaceData.perceptualSmoothness));
|
|
#elif defined(_AMBIENT_OCCLUSION) && defined(_SPECULAR_OCCLUSION_FROM_AO)
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness));
|
|
#endif
|
|
|
|
#if defined(_ENABLE_GEOMETRIC_SPECULAR_AA) && !defined(SHADER_STAGE_RAY_TRACING)
|
|
surfaceData.perceptualSmoothness = GeometricNormalFiltering(surfaceData.perceptualSmoothness, fragInputs.tangentToWorld[2], surfaceDescription.SpecularAAScreenSpaceVariance, surfaceDescription.SpecularAAThreshold);
|
|
#endif
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Get Surface And BuiltinData
|
|
|
|
void GetSurfaceAndBuiltinData(FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData RAY_TRACING_OPTIONAL_PARAMETERS)
|
|
{
|
|
// Don't dither if displaced tessellation (we're fading out the displacement instead to match the next LOD)
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && !defined(_TESSELLATION_DISPLACEMENT)
|
|
#ifdef LOD_FADE_CROSSFADE // enable dithering LOD transition if user select CrossFade transition in LOD group
|
|
LODDitheringTransition(ComputeFadeMaskSeed(V, posInput.positionSS), unity_LODFade.x);
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
#ifdef _DOUBLESIDED_ON
|
|
float3 doubleSidedConstants = _DoubleSidedConstants.xyz;
|
|
#else
|
|
float3 doubleSidedConstants = float3(1.0, 1.0, 1.0);
|
|
#endif
|
|
|
|
ApplyDoubleSidedFlipOrMirror(fragInputs, doubleSidedConstants); // Apply double sided flip on the vertex normal
|
|
#endif // SHADER_UNLIT
|
|
|
|
SurfaceDescriptionInputs surfaceDescriptionInputs = FragInputsToSurfaceDescriptionInputs(fragInputs, V);
|
|
|
|
#if defined(HAVE_VFX_MODIFICATION)
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
GetElementPixelProperties(fragInputs, properties);
|
|
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs, properties);
|
|
#else
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs);
|
|
#endif
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
surfaceDescription.Alpha = 1.0f;
|
|
}
|
|
#endif
|
|
|
|
// Perform alpha test very early to save performance (a killed pixel will not sample textures)
|
|
// TODO: split graph evaluation to grab just alpha dependencies first? tricky..
|
|
#ifdef _ALPHATEST_ON
|
|
float alphaCutoff = surfaceDescription.AlphaClipThreshold;
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
// The TransparentDepthPrepass is also used with SSR transparent.
|
|
// If an artists enable transaprent SSR but not the TransparentDepthPrepass itself, then we use AlphaClipThreshold
|
|
// otherwise if TransparentDepthPrepass is enabled we use AlphaClipThresholdDepthPrepass
|
|
#elif SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_POSTPASS
|
|
// DepthPostpass always use its own alpha threshold
|
|
alphaCutoff = surfaceDescription.AlphaClipThresholdDepthPostpass;
|
|
#elif (SHADERPASS == SHADERPASS_SHADOWS) || (SHADERPASS == SHADERPASS_RAYTRACING_VISIBILITY)
|
|
// If use shadow threshold isn't enable we don't allow any test
|
|
#endif
|
|
|
|
GENERIC_ALPHA_TEST(surfaceDescription.Alpha, alphaCutoff);
|
|
#endif
|
|
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && _DEPTHOFFSET_ON
|
|
ApplyDepthOffsetPositionInput(V, surfaceDescription.DepthOffset, GetViewForwardDir(), GetWorldToHClipMatrix(), posInput);
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
float3 bentNormalWS;
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData, bentNormalWS);
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD1
|
|
float4 lightmapTexCoord1 = fragInputs.texCoord1;
|
|
#else
|
|
float4 lightmapTexCoord1 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD2
|
|
float4 lightmapTexCoord2 = fragInputs.texCoord2;
|
|
#else
|
|
float4 lightmapTexCoord2 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Builtin Data
|
|
// For back lighting we use the oposite vertex normal
|
|
InitBuiltinData(posInput, alpha, bentNormalWS, -fragInputs.tangentToWorld[2], lightmapTexCoord1, lightmapTexCoord2, builtinData);
|
|
|
|
#else
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData);
|
|
|
|
ZERO_BUILTIN_INITIALIZE(builtinData); // No call to InitBuiltinData as we don't have any lighting
|
|
builtinData.opacity = surfaceDescription.Alpha;
|
|
|
|
#if defined(DEBUG_DISPLAY)
|
|
// Light Layers are currently not used for the Unlit shader (because it is not lit)
|
|
// But Unlit objects do cast shadows according to their rendering layer mask, which is what we want to
|
|
// display in the light layers visualization mode, therefore we need the renderingLayers
|
|
builtinData.renderingLayers = GetMeshRenderingLayerMask();
|
|
#endif
|
|
|
|
#endif // SHADER_UNLIT
|
|
|
|
#ifdef _ALPHATEST_ON
|
|
// Used for sharpening by alpha to mask - Alpha to covertage is only used with depth only and forward pass (no shadow pass, no transparent pass)
|
|
builtinData.alphaClipTreshold = alphaCutoff;
|
|
#endif
|
|
|
|
// override sampleBakedGI - not used by Unlit
|
|
// When overriding GI, we need to force the isLightmap flag to make sure we don't add APV (sampled in the lightloop) on top of the overridden value (set at GBuffer stage)
|
|
|
|
|
|
// Note this will not fully work on transparent surfaces (can check with _SURFACE_TYPE_TRANSPARENT define)
|
|
// We will always overwrite vt feeback with the nearest. So behind transparent surfaces vt will not be resolved
|
|
// This is a limitation of the current MRT approach.
|
|
#ifdef UNITY_VIRTUAL_TEXTURING
|
|
#endif
|
|
|
|
#if _DEPTHOFFSET_ON
|
|
builtinData.depthOffset = surfaceDescription.DepthOffset;
|
|
#endif
|
|
|
|
// TODO: We should generate distortion / distortionBlur for non distortion pass
|
|
#if (SHADERPASS == SHADERPASS_DISTORTION)
|
|
builtinData.distortion = surfaceDescription.Distortion;
|
|
builtinData.distortionBlur = surfaceDescription.DistortionBlur;
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// PostInitBuiltinData call ApplyDebugToBuiltinData
|
|
PostInitBuiltinData(V, posInput, surfaceData, builtinData);
|
|
#else
|
|
ApplyDebugToBuiltinData(builtinData);
|
|
#endif
|
|
|
|
RAY_TRACING_OPTIONAL_ALPHA_TEST_PASS
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Main
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDepthOnly.hlsl"
|
|
|
|
// --------------------------------------------------
|
|
// Visual Effect Vertex Invocations
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/VisualEffectVertex.hlsl"
|
|
#else
|
|
#endif
|
|
#endif
|
|
|
|
ENDHLSL
|
|
}
|
|
Pass
|
|
{
|
|
Name "FullScreenDebug"
|
|
Tags
|
|
{
|
|
"LightMode" = "FullScreenDebug"
|
|
}
|
|
|
|
// Render State
|
|
Cull [_CullMode]
|
|
ZTest LEqual
|
|
ZWrite Off
|
|
|
|
// Debug
|
|
// <None>
|
|
|
|
// --------------------------------------------------
|
|
// Pass
|
|
|
|
HLSLPROGRAM
|
|
|
|
// Pragmas
|
|
#pragma multi_compile _ DOTS_INSTANCING_ON
|
|
#pragma instancing_options renderinglayer
|
|
#pragma target 4.5
|
|
#pragma vertex Vert
|
|
#pragma fragment Frag
|
|
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
|
|
#pragma multi_compile_instancing
|
|
|
|
// Keywords
|
|
#pragma shader_feature _ _SURFACE_TYPE_TRANSPARENT
|
|
#pragma shader_feature_local _ _DOUBLESIDED_ON
|
|
#pragma shader_feature_local _ _ADD_PRECOMPUTED_VELOCITY
|
|
#pragma shader_feature_local _ _TRANSPARENT_WRITES_MOTION_VEC _TRANSPARENT_REFRACTIVE_SORT
|
|
#pragma shader_feature_local_fragment _ _ENABLE_FOG_ON_TRANSPARENT
|
|
#pragma multi_compile _ LOD_FADE_CROSSFADE
|
|
#pragma shader_feature_local_fragment _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local _ _REFRACTION_PLANE _REFRACTION_SPHERE _REFRACTION_THIN
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// GraphKeywords: <None>
|
|
|
|
// Defines
|
|
#define SHADERPASS SHADERPASS_FULL_SCREEN_DEBUG
|
|
#define RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
|
|
// For custom interpolators to inject a substruct definition before FragInputs definition,
|
|
// allowing for FragInputs to capture CI's intended for ShaderGraph's SDI.
|
|
struct CustomInterpolators
|
|
{
|
|
};
|
|
#define USE_CUSTOMINTERP_SUBSTRUCT
|
|
|
|
|
|
|
|
// TODO: Merge FragInputsVFX substruct with CustomInterpolators.
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
struct FragInputsVFX
|
|
{
|
|
/* WARNING: $splice Could not find named fragment 'FragInputsVFX' */
|
|
};
|
|
#endif
|
|
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/GeometricTools.hlsl" // Required by Tessellation.hlsl
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Tessellation.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" // Required to be include before we include properties as it define DECLARE_STACK_CB
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl" // Required before including properties as it defines UNITY_TEXTURE_STREAMING_DEBUG_VARS
|
|
// Always include Shader Graph version
|
|
// Always include last to avoid double macros
|
|
#include "Packages/com.unity.shadergraph/ShaderGraphLibrary/Functions.hlsl" // Need to be here for Gradient struct definition
|
|
|
|
// --------------------------------------------------
|
|
// Defines
|
|
|
|
// Attribute
|
|
#define ATTRIBUTES_NEED_NORMAL
|
|
#define ATTRIBUTES_NEED_TANGENT
|
|
#define ATTRIBUTES_NEED_TEXCOORD0
|
|
#define ATTRIBUTES_NEED_TEXCOORD3
|
|
#define ATTRIBUTES_NEED_COLOR
|
|
#define VARYINGS_NEED_TEXCOORD0
|
|
#define VARYINGS_NEED_TEXCOORD3
|
|
|
|
#define HAVE_MESH_MODIFICATION
|
|
|
|
//Strip down the FragInputs.hlsl (on graphics), so we can only optimize the interpolators we use.
|
|
//if by accident something requests contents of FragInputs.hlsl, it will be caught as a compiler error
|
|
//Frag inputs stripping is only enabled when FRAG_INPUTS_ENABLE_STRIPPING is set
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && SHADERPASS != SHADERPASS_RAYTRACING_GBUFFER && SHADERPASS != SHADERPASS_FULL_SCREEN_DEBUG
|
|
#define FRAG_INPUTS_ENABLE_STRIPPING
|
|
#endif
|
|
#define FRAG_INPUTS_USE_TEXCOORD0
|
|
#define FRAG_INPUTS_USE_TEXCOORD3
|
|
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl"
|
|
|
|
|
|
|
|
|
|
// Following two define are a workaround introduce in 10.1.x for RaytracingQualityNode
|
|
// The ShaderGraph don't support correctly migration of this node as it serialize all the node data
|
|
// in the json file making it impossible to uprgrade. Until we get a fix, we do a workaround here
|
|
// to still allow us to rename the field and keyword of this node without breaking existing code.
|
|
#ifdef RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define RAYTRACING_SHADER_GRAPH_HIGH
|
|
#endif
|
|
|
|
#ifdef RAYTRACING_SHADER_GRAPH_RAYTRACED
|
|
#define RAYTRACING_SHADER_GRAPH_LOW
|
|
#endif
|
|
// end
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// We need isFrontFace when using double sided - it is not required for unlit as in case of unlit double sided only drive the cullmode
|
|
// VARYINGS_NEED_CULLFACE can be define by VaryingsMeshToPS.FaceSign input if a IsFrontFace Node is included in the shader graph.
|
|
#if defined(_DOUBLESIDED_ON) && !defined(VARYINGS_NEED_CULLFACE)
|
|
#define VARYINGS_NEED_CULLFACE
|
|
#endif
|
|
#endif
|
|
|
|
// Specific Material Define
|
|
#define _AMBIENT_OCCLUSION 1
|
|
#define _SPECULAR_OCCLUSION_FROM_AO 1
|
|
#define _ENERGY_CONSERVING_SPECULAR 1
|
|
|
|
#if _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// Colored Transmission doesn't support clear coat
|
|
#undef _MATERIAL_FEATURE_CLEAR_COAT
|
|
#endif
|
|
|
|
// If we use subsurface scattering, enable output split lighting (for forward pass)
|
|
#if defined(_MATERIAL_FEATURE_SUBSURFACE_SCATTERING) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define OUTPUT_SPLIT_LIGHTING
|
|
#endif
|
|
|
|
// This shader support recursive rendering for raytracing
|
|
#define HAVE_RECURSIVE_RENDERING
|
|
|
|
// In Path Tracing, For all single-sided, refractive materials, we want to force a thin refraction model
|
|
#if (SHADERPASS == SHADERPASS_PATH_TRACING) && !defined(_DOUBLESIDED_ON) && (defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE))
|
|
#undef _REFRACTION_PLANE
|
|
#undef _REFRACTION_SPHERE
|
|
#define _REFRACTION_THIN
|
|
#endif
|
|
// Caution: we can use the define SHADER_UNLIT onlit after the above Material include as it is the Unlit template who define it
|
|
|
|
// To handle SSR on transparent correctly with a possibility to enable/disable it per framesettings
|
|
// we should have a code like this:
|
|
// if !defined(_DISABLE_SSR_TRANSPARENT)
|
|
// pragma multi_compile _ WRITE_NORMAL_BUFFER
|
|
// endif
|
|
// i.e we enable the multicompile only if we can receive SSR or not, and then C# code drive
|
|
// it based on if SSR transparent in frame settings and not (and stripper can strip it).
|
|
// this is currently not possible with our current preprocessor as _DISABLE_SSR_TRANSPARENT is a keyword not a define
|
|
// so instead we used this and chose to pay the extra cost of normal write even if SSR transaprent is disabled.
|
|
// Ideally the shader graph generator should handle it but condition below can't be handle correctly for now.
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
#if !defined(_DISABLE_SSR_TRANSPARENT) && !defined(SHADER_UNLIT)
|
|
#define WRITE_NORMAL_BUFFER
|
|
#endif
|
|
#endif
|
|
|
|
// See Lit.shader
|
|
#if SHADERPASS == SHADERPASS_MOTION_VECTORS && defined(WRITE_DECAL_BUFFER_AND_RENDERING_LAYER)
|
|
#define WRITE_DECAL_BUFFER
|
|
#endif
|
|
|
|
#ifndef DEBUG_DISPLAY
|
|
// In case of opaque we don't want to perform the alpha test, it is done in depth prepass and we use depth equal for ztest (setup from UI)
|
|
// Don't do it with debug display mode as it is possible there is no depth prepass in this case
|
|
#if !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#if SHADERPASS == SHADERPASS_FORWARD
|
|
#define SHADERPASS_FORWARD_BYPASS_ALPHA_TEST
|
|
#elif SHADERPASS == SHADERPASS_GBUFFER
|
|
#define SHADERPASS_GBUFFER_BYPASS_ALPHA_TEST
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
// Define _DEFERRED_CAPABLE_MATERIAL for shader capable to run in deferred pass
|
|
#if defined(SHADER_LIT) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _DEFERRED_CAPABLE_MATERIAL
|
|
#endif
|
|
|
|
// Translate transparent motion vector define
|
|
#if (defined(_TRANSPARENT_WRITES_MOTION_VEC) || defined(_TRANSPARENT_REFRACTIVE_SORT)) && defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _WRITE_TRANSPARENT_MOTION_VECTOR
|
|
#endif
|
|
|
|
// -- Graph Properties
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _TrunkBaseColor;
|
|
float4 _TrunkBaseColorMap_TexelSize;
|
|
float4 _TrunkTilingOffset;
|
|
float4 _TrunkNormalMap_TexelSize;
|
|
float _TrunkNormalScale;
|
|
float4 _TrunkMaskMap_TexelSize;
|
|
float _TrunkMetallic;
|
|
float _TrunkAORemapMin;
|
|
float _TrunkAORemapMax;
|
|
float _TrunkSmoothnessRemapMin;
|
|
float _TrunkSmoothnessRemapMax;
|
|
float4 _LayerMask_TexelSize;
|
|
float4 _BarkBlendMaskTilingOffset;
|
|
float4 _BarkBaseColor;
|
|
float4 _BarkBaseColorMap_TexelSize;
|
|
float _BarkUseUV3;
|
|
float4 _BarkTilingOffset;
|
|
float4 _BarkNormalMap_TexelSize;
|
|
float _BarkNormalScale;
|
|
float4 _BarkMaskMap_TexelSize;
|
|
float _BarkMetallic;
|
|
float _BarkSmoothnessRemapMin;
|
|
float _BarkSmoothnessRemapMax;
|
|
float _BarkAORemapMin;
|
|
float _BarkAORemapMax;
|
|
float _Stiffness;
|
|
float _InitialBend;
|
|
float _Drag;
|
|
float _HeightDrag;
|
|
float4 _NewNormal;
|
|
float4 _EmissionColor;
|
|
float _UseShadowThreshold;
|
|
float4 _DoubleSidedConstants;
|
|
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
|
float _BlendMode;
|
|
float _EnableBlendModePreserveSpecularLighting;
|
|
float _RayTracing;
|
|
float _RefractionModel;
|
|
float _MaterialID;
|
|
float _MaterialTypeMask;
|
|
CBUFFER_END
|
|
|
|
|
|
// Object and Global properties
|
|
SAMPLER(SamplerState_Linear_Repeat);
|
|
SAMPLER(SamplerState_Linear_Repeat_Aniso8);
|
|
TEXTURE2D(_TrunkBaseColorMap);
|
|
SAMPLER(sampler_TrunkBaseColorMap);
|
|
TEXTURE2D(_TrunkNormalMap);
|
|
SAMPLER(sampler_TrunkNormalMap);
|
|
TEXTURE2D(_TrunkMaskMap);
|
|
SAMPLER(sampler_TrunkMaskMap);
|
|
TEXTURE2D(_LayerMask);
|
|
SAMPLER(sampler_LayerMask);
|
|
TEXTURE2D(_BarkBaseColorMap);
|
|
SAMPLER(sampler_BarkBaseColorMap);
|
|
TEXTURE2D(_BarkNormalMap);
|
|
SAMPLER(sampler_BarkNormalMap);
|
|
TEXTURE2D(_BarkMaskMap);
|
|
SAMPLER(sampler_BarkMaskMap);
|
|
TEXTURE2D(WIND_SETTINGS_TexNoise);
|
|
SAMPLER(samplerWIND_SETTINGS_TexNoise);
|
|
float4 WIND_SETTINGS_TexNoise_TexelSize;
|
|
TEXTURE2D(WIND_SETTINGS_TexGust);
|
|
SAMPLER(samplerWIND_SETTINGS_TexGust);
|
|
float4 WIND_SETTINGS_TexGust_TexelSize;
|
|
float4 WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float WIND_SETTINGS_FlexNoiseScale;
|
|
float WIND_SETTINGS_ShiverNoiseScale;
|
|
float WIND_SETTINGS_Turbulence;
|
|
float WIND_SETTINGS_GustSpeed;
|
|
float WIND_SETTINGS_GustScale;
|
|
float WIND_SETTINGS_GustWorldScale;
|
|
float4x4 WIND_SETTINGS_Points;
|
|
float4 WIND_SETTINGS_Points_Radius;
|
|
|
|
// -- Property used by ScenePickingPass
|
|
#ifdef SCENEPICKINGPASS
|
|
float4 _SelectionID;
|
|
#endif
|
|
|
|
// -- Properties used by SceneSelectionPass
|
|
#ifdef SCENESELECTIONPASS
|
|
int _ObjectId;
|
|
int _PassValue;
|
|
#endif
|
|
|
|
// Includes
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/NormalSurfaceGradient.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
// GraphIncludes: <None>
|
|
|
|
// --------------------------------------------------
|
|
// Structs and Packing
|
|
|
|
struct AttributesMesh
|
|
{
|
|
float3 positionOS : POSITION;
|
|
float3 normalOS : NORMAL;
|
|
float4 tangentOS : TANGENT;
|
|
float4 uv0 : TEXCOORD0;
|
|
float4 uv3 : TEXCOORD3;
|
|
float4 color : COLOR;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(ATTRIBUTES_NEED_INSTANCEID)
|
|
uint instanceID : INSTANCEID_SEMANTIC;
|
|
#endif
|
|
};
|
|
struct VaryingsMeshToPS
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
float4 texCoord0;
|
|
float4 texCoord3;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
uint instanceID : CUSTOM_INSTANCE_ID;
|
|
#endif
|
|
};
|
|
struct VertexDescriptionInputs
|
|
{
|
|
float3 ObjectSpaceNormal;
|
|
float3 WorldSpaceNormal;
|
|
float3 ObjectSpaceTangent;
|
|
float3 ObjectSpacePosition;
|
|
float4 VertexColor;
|
|
float3 TimeParameters;
|
|
};
|
|
struct SurfaceDescriptionInputs
|
|
{
|
|
float3 TangentSpaceNormal;
|
|
float4 uv0;
|
|
float4 uv3;
|
|
};
|
|
struct PackedVaryingsMeshToPS
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
float4 texCoord0 : INTERP0;
|
|
float4 texCoord3 : INTERP1;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
uint instanceID : CUSTOM_INSTANCE_ID;
|
|
#endif
|
|
};
|
|
|
|
PackedVaryingsMeshToPS PackVaryingsMeshToPS (VaryingsMeshToPS input)
|
|
{
|
|
PackedVaryingsMeshToPS output;
|
|
ZERO_INITIALIZE(PackedVaryingsMeshToPS, output);
|
|
output.positionCS = input.positionCS;
|
|
output.texCoord0.xyzw = input.texCoord0;
|
|
output.texCoord3.xyzw = input.texCoord3;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
output.instanceID = input.instanceID;
|
|
#endif
|
|
return output;
|
|
}
|
|
|
|
VaryingsMeshToPS UnpackVaryingsMeshToPS (PackedVaryingsMeshToPS input)
|
|
{
|
|
VaryingsMeshToPS output;
|
|
output.positionCS = input.positionCS;
|
|
output.texCoord0 = input.texCoord0.xyzw;
|
|
output.texCoord3 = input.texCoord3.xyzw;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
output.instanceID = input.instanceID;
|
|
#endif
|
|
return output;
|
|
}
|
|
|
|
|
|
// --------------------------------------------------
|
|
// Graph
|
|
|
|
|
|
// Graph Functions
|
|
|
|
void Unity_Add_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
void Unity_Distance_float3(float3 A, float3 B, out float Out)
|
|
{
|
|
Out = distance(A, B);
|
|
}
|
|
|
|
void Unity_Comparison_Less_float(float A, float B, out float Out)
|
|
{
|
|
Out = A < B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_Comparison_Greater_float(float A, float B, out float Out)
|
|
{
|
|
Out = A > B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_Subtract_float(float A, float B, out float Out)
|
|
{
|
|
Out = A - B;
|
|
}
|
|
|
|
void Unity_And_float(float A, float B, out float Out)
|
|
{
|
|
Out = A && B;
|
|
}
|
|
|
|
void Unity_Branch_float(float Predicate, float True, float False, out float Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Multiply_float_float(float A, float B, out float Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Length_float4(float4 In, out float Out)
|
|
{
|
|
Out = length(In);
|
|
}
|
|
|
|
void Unity_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Subtract_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A - B;
|
|
}
|
|
|
|
void Unity_Normalize_float3(float3 In, out float3 Out)
|
|
{
|
|
Out = normalize(In);
|
|
}
|
|
|
|
void Unity_Length_float3(float3 In, out float Out)
|
|
{
|
|
Out = length(In);
|
|
}
|
|
|
|
void Unity_Divide_float(float A, float B, out float Out)
|
|
{
|
|
Out = A / B;
|
|
}
|
|
|
|
void Unity_Clamp_float(float In, float Min, float Max, out float Out)
|
|
{
|
|
Out = clamp(In, Min, Max);
|
|
}
|
|
|
|
void Unity_Lerp_float(float A, float B, float T, out float Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Multiply_float3_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Combine_float(float R, float G, float B, float A, out float4 RGBA, out float3 RGB, out float2 RG)
|
|
{
|
|
RGBA = float4(R, G, B, A);
|
|
RGB = float3(R, G, B);
|
|
RG = float2(R, G);
|
|
}
|
|
|
|
void Unity_Add_float4(float4 A, float4 B, out float4 Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
struct Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float
|
|
{
|
|
};
|
|
|
|
void SG_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float(float4x4 Matrix4_cb72bb33b7a84dfda97778a514f9b60f, float3 Vector3_90379ebf40aa468b8362f8d265f4f234, float4 Vector4_159bb4232f82428893101734a03e2a1e, Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float IN, out float4 WindPoint_1)
|
|
{
|
|
float3 _Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3 = Vector3_90379ebf40aa468b8362f8d265f4f234;
|
|
float4x4 _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4 = Matrix4_cb72bb33b7a84dfda97778a514f9b60f;
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].r);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].g);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].b);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].a);
|
|
float3 _Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4.xyz), _Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3);
|
|
float3 _Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3, _Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3);
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[0];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[1];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[2];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[3];
|
|
float _Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3, _Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float);
|
|
float4 _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4 = Vector4_159bb4232f82428893101734a03e2a1e;
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_R_1_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[0];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_G_2_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[1];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_B_3_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[2];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_A_4_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[3];
|
|
float _Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float;
|
|
Unity_Divide_float(_Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_R_1_Float, _Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float);
|
|
float _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float, float(0), float(1), _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float);
|
|
float _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float;
|
|
Unity_Lerp_float(_Split_d6e088f9ab90466583adc22ea79eb8cc_A_4_Float, float(0), _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float, _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float);
|
|
float3 _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3, (_Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float.xxx), _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3);
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_R_1_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[0];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_G_2_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[1];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_B_3_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[2];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_A_4_Float = 0;
|
|
float4 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4;
|
|
float3 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGB_5_Vector3;
|
|
float2 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_ef99a48850fe4f8f8e30e870c5e2ee09_R_1_Float, _Split_ef99a48850fe4f8f8e30e870c5e2ee09_G_2_Float, _Split_ef99a48850fe4f8f8e30e870c5e2ee09_B_3_Float, _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGB_5_Vector3, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RG_6_Vector2);
|
|
float3 _Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4.xyz), _Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3);
|
|
float3 _Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3, _Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3);
|
|
float _Split_8bbd5052350846968bf312362efd9f01_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[0];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[1];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[2];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[3];
|
|
float _Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3, _Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float);
|
|
float _Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float;
|
|
Unity_Divide_float(_Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_G_2_Float, _Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float);
|
|
float _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float, float(0), float(1), _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float);
|
|
float _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float;
|
|
Unity_Lerp_float(_Split_8bbd5052350846968bf312362efd9f01_A_4_Float, float(0), _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float, _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float);
|
|
float3 _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3, (_Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float.xxx), _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3);
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_R_1_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[0];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_G_2_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[1];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_B_3_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[2];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_A_4_Float = 0;
|
|
float4 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4;
|
|
float3 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGB_5_Vector3;
|
|
float2 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_ab8841795f594d3a90b87ac9fcc98d38_R_1_Float, _Split_ab8841795f594d3a90b87ac9fcc98d38_G_2_Float, _Split_ab8841795f594d3a90b87ac9fcc98d38_B_3_Float, _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGB_5_Vector3, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RG_6_Vector2);
|
|
float4 _Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4;
|
|
Unity_Add_float4(_Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4, _Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4);
|
|
float3 _Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4.xyz), _Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3);
|
|
float3 _Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3, _Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3);
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[0];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[1];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[2];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[3];
|
|
float _Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3, _Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float);
|
|
float _Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float;
|
|
Unity_Divide_float(_Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_B_3_Float, _Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float);
|
|
float _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float, float(0), float(1), _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float);
|
|
float _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float;
|
|
Unity_Lerp_float(_Split_fa21a8022f944854903e06c07c6f079c_A_4_Float, float(0), _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float, _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float);
|
|
float3 _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3, (_Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float.xxx), _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3);
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_R_1_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[0];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_G_2_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[1];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_B_3_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[2];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_A_4_Float = 0;
|
|
float4 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4;
|
|
float3 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGB_5_Vector3;
|
|
float2 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_6b9b5ad9f14a49b9bc49c718430617a8_R_1_Float, _Split_6b9b5ad9f14a49b9bc49c718430617a8_G_2_Float, _Split_6b9b5ad9f14a49b9bc49c718430617a8_B_3_Float, _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGB_5_Vector3, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RG_6_Vector2);
|
|
float4 _Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4;
|
|
Unity_Add_float4(_Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4, _Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4);
|
|
float3 _Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4.xyz), _Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3);
|
|
float3 _Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3, _Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3);
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[0];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[1];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[2];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[3];
|
|
float _Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3, _Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float);
|
|
float _Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float;
|
|
Unity_Divide_float(_Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_A_4_Float, _Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float);
|
|
float _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float, float(0), float(1), _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float);
|
|
float _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float;
|
|
Unity_Lerp_float(_Split_1bfec6763d4b458398e36937b4114c29_A_4_Float, float(0), _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float, _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float);
|
|
float3 _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3, (_Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float.xxx), _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3);
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_R_1_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[0];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_G_2_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[1];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_B_3_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[2];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_A_4_Float = 0;
|
|
float4 _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4;
|
|
float3 _Combine_872906644fc84c8c8286733edba75045_RGB_5_Vector3;
|
|
float2 _Combine_872906644fc84c8c8286733edba75045_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_e22879e6c4574322ab21f6261a21bced_R_1_Float, _Split_e22879e6c4574322ab21f6261a21bced_G_2_Float, _Split_e22879e6c4574322ab21f6261a21bced_B_3_Float, _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float, _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4, _Combine_872906644fc84c8c8286733edba75045_RGB_5_Vector3, _Combine_872906644fc84c8c8286733edba75045_RG_6_Vector2);
|
|
float4 _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4;
|
|
Unity_Add_float4(_Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4, _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4, _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4);
|
|
WindPoint_1 = _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4;
|
|
}
|
|
|
|
void Unity_Power_float(float A, float B, out float Out)
|
|
{
|
|
Out = pow(A, B);
|
|
}
|
|
|
|
void Unity_Or_float(float A, float B, out float Out)
|
|
{
|
|
Out = A || B;
|
|
}
|
|
|
|
void Unity_Branch_float3(float Predicate, float3 True, float3 False, out float3 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Add_float(float A, float B, out float Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
struct Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float
|
|
{
|
|
};
|
|
|
|
void SG_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float(float3 Vector3_604F121F, float3 Vector3_C30D997B, float Vector1_A2C4B4F4, float Vector1_7F78DDD2, UnityTexture2D Texture2D_5BAC276D, UnityTexture2D Texture2D_A3874DB9, float4 Vector4_EBFF8CDE, float Vector1_B4470F9B, float Vector1_2EC6D670, float Vector1_9365F438, float Vector1_F53C4B89, float Vector1_6803B355, float Vector1_5EFF6B1A, Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float IN, out float3 direction_1, out float strength_2)
|
|
{
|
|
float4 _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_R_1_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[0];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_G_2_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[1];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_B_3_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[2];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_A_4_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[3];
|
|
float4 _Combine_39060d5de038a58eb7462ba953e69739_RGBA_4_Vector4;
|
|
float3 _Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3;
|
|
float2 _Combine_39060d5de038a58eb7462ba953e69739_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_f4f701329abd45808bbd6b61ce26dcc8_R_1_Float, _Split_f4f701329abd45808bbd6b61ce26dcc8_G_2_Float, _Split_f4f701329abd45808bbd6b61ce26dcc8_B_3_Float, float(0), _Combine_39060d5de038a58eb7462ba953e69739_RGBA_4_Vector4, _Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3, _Combine_39060d5de038a58eb7462ba953e69739_RG_6_Vector2);
|
|
float3 _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3, _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3);
|
|
float4 _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_R_1_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[0];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_G_2_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[1];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_B_3_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[2];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_A_4_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[3];
|
|
float3 _Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3, (_Split_aeb4c57f09db718e9e14c3afd38465ae_A_4_Float.xxx), _Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3);
|
|
float _Property_72aef364136bb683b08145ce7a1b59a1_Out_0_Float = Vector1_9365F438;
|
|
float _Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_72aef364136bb683b08145ce7a1b59a1_Out_0_Float, float(0), _Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean);
|
|
UnityTexture2D _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D = Texture2D_A3874DB9;
|
|
float3 _Property_f0ff7954720d018395b7da89e2e2d761_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3 = float3(float(1), float(0), float(0));
|
|
float _Property_e53ae21dcf87e286b67de750a59275e7_Out_0_Float = Vector1_9365F438;
|
|
float3 _Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3, (_Property_e53ae21dcf87e286b67de750a59275e7_Out_0_Float.xxx), _Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3);
|
|
float _Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float = Vector1_5EFF6B1A;
|
|
float3 _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3, (_Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float.xxx), _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3);
|
|
float3 _Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_f0ff7954720d018395b7da89e2e2d761_Out_0_Vector3, _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3, _Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3);
|
|
float _Property_7f2599afa6fc5b8394c8fb0389031122_Out_0_Float = Vector1_6803B355;
|
|
float3 _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3, (_Property_7f2599afa6fc5b8394c8fb0389031122_Out_0_Float.xxx), _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3);
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_R_1_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[0];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_G_2_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[1];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_B_3_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[2];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_A_4_Float = 0;
|
|
float4 _Combine_0ac20ec517f076829f01b70d67c5af02_RGBA_4_Vector4;
|
|
float3 _Combine_0ac20ec517f076829f01b70d67c5af02_RGB_5_Vector3;
|
|
float2 _Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_f4466ebe24e7fa838f5735fb1210a3dd_R_1_Float, _Split_f4466ebe24e7fa838f5735fb1210a3dd_B_3_Float, float(0), float(0), _Combine_0ac20ec517f076829f01b70d67c5af02_RGBA_4_Vector4, _Combine_0ac20ec517f076829f01b70d67c5af02_RGB_5_Vector3, _Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2);
|
|
float4 _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4 = SAMPLE_TEXTURE2D_LOD(_Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.tex, _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.samplerstate, _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.GetTransformedUV(_Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2), float(3));
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_R_5_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.r;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_G_6_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.g;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_B_7_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.b;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_A_8_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.a;
|
|
float _Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float;
|
|
Unity_Branch_float(_Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean, _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_R_5_Float, float(0), _Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float);
|
|
float _Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float;
|
|
Unity_Power_float(_Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float, float(2), _Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float);
|
|
float _Property_9592cd5ab3f8628d995c1b79e8b0e51d_Out_0_Float = Vector1_F53C4B89;
|
|
float _Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float;
|
|
Unity_Multiply_float_float(_Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float, _Property_9592cd5ab3f8628d995c1b79e8b0e51d_Out_0_Float, _Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float);
|
|
float3 _Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3((_Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float.xxx), _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3, _Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3);
|
|
float _Property_7be270a4cb312f8ebbfba142f454b30d_Out_0_Float = Vector1_9365F438;
|
|
float3 _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3, (_Property_7be270a4cb312f8ebbfba142f454b30d_Out_0_Float.xxx), _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3);
|
|
float3 _Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3;
|
|
Unity_Add_float3(_Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3, _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3, _Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3);
|
|
float4 _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_e719665c40324e89a536d165d0427a68_R_1_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[0];
|
|
float _Split_e719665c40324e89a536d165d0427a68_G_2_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[1];
|
|
float _Split_e719665c40324e89a536d165d0427a68_B_3_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[2];
|
|
float _Split_e719665c40324e89a536d165d0427a68_A_4_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[3];
|
|
float _Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Split_e719665c40324e89a536d165d0427a68_A_4_Float, float(0), _Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean);
|
|
float _Property_295a45d224dd35829c1fc35a5ac74847_Out_0_Float = Vector1_2EC6D670;
|
|
float _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_295a45d224dd35829c1fc35a5ac74847_Out_0_Float, float(0), _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean);
|
|
float _Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean;
|
|
Unity_Or_float(_Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean, _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean, _Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean);
|
|
UnityTexture2D _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D = Texture2D_5BAC276D;
|
|
float3 _Property_c82f40aba4b7f08db9a97aaccbe0e096_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3, (_Split_e719665c40324e89a536d165d0427a68_A_4_Float.xxx), _Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3);
|
|
float3 _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3, (_Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float.xxx), _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3);
|
|
float3 _Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_c82f40aba4b7f08db9a97aaccbe0e096_Out_0_Vector3, _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3, _Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3);
|
|
float _Property_1ab0df57959c6986a0602bb0abfeaf58_Out_0_Float = Vector1_B4470F9B;
|
|
float3 _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3, (_Property_1ab0df57959c6986a0602bb0abfeaf58_Out_0_Float.xxx), _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3);
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_R_1_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[0];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_G_2_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[1];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_B_3_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[2];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_A_4_Float = 0;
|
|
float4 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGBA_4_Vector4;
|
|
float3 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGB_5_Vector3;
|
|
float2 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_5ff678fef0fb61889da2a8288f7e7d15_R_1_Float, _Split_5ff678fef0fb61889da2a8288f7e7d15_B_3_Float, float(0), float(0), _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGBA_4_Vector4, _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGB_5_Vector3, _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2);
|
|
float4 _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4 = SAMPLE_TEXTURE2D_LOD(_Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.tex, _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.samplerstate, _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.GetTransformedUV(_Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2), float(3));
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_R_5_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.r;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_G_6_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.g;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_B_7_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.b;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_A_8_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.a;
|
|
float4 _Combine_3136fa3d24c46087969f5a3828ccbb98_RGBA_4_Vector4;
|
|
float3 _Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3;
|
|
float2 _Combine_3136fa3d24c46087969f5a3828ccbb98_RG_6_Vector2;
|
|
Unity_Combine_float(_SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_R_5_Float, _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_G_6_Float, _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_B_7_Float, float(0), _Combine_3136fa3d24c46087969f5a3828ccbb98_RGBA_4_Vector4, _Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3, _Combine_3136fa3d24c46087969f5a3828ccbb98_RG_6_Vector2);
|
|
float3 _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3;
|
|
Unity_Add_float3(_Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3, float3(-0.5, -0.5, -0.5), _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3);
|
|
float3 _Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3;
|
|
Unity_Branch_float3(_Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean, _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3, float3(0, 0, 0), _Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3);
|
|
float _Property_9946d066804cc584a96830f8d35269cc_Out_0_Float = Vector1_2EC6D670;
|
|
float3 _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3, (_Property_9946d066804cc584a96830f8d35269cc_Out_0_Float.xxx), _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3);
|
|
float3 _Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3;
|
|
Unity_Add_float3(_Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3, _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3, _Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3);
|
|
float _Property_4ffb3356bdb9c78c815a6e7da47e7a34_Out_0_Float = Vector1_A2C4B4F4;
|
|
float3 _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3, (_Property_4ffb3356bdb9c78c815a6e7da47e7a34_Out_0_Float.xxx), _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3);
|
|
float _Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float;
|
|
Unity_Length_float3(_Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3, _Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float);
|
|
float _Property_51d6736452f5938caf6f83cdfc7df682_Out_0_Float = Vector1_7F78DDD2;
|
|
float _Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float;
|
|
Unity_Add_float(_Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float, _Property_51d6736452f5938caf6f83cdfc7df682_Out_0_Float, _Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float);
|
|
float _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float;
|
|
Unity_Multiply_float_float(_Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float, 0.001, _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float);
|
|
direction_1 = _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3;
|
|
strength_2 = _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float;
|
|
}
|
|
|
|
void Unity_CrossProduct_float(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = cross(A, B);
|
|
}
|
|
|
|
void Unity_Comparison_Equal_float(float A, float B, out float Out)
|
|
{
|
|
Out = A == B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_DotProduct_float3(float3 A, float3 B, out float Out)
|
|
{
|
|
Out = dot(A, B);
|
|
}
|
|
|
|
void Unity_Absolute_float(float In, out float Out)
|
|
{
|
|
Out = abs(In);
|
|
}
|
|
|
|
void Unity_Maximum_float(float A, float B, out float Out)
|
|
{
|
|
Out = max(A, B);
|
|
}
|
|
|
|
void Unity_Cosine_float(float In, out float Out)
|
|
{
|
|
Out = cos(In);
|
|
}
|
|
|
|
void Unity_Sine_float(float In, out float Out)
|
|
{
|
|
Out = sin(In);
|
|
}
|
|
|
|
void Unity_Comparison_NotEqual_float(float A, float B, out float Out)
|
|
{
|
|
Out = A != B ? 1 : 0;
|
|
}
|
|
|
|
struct Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float
|
|
{
|
|
float3 WorldSpaceNormal;
|
|
float4 VertexColor;
|
|
};
|
|
|
|
void SG_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float(float Vector1_BCB03E1A, float3 Vector3_C30D997B, float Vector1_A2C4B4F4, float Vector1_7EE0F94A, float Boolean_527CB26E, float Vector1_DE1BF63A, float Vector1_7F78DDD2, float3 Vector3_DE8CC74D, UnityTexture2D Texture2D_5BAC276D, UnityTexture2D Texture2D_A3874DB9, float4 Vector4_EBFF8CDE, float Vector1_B4470F9B, float Vector1_2EC6D670, float Vector1_9365F438, float Vector1_F53C4B89, float Vector1_6803B355, float4x4 Matrix4_0617b0bd42fc46ff90b1d55303a5477f, float4 Vector4_b44806ec67ca461fbcdf009dc6092cc3, Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float IN, out float3 vertex_1, out float3 normal_2)
|
|
{
|
|
float4 _Vector4_991bdf9badea4b2bb70edc71a7338c1d_Out_0_Vector4 = float4(float(0), float(0), float(0), float(1));
|
|
float3 _Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3;
|
|
{
|
|
// Converting Position from Object to AbsoluteWorld via world space
|
|
float3 world;
|
|
world = TransformObjectToWorld((_Vector4_991bdf9badea4b2bb70edc71a7338c1d_Out_0_Vector4.xyz).xyz);
|
|
_Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3 = GetAbsolutePositionWS(world);
|
|
}
|
|
float _Distance_343883e4e5444664abed46100940f24f_Out_2_Float;
|
|
Unity_Distance_float3(_Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3, float3(0, 0, 0), _Distance_343883e4e5444664abed46100940f24f_Out_2_Float);
|
|
float _Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean;
|
|
Unity_Comparison_Less_float(_Distance_343883e4e5444664abed46100940f24f_Out_2_Float, float(0.001), _Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean);
|
|
float3 _Property_2a4ab46b1d7c45918978aae50bd32b6f_Out_0_Vector3 = Vector3_C30D997B;
|
|
float4 _Vector4_d213eb2790b34988809a251ff9c74c6b_Out_0_Vector4 = float4(float(0), float(0), float(0), float(1));
|
|
float3 _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3;
|
|
_Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3 = TransformObjectToWorld((_Vector4_d213eb2790b34988809a251ff9c74c6b_Out_0_Vector4.xyz).xyz);
|
|
float3 _Property_4a88ff8e6e6b2b84bb2818cf73a0af30_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3;
|
|
_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3 = TransformObjectToWorld(_Property_4a88ff8e6e6b2b84bb2818cf73a0af30_Out_0_Vector3.xyz);
|
|
float _Property_dfda12e25f42bd808e65c99db447e176_Out_0_Boolean = Boolean_527CB26E;
|
|
float _Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float = Vector1_7EE0F94A;
|
|
float _Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float, float(0), _Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean);
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_R_1_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[0];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_G_2_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[1];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_B_3_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[2];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_A_4_Float = 0;
|
|
float _Split_7a634ef857769683b2100876a36535a2_R_1_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[0];
|
|
float _Split_7a634ef857769683b2100876a36535a2_G_2_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[1];
|
|
float _Split_7a634ef857769683b2100876a36535a2_B_3_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[2];
|
|
float _Split_7a634ef857769683b2100876a36535a2_A_4_Float = 0;
|
|
float _Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float;
|
|
Unity_Subtract_float(_Split_05e55a8c1b8cf88f93cbafc67103b677_G_2_Float, _Split_7a634ef857769683b2100876a36535a2_G_2_Float, _Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float);
|
|
float _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean;
|
|
Unity_Comparison_Less_float(_Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float, _Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float, _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean);
|
|
float _And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean;
|
|
Unity_And_float(_Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean, _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean, _And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean);
|
|
float _Property_e5e59fcc565a8b80ac239ba87d1bcf74_Out_0_Float = Vector1_A2C4B4F4;
|
|
float _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float;
|
|
Unity_Branch_float(_And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean, float(1E-05), _Property_e5e59fcc565a8b80ac239ba87d1bcf74_Out_0_Float, _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float);
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_R_1_Float = IN.VertexColor[0];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_G_2_Float = IN.VertexColor[1];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_B_3_Float = IN.VertexColor[2];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_A_4_Float = IN.VertexColor[3];
|
|
float _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float;
|
|
Unity_Multiply_float_float(_Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float, _Split_43013162a81fc4889a1944f2a2b75f66_A_4_Float, _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float);
|
|
float _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float;
|
|
Unity_Branch_float(_Property_dfda12e25f42bd808e65c99db447e176_Out_0_Boolean, _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float, _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float, _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float);
|
|
float _Property_eaab26f57a13988a8a813ad0813c8570_Out_0_Float = Vector1_7F78DDD2;
|
|
UnityTexture2D _Property_0f02225ebee993849ea6be48328c0958_Out_0_Texture2D = Texture2D_5BAC276D;
|
|
UnityTexture2D _Property_fce16cc7b4fcf48097b94eb2d5f1b596_Out_0_Texture2D = Texture2D_A3874DB9;
|
|
float4 _Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float;
|
|
Unity_Length_float4(_Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4, _Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float);
|
|
float _Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float, float(0), _Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean);
|
|
float4 _Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4;
|
|
Unity_Branch_float4(_Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean, _Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4, float4(0, 0, 1, 1), _Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4);
|
|
float4x4 _Property_cb03cb298f0a47d4ae24d85f3c47db75_Out_0_Matrix4 = Matrix4_0617b0bd42fc46ff90b1d55303a5477f;
|
|
float4 _Property_844e35a56a864617b521872c1cee398d_Out_0_Vector4 = Vector4_b44806ec67ca461fbcdf009dc6092cc3;
|
|
Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float _WindNMPoints_071e9370484b4168b560a27fbea64a52;
|
|
float4 _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4;
|
|
SG_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float(_Property_cb03cb298f0a47d4ae24d85f3c47db75_Out_0_Matrix4, SHADERGRAPH_OBJECT_POSITION, _Property_844e35a56a864617b521872c1cee398d_Out_0_Vector4, _WindNMPoints_071e9370484b4168b560a27fbea64a52, _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4);
|
|
float4 _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4;
|
|
Unity_Add_float4(_Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4, _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4, _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4);
|
|
float _Property_02c51f4c8a859f8f88433b435d4452f6_Out_0_Float = Vector1_B4470F9B;
|
|
float _Property_6b508d48a081548385021b27896c0622_Out_0_Float = Vector1_2EC6D670;
|
|
float _Property_d73fed4fb3c7b58d892364765a30498b_Out_0_Float = Vector1_9365F438;
|
|
float _Property_c3101a1b656cac858bfa11dbe7ebd268_Out_0_Float = Vector1_F53C4B89;
|
|
float _Property_c82c2ac458938d86bcc1aae3a58cc1dc_Out_0_Float = Vector1_6803B355;
|
|
float _Property_3f5330d8bec7c681ab9563aad03c7b89_Out_0_Float = Vector1_BCB03E1A;
|
|
Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba;
|
|
float3 _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3;
|
|
float _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float;
|
|
SG_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float, _Property_eaab26f57a13988a8a813ad0813c8570_Out_0_Float, _Property_0f02225ebee993849ea6be48328c0958_Out_0_Texture2D, _Property_fce16cc7b4fcf48097b94eb2d5f1b596_Out_0_Texture2D, _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4, _Property_02c51f4c8a859f8f88433b435d4452f6_Out_0_Float, _Property_6b508d48a081548385021b27896c0622_Out_0_Float, _Property_d73fed4fb3c7b58d892364765a30498b_Out_0_Float, _Property_c3101a1b656cac858bfa11dbe7ebd268_Out_0_Float, _Property_c82c2ac458938d86bcc1aae3a58cc1dc_Out_0_Float, _Property_3f5330d8bec7c681ab9563aad03c7b89_Out_0_Float, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float);
|
|
float3 _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3;
|
|
Unity_CrossProduct_float(float3 (0, 1, 0), _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3, _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3);
|
|
float _Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean;
|
|
Unity_Comparison_Equal_float((_CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3).x, float(0), _Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean);
|
|
float3 _Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean, float3(1E-06, 1E-06, 1E-06), _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3, _Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3);
|
|
float3 _Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3, _Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3);
|
|
float3 _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3);
|
|
float _DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float;
|
|
Unity_DotProduct_float3(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3, _DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float);
|
|
float3 _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, (_DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float.xxx), _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3);
|
|
float3 _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3;
|
|
Unity_Add_float3(_Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3, _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3);
|
|
float3 _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3, _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3);
|
|
float _Distance_702b068f612c7289a99272879da274ed_Out_2_Float;
|
|
Unity_Distance_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Distance_702b068f612c7289a99272879da274ed_Out_2_Float);
|
|
float _Property_f5c255b0f666358291012b78132d6593_Out_0_Float = Vector1_DE1BF63A;
|
|
float _Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float;
|
|
Unity_Divide_float(_Distance_702b068f612c7289a99272879da274ed_Out_2_Float, _Property_f5c255b0f666358291012b78132d6593_Out_0_Float, _Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float);
|
|
float _Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float;
|
|
Unity_Absolute_float(_Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float, _Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float);
|
|
float _Float_96534b09fc72da8da7bad6ebdb2b01ab_Out_0_Float = float(1E-07);
|
|
float _Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float;
|
|
Unity_Maximum_float(_Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float, _Float_96534b09fc72da8da7bad6ebdb2b01ab_Out_0_Float, _Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float);
|
|
float _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float;
|
|
Unity_Divide_float(float(1), _Property_f5c255b0f666358291012b78132d6593_Out_0_Float, _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float);
|
|
float _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float;
|
|
Unity_Power_float(_Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float, _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float, _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float);
|
|
float _Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float;
|
|
Unity_Multiply_float_float(_WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float, _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float, _Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float);
|
|
float _Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float;
|
|
Unity_Cosine_float(_Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float, _Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float);
|
|
float3 _Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3, (_Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float.xxx), _Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3);
|
|
float3 _CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3;
|
|
Unity_CrossProduct_float(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3, _CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3);
|
|
float _Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float;
|
|
Unity_Sine_float(_Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float, _Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float);
|
|
float3 _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3, (_Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float.xxx), _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3);
|
|
float3 _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3;
|
|
Unity_Add_float3(_Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3, _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3, _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3);
|
|
float3 _Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3;
|
|
Unity_Add_float3(_Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3, _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3, _Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3);
|
|
float3 _Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3;
|
|
_Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3 = TransformWorldToObject(_Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3.xyz);
|
|
float3 _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean, _Property_2a4ab46b1d7c45918978aae50bd32b6f_Out_0_Vector3, _Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3, _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3);
|
|
float3 _Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3 = Vector3_DE8CC74D;
|
|
float _Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float;
|
|
Unity_Length_float3(_Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3, _Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float);
|
|
float _Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean;
|
|
Unity_Comparison_NotEqual_float(_Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float, float(0), _Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean);
|
|
float3 _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(IN.WorldSpaceNormal, _Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3, _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3);
|
|
float3 _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean, _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3, IN.WorldSpaceNormal, _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3);
|
|
vertex_1 = _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3;
|
|
normal_2 = _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3;
|
|
}
|
|
|
|
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_Lerp_float4(float4 A, float4 B, float4 T, out float4 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Remap_float(float In, float2 InMinMax, float2 OutMinMax, out float Out)
|
|
{
|
|
Out = OutMinMax.x + (In - InMinMax.x) * (OutMinMax.y - OutMinMax.x) / (InMinMax.y - InMinMax.x);
|
|
}
|
|
|
|
void Unity_Lerp_float3(float3 A, float3 B, float3 T, out float3 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_NormalStrength_float(float3 In, float Strength, out float3 Out)
|
|
{
|
|
Out = float3(In.rg * Strength, lerp(1, In.b, saturate(Strength)));
|
|
}
|
|
|
|
// Graph Vertex
|
|
struct VertexDescription
|
|
{
|
|
float3 Position;
|
|
float3 Normal;
|
|
float3 Tangent;
|
|
};
|
|
|
|
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
|
|
{
|
|
VertexDescription description = (VertexDescription)0;
|
|
float3 _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3;
|
|
Unity_Add_float3(IN.ObjectSpacePosition, float3(1E-07, 1E-07, 1E-07), _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3);
|
|
float _Property_084857c303b23b82b7f2702b4186fa43_Out_0_Float = _Drag;
|
|
float _Property_35ad336ee9b278808178baf539e0133f_Out_0_Float = _HeightDrag;
|
|
float _Property_476e69b3f5653a8c995133f4fccaa757_Out_0_Float = _Stiffness;
|
|
float _Property_805aa6168fe3b08ca209d8ab0fa5d2d3_Out_0_Float = _InitialBend;
|
|
float4 _Property_8e47e7fd5c1a8b88b9cf212a6f62134c_Out_0_Vector4 = _NewNormal;
|
|
UnityTexture2D _Property_3b8cd110cb76a68d88342e4cc1336e0b_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(WIND_SETTINGS_TexNoise);
|
|
UnityTexture2D _Property_a939900eb077ee8593e638c7c457b53b_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(WIND_SETTINGS_TexGust);
|
|
float4 _Property_f59f8f9dc8757f8ab1c1d173e09c0787_Out_0_Vector4 = WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float _Property_89884359995fcf8a8d80bc0e19ce75f1_Out_0_Float = WIND_SETTINGS_FlexNoiseScale;
|
|
float _Property_c460088461241a819f81fd6ab2a8fc04_Out_0_Float = WIND_SETTINGS_Turbulence;
|
|
float _Property_0ef8268ed7d75386b8735f7baab81d22_Out_0_Float = WIND_SETTINGS_GustSpeed;
|
|
float _Property_9f4dae117e65b384a057e2e17ba36791_Out_0_Float = WIND_SETTINGS_GustScale;
|
|
float _Property_8c1472d718ff81889fbd5ee5e93e5291_Out_0_Float = WIND_SETTINGS_GustWorldScale;
|
|
float4x4 _Property_d28187fe6a414fa5b58ca9948c44abca_Out_0_Matrix4 = WIND_SETTINGS_Points;
|
|
float4 _Property_18d7723e0ed14f07992a44bbeb337673_Out_0_Vector4 = WIND_SETTINGS_Points_Radius;
|
|
Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8;
|
|
_WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8.WorldSpaceNormal = IN.WorldSpaceNormal;
|
|
_WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8.VertexColor = IN.VertexColor;
|
|
float3 _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3;
|
|
float3 _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_normal_2_Vector3;
|
|
SG_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float(IN.TimeParameters.x, _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3, _Property_084857c303b23b82b7f2702b4186fa43_Out_0_Float, _Property_35ad336ee9b278808178baf539e0133f_Out_0_Float, 0, _Property_476e69b3f5653a8c995133f4fccaa757_Out_0_Float, _Property_805aa6168fe3b08ca209d8ab0fa5d2d3_Out_0_Float, (_Property_8e47e7fd5c1a8b88b9cf212a6f62134c_Out_0_Vector4.xyz), _Property_3b8cd110cb76a68d88342e4cc1336e0b_Out_0_Texture2D, _Property_a939900eb077ee8593e638c7c457b53b_Out_0_Texture2D, _Property_f59f8f9dc8757f8ab1c1d173e09c0787_Out_0_Vector4, _Property_89884359995fcf8a8d80bc0e19ce75f1_Out_0_Float, _Property_c460088461241a819f81fd6ab2a8fc04_Out_0_Float, _Property_0ef8268ed7d75386b8735f7baab81d22_Out_0_Float, _Property_9f4dae117e65b384a057e2e17ba36791_Out_0_Float, _Property_8c1472d718ff81889fbd5ee5e93e5291_Out_0_Float, _Property_d28187fe6a414fa5b58ca9948c44abca_Out_0_Matrix4, _Property_18d7723e0ed14f07992a44bbeb337673_Out_0_Vector4, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_normal_2_Vector3);
|
|
description.Position = _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3;
|
|
description.Normal = IN.ObjectSpaceNormal;
|
|
description.Tangent = IN.ObjectSpaceTangent;
|
|
return description;
|
|
}
|
|
|
|
// Graph Pixel
|
|
struct SurfaceDescription
|
|
{
|
|
float3 BaseColor;
|
|
float3 Emission;
|
|
float Alpha;
|
|
float3 BentNormal;
|
|
float Smoothness;
|
|
float Occlusion;
|
|
float3 NormalTS;
|
|
float Metallic;
|
|
};
|
|
|
|
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
|
{
|
|
SurfaceDescription surface = (SurfaceDescription)0;
|
|
UnityTexture2D _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkBaseColorMap);
|
|
float4 _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4 = _TrunkTilingOffset;
|
|
float _Split_60538633130155809820b3185c81057f_R_1_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[0];
|
|
float _Split_60538633130155809820b3185c81057f_G_2_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[1];
|
|
float _Split_60538633130155809820b3185c81057f_B_3_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[2];
|
|
float _Split_60538633130155809820b3185c81057f_A_4_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[3];
|
|
float2 _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_R_1_Float, _Split_60538633130155809820b3185c81057f_G_2_Float);
|
|
float2 _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_B_3_Float, _Split_60538633130155809820b3185c81057f_A_4_Float);
|
|
float2 _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2, _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2, _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2);
|
|
float4 _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_R_4_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_G_5_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_B_6_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_A_7_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.a;
|
|
float4 _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4 = _TrunkBaseColor;
|
|
float4 _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4, _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4, _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4);
|
|
UnityTexture2D _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkBaseColorMap);
|
|
float _Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean = _BarkUseUV3;
|
|
float4 _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4 = IN.uv3;
|
|
float4 _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4 = IN.uv0;
|
|
float4 _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4;
|
|
Unity_Branch_float4(_Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean, _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4, _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4, _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4);
|
|
float4 _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4 = _BarkTilingOffset;
|
|
float _Split_ee975774554f6480b33168eff36d8be7_R_1_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[0];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_G_2_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[1];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_B_3_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[2];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_A_4_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[3];
|
|
float2 _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_R_1_Float, _Split_ee975774554f6480b33168eff36d8be7_G_2_Float);
|
|
float2 _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_B_3_Float, _Split_ee975774554f6480b33168eff36d8be7_A_4_Float);
|
|
float2 _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float((_Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4.xy), _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2, _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2, _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2);
|
|
float4 _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_R_4_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_G_5_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_B_6_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_A_7_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.a;
|
|
float4 _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4 = _BarkBaseColor;
|
|
float4 _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4, _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4);
|
|
UnityTexture2D _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_LayerMask);
|
|
float4 _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4 = _BarkBlendMaskTilingOffset;
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[0];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[1];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[2];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[3];
|
|
float2 _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float);
|
|
float2 _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float);
|
|
float2 _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2, _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2, _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2);
|
|
float4 _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2) );
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_R_4_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_G_5_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_B_6_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.a;
|
|
float4 _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4;
|
|
Unity_Lerp_float4(_Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxxx), _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4);
|
|
UnityTexture2D _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkMaskMap);
|
|
float4 _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_B_6_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.a;
|
|
float _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float = _TrunkMetallic;
|
|
float _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float, _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float, _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float);
|
|
float _Property_8142f12b781ad08680220297dab56f14_Out_0_Float = _TrunkAORemapMin;
|
|
float _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float = _TrunkAORemapMax;
|
|
float2 _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2 = float2(_Property_8142f12b781ad08680220297dab56f14_Out_0_Float, _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float);
|
|
float _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float, float2 (0, 1), _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float);
|
|
float _Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float = _TrunkSmoothnessRemapMin;
|
|
float _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float = _TrunkSmoothnessRemapMax;
|
|
float2 _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2 = float2(_Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float, _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float);
|
|
float _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float, float2 (0, 1), _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
float3 _Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3 = float3(_Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
UnityTexture2D _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkMaskMap);
|
|
float4 _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_B_6_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.a;
|
|
float _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float = _BarkMetallic;
|
|
float _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float, _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float, _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float);
|
|
float _Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float = _BarkAORemapMin;
|
|
float _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float = _BarkAORemapMax;
|
|
float2 _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2 = float2(_Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float, _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float);
|
|
float _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float, float2 (0, 1), _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float);
|
|
float _Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float = _BarkSmoothnessRemapMin;
|
|
float _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float = _BarkSmoothnessRemapMax;
|
|
float2 _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2 = float2(_Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float, _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float);
|
|
float _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float, float2 (0, 1), _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3 = float3(_Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3;
|
|
Unity_Lerp_float3(_Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3, _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3);
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[0];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[1];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[2];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_A_4_Float = 0;
|
|
UnityTexture2D _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkNormalMap);
|
|
float4 _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4);
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_R_4_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_G_5_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_B_6_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_A_7_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.a;
|
|
float _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float = _TrunkNormalScale;
|
|
float3 _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.xyz), _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float, _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3);
|
|
UnityTexture2D _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkNormalMap);
|
|
float4 _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4);
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_R_4_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_G_5_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_B_6_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_A_7_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.a;
|
|
float _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float = _BarkNormalScale;
|
|
float3 _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.xyz), _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3);
|
|
float3 _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
Unity_Lerp_float3(_NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3);
|
|
surface.BaseColor = (_Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4.xyz);
|
|
surface.Emission = float3(0, 0, 0);
|
|
surface.Alpha = float(1);
|
|
surface.BentNormal = IN.TangentSpaceNormal;
|
|
surface.Smoothness = _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float;
|
|
surface.Occlusion = _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float;
|
|
surface.NormalTS = _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
surface.Metallic = _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float;
|
|
return surface;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Graph Inputs
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#define VFX_SRP_ATTRIBUTES AttributesMesh
|
|
#define VaryingsMeshType VaryingsMeshToPS
|
|
#define VFX_SRP_VARYINGS VaryingsMeshType
|
|
#define VFX_SRP_SURFACE_INPUTS FragInputs
|
|
#endif
|
|
|
|
VertexDescriptionInputs AttributesMeshToVertexDescriptionInputs(AttributesMesh 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.VertexColor = input.color;
|
|
output.TimeParameters = _TimeParameters.xyz; // Note: in case of animation this will be overwrite (allow to handle motion vector)
|
|
#if UNITY_ANY_INSTANCING_ENABLED
|
|
#else
|
|
#endif
|
|
|
|
return output;
|
|
}
|
|
|
|
VertexDescription GetVertexDescription(AttributesMesh input, float3 timeParameters
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
// build graph inputs
|
|
VertexDescriptionInputs vertexDescriptionInputs = AttributesMeshToVertexDescriptionInputs(input);
|
|
// Override time parameters with used one (This is required to correctly handle motion vectors for vertex animation based on time)
|
|
vertexDescriptionInputs.TimeParameters = timeParameters;
|
|
|
|
// evaluate vertex graph
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
// Fetch the vertex graph properties for the particle instance.
|
|
GetElementVertexProperties(element, properties);
|
|
|
|
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs, properties);
|
|
#else
|
|
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs);
|
|
#endif
|
|
return vertexDescription;
|
|
|
|
}
|
|
|
|
AttributesMesh ApplyMeshModification(AttributesMesh input, float3 timeParameters
|
|
#ifdef USE_CUSTOMINTERP_SUBSTRUCT
|
|
#ifdef TESSELLATION_ON
|
|
, inout VaryingsMeshToDS varyings
|
|
#else
|
|
, inout VaryingsMeshToPS varyings
|
|
#endif
|
|
#endif
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
VertexDescription vertexDescription = GetVertexDescription(input, timeParameters
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, element
|
|
#endif
|
|
);
|
|
|
|
// copy graph output to the results
|
|
input.positionOS = vertexDescription.Position;
|
|
input.normalOS = vertexDescription.Normal;
|
|
input.tangentOS.xyz = vertexDescription.Tangent;
|
|
|
|
|
|
|
|
return input;
|
|
}
|
|
|
|
#if defined(_ADD_CUSTOM_VELOCITY) // For shader graph custom velocity
|
|
// Return precomputed Velocity in object space
|
|
float3 GetCustomVelocity(AttributesMesh input
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
VertexDescription vertexDescription = GetVertexDescription(input, _TimeParameters.xyz
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, element
|
|
#endif
|
|
);
|
|
return vertexDescription.CustomVelocity;
|
|
}
|
|
#endif
|
|
|
|
FragInputs BuildFragInputs(VaryingsMeshToPS input)
|
|
{
|
|
FragInputs output;
|
|
ZERO_INITIALIZE(FragInputs, output);
|
|
|
|
// Init to some default value to make the computer quiet (else it output 'divide by zero' warning even if value is not used).
|
|
// TODO: this is a really poor workaround, but the variable is used in a bunch of places
|
|
// to compute normals which are then passed on elsewhere to compute other values...
|
|
output.tangentToWorld = k_identity3x3;
|
|
output.positionSS = input.positionCS; // input.positionCS is SV_Position
|
|
|
|
output.texCoord0 = input.texCoord0;
|
|
output.texCoord3 = input.texCoord3;
|
|
|
|
#if UNITY_ANY_INSTANCING_ENABLED
|
|
#else
|
|
#endif
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
// FragInputs from VFX come from two places: Interpolator or CBuffer.
|
|
#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
|
|
|
|
// splice point to copy custom interpolator fields from varyings to frag inputs
|
|
|
|
|
|
return output;
|
|
}
|
|
|
|
// existing HDRP code uses the combined function to go directly from packed to frag inputs
|
|
FragInputs UnpackVaryingsMeshToFragInputs(PackedVaryingsMeshToPS input)
|
|
{
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
#if defined(HAVE_VFX_MODIFICATION) && defined(UNITY_INSTANCING_ENABLED)
|
|
unity_InstanceID = input.instanceID;
|
|
#endif
|
|
VaryingsMeshToPS unpacked = UnpackVaryingsMeshToPS(input);
|
|
return BuildFragInputs(unpacked);
|
|
}
|
|
SurfaceDescriptionInputs FragInputsToSurfaceDescriptionInputs(FragInputs input, float3 viewWS)
|
|
{
|
|
SurfaceDescriptionInputs output;
|
|
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
|
|
|
#if defined(SHADER_STAGE_RAY_TRACING)
|
|
#else
|
|
#endif
|
|
output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
|
|
|
|
#if UNITY_UV_STARTS_AT_TOP
|
|
#else
|
|
#endif
|
|
|
|
|
|
output.uv0 = input.texCoord0;
|
|
output.uv3 = input.texCoord3;
|
|
|
|
// splice point to copy frag inputs custom interpolator pack into the SDI
|
|
|
|
|
|
return output;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Surface Data (Specific Material)
|
|
|
|
void ApplyDecalToSurfaceDataNoNormal(DecalSurfaceData decalSurfaceData, inout SurfaceData surfaceData);
|
|
|
|
void ApplyDecalAndGetNormal(FragInputs fragInputs, PositionInputs posInput, SurfaceDescription surfaceDescription,
|
|
inout SurfaceData surfaceData)
|
|
{
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
#ifdef DECAL_NORMAL_BLENDING
|
|
// SG nodes don't ouptut surface gradients, so if decals require surf grad blending, we have to convert
|
|
// the normal to gradient before applying the decal. We then have to resolve the gradient back to world space
|
|
float3 normalTS;
|
|
|
|
normalTS = SurfaceGradientFromTangentSpaceNormalAndFromTBN(surfaceDescription.NormalTS,
|
|
fragInputs.tangentToWorld[0], fragInputs.tangentToWorld[1]);
|
|
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, fragInputs.tangentToWorld[2], normalTS);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
|
|
GetNormalWS_SG(fragInputs, normalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
#else
|
|
// normal delivered to master node
|
|
GetNormalWS(fragInputs, surfaceDescription.NormalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Both uses and modifies 'surfaceData.normalWS'.
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, surfaceData.normalWS.xyz);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
#endif
|
|
}
|
|
void BuildSurfaceData(FragInputs fragInputs, inout SurfaceDescription surfaceDescription, float3 V, PositionInputs posInput, out SurfaceData surfaceData, out float3 bentNormalWS)
|
|
{
|
|
ZERO_INITIALIZE(SurfaceData, surfaceData);
|
|
|
|
// specularOcclusion need to be init ahead of decal to quiet the compiler that modify the SurfaceData struct
|
|
// however specularOcclusion can come from the graph, so need to be init here so it can be override.
|
|
surfaceData.specularOcclusion = 1.0;
|
|
surfaceData.thickness = 0.0;
|
|
|
|
surfaceData.baseColor = surfaceDescription.BaseColor;
|
|
surfaceData.perceptualSmoothness = surfaceDescription.Smoothness;
|
|
surfaceData.ambientOcclusion = surfaceDescription.Occlusion;
|
|
surfaceData.metallic = surfaceDescription.Metallic;
|
|
|
|
#if defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE) || defined(_REFRACTION_THIN)
|
|
if (_EnableSSRefraction)
|
|
{
|
|
|
|
surfaceData.transmittanceMask = (1.0 - surfaceDescription.Alpha);
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
else
|
|
{
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
#else
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
#endif
|
|
|
|
// These static material feature allow compile time optimization
|
|
surfaceData.materialFeatures = MATERIALFEATUREFLAGS_LIT_STANDARD;
|
|
#ifdef _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SUBSURFACE_SCATTERING;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_COLORED_TRANSMISSION;
|
|
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_ANISOTROPY
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_ANISOTROPY;
|
|
|
|
// Initialize the normal to something non-zero to avoid a div-zero warning for anisotropy.
|
|
surfaceData.normalWS = float3(0, 1, 0);
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_IRIDESCENCE
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_IRIDESCENCE;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SPECULAR_COLOR;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_CLEAR_COAT
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_CLEAR_COAT;
|
|
#endif
|
|
|
|
#if defined (_MATERIAL_FEATURE_SPECULAR_COLOR) && defined (_ENERGY_CONSERVING_SPECULAR)
|
|
// Require to have setup baseColor
|
|
// Reproduce the energy conservation done in legacy Unity. Not ideal but better for compatibility and users can unchek it
|
|
surfaceData.baseColor *= (1.0 - Max3(surfaceData.specularColor.r, surfaceData.specularColor.g, surfaceData.specularColor.b));
|
|
#endif
|
|
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
ApplyDecalAndGetNormal(fragInputs, posInput, surfaceDescription, surfaceData);
|
|
|
|
surfaceData.geomNormalWS = fragInputs.tangentToWorld[2];
|
|
|
|
surfaceData.tangentWS = normalize(fragInputs.tangentToWorld[0].xyz); // The tangent is not normalize in tangentToWorld for mikkt. TODO: Check if it expected that we normalize with Morten. Tag: SURFACE_GRADIENT
|
|
|
|
|
|
bentNormalWS = surfaceData.normalWS;
|
|
|
|
surfaceData.tangentWS = Orthonormalize(surfaceData.tangentWS, surfaceData.normalWS);
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
// Mipmap mode debugging isn't supported with ray tracing as it relies on derivatives
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD0
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG(posInput.positionSS, fragInputs.texCoord0);
|
|
#else
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG_NO_UV(posInput.positionSS);
|
|
#endif
|
|
surfaceData.metallic = 0;
|
|
}
|
|
#endif
|
|
|
|
// We need to call ApplyDebugToSurfaceData after filling the surfaceData and before filling builtinData
|
|
// as it can modify attribute use for static lighting
|
|
ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData);
|
|
#endif
|
|
|
|
// By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion.
|
|
// If user provide bent normal then we process a better term
|
|
#if defined(_SPECULAR_OCCLUSION_CUSTOM)
|
|
// Just use the value passed through via the slot (not active otherwise)
|
|
#elif defined(_SPECULAR_OCCLUSION_FROM_AO_BENT_NORMAL)
|
|
// If we have bent normal and ambient occlusion, process a specular occlusion
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromBentAO(V, bentNormalWS, surfaceData.normalWS, surfaceData.ambientOcclusion, PerceptualSmoothnessToPerceptualRoughness(surfaceData.perceptualSmoothness));
|
|
#elif defined(_AMBIENT_OCCLUSION) && defined(_SPECULAR_OCCLUSION_FROM_AO)
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness));
|
|
#endif
|
|
|
|
#if defined(_ENABLE_GEOMETRIC_SPECULAR_AA) && !defined(SHADER_STAGE_RAY_TRACING)
|
|
surfaceData.perceptualSmoothness = GeometricNormalFiltering(surfaceData.perceptualSmoothness, fragInputs.tangentToWorld[2], surfaceDescription.SpecularAAScreenSpaceVariance, surfaceDescription.SpecularAAThreshold);
|
|
#endif
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Get Surface And BuiltinData
|
|
|
|
void GetSurfaceAndBuiltinData(FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData RAY_TRACING_OPTIONAL_PARAMETERS)
|
|
{
|
|
// Don't dither if displaced tessellation (we're fading out the displacement instead to match the next LOD)
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && !defined(_TESSELLATION_DISPLACEMENT)
|
|
#ifdef LOD_FADE_CROSSFADE // enable dithering LOD transition if user select CrossFade transition in LOD group
|
|
LODDitheringTransition(ComputeFadeMaskSeed(V, posInput.positionSS), unity_LODFade.x);
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
#ifdef _DOUBLESIDED_ON
|
|
float3 doubleSidedConstants = _DoubleSidedConstants.xyz;
|
|
#else
|
|
float3 doubleSidedConstants = float3(1.0, 1.0, 1.0);
|
|
#endif
|
|
|
|
ApplyDoubleSidedFlipOrMirror(fragInputs, doubleSidedConstants); // Apply double sided flip on the vertex normal
|
|
#endif // SHADER_UNLIT
|
|
|
|
SurfaceDescriptionInputs surfaceDescriptionInputs = FragInputsToSurfaceDescriptionInputs(fragInputs, V);
|
|
|
|
#if defined(HAVE_VFX_MODIFICATION)
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
GetElementPixelProperties(fragInputs, properties);
|
|
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs, properties);
|
|
#else
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs);
|
|
#endif
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
surfaceDescription.Alpha = 1.0f;
|
|
}
|
|
#endif
|
|
|
|
// Perform alpha test very early to save performance (a killed pixel will not sample textures)
|
|
// TODO: split graph evaluation to grab just alpha dependencies first? tricky..
|
|
#ifdef _ALPHATEST_ON
|
|
float alphaCutoff = surfaceDescription.AlphaClipThreshold;
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
// The TransparentDepthPrepass is also used with SSR transparent.
|
|
// If an artists enable transaprent SSR but not the TransparentDepthPrepass itself, then we use AlphaClipThreshold
|
|
// otherwise if TransparentDepthPrepass is enabled we use AlphaClipThresholdDepthPrepass
|
|
#elif SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_POSTPASS
|
|
// DepthPostpass always use its own alpha threshold
|
|
alphaCutoff = surfaceDescription.AlphaClipThresholdDepthPostpass;
|
|
#elif (SHADERPASS == SHADERPASS_SHADOWS) || (SHADERPASS == SHADERPASS_RAYTRACING_VISIBILITY)
|
|
// If use shadow threshold isn't enable we don't allow any test
|
|
#endif
|
|
|
|
GENERIC_ALPHA_TEST(surfaceDescription.Alpha, alphaCutoff);
|
|
#endif
|
|
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && _DEPTHOFFSET_ON
|
|
ApplyDepthOffsetPositionInput(V, surfaceDescription.DepthOffset, GetViewForwardDir(), GetWorldToHClipMatrix(), posInput);
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
float3 bentNormalWS;
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData, bentNormalWS);
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD1
|
|
float4 lightmapTexCoord1 = fragInputs.texCoord1;
|
|
#else
|
|
float4 lightmapTexCoord1 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD2
|
|
float4 lightmapTexCoord2 = fragInputs.texCoord2;
|
|
#else
|
|
float4 lightmapTexCoord2 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Builtin Data
|
|
// For back lighting we use the oposite vertex normal
|
|
InitBuiltinData(posInput, alpha, bentNormalWS, -fragInputs.tangentToWorld[2], lightmapTexCoord1, lightmapTexCoord2, builtinData);
|
|
|
|
#else
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData);
|
|
|
|
ZERO_BUILTIN_INITIALIZE(builtinData); // No call to InitBuiltinData as we don't have any lighting
|
|
builtinData.opacity = surfaceDescription.Alpha;
|
|
|
|
#if defined(DEBUG_DISPLAY)
|
|
// Light Layers are currently not used for the Unlit shader (because it is not lit)
|
|
// But Unlit objects do cast shadows according to their rendering layer mask, which is what we want to
|
|
// display in the light layers visualization mode, therefore we need the renderingLayers
|
|
builtinData.renderingLayers = GetMeshRenderingLayerMask();
|
|
#endif
|
|
|
|
#endif // SHADER_UNLIT
|
|
|
|
#ifdef _ALPHATEST_ON
|
|
// Used for sharpening by alpha to mask - Alpha to covertage is only used with depth only and forward pass (no shadow pass, no transparent pass)
|
|
builtinData.alphaClipTreshold = alphaCutoff;
|
|
#endif
|
|
|
|
// override sampleBakedGI - not used by Unlit
|
|
// When overriding GI, we need to force the isLightmap flag to make sure we don't add APV (sampled in the lightloop) on top of the overridden value (set at GBuffer stage)
|
|
|
|
builtinData.emissiveColor = surfaceDescription.Emission;
|
|
|
|
// Note this will not fully work on transparent surfaces (can check with _SURFACE_TYPE_TRANSPARENT define)
|
|
// We will always overwrite vt feeback with the nearest. So behind transparent surfaces vt will not be resolved
|
|
// This is a limitation of the current MRT approach.
|
|
#ifdef UNITY_VIRTUAL_TEXTURING
|
|
#endif
|
|
|
|
#if _DEPTHOFFSET_ON
|
|
builtinData.depthOffset = surfaceDescription.DepthOffset;
|
|
#endif
|
|
|
|
// TODO: We should generate distortion / distortionBlur for non distortion pass
|
|
#if (SHADERPASS == SHADERPASS_DISTORTION)
|
|
builtinData.distortion = surfaceDescription.Distortion;
|
|
builtinData.distortionBlur = surfaceDescription.DistortionBlur;
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// PostInitBuiltinData call ApplyDebugToBuiltinData
|
|
PostInitBuiltinData(V, posInput, surfaceData, builtinData);
|
|
#else
|
|
ApplyDebugToBuiltinData(builtinData);
|
|
#endif
|
|
|
|
RAY_TRACING_OPTIONAL_ALPHA_TEST_PASS
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Main
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassFullScreenDebug.hlsl"
|
|
|
|
// --------------------------------------------------
|
|
// Visual Effect Vertex Invocations
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/VisualEffectVertex.hlsl"
|
|
#else
|
|
#endif
|
|
#endif
|
|
|
|
ENDHLSL
|
|
}
|
|
Pass
|
|
{
|
|
Name "DepthOnly"
|
|
Tags
|
|
{
|
|
"LightMode" = "DepthOnly"
|
|
}
|
|
|
|
// Render State
|
|
Cull [_CullMode]
|
|
ZWrite On
|
|
Stencil
|
|
{
|
|
WriteMask [_StencilWriteMaskDepth]
|
|
Ref [_StencilRefDepth]
|
|
CompFront Always
|
|
PassFront Replace
|
|
CompBack Always
|
|
PassBack Replace
|
|
}
|
|
|
|
// Debug
|
|
// <None>
|
|
|
|
// --------------------------------------------------
|
|
// Pass
|
|
|
|
HLSLPROGRAM
|
|
|
|
// Pragmas
|
|
#pragma multi_compile _ DOTS_INSTANCING_ON
|
|
#pragma instancing_options renderinglayer
|
|
#pragma target 4.5
|
|
#pragma vertex Vert
|
|
#pragma fragment Frag
|
|
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
|
|
#pragma multi_compile_instancing
|
|
|
|
// Keywords
|
|
#pragma multi_compile _ WRITE_NORMAL_BUFFER
|
|
#pragma multi_compile_fragment _ WRITE_MSAA_DEPTH
|
|
#pragma shader_feature _ _SURFACE_TYPE_TRANSPARENT
|
|
#pragma shader_feature_local _ _DOUBLESIDED_ON
|
|
#pragma shader_feature_local _ _ADD_PRECOMPUTED_VELOCITY
|
|
#pragma shader_feature_local _ _TRANSPARENT_WRITES_MOTION_VEC _TRANSPARENT_REFRACTIVE_SORT
|
|
#pragma shader_feature_local_fragment _ _ENABLE_FOG_ON_TRANSPARENT
|
|
#pragma multi_compile _ LOD_FADE_CROSSFADE
|
|
#pragma shader_feature_local_fragment _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma multi_compile_fragment _ WRITE_DECAL_BUFFER WRITE_RENDERING_LAYER
|
|
#pragma shader_feature_local _ _REFRACTION_PLANE _REFRACTION_SPHERE _REFRACTION_THIN
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// GraphKeywords: <None>
|
|
|
|
// Defines
|
|
#define SHADERPASS SHADERPASS_DEPTH_ONLY
|
|
#define RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
|
|
// For custom interpolators to inject a substruct definition before FragInputs definition,
|
|
// allowing for FragInputs to capture CI's intended for ShaderGraph's SDI.
|
|
struct CustomInterpolators
|
|
{
|
|
};
|
|
#define USE_CUSTOMINTERP_SUBSTRUCT
|
|
|
|
|
|
|
|
// TODO: Merge FragInputsVFX substruct with CustomInterpolators.
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
struct FragInputsVFX
|
|
{
|
|
/* WARNING: $splice Could not find named fragment 'FragInputsVFX' */
|
|
};
|
|
#endif
|
|
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/GeometricTools.hlsl" // Required by Tessellation.hlsl
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Tessellation.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" // Required to be include before we include properties as it define DECLARE_STACK_CB
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl" // Required before including properties as it defines UNITY_TEXTURE_STREAMING_DEBUG_VARS
|
|
// Always include Shader Graph version
|
|
// Always include last to avoid double macros
|
|
#include "Packages/com.unity.shadergraph/ShaderGraphLibrary/Functions.hlsl" // Need to be here for Gradient struct definition
|
|
|
|
// --------------------------------------------------
|
|
// Defines
|
|
|
|
// Attribute
|
|
#define ATTRIBUTES_NEED_NORMAL
|
|
#define ATTRIBUTES_NEED_TANGENT
|
|
#define ATTRIBUTES_NEED_TEXCOORD0
|
|
#define ATTRIBUTES_NEED_TEXCOORD3
|
|
#define ATTRIBUTES_NEED_COLOR
|
|
#define VARYINGS_NEED_TANGENT_TO_WORLD
|
|
#define VARYINGS_NEED_TEXCOORD0
|
|
#define VARYINGS_NEED_TEXCOORD3
|
|
|
|
#define HAVE_MESH_MODIFICATION
|
|
|
|
//Strip down the FragInputs.hlsl (on graphics), so we can only optimize the interpolators we use.
|
|
//if by accident something requests contents of FragInputs.hlsl, it will be caught as a compiler error
|
|
//Frag inputs stripping is only enabled when FRAG_INPUTS_ENABLE_STRIPPING is set
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && SHADERPASS != SHADERPASS_RAYTRACING_GBUFFER && SHADERPASS != SHADERPASS_FULL_SCREEN_DEBUG
|
|
#define FRAG_INPUTS_ENABLE_STRIPPING
|
|
#endif
|
|
#define FRAG_INPUTS_USE_TEXCOORD0
|
|
#define FRAG_INPUTS_USE_TEXCOORD3
|
|
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl"
|
|
|
|
|
|
|
|
|
|
// Following two define are a workaround introduce in 10.1.x for RaytracingQualityNode
|
|
// The ShaderGraph don't support correctly migration of this node as it serialize all the node data
|
|
// in the json file making it impossible to uprgrade. Until we get a fix, we do a workaround here
|
|
// to still allow us to rename the field and keyword of this node without breaking existing code.
|
|
#ifdef RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define RAYTRACING_SHADER_GRAPH_HIGH
|
|
#endif
|
|
|
|
#ifdef RAYTRACING_SHADER_GRAPH_RAYTRACED
|
|
#define RAYTRACING_SHADER_GRAPH_LOW
|
|
#endif
|
|
// end
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// We need isFrontFace when using double sided - it is not required for unlit as in case of unlit double sided only drive the cullmode
|
|
// VARYINGS_NEED_CULLFACE can be define by VaryingsMeshToPS.FaceSign input if a IsFrontFace Node is included in the shader graph.
|
|
#if defined(_DOUBLESIDED_ON) && !defined(VARYINGS_NEED_CULLFACE)
|
|
#define VARYINGS_NEED_CULLFACE
|
|
#endif
|
|
#endif
|
|
|
|
// Specific Material Define
|
|
#define _AMBIENT_OCCLUSION 1
|
|
#define _SPECULAR_OCCLUSION_FROM_AO 1
|
|
#define _ENERGY_CONSERVING_SPECULAR 1
|
|
|
|
#if _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// Colored Transmission doesn't support clear coat
|
|
#undef _MATERIAL_FEATURE_CLEAR_COAT
|
|
#endif
|
|
|
|
// If we use subsurface scattering, enable output split lighting (for forward pass)
|
|
#if defined(_MATERIAL_FEATURE_SUBSURFACE_SCATTERING) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define OUTPUT_SPLIT_LIGHTING
|
|
#endif
|
|
|
|
// This shader support recursive rendering for raytracing
|
|
#define HAVE_RECURSIVE_RENDERING
|
|
|
|
// In Path Tracing, For all single-sided, refractive materials, we want to force a thin refraction model
|
|
#if (SHADERPASS == SHADERPASS_PATH_TRACING) && !defined(_DOUBLESIDED_ON) && (defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE))
|
|
#undef _REFRACTION_PLANE
|
|
#undef _REFRACTION_SPHERE
|
|
#define _REFRACTION_THIN
|
|
#endif
|
|
// Caution: we can use the define SHADER_UNLIT onlit after the above Material include as it is the Unlit template who define it
|
|
|
|
// To handle SSR on transparent correctly with a possibility to enable/disable it per framesettings
|
|
// we should have a code like this:
|
|
// if !defined(_DISABLE_SSR_TRANSPARENT)
|
|
// pragma multi_compile _ WRITE_NORMAL_BUFFER
|
|
// endif
|
|
// i.e we enable the multicompile only if we can receive SSR or not, and then C# code drive
|
|
// it based on if SSR transparent in frame settings and not (and stripper can strip it).
|
|
// this is currently not possible with our current preprocessor as _DISABLE_SSR_TRANSPARENT is a keyword not a define
|
|
// so instead we used this and chose to pay the extra cost of normal write even if SSR transaprent is disabled.
|
|
// Ideally the shader graph generator should handle it but condition below can't be handle correctly for now.
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
#if !defined(_DISABLE_SSR_TRANSPARENT) && !defined(SHADER_UNLIT)
|
|
#define WRITE_NORMAL_BUFFER
|
|
#endif
|
|
#endif
|
|
|
|
// See Lit.shader
|
|
#if SHADERPASS == SHADERPASS_MOTION_VECTORS && defined(WRITE_DECAL_BUFFER_AND_RENDERING_LAYER)
|
|
#define WRITE_DECAL_BUFFER
|
|
#endif
|
|
|
|
#ifndef DEBUG_DISPLAY
|
|
// In case of opaque we don't want to perform the alpha test, it is done in depth prepass and we use depth equal for ztest (setup from UI)
|
|
// Don't do it with debug display mode as it is possible there is no depth prepass in this case
|
|
#if !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#if SHADERPASS == SHADERPASS_FORWARD
|
|
#define SHADERPASS_FORWARD_BYPASS_ALPHA_TEST
|
|
#elif SHADERPASS == SHADERPASS_GBUFFER
|
|
#define SHADERPASS_GBUFFER_BYPASS_ALPHA_TEST
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
// Define _DEFERRED_CAPABLE_MATERIAL for shader capable to run in deferred pass
|
|
#if defined(SHADER_LIT) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _DEFERRED_CAPABLE_MATERIAL
|
|
#endif
|
|
|
|
// Translate transparent motion vector define
|
|
#if (defined(_TRANSPARENT_WRITES_MOTION_VEC) || defined(_TRANSPARENT_REFRACTIVE_SORT)) && defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _WRITE_TRANSPARENT_MOTION_VECTOR
|
|
#endif
|
|
|
|
// -- Graph Properties
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _TrunkBaseColor;
|
|
float4 _TrunkBaseColorMap_TexelSize;
|
|
float4 _TrunkTilingOffset;
|
|
float4 _TrunkNormalMap_TexelSize;
|
|
float _TrunkNormalScale;
|
|
float4 _TrunkMaskMap_TexelSize;
|
|
float _TrunkMetallic;
|
|
float _TrunkAORemapMin;
|
|
float _TrunkAORemapMax;
|
|
float _TrunkSmoothnessRemapMin;
|
|
float _TrunkSmoothnessRemapMax;
|
|
float4 _LayerMask_TexelSize;
|
|
float4 _BarkBlendMaskTilingOffset;
|
|
float4 _BarkBaseColor;
|
|
float4 _BarkBaseColorMap_TexelSize;
|
|
float _BarkUseUV3;
|
|
float4 _BarkTilingOffset;
|
|
float4 _BarkNormalMap_TexelSize;
|
|
float _BarkNormalScale;
|
|
float4 _BarkMaskMap_TexelSize;
|
|
float _BarkMetallic;
|
|
float _BarkSmoothnessRemapMin;
|
|
float _BarkSmoothnessRemapMax;
|
|
float _BarkAORemapMin;
|
|
float _BarkAORemapMax;
|
|
float _Stiffness;
|
|
float _InitialBend;
|
|
float _Drag;
|
|
float _HeightDrag;
|
|
float4 _NewNormal;
|
|
float4 _EmissionColor;
|
|
float _UseShadowThreshold;
|
|
float4 _DoubleSidedConstants;
|
|
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
|
float _BlendMode;
|
|
float _EnableBlendModePreserveSpecularLighting;
|
|
float _RayTracing;
|
|
float _RefractionModel;
|
|
float _MaterialID;
|
|
float _MaterialTypeMask;
|
|
CBUFFER_END
|
|
|
|
|
|
// Object and Global properties
|
|
SAMPLER(SamplerState_Linear_Repeat);
|
|
SAMPLER(SamplerState_Linear_Repeat_Aniso8);
|
|
TEXTURE2D(_TrunkBaseColorMap);
|
|
SAMPLER(sampler_TrunkBaseColorMap);
|
|
TEXTURE2D(_TrunkNormalMap);
|
|
SAMPLER(sampler_TrunkNormalMap);
|
|
TEXTURE2D(_TrunkMaskMap);
|
|
SAMPLER(sampler_TrunkMaskMap);
|
|
TEXTURE2D(_LayerMask);
|
|
SAMPLER(sampler_LayerMask);
|
|
TEXTURE2D(_BarkBaseColorMap);
|
|
SAMPLER(sampler_BarkBaseColorMap);
|
|
TEXTURE2D(_BarkNormalMap);
|
|
SAMPLER(sampler_BarkNormalMap);
|
|
TEXTURE2D(_BarkMaskMap);
|
|
SAMPLER(sampler_BarkMaskMap);
|
|
TEXTURE2D(WIND_SETTINGS_TexNoise);
|
|
SAMPLER(samplerWIND_SETTINGS_TexNoise);
|
|
float4 WIND_SETTINGS_TexNoise_TexelSize;
|
|
TEXTURE2D(WIND_SETTINGS_TexGust);
|
|
SAMPLER(samplerWIND_SETTINGS_TexGust);
|
|
float4 WIND_SETTINGS_TexGust_TexelSize;
|
|
float4 WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float WIND_SETTINGS_FlexNoiseScale;
|
|
float WIND_SETTINGS_ShiverNoiseScale;
|
|
float WIND_SETTINGS_Turbulence;
|
|
float WIND_SETTINGS_GustSpeed;
|
|
float WIND_SETTINGS_GustScale;
|
|
float WIND_SETTINGS_GustWorldScale;
|
|
float4x4 WIND_SETTINGS_Points;
|
|
float4 WIND_SETTINGS_Points_Radius;
|
|
|
|
// -- Property used by ScenePickingPass
|
|
#ifdef SCENEPICKINGPASS
|
|
float4 _SelectionID;
|
|
#endif
|
|
|
|
// -- Properties used by SceneSelectionPass
|
|
#ifdef SCENESELECTIONPASS
|
|
int _ObjectId;
|
|
int _PassValue;
|
|
#endif
|
|
|
|
// Includes
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/NormalSurfaceGradient.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDecalData.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
// GraphIncludes: <None>
|
|
|
|
// --------------------------------------------------
|
|
// Structs and Packing
|
|
|
|
struct AttributesMesh
|
|
{
|
|
float3 positionOS : POSITION;
|
|
float3 normalOS : NORMAL;
|
|
float4 tangentOS : TANGENT;
|
|
float4 uv0 : TEXCOORD0;
|
|
float4 uv3 : TEXCOORD3;
|
|
float4 color : COLOR;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(ATTRIBUTES_NEED_INSTANCEID)
|
|
uint instanceID : INSTANCEID_SEMANTIC;
|
|
#endif
|
|
};
|
|
struct VaryingsMeshToPS
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
float3 normalWS;
|
|
float4 tangentWS;
|
|
float4 texCoord0;
|
|
float4 texCoord3;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
uint instanceID : CUSTOM_INSTANCE_ID;
|
|
#endif
|
|
};
|
|
struct VertexDescriptionInputs
|
|
{
|
|
float3 ObjectSpaceNormal;
|
|
float3 WorldSpaceNormal;
|
|
float3 ObjectSpaceTangent;
|
|
float3 ObjectSpacePosition;
|
|
float4 VertexColor;
|
|
float3 TimeParameters;
|
|
};
|
|
struct SurfaceDescriptionInputs
|
|
{
|
|
float3 TangentSpaceNormal;
|
|
float4 uv0;
|
|
float4 uv3;
|
|
};
|
|
struct PackedVaryingsMeshToPS
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
float4 tangentWS : INTERP0;
|
|
float4 texCoord0 : INTERP1;
|
|
float4 texCoord3 : INTERP2;
|
|
float3 normalWS : INTERP3;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
uint instanceID : CUSTOM_INSTANCE_ID;
|
|
#endif
|
|
};
|
|
|
|
PackedVaryingsMeshToPS PackVaryingsMeshToPS (VaryingsMeshToPS input)
|
|
{
|
|
PackedVaryingsMeshToPS output;
|
|
ZERO_INITIALIZE(PackedVaryingsMeshToPS, output);
|
|
output.positionCS = input.positionCS;
|
|
output.tangentWS.xyzw = input.tangentWS;
|
|
output.texCoord0.xyzw = input.texCoord0;
|
|
output.texCoord3.xyzw = input.texCoord3;
|
|
output.normalWS.xyz = input.normalWS;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
output.instanceID = input.instanceID;
|
|
#endif
|
|
return output;
|
|
}
|
|
|
|
VaryingsMeshToPS UnpackVaryingsMeshToPS (PackedVaryingsMeshToPS input)
|
|
{
|
|
VaryingsMeshToPS output;
|
|
output.positionCS = input.positionCS;
|
|
output.tangentWS = input.tangentWS.xyzw;
|
|
output.texCoord0 = input.texCoord0.xyzw;
|
|
output.texCoord3 = input.texCoord3.xyzw;
|
|
output.normalWS = input.normalWS.xyz;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
output.instanceID = input.instanceID;
|
|
#endif
|
|
return output;
|
|
}
|
|
|
|
|
|
// --------------------------------------------------
|
|
// Graph
|
|
|
|
|
|
// Graph Functions
|
|
|
|
void Unity_Add_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
void Unity_Distance_float3(float3 A, float3 B, out float Out)
|
|
{
|
|
Out = distance(A, B);
|
|
}
|
|
|
|
void Unity_Comparison_Less_float(float A, float B, out float Out)
|
|
{
|
|
Out = A < B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_Comparison_Greater_float(float A, float B, out float Out)
|
|
{
|
|
Out = A > B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_Subtract_float(float A, float B, out float Out)
|
|
{
|
|
Out = A - B;
|
|
}
|
|
|
|
void Unity_And_float(float A, float B, out float Out)
|
|
{
|
|
Out = A && B;
|
|
}
|
|
|
|
void Unity_Branch_float(float Predicate, float True, float False, out float Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Multiply_float_float(float A, float B, out float Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Length_float4(float4 In, out float Out)
|
|
{
|
|
Out = length(In);
|
|
}
|
|
|
|
void Unity_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Subtract_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A - B;
|
|
}
|
|
|
|
void Unity_Normalize_float3(float3 In, out float3 Out)
|
|
{
|
|
Out = normalize(In);
|
|
}
|
|
|
|
void Unity_Length_float3(float3 In, out float Out)
|
|
{
|
|
Out = length(In);
|
|
}
|
|
|
|
void Unity_Divide_float(float A, float B, out float Out)
|
|
{
|
|
Out = A / B;
|
|
}
|
|
|
|
void Unity_Clamp_float(float In, float Min, float Max, out float Out)
|
|
{
|
|
Out = clamp(In, Min, Max);
|
|
}
|
|
|
|
void Unity_Lerp_float(float A, float B, float T, out float Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Multiply_float3_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Combine_float(float R, float G, float B, float A, out float4 RGBA, out float3 RGB, out float2 RG)
|
|
{
|
|
RGBA = float4(R, G, B, A);
|
|
RGB = float3(R, G, B);
|
|
RG = float2(R, G);
|
|
}
|
|
|
|
void Unity_Add_float4(float4 A, float4 B, out float4 Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
struct Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float
|
|
{
|
|
};
|
|
|
|
void SG_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float(float4x4 Matrix4_cb72bb33b7a84dfda97778a514f9b60f, float3 Vector3_90379ebf40aa468b8362f8d265f4f234, float4 Vector4_159bb4232f82428893101734a03e2a1e, Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float IN, out float4 WindPoint_1)
|
|
{
|
|
float3 _Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3 = Vector3_90379ebf40aa468b8362f8d265f4f234;
|
|
float4x4 _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4 = Matrix4_cb72bb33b7a84dfda97778a514f9b60f;
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].r);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].g);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].b);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].a);
|
|
float3 _Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4.xyz), _Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3);
|
|
float3 _Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3, _Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3);
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[0];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[1];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[2];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[3];
|
|
float _Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3, _Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float);
|
|
float4 _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4 = Vector4_159bb4232f82428893101734a03e2a1e;
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_R_1_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[0];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_G_2_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[1];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_B_3_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[2];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_A_4_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[3];
|
|
float _Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float;
|
|
Unity_Divide_float(_Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_R_1_Float, _Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float);
|
|
float _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float, float(0), float(1), _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float);
|
|
float _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float;
|
|
Unity_Lerp_float(_Split_d6e088f9ab90466583adc22ea79eb8cc_A_4_Float, float(0), _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float, _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float);
|
|
float3 _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3, (_Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float.xxx), _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3);
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_R_1_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[0];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_G_2_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[1];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_B_3_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[2];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_A_4_Float = 0;
|
|
float4 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4;
|
|
float3 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGB_5_Vector3;
|
|
float2 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_ef99a48850fe4f8f8e30e870c5e2ee09_R_1_Float, _Split_ef99a48850fe4f8f8e30e870c5e2ee09_G_2_Float, _Split_ef99a48850fe4f8f8e30e870c5e2ee09_B_3_Float, _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGB_5_Vector3, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RG_6_Vector2);
|
|
float3 _Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4.xyz), _Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3);
|
|
float3 _Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3, _Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3);
|
|
float _Split_8bbd5052350846968bf312362efd9f01_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[0];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[1];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[2];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[3];
|
|
float _Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3, _Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float);
|
|
float _Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float;
|
|
Unity_Divide_float(_Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_G_2_Float, _Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float);
|
|
float _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float, float(0), float(1), _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float);
|
|
float _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float;
|
|
Unity_Lerp_float(_Split_8bbd5052350846968bf312362efd9f01_A_4_Float, float(0), _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float, _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float);
|
|
float3 _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3, (_Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float.xxx), _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3);
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_R_1_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[0];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_G_2_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[1];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_B_3_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[2];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_A_4_Float = 0;
|
|
float4 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4;
|
|
float3 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGB_5_Vector3;
|
|
float2 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_ab8841795f594d3a90b87ac9fcc98d38_R_1_Float, _Split_ab8841795f594d3a90b87ac9fcc98d38_G_2_Float, _Split_ab8841795f594d3a90b87ac9fcc98d38_B_3_Float, _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGB_5_Vector3, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RG_6_Vector2);
|
|
float4 _Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4;
|
|
Unity_Add_float4(_Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4, _Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4);
|
|
float3 _Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4.xyz), _Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3);
|
|
float3 _Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3, _Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3);
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[0];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[1];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[2];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[3];
|
|
float _Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3, _Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float);
|
|
float _Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float;
|
|
Unity_Divide_float(_Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_B_3_Float, _Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float);
|
|
float _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float, float(0), float(1), _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float);
|
|
float _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float;
|
|
Unity_Lerp_float(_Split_fa21a8022f944854903e06c07c6f079c_A_4_Float, float(0), _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float, _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float);
|
|
float3 _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3, (_Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float.xxx), _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3);
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_R_1_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[0];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_G_2_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[1];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_B_3_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[2];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_A_4_Float = 0;
|
|
float4 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4;
|
|
float3 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGB_5_Vector3;
|
|
float2 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_6b9b5ad9f14a49b9bc49c718430617a8_R_1_Float, _Split_6b9b5ad9f14a49b9bc49c718430617a8_G_2_Float, _Split_6b9b5ad9f14a49b9bc49c718430617a8_B_3_Float, _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGB_5_Vector3, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RG_6_Vector2);
|
|
float4 _Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4;
|
|
Unity_Add_float4(_Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4, _Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4);
|
|
float3 _Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4.xyz), _Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3);
|
|
float3 _Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3, _Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3);
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[0];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[1];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[2];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[3];
|
|
float _Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3, _Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float);
|
|
float _Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float;
|
|
Unity_Divide_float(_Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_A_4_Float, _Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float);
|
|
float _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float, float(0), float(1), _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float);
|
|
float _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float;
|
|
Unity_Lerp_float(_Split_1bfec6763d4b458398e36937b4114c29_A_4_Float, float(0), _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float, _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float);
|
|
float3 _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3, (_Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float.xxx), _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3);
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_R_1_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[0];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_G_2_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[1];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_B_3_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[2];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_A_4_Float = 0;
|
|
float4 _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4;
|
|
float3 _Combine_872906644fc84c8c8286733edba75045_RGB_5_Vector3;
|
|
float2 _Combine_872906644fc84c8c8286733edba75045_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_e22879e6c4574322ab21f6261a21bced_R_1_Float, _Split_e22879e6c4574322ab21f6261a21bced_G_2_Float, _Split_e22879e6c4574322ab21f6261a21bced_B_3_Float, _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float, _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4, _Combine_872906644fc84c8c8286733edba75045_RGB_5_Vector3, _Combine_872906644fc84c8c8286733edba75045_RG_6_Vector2);
|
|
float4 _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4;
|
|
Unity_Add_float4(_Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4, _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4, _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4);
|
|
WindPoint_1 = _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4;
|
|
}
|
|
|
|
void Unity_Power_float(float A, float B, out float Out)
|
|
{
|
|
Out = pow(A, B);
|
|
}
|
|
|
|
void Unity_Or_float(float A, float B, out float Out)
|
|
{
|
|
Out = A || B;
|
|
}
|
|
|
|
void Unity_Branch_float3(float Predicate, float3 True, float3 False, out float3 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Add_float(float A, float B, out float Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
struct Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float
|
|
{
|
|
};
|
|
|
|
void SG_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float(float3 Vector3_604F121F, float3 Vector3_C30D997B, float Vector1_A2C4B4F4, float Vector1_7F78DDD2, UnityTexture2D Texture2D_5BAC276D, UnityTexture2D Texture2D_A3874DB9, float4 Vector4_EBFF8CDE, float Vector1_B4470F9B, float Vector1_2EC6D670, float Vector1_9365F438, float Vector1_F53C4B89, float Vector1_6803B355, float Vector1_5EFF6B1A, Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float IN, out float3 direction_1, out float strength_2)
|
|
{
|
|
float4 _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_R_1_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[0];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_G_2_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[1];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_B_3_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[2];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_A_4_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[3];
|
|
float4 _Combine_39060d5de038a58eb7462ba953e69739_RGBA_4_Vector4;
|
|
float3 _Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3;
|
|
float2 _Combine_39060d5de038a58eb7462ba953e69739_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_f4f701329abd45808bbd6b61ce26dcc8_R_1_Float, _Split_f4f701329abd45808bbd6b61ce26dcc8_G_2_Float, _Split_f4f701329abd45808bbd6b61ce26dcc8_B_3_Float, float(0), _Combine_39060d5de038a58eb7462ba953e69739_RGBA_4_Vector4, _Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3, _Combine_39060d5de038a58eb7462ba953e69739_RG_6_Vector2);
|
|
float3 _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3, _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3);
|
|
float4 _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_R_1_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[0];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_G_2_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[1];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_B_3_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[2];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_A_4_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[3];
|
|
float3 _Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3, (_Split_aeb4c57f09db718e9e14c3afd38465ae_A_4_Float.xxx), _Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3);
|
|
float _Property_72aef364136bb683b08145ce7a1b59a1_Out_0_Float = Vector1_9365F438;
|
|
float _Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_72aef364136bb683b08145ce7a1b59a1_Out_0_Float, float(0), _Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean);
|
|
UnityTexture2D _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D = Texture2D_A3874DB9;
|
|
float3 _Property_f0ff7954720d018395b7da89e2e2d761_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3 = float3(float(1), float(0), float(0));
|
|
float _Property_e53ae21dcf87e286b67de750a59275e7_Out_0_Float = Vector1_9365F438;
|
|
float3 _Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3, (_Property_e53ae21dcf87e286b67de750a59275e7_Out_0_Float.xxx), _Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3);
|
|
float _Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float = Vector1_5EFF6B1A;
|
|
float3 _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3, (_Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float.xxx), _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3);
|
|
float3 _Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_f0ff7954720d018395b7da89e2e2d761_Out_0_Vector3, _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3, _Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3);
|
|
float _Property_7f2599afa6fc5b8394c8fb0389031122_Out_0_Float = Vector1_6803B355;
|
|
float3 _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3, (_Property_7f2599afa6fc5b8394c8fb0389031122_Out_0_Float.xxx), _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3);
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_R_1_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[0];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_G_2_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[1];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_B_3_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[2];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_A_4_Float = 0;
|
|
float4 _Combine_0ac20ec517f076829f01b70d67c5af02_RGBA_4_Vector4;
|
|
float3 _Combine_0ac20ec517f076829f01b70d67c5af02_RGB_5_Vector3;
|
|
float2 _Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_f4466ebe24e7fa838f5735fb1210a3dd_R_1_Float, _Split_f4466ebe24e7fa838f5735fb1210a3dd_B_3_Float, float(0), float(0), _Combine_0ac20ec517f076829f01b70d67c5af02_RGBA_4_Vector4, _Combine_0ac20ec517f076829f01b70d67c5af02_RGB_5_Vector3, _Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2);
|
|
float4 _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4 = SAMPLE_TEXTURE2D_LOD(_Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.tex, _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.samplerstate, _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.GetTransformedUV(_Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2), float(3));
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_R_5_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.r;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_G_6_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.g;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_B_7_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.b;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_A_8_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.a;
|
|
float _Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float;
|
|
Unity_Branch_float(_Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean, _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_R_5_Float, float(0), _Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float);
|
|
float _Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float;
|
|
Unity_Power_float(_Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float, float(2), _Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float);
|
|
float _Property_9592cd5ab3f8628d995c1b79e8b0e51d_Out_0_Float = Vector1_F53C4B89;
|
|
float _Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float;
|
|
Unity_Multiply_float_float(_Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float, _Property_9592cd5ab3f8628d995c1b79e8b0e51d_Out_0_Float, _Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float);
|
|
float3 _Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3((_Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float.xxx), _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3, _Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3);
|
|
float _Property_7be270a4cb312f8ebbfba142f454b30d_Out_0_Float = Vector1_9365F438;
|
|
float3 _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3, (_Property_7be270a4cb312f8ebbfba142f454b30d_Out_0_Float.xxx), _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3);
|
|
float3 _Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3;
|
|
Unity_Add_float3(_Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3, _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3, _Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3);
|
|
float4 _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_e719665c40324e89a536d165d0427a68_R_1_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[0];
|
|
float _Split_e719665c40324e89a536d165d0427a68_G_2_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[1];
|
|
float _Split_e719665c40324e89a536d165d0427a68_B_3_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[2];
|
|
float _Split_e719665c40324e89a536d165d0427a68_A_4_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[3];
|
|
float _Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Split_e719665c40324e89a536d165d0427a68_A_4_Float, float(0), _Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean);
|
|
float _Property_295a45d224dd35829c1fc35a5ac74847_Out_0_Float = Vector1_2EC6D670;
|
|
float _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_295a45d224dd35829c1fc35a5ac74847_Out_0_Float, float(0), _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean);
|
|
float _Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean;
|
|
Unity_Or_float(_Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean, _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean, _Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean);
|
|
UnityTexture2D _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D = Texture2D_5BAC276D;
|
|
float3 _Property_c82f40aba4b7f08db9a97aaccbe0e096_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3, (_Split_e719665c40324e89a536d165d0427a68_A_4_Float.xxx), _Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3);
|
|
float3 _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3, (_Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float.xxx), _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3);
|
|
float3 _Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_c82f40aba4b7f08db9a97aaccbe0e096_Out_0_Vector3, _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3, _Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3);
|
|
float _Property_1ab0df57959c6986a0602bb0abfeaf58_Out_0_Float = Vector1_B4470F9B;
|
|
float3 _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3, (_Property_1ab0df57959c6986a0602bb0abfeaf58_Out_0_Float.xxx), _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3);
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_R_1_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[0];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_G_2_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[1];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_B_3_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[2];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_A_4_Float = 0;
|
|
float4 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGBA_4_Vector4;
|
|
float3 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGB_5_Vector3;
|
|
float2 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_5ff678fef0fb61889da2a8288f7e7d15_R_1_Float, _Split_5ff678fef0fb61889da2a8288f7e7d15_B_3_Float, float(0), float(0), _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGBA_4_Vector4, _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGB_5_Vector3, _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2);
|
|
float4 _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4 = SAMPLE_TEXTURE2D_LOD(_Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.tex, _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.samplerstate, _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.GetTransformedUV(_Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2), float(3));
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_R_5_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.r;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_G_6_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.g;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_B_7_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.b;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_A_8_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.a;
|
|
float4 _Combine_3136fa3d24c46087969f5a3828ccbb98_RGBA_4_Vector4;
|
|
float3 _Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3;
|
|
float2 _Combine_3136fa3d24c46087969f5a3828ccbb98_RG_6_Vector2;
|
|
Unity_Combine_float(_SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_R_5_Float, _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_G_6_Float, _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_B_7_Float, float(0), _Combine_3136fa3d24c46087969f5a3828ccbb98_RGBA_4_Vector4, _Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3, _Combine_3136fa3d24c46087969f5a3828ccbb98_RG_6_Vector2);
|
|
float3 _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3;
|
|
Unity_Add_float3(_Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3, float3(-0.5, -0.5, -0.5), _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3);
|
|
float3 _Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3;
|
|
Unity_Branch_float3(_Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean, _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3, float3(0, 0, 0), _Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3);
|
|
float _Property_9946d066804cc584a96830f8d35269cc_Out_0_Float = Vector1_2EC6D670;
|
|
float3 _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3, (_Property_9946d066804cc584a96830f8d35269cc_Out_0_Float.xxx), _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3);
|
|
float3 _Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3;
|
|
Unity_Add_float3(_Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3, _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3, _Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3);
|
|
float _Property_4ffb3356bdb9c78c815a6e7da47e7a34_Out_0_Float = Vector1_A2C4B4F4;
|
|
float3 _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3, (_Property_4ffb3356bdb9c78c815a6e7da47e7a34_Out_0_Float.xxx), _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3);
|
|
float _Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float;
|
|
Unity_Length_float3(_Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3, _Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float);
|
|
float _Property_51d6736452f5938caf6f83cdfc7df682_Out_0_Float = Vector1_7F78DDD2;
|
|
float _Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float;
|
|
Unity_Add_float(_Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float, _Property_51d6736452f5938caf6f83cdfc7df682_Out_0_Float, _Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float);
|
|
float _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float;
|
|
Unity_Multiply_float_float(_Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float, 0.001, _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float);
|
|
direction_1 = _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3;
|
|
strength_2 = _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float;
|
|
}
|
|
|
|
void Unity_CrossProduct_float(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = cross(A, B);
|
|
}
|
|
|
|
void Unity_Comparison_Equal_float(float A, float B, out float Out)
|
|
{
|
|
Out = A == B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_DotProduct_float3(float3 A, float3 B, out float Out)
|
|
{
|
|
Out = dot(A, B);
|
|
}
|
|
|
|
void Unity_Absolute_float(float In, out float Out)
|
|
{
|
|
Out = abs(In);
|
|
}
|
|
|
|
void Unity_Maximum_float(float A, float B, out float Out)
|
|
{
|
|
Out = max(A, B);
|
|
}
|
|
|
|
void Unity_Cosine_float(float In, out float Out)
|
|
{
|
|
Out = cos(In);
|
|
}
|
|
|
|
void Unity_Sine_float(float In, out float Out)
|
|
{
|
|
Out = sin(In);
|
|
}
|
|
|
|
void Unity_Comparison_NotEqual_float(float A, float B, out float Out)
|
|
{
|
|
Out = A != B ? 1 : 0;
|
|
}
|
|
|
|
struct Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float
|
|
{
|
|
float3 WorldSpaceNormal;
|
|
float4 VertexColor;
|
|
};
|
|
|
|
void SG_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float(float Vector1_BCB03E1A, float3 Vector3_C30D997B, float Vector1_A2C4B4F4, float Vector1_7EE0F94A, float Boolean_527CB26E, float Vector1_DE1BF63A, float Vector1_7F78DDD2, float3 Vector3_DE8CC74D, UnityTexture2D Texture2D_5BAC276D, UnityTexture2D Texture2D_A3874DB9, float4 Vector4_EBFF8CDE, float Vector1_B4470F9B, float Vector1_2EC6D670, float Vector1_9365F438, float Vector1_F53C4B89, float Vector1_6803B355, float4x4 Matrix4_0617b0bd42fc46ff90b1d55303a5477f, float4 Vector4_b44806ec67ca461fbcdf009dc6092cc3, Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float IN, out float3 vertex_1, out float3 normal_2)
|
|
{
|
|
float4 _Vector4_991bdf9badea4b2bb70edc71a7338c1d_Out_0_Vector4 = float4(float(0), float(0), float(0), float(1));
|
|
float3 _Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3;
|
|
{
|
|
// Converting Position from Object to AbsoluteWorld via world space
|
|
float3 world;
|
|
world = TransformObjectToWorld((_Vector4_991bdf9badea4b2bb70edc71a7338c1d_Out_0_Vector4.xyz).xyz);
|
|
_Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3 = GetAbsolutePositionWS(world);
|
|
}
|
|
float _Distance_343883e4e5444664abed46100940f24f_Out_2_Float;
|
|
Unity_Distance_float3(_Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3, float3(0, 0, 0), _Distance_343883e4e5444664abed46100940f24f_Out_2_Float);
|
|
float _Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean;
|
|
Unity_Comparison_Less_float(_Distance_343883e4e5444664abed46100940f24f_Out_2_Float, float(0.001), _Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean);
|
|
float3 _Property_2a4ab46b1d7c45918978aae50bd32b6f_Out_0_Vector3 = Vector3_C30D997B;
|
|
float4 _Vector4_d213eb2790b34988809a251ff9c74c6b_Out_0_Vector4 = float4(float(0), float(0), float(0), float(1));
|
|
float3 _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3;
|
|
_Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3 = TransformObjectToWorld((_Vector4_d213eb2790b34988809a251ff9c74c6b_Out_0_Vector4.xyz).xyz);
|
|
float3 _Property_4a88ff8e6e6b2b84bb2818cf73a0af30_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3;
|
|
_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3 = TransformObjectToWorld(_Property_4a88ff8e6e6b2b84bb2818cf73a0af30_Out_0_Vector3.xyz);
|
|
float _Property_dfda12e25f42bd808e65c99db447e176_Out_0_Boolean = Boolean_527CB26E;
|
|
float _Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float = Vector1_7EE0F94A;
|
|
float _Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float, float(0), _Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean);
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_R_1_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[0];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_G_2_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[1];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_B_3_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[2];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_A_4_Float = 0;
|
|
float _Split_7a634ef857769683b2100876a36535a2_R_1_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[0];
|
|
float _Split_7a634ef857769683b2100876a36535a2_G_2_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[1];
|
|
float _Split_7a634ef857769683b2100876a36535a2_B_3_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[2];
|
|
float _Split_7a634ef857769683b2100876a36535a2_A_4_Float = 0;
|
|
float _Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float;
|
|
Unity_Subtract_float(_Split_05e55a8c1b8cf88f93cbafc67103b677_G_2_Float, _Split_7a634ef857769683b2100876a36535a2_G_2_Float, _Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float);
|
|
float _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean;
|
|
Unity_Comparison_Less_float(_Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float, _Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float, _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean);
|
|
float _And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean;
|
|
Unity_And_float(_Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean, _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean, _And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean);
|
|
float _Property_e5e59fcc565a8b80ac239ba87d1bcf74_Out_0_Float = Vector1_A2C4B4F4;
|
|
float _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float;
|
|
Unity_Branch_float(_And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean, float(1E-05), _Property_e5e59fcc565a8b80ac239ba87d1bcf74_Out_0_Float, _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float);
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_R_1_Float = IN.VertexColor[0];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_G_2_Float = IN.VertexColor[1];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_B_3_Float = IN.VertexColor[2];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_A_4_Float = IN.VertexColor[3];
|
|
float _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float;
|
|
Unity_Multiply_float_float(_Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float, _Split_43013162a81fc4889a1944f2a2b75f66_A_4_Float, _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float);
|
|
float _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float;
|
|
Unity_Branch_float(_Property_dfda12e25f42bd808e65c99db447e176_Out_0_Boolean, _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float, _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float, _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float);
|
|
float _Property_eaab26f57a13988a8a813ad0813c8570_Out_0_Float = Vector1_7F78DDD2;
|
|
UnityTexture2D _Property_0f02225ebee993849ea6be48328c0958_Out_0_Texture2D = Texture2D_5BAC276D;
|
|
UnityTexture2D _Property_fce16cc7b4fcf48097b94eb2d5f1b596_Out_0_Texture2D = Texture2D_A3874DB9;
|
|
float4 _Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float;
|
|
Unity_Length_float4(_Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4, _Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float);
|
|
float _Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float, float(0), _Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean);
|
|
float4 _Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4;
|
|
Unity_Branch_float4(_Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean, _Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4, float4(0, 0, 1, 1), _Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4);
|
|
float4x4 _Property_cb03cb298f0a47d4ae24d85f3c47db75_Out_0_Matrix4 = Matrix4_0617b0bd42fc46ff90b1d55303a5477f;
|
|
float4 _Property_844e35a56a864617b521872c1cee398d_Out_0_Vector4 = Vector4_b44806ec67ca461fbcdf009dc6092cc3;
|
|
Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float _WindNMPoints_071e9370484b4168b560a27fbea64a52;
|
|
float4 _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4;
|
|
SG_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float(_Property_cb03cb298f0a47d4ae24d85f3c47db75_Out_0_Matrix4, SHADERGRAPH_OBJECT_POSITION, _Property_844e35a56a864617b521872c1cee398d_Out_0_Vector4, _WindNMPoints_071e9370484b4168b560a27fbea64a52, _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4);
|
|
float4 _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4;
|
|
Unity_Add_float4(_Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4, _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4, _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4);
|
|
float _Property_02c51f4c8a859f8f88433b435d4452f6_Out_0_Float = Vector1_B4470F9B;
|
|
float _Property_6b508d48a081548385021b27896c0622_Out_0_Float = Vector1_2EC6D670;
|
|
float _Property_d73fed4fb3c7b58d892364765a30498b_Out_0_Float = Vector1_9365F438;
|
|
float _Property_c3101a1b656cac858bfa11dbe7ebd268_Out_0_Float = Vector1_F53C4B89;
|
|
float _Property_c82c2ac458938d86bcc1aae3a58cc1dc_Out_0_Float = Vector1_6803B355;
|
|
float _Property_3f5330d8bec7c681ab9563aad03c7b89_Out_0_Float = Vector1_BCB03E1A;
|
|
Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba;
|
|
float3 _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3;
|
|
float _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float;
|
|
SG_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float, _Property_eaab26f57a13988a8a813ad0813c8570_Out_0_Float, _Property_0f02225ebee993849ea6be48328c0958_Out_0_Texture2D, _Property_fce16cc7b4fcf48097b94eb2d5f1b596_Out_0_Texture2D, _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4, _Property_02c51f4c8a859f8f88433b435d4452f6_Out_0_Float, _Property_6b508d48a081548385021b27896c0622_Out_0_Float, _Property_d73fed4fb3c7b58d892364765a30498b_Out_0_Float, _Property_c3101a1b656cac858bfa11dbe7ebd268_Out_0_Float, _Property_c82c2ac458938d86bcc1aae3a58cc1dc_Out_0_Float, _Property_3f5330d8bec7c681ab9563aad03c7b89_Out_0_Float, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float);
|
|
float3 _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3;
|
|
Unity_CrossProduct_float(float3 (0, 1, 0), _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3, _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3);
|
|
float _Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean;
|
|
Unity_Comparison_Equal_float((_CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3).x, float(0), _Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean);
|
|
float3 _Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean, float3(1E-06, 1E-06, 1E-06), _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3, _Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3);
|
|
float3 _Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3, _Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3);
|
|
float3 _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3);
|
|
float _DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float;
|
|
Unity_DotProduct_float3(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3, _DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float);
|
|
float3 _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, (_DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float.xxx), _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3);
|
|
float3 _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3;
|
|
Unity_Add_float3(_Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3, _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3);
|
|
float3 _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3, _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3);
|
|
float _Distance_702b068f612c7289a99272879da274ed_Out_2_Float;
|
|
Unity_Distance_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Distance_702b068f612c7289a99272879da274ed_Out_2_Float);
|
|
float _Property_f5c255b0f666358291012b78132d6593_Out_0_Float = Vector1_DE1BF63A;
|
|
float _Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float;
|
|
Unity_Divide_float(_Distance_702b068f612c7289a99272879da274ed_Out_2_Float, _Property_f5c255b0f666358291012b78132d6593_Out_0_Float, _Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float);
|
|
float _Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float;
|
|
Unity_Absolute_float(_Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float, _Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float);
|
|
float _Float_96534b09fc72da8da7bad6ebdb2b01ab_Out_0_Float = float(1E-07);
|
|
float _Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float;
|
|
Unity_Maximum_float(_Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float, _Float_96534b09fc72da8da7bad6ebdb2b01ab_Out_0_Float, _Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float);
|
|
float _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float;
|
|
Unity_Divide_float(float(1), _Property_f5c255b0f666358291012b78132d6593_Out_0_Float, _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float);
|
|
float _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float;
|
|
Unity_Power_float(_Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float, _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float, _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float);
|
|
float _Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float;
|
|
Unity_Multiply_float_float(_WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float, _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float, _Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float);
|
|
float _Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float;
|
|
Unity_Cosine_float(_Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float, _Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float);
|
|
float3 _Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3, (_Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float.xxx), _Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3);
|
|
float3 _CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3;
|
|
Unity_CrossProduct_float(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3, _CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3);
|
|
float _Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float;
|
|
Unity_Sine_float(_Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float, _Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float);
|
|
float3 _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3, (_Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float.xxx), _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3);
|
|
float3 _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3;
|
|
Unity_Add_float3(_Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3, _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3, _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3);
|
|
float3 _Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3;
|
|
Unity_Add_float3(_Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3, _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3, _Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3);
|
|
float3 _Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3;
|
|
_Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3 = TransformWorldToObject(_Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3.xyz);
|
|
float3 _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean, _Property_2a4ab46b1d7c45918978aae50bd32b6f_Out_0_Vector3, _Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3, _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3);
|
|
float3 _Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3 = Vector3_DE8CC74D;
|
|
float _Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float;
|
|
Unity_Length_float3(_Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3, _Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float);
|
|
float _Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean;
|
|
Unity_Comparison_NotEqual_float(_Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float, float(0), _Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean);
|
|
float3 _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(IN.WorldSpaceNormal, _Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3, _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3);
|
|
float3 _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean, _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3, IN.WorldSpaceNormal, _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3);
|
|
vertex_1 = _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3;
|
|
normal_2 = _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3;
|
|
}
|
|
|
|
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_Lerp_float4(float4 A, float4 B, float4 T, out float4 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Remap_float(float In, float2 InMinMax, float2 OutMinMax, out float Out)
|
|
{
|
|
Out = OutMinMax.x + (In - InMinMax.x) * (OutMinMax.y - OutMinMax.x) / (InMinMax.y - InMinMax.x);
|
|
}
|
|
|
|
void Unity_Lerp_float3(float3 A, float3 B, float3 T, out float3 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_NormalStrength_float(float3 In, float Strength, out float3 Out)
|
|
{
|
|
Out = float3(In.rg * Strength, lerp(1, In.b, saturate(Strength)));
|
|
}
|
|
|
|
// Graph Vertex
|
|
struct VertexDescription
|
|
{
|
|
float3 Position;
|
|
float3 Normal;
|
|
float3 Tangent;
|
|
};
|
|
|
|
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
|
|
{
|
|
VertexDescription description = (VertexDescription)0;
|
|
float3 _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3;
|
|
Unity_Add_float3(IN.ObjectSpacePosition, float3(1E-07, 1E-07, 1E-07), _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3);
|
|
float _Property_084857c303b23b82b7f2702b4186fa43_Out_0_Float = _Drag;
|
|
float _Property_35ad336ee9b278808178baf539e0133f_Out_0_Float = _HeightDrag;
|
|
float _Property_476e69b3f5653a8c995133f4fccaa757_Out_0_Float = _Stiffness;
|
|
float _Property_805aa6168fe3b08ca209d8ab0fa5d2d3_Out_0_Float = _InitialBend;
|
|
float4 _Property_8e47e7fd5c1a8b88b9cf212a6f62134c_Out_0_Vector4 = _NewNormal;
|
|
UnityTexture2D _Property_3b8cd110cb76a68d88342e4cc1336e0b_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(WIND_SETTINGS_TexNoise);
|
|
UnityTexture2D _Property_a939900eb077ee8593e638c7c457b53b_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(WIND_SETTINGS_TexGust);
|
|
float4 _Property_f59f8f9dc8757f8ab1c1d173e09c0787_Out_0_Vector4 = WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float _Property_89884359995fcf8a8d80bc0e19ce75f1_Out_0_Float = WIND_SETTINGS_FlexNoiseScale;
|
|
float _Property_c460088461241a819f81fd6ab2a8fc04_Out_0_Float = WIND_SETTINGS_Turbulence;
|
|
float _Property_0ef8268ed7d75386b8735f7baab81d22_Out_0_Float = WIND_SETTINGS_GustSpeed;
|
|
float _Property_9f4dae117e65b384a057e2e17ba36791_Out_0_Float = WIND_SETTINGS_GustScale;
|
|
float _Property_8c1472d718ff81889fbd5ee5e93e5291_Out_0_Float = WIND_SETTINGS_GustWorldScale;
|
|
float4x4 _Property_d28187fe6a414fa5b58ca9948c44abca_Out_0_Matrix4 = WIND_SETTINGS_Points;
|
|
float4 _Property_18d7723e0ed14f07992a44bbeb337673_Out_0_Vector4 = WIND_SETTINGS_Points_Radius;
|
|
Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8;
|
|
_WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8.WorldSpaceNormal = IN.WorldSpaceNormal;
|
|
_WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8.VertexColor = IN.VertexColor;
|
|
float3 _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3;
|
|
float3 _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_normal_2_Vector3;
|
|
SG_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float(IN.TimeParameters.x, _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3, _Property_084857c303b23b82b7f2702b4186fa43_Out_0_Float, _Property_35ad336ee9b278808178baf539e0133f_Out_0_Float, 0, _Property_476e69b3f5653a8c995133f4fccaa757_Out_0_Float, _Property_805aa6168fe3b08ca209d8ab0fa5d2d3_Out_0_Float, (_Property_8e47e7fd5c1a8b88b9cf212a6f62134c_Out_0_Vector4.xyz), _Property_3b8cd110cb76a68d88342e4cc1336e0b_Out_0_Texture2D, _Property_a939900eb077ee8593e638c7c457b53b_Out_0_Texture2D, _Property_f59f8f9dc8757f8ab1c1d173e09c0787_Out_0_Vector4, _Property_89884359995fcf8a8d80bc0e19ce75f1_Out_0_Float, _Property_c460088461241a819f81fd6ab2a8fc04_Out_0_Float, _Property_0ef8268ed7d75386b8735f7baab81d22_Out_0_Float, _Property_9f4dae117e65b384a057e2e17ba36791_Out_0_Float, _Property_8c1472d718ff81889fbd5ee5e93e5291_Out_0_Float, _Property_d28187fe6a414fa5b58ca9948c44abca_Out_0_Matrix4, _Property_18d7723e0ed14f07992a44bbeb337673_Out_0_Vector4, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_normal_2_Vector3);
|
|
description.Position = _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3;
|
|
description.Normal = IN.ObjectSpaceNormal;
|
|
description.Tangent = IN.ObjectSpaceTangent;
|
|
return description;
|
|
}
|
|
|
|
// Graph Pixel
|
|
struct SurfaceDescription
|
|
{
|
|
float3 BaseColor;
|
|
float3 Emission;
|
|
float Alpha;
|
|
float3 BentNormal;
|
|
float Smoothness;
|
|
float Occlusion;
|
|
float3 NormalTS;
|
|
float Metallic;
|
|
};
|
|
|
|
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
|
{
|
|
SurfaceDescription surface = (SurfaceDescription)0;
|
|
UnityTexture2D _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkBaseColorMap);
|
|
float4 _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4 = _TrunkTilingOffset;
|
|
float _Split_60538633130155809820b3185c81057f_R_1_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[0];
|
|
float _Split_60538633130155809820b3185c81057f_G_2_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[1];
|
|
float _Split_60538633130155809820b3185c81057f_B_3_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[2];
|
|
float _Split_60538633130155809820b3185c81057f_A_4_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[3];
|
|
float2 _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_R_1_Float, _Split_60538633130155809820b3185c81057f_G_2_Float);
|
|
float2 _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_B_3_Float, _Split_60538633130155809820b3185c81057f_A_4_Float);
|
|
float2 _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2, _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2, _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2);
|
|
float4 _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_R_4_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_G_5_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_B_6_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_A_7_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.a;
|
|
float4 _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4 = _TrunkBaseColor;
|
|
float4 _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4, _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4, _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4);
|
|
UnityTexture2D _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkBaseColorMap);
|
|
float _Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean = _BarkUseUV3;
|
|
float4 _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4 = IN.uv3;
|
|
float4 _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4 = IN.uv0;
|
|
float4 _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4;
|
|
Unity_Branch_float4(_Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean, _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4, _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4, _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4);
|
|
float4 _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4 = _BarkTilingOffset;
|
|
float _Split_ee975774554f6480b33168eff36d8be7_R_1_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[0];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_G_2_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[1];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_B_3_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[2];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_A_4_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[3];
|
|
float2 _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_R_1_Float, _Split_ee975774554f6480b33168eff36d8be7_G_2_Float);
|
|
float2 _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_B_3_Float, _Split_ee975774554f6480b33168eff36d8be7_A_4_Float);
|
|
float2 _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float((_Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4.xy), _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2, _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2, _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2);
|
|
float4 _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_R_4_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_G_5_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_B_6_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_A_7_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.a;
|
|
float4 _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4 = _BarkBaseColor;
|
|
float4 _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4, _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4);
|
|
UnityTexture2D _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_LayerMask);
|
|
float4 _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4 = _BarkBlendMaskTilingOffset;
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[0];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[1];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[2];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[3];
|
|
float2 _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float);
|
|
float2 _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float);
|
|
float2 _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2, _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2, _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2);
|
|
float4 _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2) );
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_R_4_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_G_5_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_B_6_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.a;
|
|
float4 _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4;
|
|
Unity_Lerp_float4(_Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxxx), _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4);
|
|
UnityTexture2D _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkMaskMap);
|
|
float4 _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_B_6_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.a;
|
|
float _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float = _TrunkMetallic;
|
|
float _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float, _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float, _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float);
|
|
float _Property_8142f12b781ad08680220297dab56f14_Out_0_Float = _TrunkAORemapMin;
|
|
float _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float = _TrunkAORemapMax;
|
|
float2 _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2 = float2(_Property_8142f12b781ad08680220297dab56f14_Out_0_Float, _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float);
|
|
float _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float, float2 (0, 1), _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float);
|
|
float _Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float = _TrunkSmoothnessRemapMin;
|
|
float _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float = _TrunkSmoothnessRemapMax;
|
|
float2 _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2 = float2(_Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float, _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float);
|
|
float _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float, float2 (0, 1), _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
float3 _Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3 = float3(_Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
UnityTexture2D _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkMaskMap);
|
|
float4 _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_B_6_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.a;
|
|
float _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float = _BarkMetallic;
|
|
float _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float, _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float, _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float);
|
|
float _Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float = _BarkAORemapMin;
|
|
float _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float = _BarkAORemapMax;
|
|
float2 _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2 = float2(_Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float, _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float);
|
|
float _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float, float2 (0, 1), _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float);
|
|
float _Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float = _BarkSmoothnessRemapMin;
|
|
float _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float = _BarkSmoothnessRemapMax;
|
|
float2 _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2 = float2(_Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float, _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float);
|
|
float _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float, float2 (0, 1), _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3 = float3(_Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3;
|
|
Unity_Lerp_float3(_Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3, _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3);
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[0];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[1];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[2];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_A_4_Float = 0;
|
|
UnityTexture2D _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkNormalMap);
|
|
float4 _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4);
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_R_4_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_G_5_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_B_6_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_A_7_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.a;
|
|
float _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float = _TrunkNormalScale;
|
|
float3 _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.xyz), _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float, _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3);
|
|
UnityTexture2D _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkNormalMap);
|
|
float4 _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4);
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_R_4_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_G_5_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_B_6_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_A_7_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.a;
|
|
float _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float = _BarkNormalScale;
|
|
float3 _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.xyz), _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3);
|
|
float3 _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
Unity_Lerp_float3(_NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3);
|
|
surface.BaseColor = (_Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4.xyz);
|
|
surface.Emission = float3(0, 0, 0);
|
|
surface.Alpha = float(1);
|
|
surface.BentNormal = IN.TangentSpaceNormal;
|
|
surface.Smoothness = _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float;
|
|
surface.Occlusion = _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float;
|
|
surface.NormalTS = _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
surface.Metallic = _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float;
|
|
return surface;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Graph Inputs
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#define VFX_SRP_ATTRIBUTES AttributesMesh
|
|
#define VaryingsMeshType VaryingsMeshToPS
|
|
#define VFX_SRP_VARYINGS VaryingsMeshType
|
|
#define VFX_SRP_SURFACE_INPUTS FragInputs
|
|
#endif
|
|
|
|
VertexDescriptionInputs AttributesMeshToVertexDescriptionInputs(AttributesMesh 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.VertexColor = input.color;
|
|
output.TimeParameters = _TimeParameters.xyz; // Note: in case of animation this will be overwrite (allow to handle motion vector)
|
|
#if UNITY_ANY_INSTANCING_ENABLED
|
|
#else
|
|
#endif
|
|
|
|
return output;
|
|
}
|
|
|
|
VertexDescription GetVertexDescription(AttributesMesh input, float3 timeParameters
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
// build graph inputs
|
|
VertexDescriptionInputs vertexDescriptionInputs = AttributesMeshToVertexDescriptionInputs(input);
|
|
// Override time parameters with used one (This is required to correctly handle motion vectors for vertex animation based on time)
|
|
vertexDescriptionInputs.TimeParameters = timeParameters;
|
|
|
|
// evaluate vertex graph
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
// Fetch the vertex graph properties for the particle instance.
|
|
GetElementVertexProperties(element, properties);
|
|
|
|
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs, properties);
|
|
#else
|
|
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs);
|
|
#endif
|
|
return vertexDescription;
|
|
|
|
}
|
|
|
|
AttributesMesh ApplyMeshModification(AttributesMesh input, float3 timeParameters
|
|
#ifdef USE_CUSTOMINTERP_SUBSTRUCT
|
|
#ifdef TESSELLATION_ON
|
|
, inout VaryingsMeshToDS varyings
|
|
#else
|
|
, inout VaryingsMeshToPS varyings
|
|
#endif
|
|
#endif
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
VertexDescription vertexDescription = GetVertexDescription(input, timeParameters
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, element
|
|
#endif
|
|
);
|
|
|
|
// copy graph output to the results
|
|
input.positionOS = vertexDescription.Position;
|
|
input.normalOS = vertexDescription.Normal;
|
|
input.tangentOS.xyz = vertexDescription.Tangent;
|
|
|
|
|
|
|
|
return input;
|
|
}
|
|
|
|
#if defined(_ADD_CUSTOM_VELOCITY) // For shader graph custom velocity
|
|
// Return precomputed Velocity in object space
|
|
float3 GetCustomVelocity(AttributesMesh input
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
VertexDescription vertexDescription = GetVertexDescription(input, _TimeParameters.xyz
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, element
|
|
#endif
|
|
);
|
|
return vertexDescription.CustomVelocity;
|
|
}
|
|
#endif
|
|
|
|
FragInputs BuildFragInputs(VaryingsMeshToPS input)
|
|
{
|
|
FragInputs output;
|
|
ZERO_INITIALIZE(FragInputs, output);
|
|
|
|
// Init to some default value to make the computer quiet (else it output 'divide by zero' warning even if value is not used).
|
|
// TODO: this is a really poor workaround, but the variable is used in a bunch of places
|
|
// to compute normals which are then passed on elsewhere to compute other values...
|
|
output.tangentToWorld = k_identity3x3;
|
|
output.positionSS = input.positionCS; // input.positionCS is SV_Position
|
|
|
|
output.tangentToWorld = BuildTangentToWorld(input.tangentWS, input.normalWS);
|
|
output.texCoord0 = input.texCoord0;
|
|
output.texCoord3 = input.texCoord3;
|
|
|
|
#if UNITY_ANY_INSTANCING_ENABLED
|
|
#else
|
|
#endif
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
// FragInputs from VFX come from two places: Interpolator or CBuffer.
|
|
#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
|
|
|
|
// splice point to copy custom interpolator fields from varyings to frag inputs
|
|
|
|
|
|
return output;
|
|
}
|
|
|
|
// existing HDRP code uses the combined function to go directly from packed to frag inputs
|
|
FragInputs UnpackVaryingsMeshToFragInputs(PackedVaryingsMeshToPS input)
|
|
{
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
#if defined(HAVE_VFX_MODIFICATION) && defined(UNITY_INSTANCING_ENABLED)
|
|
unity_InstanceID = input.instanceID;
|
|
#endif
|
|
VaryingsMeshToPS unpacked = UnpackVaryingsMeshToPS(input);
|
|
return BuildFragInputs(unpacked);
|
|
}
|
|
SurfaceDescriptionInputs FragInputsToSurfaceDescriptionInputs(FragInputs input, float3 viewWS)
|
|
{
|
|
SurfaceDescriptionInputs output;
|
|
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
|
|
|
#if defined(SHADER_STAGE_RAY_TRACING)
|
|
#else
|
|
#endif
|
|
output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
|
|
|
|
#if UNITY_UV_STARTS_AT_TOP
|
|
#else
|
|
#endif
|
|
|
|
|
|
output.uv0 = input.texCoord0;
|
|
output.uv3 = input.texCoord3;
|
|
|
|
// splice point to copy frag inputs custom interpolator pack into the SDI
|
|
|
|
|
|
return output;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Surface Data (Specific Material)
|
|
|
|
void ApplyDecalToSurfaceDataNoNormal(DecalSurfaceData decalSurfaceData, inout SurfaceData surfaceData);
|
|
|
|
void ApplyDecalAndGetNormal(FragInputs fragInputs, PositionInputs posInput, SurfaceDescription surfaceDescription,
|
|
inout SurfaceData surfaceData)
|
|
{
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
#ifdef DECAL_NORMAL_BLENDING
|
|
// SG nodes don't ouptut surface gradients, so if decals require surf grad blending, we have to convert
|
|
// the normal to gradient before applying the decal. We then have to resolve the gradient back to world space
|
|
float3 normalTS;
|
|
|
|
normalTS = SurfaceGradientFromTangentSpaceNormalAndFromTBN(surfaceDescription.NormalTS,
|
|
fragInputs.tangentToWorld[0], fragInputs.tangentToWorld[1]);
|
|
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, fragInputs.tangentToWorld[2], normalTS);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
|
|
GetNormalWS_SG(fragInputs, normalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
#else
|
|
// normal delivered to master node
|
|
GetNormalWS(fragInputs, surfaceDescription.NormalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Both uses and modifies 'surfaceData.normalWS'.
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, surfaceData.normalWS.xyz);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
#endif
|
|
}
|
|
void BuildSurfaceData(FragInputs fragInputs, inout SurfaceDescription surfaceDescription, float3 V, PositionInputs posInput, out SurfaceData surfaceData, out float3 bentNormalWS)
|
|
{
|
|
ZERO_INITIALIZE(SurfaceData, surfaceData);
|
|
|
|
// specularOcclusion need to be init ahead of decal to quiet the compiler that modify the SurfaceData struct
|
|
// however specularOcclusion can come from the graph, so need to be init here so it can be override.
|
|
surfaceData.specularOcclusion = 1.0;
|
|
surfaceData.thickness = 0.0;
|
|
|
|
surfaceData.baseColor = surfaceDescription.BaseColor;
|
|
surfaceData.perceptualSmoothness = surfaceDescription.Smoothness;
|
|
surfaceData.ambientOcclusion = surfaceDescription.Occlusion;
|
|
surfaceData.metallic = surfaceDescription.Metallic;
|
|
|
|
#if defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE) || defined(_REFRACTION_THIN)
|
|
if (_EnableSSRefraction)
|
|
{
|
|
|
|
surfaceData.transmittanceMask = (1.0 - surfaceDescription.Alpha);
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
else
|
|
{
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
#else
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
#endif
|
|
|
|
// These static material feature allow compile time optimization
|
|
surfaceData.materialFeatures = MATERIALFEATUREFLAGS_LIT_STANDARD;
|
|
#ifdef _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SUBSURFACE_SCATTERING;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_COLORED_TRANSMISSION;
|
|
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_ANISOTROPY
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_ANISOTROPY;
|
|
|
|
// Initialize the normal to something non-zero to avoid a div-zero warning for anisotropy.
|
|
surfaceData.normalWS = float3(0, 1, 0);
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_IRIDESCENCE
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_IRIDESCENCE;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SPECULAR_COLOR;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_CLEAR_COAT
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_CLEAR_COAT;
|
|
#endif
|
|
|
|
#if defined (_MATERIAL_FEATURE_SPECULAR_COLOR) && defined (_ENERGY_CONSERVING_SPECULAR)
|
|
// Require to have setup baseColor
|
|
// Reproduce the energy conservation done in legacy Unity. Not ideal but better for compatibility and users can unchek it
|
|
surfaceData.baseColor *= (1.0 - Max3(surfaceData.specularColor.r, surfaceData.specularColor.g, surfaceData.specularColor.b));
|
|
#endif
|
|
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
ApplyDecalAndGetNormal(fragInputs, posInput, surfaceDescription, surfaceData);
|
|
|
|
surfaceData.geomNormalWS = fragInputs.tangentToWorld[2];
|
|
|
|
surfaceData.tangentWS = normalize(fragInputs.tangentToWorld[0].xyz); // The tangent is not normalize in tangentToWorld for mikkt. TODO: Check if it expected that we normalize with Morten. Tag: SURFACE_GRADIENT
|
|
|
|
|
|
bentNormalWS = surfaceData.normalWS;
|
|
|
|
surfaceData.tangentWS = Orthonormalize(surfaceData.tangentWS, surfaceData.normalWS);
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
// Mipmap mode debugging isn't supported with ray tracing as it relies on derivatives
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD0
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG(posInput.positionSS, fragInputs.texCoord0);
|
|
#else
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG_NO_UV(posInput.positionSS);
|
|
#endif
|
|
surfaceData.metallic = 0;
|
|
}
|
|
#endif
|
|
|
|
// We need to call ApplyDebugToSurfaceData after filling the surfaceData and before filling builtinData
|
|
// as it can modify attribute use for static lighting
|
|
ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData);
|
|
#endif
|
|
|
|
// By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion.
|
|
// If user provide bent normal then we process a better term
|
|
#if defined(_SPECULAR_OCCLUSION_CUSTOM)
|
|
// Just use the value passed through via the slot (not active otherwise)
|
|
#elif defined(_SPECULAR_OCCLUSION_FROM_AO_BENT_NORMAL)
|
|
// If we have bent normal and ambient occlusion, process a specular occlusion
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromBentAO(V, bentNormalWS, surfaceData.normalWS, surfaceData.ambientOcclusion, PerceptualSmoothnessToPerceptualRoughness(surfaceData.perceptualSmoothness));
|
|
#elif defined(_AMBIENT_OCCLUSION) && defined(_SPECULAR_OCCLUSION_FROM_AO)
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness));
|
|
#endif
|
|
|
|
#if defined(_ENABLE_GEOMETRIC_SPECULAR_AA) && !defined(SHADER_STAGE_RAY_TRACING)
|
|
surfaceData.perceptualSmoothness = GeometricNormalFiltering(surfaceData.perceptualSmoothness, fragInputs.tangentToWorld[2], surfaceDescription.SpecularAAScreenSpaceVariance, surfaceDescription.SpecularAAThreshold);
|
|
#endif
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Get Surface And BuiltinData
|
|
|
|
void GetSurfaceAndBuiltinData(FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData RAY_TRACING_OPTIONAL_PARAMETERS)
|
|
{
|
|
// Don't dither if displaced tessellation (we're fading out the displacement instead to match the next LOD)
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && !defined(_TESSELLATION_DISPLACEMENT)
|
|
#ifdef LOD_FADE_CROSSFADE // enable dithering LOD transition if user select CrossFade transition in LOD group
|
|
LODDitheringTransition(ComputeFadeMaskSeed(V, posInput.positionSS), unity_LODFade.x);
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
#ifdef _DOUBLESIDED_ON
|
|
float3 doubleSidedConstants = _DoubleSidedConstants.xyz;
|
|
#else
|
|
float3 doubleSidedConstants = float3(1.0, 1.0, 1.0);
|
|
#endif
|
|
|
|
ApplyDoubleSidedFlipOrMirror(fragInputs, doubleSidedConstants); // Apply double sided flip on the vertex normal
|
|
#endif // SHADER_UNLIT
|
|
|
|
SurfaceDescriptionInputs surfaceDescriptionInputs = FragInputsToSurfaceDescriptionInputs(fragInputs, V);
|
|
|
|
#if defined(HAVE_VFX_MODIFICATION)
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
GetElementPixelProperties(fragInputs, properties);
|
|
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs, properties);
|
|
#else
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs);
|
|
#endif
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
surfaceDescription.Alpha = 1.0f;
|
|
}
|
|
#endif
|
|
|
|
// Perform alpha test very early to save performance (a killed pixel will not sample textures)
|
|
// TODO: split graph evaluation to grab just alpha dependencies first? tricky..
|
|
#ifdef _ALPHATEST_ON
|
|
float alphaCutoff = surfaceDescription.AlphaClipThreshold;
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
// The TransparentDepthPrepass is also used with SSR transparent.
|
|
// If an artists enable transaprent SSR but not the TransparentDepthPrepass itself, then we use AlphaClipThreshold
|
|
// otherwise if TransparentDepthPrepass is enabled we use AlphaClipThresholdDepthPrepass
|
|
#elif SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_POSTPASS
|
|
// DepthPostpass always use its own alpha threshold
|
|
alphaCutoff = surfaceDescription.AlphaClipThresholdDepthPostpass;
|
|
#elif (SHADERPASS == SHADERPASS_SHADOWS) || (SHADERPASS == SHADERPASS_RAYTRACING_VISIBILITY)
|
|
// If use shadow threshold isn't enable we don't allow any test
|
|
#endif
|
|
|
|
GENERIC_ALPHA_TEST(surfaceDescription.Alpha, alphaCutoff);
|
|
#endif
|
|
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && _DEPTHOFFSET_ON
|
|
ApplyDepthOffsetPositionInput(V, surfaceDescription.DepthOffset, GetViewForwardDir(), GetWorldToHClipMatrix(), posInput);
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
float3 bentNormalWS;
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData, bentNormalWS);
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD1
|
|
float4 lightmapTexCoord1 = fragInputs.texCoord1;
|
|
#else
|
|
float4 lightmapTexCoord1 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD2
|
|
float4 lightmapTexCoord2 = fragInputs.texCoord2;
|
|
#else
|
|
float4 lightmapTexCoord2 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Builtin Data
|
|
// For back lighting we use the oposite vertex normal
|
|
InitBuiltinData(posInput, alpha, bentNormalWS, -fragInputs.tangentToWorld[2], lightmapTexCoord1, lightmapTexCoord2, builtinData);
|
|
|
|
#else
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData);
|
|
|
|
ZERO_BUILTIN_INITIALIZE(builtinData); // No call to InitBuiltinData as we don't have any lighting
|
|
builtinData.opacity = surfaceDescription.Alpha;
|
|
|
|
#if defined(DEBUG_DISPLAY)
|
|
// Light Layers are currently not used for the Unlit shader (because it is not lit)
|
|
// But Unlit objects do cast shadows according to their rendering layer mask, which is what we want to
|
|
// display in the light layers visualization mode, therefore we need the renderingLayers
|
|
builtinData.renderingLayers = GetMeshRenderingLayerMask();
|
|
#endif
|
|
|
|
#endif // SHADER_UNLIT
|
|
|
|
#ifdef _ALPHATEST_ON
|
|
// Used for sharpening by alpha to mask - Alpha to covertage is only used with depth only and forward pass (no shadow pass, no transparent pass)
|
|
builtinData.alphaClipTreshold = alphaCutoff;
|
|
#endif
|
|
|
|
// override sampleBakedGI - not used by Unlit
|
|
// When overriding GI, we need to force the isLightmap flag to make sure we don't add APV (sampled in the lightloop) on top of the overridden value (set at GBuffer stage)
|
|
|
|
builtinData.emissiveColor = surfaceDescription.Emission;
|
|
|
|
// Note this will not fully work on transparent surfaces (can check with _SURFACE_TYPE_TRANSPARENT define)
|
|
// We will always overwrite vt feeback with the nearest. So behind transparent surfaces vt will not be resolved
|
|
// This is a limitation of the current MRT approach.
|
|
#ifdef UNITY_VIRTUAL_TEXTURING
|
|
#endif
|
|
|
|
#if _DEPTHOFFSET_ON
|
|
builtinData.depthOffset = surfaceDescription.DepthOffset;
|
|
#endif
|
|
|
|
// TODO: We should generate distortion / distortionBlur for non distortion pass
|
|
#if (SHADERPASS == SHADERPASS_DISTORTION)
|
|
builtinData.distortion = surfaceDescription.Distortion;
|
|
builtinData.distortionBlur = surfaceDescription.DistortionBlur;
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// PostInitBuiltinData call ApplyDebugToBuiltinData
|
|
PostInitBuiltinData(V, posInput, surfaceData, builtinData);
|
|
#else
|
|
ApplyDebugToBuiltinData(builtinData);
|
|
#endif
|
|
|
|
RAY_TRACING_OPTIONAL_ALPHA_TEST_PASS
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Main
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDepthOnly.hlsl"
|
|
|
|
// --------------------------------------------------
|
|
// Visual Effect Vertex Invocations
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/VisualEffectVertex.hlsl"
|
|
#else
|
|
#endif
|
|
#endif
|
|
|
|
ENDHLSL
|
|
}
|
|
Pass
|
|
{
|
|
Name "GBuffer"
|
|
Tags
|
|
{
|
|
"LightMode" = "GBuffer"
|
|
}
|
|
|
|
// Render State
|
|
Cull [_CullMode]
|
|
ZTest [_ZTestGBuffer]
|
|
Stencil
|
|
{
|
|
WriteMask [_StencilWriteMaskGBuffer]
|
|
Ref [_StencilRefGBuffer]
|
|
CompFront Always
|
|
PassFront Replace
|
|
CompBack Always
|
|
PassBack Replace
|
|
}
|
|
|
|
// Debug
|
|
// <None>
|
|
|
|
// --------------------------------------------------
|
|
// Pass
|
|
|
|
HLSLPROGRAM
|
|
|
|
// Pragmas
|
|
#pragma multi_compile _ DOTS_INSTANCING_ON
|
|
#pragma instancing_options renderinglayer
|
|
#pragma target 4.5
|
|
#pragma vertex Vert
|
|
#pragma fragment Frag
|
|
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
|
|
#pragma multi_compile_instancing
|
|
|
|
// Keywords
|
|
#pragma multi_compile_fragment _ RENDERING_LAYERS
|
|
#pragma multi_compile_raytracing _ RENDERING_LAYERS
|
|
#pragma shader_feature _ _SURFACE_TYPE_TRANSPARENT
|
|
#pragma shader_feature_local _ _DOUBLESIDED_ON
|
|
#pragma shader_feature_local _ _ADD_PRECOMPUTED_VELOCITY
|
|
#pragma shader_feature_local _ _TRANSPARENT_WRITES_MOTION_VEC _TRANSPARENT_REFRACTIVE_SORT
|
|
#pragma shader_feature_local_fragment _ _ENABLE_FOG_ON_TRANSPARENT
|
|
#pragma multi_compile _ DEBUG_DISPLAY
|
|
#pragma multi_compile _ LOD_FADE_CROSSFADE
|
|
#pragma shader_feature_local_fragment _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma multi_compile _ LIGHTMAP_ON
|
|
#pragma multi_compile _ DIRLIGHTMAP_COMBINED
|
|
#pragma multi_compile_fragment _ PROBE_VOLUMES_L1 PROBE_VOLUMES_L2
|
|
#pragma multi_compile_raytracing _ PROBE_VOLUMES_L1 PROBE_VOLUMES_L2
|
|
#pragma multi_compile _ DYNAMICLIGHTMAP_ON
|
|
#pragma multi_compile_fragment _ SHADOWS_SHADOWMASK
|
|
#pragma multi_compile_raytracing _ SHADOWS_SHADOWMASK
|
|
#pragma multi_compile_fragment DECALS_OFF DECALS_3RT DECALS_4RT
|
|
#pragma multi_compile_fragment _ DECAL_SURFACE_GRADIENT
|
|
#pragma multi_compile _ USE_LEGACY_LIGHTMAPS
|
|
#pragma shader_feature_local _ _REFRACTION_PLANE _REFRACTION_SPHERE _REFRACTION_THIN
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// GraphKeywords: <None>
|
|
|
|
// Defines
|
|
#define SHADERPASS SHADERPASS_GBUFFER
|
|
#define RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
|
|
// For custom interpolators to inject a substruct definition before FragInputs definition,
|
|
// allowing for FragInputs to capture CI's intended for ShaderGraph's SDI.
|
|
struct CustomInterpolators
|
|
{
|
|
};
|
|
#define USE_CUSTOMINTERP_SUBSTRUCT
|
|
|
|
|
|
|
|
// TODO: Merge FragInputsVFX substruct with CustomInterpolators.
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
struct FragInputsVFX
|
|
{
|
|
/* WARNING: $splice Could not find named fragment 'FragInputsVFX' */
|
|
};
|
|
#endif
|
|
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/GeometricTools.hlsl" // Required by Tessellation.hlsl
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Tessellation.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" // Required to be include before we include properties as it define DECLARE_STACK_CB
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl" // Required before including properties as it defines UNITY_TEXTURE_STREAMING_DEBUG_VARS
|
|
// Always include Shader Graph version
|
|
// Always include last to avoid double macros
|
|
#include "Packages/com.unity.shadergraph/ShaderGraphLibrary/Functions.hlsl" // Need to be here for Gradient struct definition
|
|
|
|
// --------------------------------------------------
|
|
// Defines
|
|
|
|
// Attribute
|
|
#define ATTRIBUTES_NEED_NORMAL
|
|
#define ATTRIBUTES_NEED_TANGENT
|
|
#define ATTRIBUTES_NEED_TEXCOORD0
|
|
#define ATTRIBUTES_NEED_TEXCOORD1
|
|
#define ATTRIBUTES_NEED_TEXCOORD2
|
|
#define ATTRIBUTES_NEED_TEXCOORD3
|
|
#define ATTRIBUTES_NEED_COLOR
|
|
#define VARYINGS_NEED_POSITION_WS
|
|
#define VARYINGS_NEED_TANGENT_TO_WORLD
|
|
#define VARYINGS_NEED_TEXCOORD0
|
|
#define VARYINGS_NEED_TEXCOORD1
|
|
#define VARYINGS_NEED_TEXCOORD2
|
|
#define VARYINGS_NEED_TEXCOORD3
|
|
|
|
#define HAVE_MESH_MODIFICATION
|
|
|
|
//Strip down the FragInputs.hlsl (on graphics), so we can only optimize the interpolators we use.
|
|
//if by accident something requests contents of FragInputs.hlsl, it will be caught as a compiler error
|
|
//Frag inputs stripping is only enabled when FRAG_INPUTS_ENABLE_STRIPPING is set
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && SHADERPASS != SHADERPASS_RAYTRACING_GBUFFER && SHADERPASS != SHADERPASS_FULL_SCREEN_DEBUG
|
|
#define FRAG_INPUTS_ENABLE_STRIPPING
|
|
#endif
|
|
#define FRAG_INPUTS_USE_TEXCOORD0
|
|
#define FRAG_INPUTS_USE_TEXCOORD1
|
|
#define FRAG_INPUTS_USE_TEXCOORD2
|
|
#define FRAG_INPUTS_USE_TEXCOORD3
|
|
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl"
|
|
|
|
|
|
|
|
|
|
// Following two define are a workaround introduce in 10.1.x for RaytracingQualityNode
|
|
// The ShaderGraph don't support correctly migration of this node as it serialize all the node data
|
|
// in the json file making it impossible to uprgrade. Until we get a fix, we do a workaround here
|
|
// to still allow us to rename the field and keyword of this node without breaking existing code.
|
|
#ifdef RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define RAYTRACING_SHADER_GRAPH_HIGH
|
|
#endif
|
|
|
|
#ifdef RAYTRACING_SHADER_GRAPH_RAYTRACED
|
|
#define RAYTRACING_SHADER_GRAPH_LOW
|
|
#endif
|
|
// end
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// We need isFrontFace when using double sided - it is not required for unlit as in case of unlit double sided only drive the cullmode
|
|
// VARYINGS_NEED_CULLFACE can be define by VaryingsMeshToPS.FaceSign input if a IsFrontFace Node is included in the shader graph.
|
|
#if defined(_DOUBLESIDED_ON) && !defined(VARYINGS_NEED_CULLFACE)
|
|
#define VARYINGS_NEED_CULLFACE
|
|
#endif
|
|
#endif
|
|
|
|
// Specific Material Define
|
|
#define _AMBIENT_OCCLUSION 1
|
|
#define _SPECULAR_OCCLUSION_FROM_AO 1
|
|
#define _ENERGY_CONSERVING_SPECULAR 1
|
|
|
|
#if _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// Colored Transmission doesn't support clear coat
|
|
#undef _MATERIAL_FEATURE_CLEAR_COAT
|
|
#endif
|
|
|
|
// If we use subsurface scattering, enable output split lighting (for forward pass)
|
|
#if defined(_MATERIAL_FEATURE_SUBSURFACE_SCATTERING) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define OUTPUT_SPLIT_LIGHTING
|
|
#endif
|
|
|
|
// This shader support recursive rendering for raytracing
|
|
#define HAVE_RECURSIVE_RENDERING
|
|
|
|
// In Path Tracing, For all single-sided, refractive materials, we want to force a thin refraction model
|
|
#if (SHADERPASS == SHADERPASS_PATH_TRACING) && !defined(_DOUBLESIDED_ON) && (defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE))
|
|
#undef _REFRACTION_PLANE
|
|
#undef _REFRACTION_SPHERE
|
|
#define _REFRACTION_THIN
|
|
#endif
|
|
// Caution: we can use the define SHADER_UNLIT onlit after the above Material include as it is the Unlit template who define it
|
|
|
|
// To handle SSR on transparent correctly with a possibility to enable/disable it per framesettings
|
|
// we should have a code like this:
|
|
// if !defined(_DISABLE_SSR_TRANSPARENT)
|
|
// pragma multi_compile _ WRITE_NORMAL_BUFFER
|
|
// endif
|
|
// i.e we enable the multicompile only if we can receive SSR or not, and then C# code drive
|
|
// it based on if SSR transparent in frame settings and not (and stripper can strip it).
|
|
// this is currently not possible with our current preprocessor as _DISABLE_SSR_TRANSPARENT is a keyword not a define
|
|
// so instead we used this and chose to pay the extra cost of normal write even if SSR transaprent is disabled.
|
|
// Ideally the shader graph generator should handle it but condition below can't be handle correctly for now.
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
#if !defined(_DISABLE_SSR_TRANSPARENT) && !defined(SHADER_UNLIT)
|
|
#define WRITE_NORMAL_BUFFER
|
|
#endif
|
|
#endif
|
|
|
|
// See Lit.shader
|
|
#if SHADERPASS == SHADERPASS_MOTION_VECTORS && defined(WRITE_DECAL_BUFFER_AND_RENDERING_LAYER)
|
|
#define WRITE_DECAL_BUFFER
|
|
#endif
|
|
|
|
#ifndef DEBUG_DISPLAY
|
|
// In case of opaque we don't want to perform the alpha test, it is done in depth prepass and we use depth equal for ztest (setup from UI)
|
|
// Don't do it with debug display mode as it is possible there is no depth prepass in this case
|
|
#if !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#if SHADERPASS == SHADERPASS_FORWARD
|
|
#define SHADERPASS_FORWARD_BYPASS_ALPHA_TEST
|
|
#elif SHADERPASS == SHADERPASS_GBUFFER
|
|
#define SHADERPASS_GBUFFER_BYPASS_ALPHA_TEST
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
// Define _DEFERRED_CAPABLE_MATERIAL for shader capable to run in deferred pass
|
|
#if defined(SHADER_LIT) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _DEFERRED_CAPABLE_MATERIAL
|
|
#endif
|
|
|
|
// Translate transparent motion vector define
|
|
#if (defined(_TRANSPARENT_WRITES_MOTION_VEC) || defined(_TRANSPARENT_REFRACTIVE_SORT)) && defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _WRITE_TRANSPARENT_MOTION_VECTOR
|
|
#endif
|
|
|
|
// -- Graph Properties
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _TrunkBaseColor;
|
|
float4 _TrunkBaseColorMap_TexelSize;
|
|
float4 _TrunkTilingOffset;
|
|
float4 _TrunkNormalMap_TexelSize;
|
|
float _TrunkNormalScale;
|
|
float4 _TrunkMaskMap_TexelSize;
|
|
float _TrunkMetallic;
|
|
float _TrunkAORemapMin;
|
|
float _TrunkAORemapMax;
|
|
float _TrunkSmoothnessRemapMin;
|
|
float _TrunkSmoothnessRemapMax;
|
|
float4 _LayerMask_TexelSize;
|
|
float4 _BarkBlendMaskTilingOffset;
|
|
float4 _BarkBaseColor;
|
|
float4 _BarkBaseColorMap_TexelSize;
|
|
float _BarkUseUV3;
|
|
float4 _BarkTilingOffset;
|
|
float4 _BarkNormalMap_TexelSize;
|
|
float _BarkNormalScale;
|
|
float4 _BarkMaskMap_TexelSize;
|
|
float _BarkMetallic;
|
|
float _BarkSmoothnessRemapMin;
|
|
float _BarkSmoothnessRemapMax;
|
|
float _BarkAORemapMin;
|
|
float _BarkAORemapMax;
|
|
float _Stiffness;
|
|
float _InitialBend;
|
|
float _Drag;
|
|
float _HeightDrag;
|
|
float4 _NewNormal;
|
|
float4 _EmissionColor;
|
|
float _UseShadowThreshold;
|
|
float4 _DoubleSidedConstants;
|
|
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
|
float _BlendMode;
|
|
float _EnableBlendModePreserveSpecularLighting;
|
|
float _RayTracing;
|
|
float _RefractionModel;
|
|
float _MaterialID;
|
|
float _MaterialTypeMask;
|
|
CBUFFER_END
|
|
|
|
|
|
// Object and Global properties
|
|
SAMPLER(SamplerState_Linear_Repeat);
|
|
SAMPLER(SamplerState_Linear_Repeat_Aniso8);
|
|
TEXTURE2D(_TrunkBaseColorMap);
|
|
SAMPLER(sampler_TrunkBaseColorMap);
|
|
TEXTURE2D(_TrunkNormalMap);
|
|
SAMPLER(sampler_TrunkNormalMap);
|
|
TEXTURE2D(_TrunkMaskMap);
|
|
SAMPLER(sampler_TrunkMaskMap);
|
|
TEXTURE2D(_LayerMask);
|
|
SAMPLER(sampler_LayerMask);
|
|
TEXTURE2D(_BarkBaseColorMap);
|
|
SAMPLER(sampler_BarkBaseColorMap);
|
|
TEXTURE2D(_BarkNormalMap);
|
|
SAMPLER(sampler_BarkNormalMap);
|
|
TEXTURE2D(_BarkMaskMap);
|
|
SAMPLER(sampler_BarkMaskMap);
|
|
TEXTURE2D(WIND_SETTINGS_TexNoise);
|
|
SAMPLER(samplerWIND_SETTINGS_TexNoise);
|
|
float4 WIND_SETTINGS_TexNoise_TexelSize;
|
|
TEXTURE2D(WIND_SETTINGS_TexGust);
|
|
SAMPLER(samplerWIND_SETTINGS_TexGust);
|
|
float4 WIND_SETTINGS_TexGust_TexelSize;
|
|
float4 WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float WIND_SETTINGS_FlexNoiseScale;
|
|
float WIND_SETTINGS_ShiverNoiseScale;
|
|
float WIND_SETTINGS_Turbulence;
|
|
float WIND_SETTINGS_GustSpeed;
|
|
float WIND_SETTINGS_GustScale;
|
|
float WIND_SETTINGS_GustWorldScale;
|
|
float4x4 WIND_SETTINGS_Points;
|
|
float4 WIND_SETTINGS_Points_Radius;
|
|
|
|
// -- Property used by ScenePickingPass
|
|
#ifdef SCENEPICKINGPASS
|
|
float4 _SelectionID;
|
|
#endif
|
|
|
|
// -- Properties used by SceneSelectionPass
|
|
#ifdef SCENESELECTIONPASS
|
|
int _ObjectId;
|
|
int _PassValue;
|
|
#endif
|
|
|
|
// Includes
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/NormalSurfaceGradient.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDecalData.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
// GraphIncludes: <None>
|
|
|
|
// --------------------------------------------------
|
|
// Structs and Packing
|
|
|
|
struct AttributesMesh
|
|
{
|
|
float3 positionOS : POSITION;
|
|
float3 normalOS : NORMAL;
|
|
float4 tangentOS : TANGENT;
|
|
float4 uv0 : TEXCOORD0;
|
|
float4 uv1 : TEXCOORD1;
|
|
float4 uv2 : TEXCOORD2;
|
|
float4 uv3 : TEXCOORD3;
|
|
float4 color : COLOR;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(ATTRIBUTES_NEED_INSTANCEID)
|
|
uint instanceID : INSTANCEID_SEMANTIC;
|
|
#endif
|
|
};
|
|
struct VaryingsMeshToPS
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
float3 positionRWS;
|
|
float3 normalWS;
|
|
float4 tangentWS;
|
|
float4 texCoord0;
|
|
float4 texCoord1;
|
|
float4 texCoord2;
|
|
float4 texCoord3;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
uint instanceID : CUSTOM_INSTANCE_ID;
|
|
#endif
|
|
};
|
|
struct VertexDescriptionInputs
|
|
{
|
|
float3 ObjectSpaceNormal;
|
|
float3 WorldSpaceNormal;
|
|
float3 ObjectSpaceTangent;
|
|
float3 ObjectSpacePosition;
|
|
float4 VertexColor;
|
|
float3 TimeParameters;
|
|
};
|
|
struct SurfaceDescriptionInputs
|
|
{
|
|
float3 TangentSpaceNormal;
|
|
float4 uv0;
|
|
float4 uv3;
|
|
};
|
|
struct PackedVaryingsMeshToPS
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
float4 tangentWS : INTERP0;
|
|
float4 texCoord0 : INTERP1;
|
|
float4 texCoord1 : INTERP2;
|
|
float4 texCoord2 : INTERP3;
|
|
float4 texCoord3 : INTERP4;
|
|
float3 positionRWS : INTERP5;
|
|
float3 normalWS : INTERP6;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
uint instanceID : CUSTOM_INSTANCE_ID;
|
|
#endif
|
|
};
|
|
|
|
PackedVaryingsMeshToPS PackVaryingsMeshToPS (VaryingsMeshToPS input)
|
|
{
|
|
PackedVaryingsMeshToPS output;
|
|
ZERO_INITIALIZE(PackedVaryingsMeshToPS, output);
|
|
output.positionCS = input.positionCS;
|
|
output.tangentWS.xyzw = input.tangentWS;
|
|
output.texCoord0.xyzw = input.texCoord0;
|
|
output.texCoord1.xyzw = input.texCoord1;
|
|
output.texCoord2.xyzw = input.texCoord2;
|
|
output.texCoord3.xyzw = input.texCoord3;
|
|
output.positionRWS.xyz = input.positionRWS;
|
|
output.normalWS.xyz = input.normalWS;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
output.instanceID = input.instanceID;
|
|
#endif
|
|
return output;
|
|
}
|
|
|
|
VaryingsMeshToPS UnpackVaryingsMeshToPS (PackedVaryingsMeshToPS input)
|
|
{
|
|
VaryingsMeshToPS output;
|
|
output.positionCS = input.positionCS;
|
|
output.tangentWS = input.tangentWS.xyzw;
|
|
output.texCoord0 = input.texCoord0.xyzw;
|
|
output.texCoord1 = input.texCoord1.xyzw;
|
|
output.texCoord2 = input.texCoord2.xyzw;
|
|
output.texCoord3 = input.texCoord3.xyzw;
|
|
output.positionRWS = input.positionRWS.xyz;
|
|
output.normalWS = input.normalWS.xyz;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
output.instanceID = input.instanceID;
|
|
#endif
|
|
return output;
|
|
}
|
|
|
|
|
|
// --------------------------------------------------
|
|
// Graph
|
|
|
|
|
|
// Graph Functions
|
|
|
|
void Unity_Add_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
void Unity_Distance_float3(float3 A, float3 B, out float Out)
|
|
{
|
|
Out = distance(A, B);
|
|
}
|
|
|
|
void Unity_Comparison_Less_float(float A, float B, out float Out)
|
|
{
|
|
Out = A < B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_Comparison_Greater_float(float A, float B, out float Out)
|
|
{
|
|
Out = A > B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_Subtract_float(float A, float B, out float Out)
|
|
{
|
|
Out = A - B;
|
|
}
|
|
|
|
void Unity_And_float(float A, float B, out float Out)
|
|
{
|
|
Out = A && B;
|
|
}
|
|
|
|
void Unity_Branch_float(float Predicate, float True, float False, out float Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Multiply_float_float(float A, float B, out float Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Length_float4(float4 In, out float Out)
|
|
{
|
|
Out = length(In);
|
|
}
|
|
|
|
void Unity_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Subtract_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A - B;
|
|
}
|
|
|
|
void Unity_Normalize_float3(float3 In, out float3 Out)
|
|
{
|
|
Out = normalize(In);
|
|
}
|
|
|
|
void Unity_Length_float3(float3 In, out float Out)
|
|
{
|
|
Out = length(In);
|
|
}
|
|
|
|
void Unity_Divide_float(float A, float B, out float Out)
|
|
{
|
|
Out = A / B;
|
|
}
|
|
|
|
void Unity_Clamp_float(float In, float Min, float Max, out float Out)
|
|
{
|
|
Out = clamp(In, Min, Max);
|
|
}
|
|
|
|
void Unity_Lerp_float(float A, float B, float T, out float Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Multiply_float3_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Combine_float(float R, float G, float B, float A, out float4 RGBA, out float3 RGB, out float2 RG)
|
|
{
|
|
RGBA = float4(R, G, B, A);
|
|
RGB = float3(R, G, B);
|
|
RG = float2(R, G);
|
|
}
|
|
|
|
void Unity_Add_float4(float4 A, float4 B, out float4 Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
struct Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float
|
|
{
|
|
};
|
|
|
|
void SG_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float(float4x4 Matrix4_cb72bb33b7a84dfda97778a514f9b60f, float3 Vector3_90379ebf40aa468b8362f8d265f4f234, float4 Vector4_159bb4232f82428893101734a03e2a1e, Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float IN, out float4 WindPoint_1)
|
|
{
|
|
float3 _Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3 = Vector3_90379ebf40aa468b8362f8d265f4f234;
|
|
float4x4 _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4 = Matrix4_cb72bb33b7a84dfda97778a514f9b60f;
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].r);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].g);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].b);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].a);
|
|
float3 _Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4.xyz), _Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3);
|
|
float3 _Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3, _Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3);
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[0];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[1];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[2];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[3];
|
|
float _Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3, _Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float);
|
|
float4 _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4 = Vector4_159bb4232f82428893101734a03e2a1e;
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_R_1_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[0];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_G_2_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[1];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_B_3_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[2];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_A_4_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[3];
|
|
float _Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float;
|
|
Unity_Divide_float(_Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_R_1_Float, _Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float);
|
|
float _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float, float(0), float(1), _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float);
|
|
float _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float;
|
|
Unity_Lerp_float(_Split_d6e088f9ab90466583adc22ea79eb8cc_A_4_Float, float(0), _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float, _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float);
|
|
float3 _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3, (_Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float.xxx), _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3);
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_R_1_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[0];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_G_2_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[1];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_B_3_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[2];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_A_4_Float = 0;
|
|
float4 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4;
|
|
float3 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGB_5_Vector3;
|
|
float2 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_ef99a48850fe4f8f8e30e870c5e2ee09_R_1_Float, _Split_ef99a48850fe4f8f8e30e870c5e2ee09_G_2_Float, _Split_ef99a48850fe4f8f8e30e870c5e2ee09_B_3_Float, _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGB_5_Vector3, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RG_6_Vector2);
|
|
float3 _Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4.xyz), _Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3);
|
|
float3 _Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3, _Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3);
|
|
float _Split_8bbd5052350846968bf312362efd9f01_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[0];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[1];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[2];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[3];
|
|
float _Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3, _Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float);
|
|
float _Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float;
|
|
Unity_Divide_float(_Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_G_2_Float, _Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float);
|
|
float _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float, float(0), float(1), _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float);
|
|
float _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float;
|
|
Unity_Lerp_float(_Split_8bbd5052350846968bf312362efd9f01_A_4_Float, float(0), _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float, _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float);
|
|
float3 _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3, (_Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float.xxx), _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3);
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_R_1_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[0];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_G_2_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[1];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_B_3_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[2];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_A_4_Float = 0;
|
|
float4 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4;
|
|
float3 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGB_5_Vector3;
|
|
float2 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_ab8841795f594d3a90b87ac9fcc98d38_R_1_Float, _Split_ab8841795f594d3a90b87ac9fcc98d38_G_2_Float, _Split_ab8841795f594d3a90b87ac9fcc98d38_B_3_Float, _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGB_5_Vector3, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RG_6_Vector2);
|
|
float4 _Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4;
|
|
Unity_Add_float4(_Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4, _Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4);
|
|
float3 _Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4.xyz), _Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3);
|
|
float3 _Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3, _Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3);
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[0];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[1];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[2];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[3];
|
|
float _Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3, _Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float);
|
|
float _Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float;
|
|
Unity_Divide_float(_Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_B_3_Float, _Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float);
|
|
float _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float, float(0), float(1), _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float);
|
|
float _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float;
|
|
Unity_Lerp_float(_Split_fa21a8022f944854903e06c07c6f079c_A_4_Float, float(0), _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float, _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float);
|
|
float3 _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3, (_Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float.xxx), _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3);
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_R_1_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[0];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_G_2_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[1];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_B_3_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[2];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_A_4_Float = 0;
|
|
float4 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4;
|
|
float3 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGB_5_Vector3;
|
|
float2 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_6b9b5ad9f14a49b9bc49c718430617a8_R_1_Float, _Split_6b9b5ad9f14a49b9bc49c718430617a8_G_2_Float, _Split_6b9b5ad9f14a49b9bc49c718430617a8_B_3_Float, _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGB_5_Vector3, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RG_6_Vector2);
|
|
float4 _Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4;
|
|
Unity_Add_float4(_Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4, _Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4);
|
|
float3 _Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4.xyz), _Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3);
|
|
float3 _Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3, _Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3);
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[0];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[1];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[2];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[3];
|
|
float _Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3, _Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float);
|
|
float _Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float;
|
|
Unity_Divide_float(_Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_A_4_Float, _Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float);
|
|
float _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float, float(0), float(1), _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float);
|
|
float _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float;
|
|
Unity_Lerp_float(_Split_1bfec6763d4b458398e36937b4114c29_A_4_Float, float(0), _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float, _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float);
|
|
float3 _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3, (_Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float.xxx), _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3);
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_R_1_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[0];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_G_2_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[1];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_B_3_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[2];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_A_4_Float = 0;
|
|
float4 _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4;
|
|
float3 _Combine_872906644fc84c8c8286733edba75045_RGB_5_Vector3;
|
|
float2 _Combine_872906644fc84c8c8286733edba75045_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_e22879e6c4574322ab21f6261a21bced_R_1_Float, _Split_e22879e6c4574322ab21f6261a21bced_G_2_Float, _Split_e22879e6c4574322ab21f6261a21bced_B_3_Float, _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float, _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4, _Combine_872906644fc84c8c8286733edba75045_RGB_5_Vector3, _Combine_872906644fc84c8c8286733edba75045_RG_6_Vector2);
|
|
float4 _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4;
|
|
Unity_Add_float4(_Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4, _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4, _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4);
|
|
WindPoint_1 = _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4;
|
|
}
|
|
|
|
void Unity_Power_float(float A, float B, out float Out)
|
|
{
|
|
Out = pow(A, B);
|
|
}
|
|
|
|
void Unity_Or_float(float A, float B, out float Out)
|
|
{
|
|
Out = A || B;
|
|
}
|
|
|
|
void Unity_Branch_float3(float Predicate, float3 True, float3 False, out float3 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Add_float(float A, float B, out float Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
struct Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float
|
|
{
|
|
};
|
|
|
|
void SG_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float(float3 Vector3_604F121F, float3 Vector3_C30D997B, float Vector1_A2C4B4F4, float Vector1_7F78DDD2, UnityTexture2D Texture2D_5BAC276D, UnityTexture2D Texture2D_A3874DB9, float4 Vector4_EBFF8CDE, float Vector1_B4470F9B, float Vector1_2EC6D670, float Vector1_9365F438, float Vector1_F53C4B89, float Vector1_6803B355, float Vector1_5EFF6B1A, Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float IN, out float3 direction_1, out float strength_2)
|
|
{
|
|
float4 _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_R_1_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[0];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_G_2_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[1];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_B_3_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[2];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_A_4_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[3];
|
|
float4 _Combine_39060d5de038a58eb7462ba953e69739_RGBA_4_Vector4;
|
|
float3 _Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3;
|
|
float2 _Combine_39060d5de038a58eb7462ba953e69739_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_f4f701329abd45808bbd6b61ce26dcc8_R_1_Float, _Split_f4f701329abd45808bbd6b61ce26dcc8_G_2_Float, _Split_f4f701329abd45808bbd6b61ce26dcc8_B_3_Float, float(0), _Combine_39060d5de038a58eb7462ba953e69739_RGBA_4_Vector4, _Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3, _Combine_39060d5de038a58eb7462ba953e69739_RG_6_Vector2);
|
|
float3 _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3, _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3);
|
|
float4 _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_R_1_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[0];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_G_2_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[1];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_B_3_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[2];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_A_4_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[3];
|
|
float3 _Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3, (_Split_aeb4c57f09db718e9e14c3afd38465ae_A_4_Float.xxx), _Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3);
|
|
float _Property_72aef364136bb683b08145ce7a1b59a1_Out_0_Float = Vector1_9365F438;
|
|
float _Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_72aef364136bb683b08145ce7a1b59a1_Out_0_Float, float(0), _Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean);
|
|
UnityTexture2D _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D = Texture2D_A3874DB9;
|
|
float3 _Property_f0ff7954720d018395b7da89e2e2d761_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3 = float3(float(1), float(0), float(0));
|
|
float _Property_e53ae21dcf87e286b67de750a59275e7_Out_0_Float = Vector1_9365F438;
|
|
float3 _Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3, (_Property_e53ae21dcf87e286b67de750a59275e7_Out_0_Float.xxx), _Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3);
|
|
float _Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float = Vector1_5EFF6B1A;
|
|
float3 _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3, (_Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float.xxx), _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3);
|
|
float3 _Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_f0ff7954720d018395b7da89e2e2d761_Out_0_Vector3, _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3, _Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3);
|
|
float _Property_7f2599afa6fc5b8394c8fb0389031122_Out_0_Float = Vector1_6803B355;
|
|
float3 _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3, (_Property_7f2599afa6fc5b8394c8fb0389031122_Out_0_Float.xxx), _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3);
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_R_1_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[0];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_G_2_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[1];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_B_3_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[2];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_A_4_Float = 0;
|
|
float4 _Combine_0ac20ec517f076829f01b70d67c5af02_RGBA_4_Vector4;
|
|
float3 _Combine_0ac20ec517f076829f01b70d67c5af02_RGB_5_Vector3;
|
|
float2 _Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_f4466ebe24e7fa838f5735fb1210a3dd_R_1_Float, _Split_f4466ebe24e7fa838f5735fb1210a3dd_B_3_Float, float(0), float(0), _Combine_0ac20ec517f076829f01b70d67c5af02_RGBA_4_Vector4, _Combine_0ac20ec517f076829f01b70d67c5af02_RGB_5_Vector3, _Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2);
|
|
float4 _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4 = SAMPLE_TEXTURE2D_LOD(_Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.tex, _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.samplerstate, _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.GetTransformedUV(_Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2), float(3));
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_R_5_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.r;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_G_6_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.g;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_B_7_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.b;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_A_8_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.a;
|
|
float _Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float;
|
|
Unity_Branch_float(_Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean, _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_R_5_Float, float(0), _Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float);
|
|
float _Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float;
|
|
Unity_Power_float(_Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float, float(2), _Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float);
|
|
float _Property_9592cd5ab3f8628d995c1b79e8b0e51d_Out_0_Float = Vector1_F53C4B89;
|
|
float _Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float;
|
|
Unity_Multiply_float_float(_Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float, _Property_9592cd5ab3f8628d995c1b79e8b0e51d_Out_0_Float, _Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float);
|
|
float3 _Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3((_Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float.xxx), _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3, _Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3);
|
|
float _Property_7be270a4cb312f8ebbfba142f454b30d_Out_0_Float = Vector1_9365F438;
|
|
float3 _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3, (_Property_7be270a4cb312f8ebbfba142f454b30d_Out_0_Float.xxx), _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3);
|
|
float3 _Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3;
|
|
Unity_Add_float3(_Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3, _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3, _Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3);
|
|
float4 _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_e719665c40324e89a536d165d0427a68_R_1_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[0];
|
|
float _Split_e719665c40324e89a536d165d0427a68_G_2_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[1];
|
|
float _Split_e719665c40324e89a536d165d0427a68_B_3_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[2];
|
|
float _Split_e719665c40324e89a536d165d0427a68_A_4_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[3];
|
|
float _Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Split_e719665c40324e89a536d165d0427a68_A_4_Float, float(0), _Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean);
|
|
float _Property_295a45d224dd35829c1fc35a5ac74847_Out_0_Float = Vector1_2EC6D670;
|
|
float _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_295a45d224dd35829c1fc35a5ac74847_Out_0_Float, float(0), _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean);
|
|
float _Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean;
|
|
Unity_Or_float(_Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean, _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean, _Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean);
|
|
UnityTexture2D _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D = Texture2D_5BAC276D;
|
|
float3 _Property_c82f40aba4b7f08db9a97aaccbe0e096_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3, (_Split_e719665c40324e89a536d165d0427a68_A_4_Float.xxx), _Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3);
|
|
float3 _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3, (_Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float.xxx), _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3);
|
|
float3 _Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_c82f40aba4b7f08db9a97aaccbe0e096_Out_0_Vector3, _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3, _Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3);
|
|
float _Property_1ab0df57959c6986a0602bb0abfeaf58_Out_0_Float = Vector1_B4470F9B;
|
|
float3 _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3, (_Property_1ab0df57959c6986a0602bb0abfeaf58_Out_0_Float.xxx), _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3);
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_R_1_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[0];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_G_2_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[1];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_B_3_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[2];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_A_4_Float = 0;
|
|
float4 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGBA_4_Vector4;
|
|
float3 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGB_5_Vector3;
|
|
float2 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_5ff678fef0fb61889da2a8288f7e7d15_R_1_Float, _Split_5ff678fef0fb61889da2a8288f7e7d15_B_3_Float, float(0), float(0), _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGBA_4_Vector4, _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGB_5_Vector3, _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2);
|
|
float4 _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4 = SAMPLE_TEXTURE2D_LOD(_Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.tex, _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.samplerstate, _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.GetTransformedUV(_Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2), float(3));
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_R_5_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.r;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_G_6_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.g;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_B_7_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.b;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_A_8_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.a;
|
|
float4 _Combine_3136fa3d24c46087969f5a3828ccbb98_RGBA_4_Vector4;
|
|
float3 _Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3;
|
|
float2 _Combine_3136fa3d24c46087969f5a3828ccbb98_RG_6_Vector2;
|
|
Unity_Combine_float(_SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_R_5_Float, _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_G_6_Float, _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_B_7_Float, float(0), _Combine_3136fa3d24c46087969f5a3828ccbb98_RGBA_4_Vector4, _Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3, _Combine_3136fa3d24c46087969f5a3828ccbb98_RG_6_Vector2);
|
|
float3 _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3;
|
|
Unity_Add_float3(_Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3, float3(-0.5, -0.5, -0.5), _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3);
|
|
float3 _Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3;
|
|
Unity_Branch_float3(_Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean, _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3, float3(0, 0, 0), _Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3);
|
|
float _Property_9946d066804cc584a96830f8d35269cc_Out_0_Float = Vector1_2EC6D670;
|
|
float3 _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3, (_Property_9946d066804cc584a96830f8d35269cc_Out_0_Float.xxx), _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3);
|
|
float3 _Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3;
|
|
Unity_Add_float3(_Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3, _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3, _Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3);
|
|
float _Property_4ffb3356bdb9c78c815a6e7da47e7a34_Out_0_Float = Vector1_A2C4B4F4;
|
|
float3 _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3, (_Property_4ffb3356bdb9c78c815a6e7da47e7a34_Out_0_Float.xxx), _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3);
|
|
float _Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float;
|
|
Unity_Length_float3(_Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3, _Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float);
|
|
float _Property_51d6736452f5938caf6f83cdfc7df682_Out_0_Float = Vector1_7F78DDD2;
|
|
float _Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float;
|
|
Unity_Add_float(_Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float, _Property_51d6736452f5938caf6f83cdfc7df682_Out_0_Float, _Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float);
|
|
float _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float;
|
|
Unity_Multiply_float_float(_Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float, 0.001, _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float);
|
|
direction_1 = _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3;
|
|
strength_2 = _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float;
|
|
}
|
|
|
|
void Unity_CrossProduct_float(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = cross(A, B);
|
|
}
|
|
|
|
void Unity_Comparison_Equal_float(float A, float B, out float Out)
|
|
{
|
|
Out = A == B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_DotProduct_float3(float3 A, float3 B, out float Out)
|
|
{
|
|
Out = dot(A, B);
|
|
}
|
|
|
|
void Unity_Absolute_float(float In, out float Out)
|
|
{
|
|
Out = abs(In);
|
|
}
|
|
|
|
void Unity_Maximum_float(float A, float B, out float Out)
|
|
{
|
|
Out = max(A, B);
|
|
}
|
|
|
|
void Unity_Cosine_float(float In, out float Out)
|
|
{
|
|
Out = cos(In);
|
|
}
|
|
|
|
void Unity_Sine_float(float In, out float Out)
|
|
{
|
|
Out = sin(In);
|
|
}
|
|
|
|
void Unity_Comparison_NotEqual_float(float A, float B, out float Out)
|
|
{
|
|
Out = A != B ? 1 : 0;
|
|
}
|
|
|
|
struct Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float
|
|
{
|
|
float3 WorldSpaceNormal;
|
|
float4 VertexColor;
|
|
};
|
|
|
|
void SG_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float(float Vector1_BCB03E1A, float3 Vector3_C30D997B, float Vector1_A2C4B4F4, float Vector1_7EE0F94A, float Boolean_527CB26E, float Vector1_DE1BF63A, float Vector1_7F78DDD2, float3 Vector3_DE8CC74D, UnityTexture2D Texture2D_5BAC276D, UnityTexture2D Texture2D_A3874DB9, float4 Vector4_EBFF8CDE, float Vector1_B4470F9B, float Vector1_2EC6D670, float Vector1_9365F438, float Vector1_F53C4B89, float Vector1_6803B355, float4x4 Matrix4_0617b0bd42fc46ff90b1d55303a5477f, float4 Vector4_b44806ec67ca461fbcdf009dc6092cc3, Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float IN, out float3 vertex_1, out float3 normal_2)
|
|
{
|
|
float4 _Vector4_991bdf9badea4b2bb70edc71a7338c1d_Out_0_Vector4 = float4(float(0), float(0), float(0), float(1));
|
|
float3 _Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3;
|
|
{
|
|
// Converting Position from Object to AbsoluteWorld via world space
|
|
float3 world;
|
|
world = TransformObjectToWorld((_Vector4_991bdf9badea4b2bb70edc71a7338c1d_Out_0_Vector4.xyz).xyz);
|
|
_Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3 = GetAbsolutePositionWS(world);
|
|
}
|
|
float _Distance_343883e4e5444664abed46100940f24f_Out_2_Float;
|
|
Unity_Distance_float3(_Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3, float3(0, 0, 0), _Distance_343883e4e5444664abed46100940f24f_Out_2_Float);
|
|
float _Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean;
|
|
Unity_Comparison_Less_float(_Distance_343883e4e5444664abed46100940f24f_Out_2_Float, float(0.001), _Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean);
|
|
float3 _Property_2a4ab46b1d7c45918978aae50bd32b6f_Out_0_Vector3 = Vector3_C30D997B;
|
|
float4 _Vector4_d213eb2790b34988809a251ff9c74c6b_Out_0_Vector4 = float4(float(0), float(0), float(0), float(1));
|
|
float3 _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3;
|
|
_Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3 = TransformObjectToWorld((_Vector4_d213eb2790b34988809a251ff9c74c6b_Out_0_Vector4.xyz).xyz);
|
|
float3 _Property_4a88ff8e6e6b2b84bb2818cf73a0af30_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3;
|
|
_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3 = TransformObjectToWorld(_Property_4a88ff8e6e6b2b84bb2818cf73a0af30_Out_0_Vector3.xyz);
|
|
float _Property_dfda12e25f42bd808e65c99db447e176_Out_0_Boolean = Boolean_527CB26E;
|
|
float _Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float = Vector1_7EE0F94A;
|
|
float _Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float, float(0), _Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean);
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_R_1_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[0];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_G_2_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[1];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_B_3_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[2];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_A_4_Float = 0;
|
|
float _Split_7a634ef857769683b2100876a36535a2_R_1_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[0];
|
|
float _Split_7a634ef857769683b2100876a36535a2_G_2_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[1];
|
|
float _Split_7a634ef857769683b2100876a36535a2_B_3_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[2];
|
|
float _Split_7a634ef857769683b2100876a36535a2_A_4_Float = 0;
|
|
float _Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float;
|
|
Unity_Subtract_float(_Split_05e55a8c1b8cf88f93cbafc67103b677_G_2_Float, _Split_7a634ef857769683b2100876a36535a2_G_2_Float, _Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float);
|
|
float _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean;
|
|
Unity_Comparison_Less_float(_Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float, _Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float, _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean);
|
|
float _And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean;
|
|
Unity_And_float(_Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean, _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean, _And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean);
|
|
float _Property_e5e59fcc565a8b80ac239ba87d1bcf74_Out_0_Float = Vector1_A2C4B4F4;
|
|
float _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float;
|
|
Unity_Branch_float(_And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean, float(1E-05), _Property_e5e59fcc565a8b80ac239ba87d1bcf74_Out_0_Float, _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float);
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_R_1_Float = IN.VertexColor[0];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_G_2_Float = IN.VertexColor[1];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_B_3_Float = IN.VertexColor[2];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_A_4_Float = IN.VertexColor[3];
|
|
float _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float;
|
|
Unity_Multiply_float_float(_Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float, _Split_43013162a81fc4889a1944f2a2b75f66_A_4_Float, _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float);
|
|
float _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float;
|
|
Unity_Branch_float(_Property_dfda12e25f42bd808e65c99db447e176_Out_0_Boolean, _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float, _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float, _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float);
|
|
float _Property_eaab26f57a13988a8a813ad0813c8570_Out_0_Float = Vector1_7F78DDD2;
|
|
UnityTexture2D _Property_0f02225ebee993849ea6be48328c0958_Out_0_Texture2D = Texture2D_5BAC276D;
|
|
UnityTexture2D _Property_fce16cc7b4fcf48097b94eb2d5f1b596_Out_0_Texture2D = Texture2D_A3874DB9;
|
|
float4 _Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float;
|
|
Unity_Length_float4(_Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4, _Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float);
|
|
float _Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float, float(0), _Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean);
|
|
float4 _Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4;
|
|
Unity_Branch_float4(_Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean, _Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4, float4(0, 0, 1, 1), _Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4);
|
|
float4x4 _Property_cb03cb298f0a47d4ae24d85f3c47db75_Out_0_Matrix4 = Matrix4_0617b0bd42fc46ff90b1d55303a5477f;
|
|
float4 _Property_844e35a56a864617b521872c1cee398d_Out_0_Vector4 = Vector4_b44806ec67ca461fbcdf009dc6092cc3;
|
|
Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float _WindNMPoints_071e9370484b4168b560a27fbea64a52;
|
|
float4 _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4;
|
|
SG_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float(_Property_cb03cb298f0a47d4ae24d85f3c47db75_Out_0_Matrix4, SHADERGRAPH_OBJECT_POSITION, _Property_844e35a56a864617b521872c1cee398d_Out_0_Vector4, _WindNMPoints_071e9370484b4168b560a27fbea64a52, _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4);
|
|
float4 _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4;
|
|
Unity_Add_float4(_Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4, _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4, _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4);
|
|
float _Property_02c51f4c8a859f8f88433b435d4452f6_Out_0_Float = Vector1_B4470F9B;
|
|
float _Property_6b508d48a081548385021b27896c0622_Out_0_Float = Vector1_2EC6D670;
|
|
float _Property_d73fed4fb3c7b58d892364765a30498b_Out_0_Float = Vector1_9365F438;
|
|
float _Property_c3101a1b656cac858bfa11dbe7ebd268_Out_0_Float = Vector1_F53C4B89;
|
|
float _Property_c82c2ac458938d86bcc1aae3a58cc1dc_Out_0_Float = Vector1_6803B355;
|
|
float _Property_3f5330d8bec7c681ab9563aad03c7b89_Out_0_Float = Vector1_BCB03E1A;
|
|
Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba;
|
|
float3 _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3;
|
|
float _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float;
|
|
SG_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float, _Property_eaab26f57a13988a8a813ad0813c8570_Out_0_Float, _Property_0f02225ebee993849ea6be48328c0958_Out_0_Texture2D, _Property_fce16cc7b4fcf48097b94eb2d5f1b596_Out_0_Texture2D, _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4, _Property_02c51f4c8a859f8f88433b435d4452f6_Out_0_Float, _Property_6b508d48a081548385021b27896c0622_Out_0_Float, _Property_d73fed4fb3c7b58d892364765a30498b_Out_0_Float, _Property_c3101a1b656cac858bfa11dbe7ebd268_Out_0_Float, _Property_c82c2ac458938d86bcc1aae3a58cc1dc_Out_0_Float, _Property_3f5330d8bec7c681ab9563aad03c7b89_Out_0_Float, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float);
|
|
float3 _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3;
|
|
Unity_CrossProduct_float(float3 (0, 1, 0), _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3, _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3);
|
|
float _Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean;
|
|
Unity_Comparison_Equal_float((_CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3).x, float(0), _Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean);
|
|
float3 _Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean, float3(1E-06, 1E-06, 1E-06), _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3, _Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3);
|
|
float3 _Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3, _Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3);
|
|
float3 _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3);
|
|
float _DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float;
|
|
Unity_DotProduct_float3(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3, _DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float);
|
|
float3 _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, (_DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float.xxx), _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3);
|
|
float3 _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3;
|
|
Unity_Add_float3(_Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3, _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3);
|
|
float3 _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3, _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3);
|
|
float _Distance_702b068f612c7289a99272879da274ed_Out_2_Float;
|
|
Unity_Distance_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Distance_702b068f612c7289a99272879da274ed_Out_2_Float);
|
|
float _Property_f5c255b0f666358291012b78132d6593_Out_0_Float = Vector1_DE1BF63A;
|
|
float _Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float;
|
|
Unity_Divide_float(_Distance_702b068f612c7289a99272879da274ed_Out_2_Float, _Property_f5c255b0f666358291012b78132d6593_Out_0_Float, _Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float);
|
|
float _Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float;
|
|
Unity_Absolute_float(_Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float, _Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float);
|
|
float _Float_96534b09fc72da8da7bad6ebdb2b01ab_Out_0_Float = float(1E-07);
|
|
float _Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float;
|
|
Unity_Maximum_float(_Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float, _Float_96534b09fc72da8da7bad6ebdb2b01ab_Out_0_Float, _Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float);
|
|
float _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float;
|
|
Unity_Divide_float(float(1), _Property_f5c255b0f666358291012b78132d6593_Out_0_Float, _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float);
|
|
float _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float;
|
|
Unity_Power_float(_Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float, _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float, _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float);
|
|
float _Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float;
|
|
Unity_Multiply_float_float(_WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float, _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float, _Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float);
|
|
float _Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float;
|
|
Unity_Cosine_float(_Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float, _Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float);
|
|
float3 _Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3, (_Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float.xxx), _Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3);
|
|
float3 _CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3;
|
|
Unity_CrossProduct_float(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3, _CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3);
|
|
float _Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float;
|
|
Unity_Sine_float(_Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float, _Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float);
|
|
float3 _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3, (_Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float.xxx), _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3);
|
|
float3 _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3;
|
|
Unity_Add_float3(_Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3, _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3, _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3);
|
|
float3 _Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3;
|
|
Unity_Add_float3(_Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3, _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3, _Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3);
|
|
float3 _Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3;
|
|
_Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3 = TransformWorldToObject(_Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3.xyz);
|
|
float3 _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean, _Property_2a4ab46b1d7c45918978aae50bd32b6f_Out_0_Vector3, _Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3, _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3);
|
|
float3 _Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3 = Vector3_DE8CC74D;
|
|
float _Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float;
|
|
Unity_Length_float3(_Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3, _Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float);
|
|
float _Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean;
|
|
Unity_Comparison_NotEqual_float(_Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float, float(0), _Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean);
|
|
float3 _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(IN.WorldSpaceNormal, _Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3, _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3);
|
|
float3 _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean, _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3, IN.WorldSpaceNormal, _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3);
|
|
vertex_1 = _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3;
|
|
normal_2 = _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3;
|
|
}
|
|
|
|
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_Lerp_float4(float4 A, float4 B, float4 T, out float4 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Remap_float(float In, float2 InMinMax, float2 OutMinMax, out float Out)
|
|
{
|
|
Out = OutMinMax.x + (In - InMinMax.x) * (OutMinMax.y - OutMinMax.x) / (InMinMax.y - InMinMax.x);
|
|
}
|
|
|
|
void Unity_Lerp_float3(float3 A, float3 B, float3 T, out float3 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_NormalStrength_float(float3 In, float Strength, out float3 Out)
|
|
{
|
|
Out = float3(In.rg * Strength, lerp(1, In.b, saturate(Strength)));
|
|
}
|
|
|
|
// Graph Vertex
|
|
struct VertexDescription
|
|
{
|
|
float3 Position;
|
|
float3 Normal;
|
|
float3 Tangent;
|
|
};
|
|
|
|
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
|
|
{
|
|
VertexDescription description = (VertexDescription)0;
|
|
float3 _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3;
|
|
Unity_Add_float3(IN.ObjectSpacePosition, float3(1E-07, 1E-07, 1E-07), _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3);
|
|
float _Property_084857c303b23b82b7f2702b4186fa43_Out_0_Float = _Drag;
|
|
float _Property_35ad336ee9b278808178baf539e0133f_Out_0_Float = _HeightDrag;
|
|
float _Property_476e69b3f5653a8c995133f4fccaa757_Out_0_Float = _Stiffness;
|
|
float _Property_805aa6168fe3b08ca209d8ab0fa5d2d3_Out_0_Float = _InitialBend;
|
|
float4 _Property_8e47e7fd5c1a8b88b9cf212a6f62134c_Out_0_Vector4 = _NewNormal;
|
|
UnityTexture2D _Property_3b8cd110cb76a68d88342e4cc1336e0b_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(WIND_SETTINGS_TexNoise);
|
|
UnityTexture2D _Property_a939900eb077ee8593e638c7c457b53b_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(WIND_SETTINGS_TexGust);
|
|
float4 _Property_f59f8f9dc8757f8ab1c1d173e09c0787_Out_0_Vector4 = WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float _Property_89884359995fcf8a8d80bc0e19ce75f1_Out_0_Float = WIND_SETTINGS_FlexNoiseScale;
|
|
float _Property_c460088461241a819f81fd6ab2a8fc04_Out_0_Float = WIND_SETTINGS_Turbulence;
|
|
float _Property_0ef8268ed7d75386b8735f7baab81d22_Out_0_Float = WIND_SETTINGS_GustSpeed;
|
|
float _Property_9f4dae117e65b384a057e2e17ba36791_Out_0_Float = WIND_SETTINGS_GustScale;
|
|
float _Property_8c1472d718ff81889fbd5ee5e93e5291_Out_0_Float = WIND_SETTINGS_GustWorldScale;
|
|
float4x4 _Property_d28187fe6a414fa5b58ca9948c44abca_Out_0_Matrix4 = WIND_SETTINGS_Points;
|
|
float4 _Property_18d7723e0ed14f07992a44bbeb337673_Out_0_Vector4 = WIND_SETTINGS_Points_Radius;
|
|
Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8;
|
|
_WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8.WorldSpaceNormal = IN.WorldSpaceNormal;
|
|
_WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8.VertexColor = IN.VertexColor;
|
|
float3 _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3;
|
|
float3 _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_normal_2_Vector3;
|
|
SG_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float(IN.TimeParameters.x, _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3, _Property_084857c303b23b82b7f2702b4186fa43_Out_0_Float, _Property_35ad336ee9b278808178baf539e0133f_Out_0_Float, 0, _Property_476e69b3f5653a8c995133f4fccaa757_Out_0_Float, _Property_805aa6168fe3b08ca209d8ab0fa5d2d3_Out_0_Float, (_Property_8e47e7fd5c1a8b88b9cf212a6f62134c_Out_0_Vector4.xyz), _Property_3b8cd110cb76a68d88342e4cc1336e0b_Out_0_Texture2D, _Property_a939900eb077ee8593e638c7c457b53b_Out_0_Texture2D, _Property_f59f8f9dc8757f8ab1c1d173e09c0787_Out_0_Vector4, _Property_89884359995fcf8a8d80bc0e19ce75f1_Out_0_Float, _Property_c460088461241a819f81fd6ab2a8fc04_Out_0_Float, _Property_0ef8268ed7d75386b8735f7baab81d22_Out_0_Float, _Property_9f4dae117e65b384a057e2e17ba36791_Out_0_Float, _Property_8c1472d718ff81889fbd5ee5e93e5291_Out_0_Float, _Property_d28187fe6a414fa5b58ca9948c44abca_Out_0_Matrix4, _Property_18d7723e0ed14f07992a44bbeb337673_Out_0_Vector4, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_normal_2_Vector3);
|
|
description.Position = _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3;
|
|
description.Normal = IN.ObjectSpaceNormal;
|
|
description.Tangent = IN.ObjectSpaceTangent;
|
|
return description;
|
|
}
|
|
|
|
// Graph Pixel
|
|
struct SurfaceDescription
|
|
{
|
|
float3 BaseColor;
|
|
float3 Emission;
|
|
float Alpha;
|
|
float3 BentNormal;
|
|
float Smoothness;
|
|
float Occlusion;
|
|
float3 NormalTS;
|
|
float Metallic;
|
|
float4 VTPackedFeedback;
|
|
};
|
|
|
|
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
|
{
|
|
SurfaceDescription surface = (SurfaceDescription)0;
|
|
UnityTexture2D _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkBaseColorMap);
|
|
float4 _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4 = _TrunkTilingOffset;
|
|
float _Split_60538633130155809820b3185c81057f_R_1_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[0];
|
|
float _Split_60538633130155809820b3185c81057f_G_2_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[1];
|
|
float _Split_60538633130155809820b3185c81057f_B_3_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[2];
|
|
float _Split_60538633130155809820b3185c81057f_A_4_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[3];
|
|
float2 _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_R_1_Float, _Split_60538633130155809820b3185c81057f_G_2_Float);
|
|
float2 _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_B_3_Float, _Split_60538633130155809820b3185c81057f_A_4_Float);
|
|
float2 _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2, _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2, _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2);
|
|
float4 _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_R_4_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_G_5_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_B_6_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_A_7_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.a;
|
|
float4 _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4 = _TrunkBaseColor;
|
|
float4 _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4, _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4, _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4);
|
|
UnityTexture2D _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkBaseColorMap);
|
|
float _Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean = _BarkUseUV3;
|
|
float4 _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4 = IN.uv3;
|
|
float4 _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4 = IN.uv0;
|
|
float4 _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4;
|
|
Unity_Branch_float4(_Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean, _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4, _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4, _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4);
|
|
float4 _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4 = _BarkTilingOffset;
|
|
float _Split_ee975774554f6480b33168eff36d8be7_R_1_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[0];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_G_2_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[1];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_B_3_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[2];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_A_4_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[3];
|
|
float2 _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_R_1_Float, _Split_ee975774554f6480b33168eff36d8be7_G_2_Float);
|
|
float2 _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_B_3_Float, _Split_ee975774554f6480b33168eff36d8be7_A_4_Float);
|
|
float2 _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float((_Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4.xy), _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2, _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2, _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2);
|
|
float4 _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_R_4_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_G_5_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_B_6_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_A_7_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.a;
|
|
float4 _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4 = _BarkBaseColor;
|
|
float4 _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4, _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4);
|
|
UnityTexture2D _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_LayerMask);
|
|
float4 _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4 = _BarkBlendMaskTilingOffset;
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[0];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[1];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[2];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[3];
|
|
float2 _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float);
|
|
float2 _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float);
|
|
float2 _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2, _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2, _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2);
|
|
float4 _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2) );
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_R_4_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_G_5_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_B_6_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.a;
|
|
float4 _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4;
|
|
Unity_Lerp_float4(_Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxxx), _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4);
|
|
UnityTexture2D _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkMaskMap);
|
|
float4 _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_B_6_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.a;
|
|
float _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float = _TrunkMetallic;
|
|
float _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float, _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float, _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float);
|
|
float _Property_8142f12b781ad08680220297dab56f14_Out_0_Float = _TrunkAORemapMin;
|
|
float _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float = _TrunkAORemapMax;
|
|
float2 _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2 = float2(_Property_8142f12b781ad08680220297dab56f14_Out_0_Float, _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float);
|
|
float _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float, float2 (0, 1), _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float);
|
|
float _Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float = _TrunkSmoothnessRemapMin;
|
|
float _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float = _TrunkSmoothnessRemapMax;
|
|
float2 _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2 = float2(_Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float, _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float);
|
|
float _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float, float2 (0, 1), _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
float3 _Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3 = float3(_Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
UnityTexture2D _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkMaskMap);
|
|
float4 _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_B_6_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.a;
|
|
float _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float = _BarkMetallic;
|
|
float _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float, _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float, _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float);
|
|
float _Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float = _BarkAORemapMin;
|
|
float _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float = _BarkAORemapMax;
|
|
float2 _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2 = float2(_Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float, _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float);
|
|
float _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float, float2 (0, 1), _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float);
|
|
float _Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float = _BarkSmoothnessRemapMin;
|
|
float _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float = _BarkSmoothnessRemapMax;
|
|
float2 _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2 = float2(_Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float, _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float);
|
|
float _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float, float2 (0, 1), _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3 = float3(_Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3;
|
|
Unity_Lerp_float3(_Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3, _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3);
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[0];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[1];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[2];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_A_4_Float = 0;
|
|
UnityTexture2D _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkNormalMap);
|
|
float4 _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4);
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_R_4_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_G_5_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_B_6_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_A_7_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.a;
|
|
float _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float = _TrunkNormalScale;
|
|
float3 _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.xyz), _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float, _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3);
|
|
UnityTexture2D _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkNormalMap);
|
|
float4 _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4);
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_R_4_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_G_5_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_B_6_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_A_7_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.a;
|
|
float _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float = _BarkNormalScale;
|
|
float3 _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.xyz), _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3);
|
|
float3 _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
Unity_Lerp_float3(_NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3);
|
|
surface.BaseColor = (_Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4.xyz);
|
|
surface.Emission = float3(0, 0, 0);
|
|
surface.Alpha = float(1);
|
|
surface.BentNormal = IN.TangentSpaceNormal;
|
|
surface.Smoothness = _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float;
|
|
surface.Occlusion = _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float;
|
|
surface.NormalTS = _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
surface.Metallic = _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float;
|
|
{
|
|
surface.VTPackedFeedback = float4(1.0f,1.0f,1.0f,1.0f);
|
|
}
|
|
return surface;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Graph Inputs
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#define VFX_SRP_ATTRIBUTES AttributesMesh
|
|
#define VaryingsMeshType VaryingsMeshToPS
|
|
#define VFX_SRP_VARYINGS VaryingsMeshType
|
|
#define VFX_SRP_SURFACE_INPUTS FragInputs
|
|
#endif
|
|
|
|
VertexDescriptionInputs AttributesMeshToVertexDescriptionInputs(AttributesMesh 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.VertexColor = input.color;
|
|
output.TimeParameters = _TimeParameters.xyz; // Note: in case of animation this will be overwrite (allow to handle motion vector)
|
|
#if UNITY_ANY_INSTANCING_ENABLED
|
|
#else
|
|
#endif
|
|
|
|
return output;
|
|
}
|
|
|
|
VertexDescription GetVertexDescription(AttributesMesh input, float3 timeParameters
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
// build graph inputs
|
|
VertexDescriptionInputs vertexDescriptionInputs = AttributesMeshToVertexDescriptionInputs(input);
|
|
// Override time parameters with used one (This is required to correctly handle motion vectors for vertex animation based on time)
|
|
vertexDescriptionInputs.TimeParameters = timeParameters;
|
|
|
|
// evaluate vertex graph
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
// Fetch the vertex graph properties for the particle instance.
|
|
GetElementVertexProperties(element, properties);
|
|
|
|
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs, properties);
|
|
#else
|
|
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs);
|
|
#endif
|
|
return vertexDescription;
|
|
|
|
}
|
|
|
|
AttributesMesh ApplyMeshModification(AttributesMesh input, float3 timeParameters
|
|
#ifdef USE_CUSTOMINTERP_SUBSTRUCT
|
|
#ifdef TESSELLATION_ON
|
|
, inout VaryingsMeshToDS varyings
|
|
#else
|
|
, inout VaryingsMeshToPS varyings
|
|
#endif
|
|
#endif
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
VertexDescription vertexDescription = GetVertexDescription(input, timeParameters
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, element
|
|
#endif
|
|
);
|
|
|
|
// copy graph output to the results
|
|
input.positionOS = vertexDescription.Position;
|
|
input.normalOS = vertexDescription.Normal;
|
|
input.tangentOS.xyz = vertexDescription.Tangent;
|
|
|
|
|
|
|
|
return input;
|
|
}
|
|
|
|
#if defined(_ADD_CUSTOM_VELOCITY) // For shader graph custom velocity
|
|
// Return precomputed Velocity in object space
|
|
float3 GetCustomVelocity(AttributesMesh input
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
VertexDescription vertexDescription = GetVertexDescription(input, _TimeParameters.xyz
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, element
|
|
#endif
|
|
);
|
|
return vertexDescription.CustomVelocity;
|
|
}
|
|
#endif
|
|
|
|
FragInputs BuildFragInputs(VaryingsMeshToPS input)
|
|
{
|
|
FragInputs output;
|
|
ZERO_INITIALIZE(FragInputs, output);
|
|
|
|
// Init to some default value to make the computer quiet (else it output 'divide by zero' warning even if value is not used).
|
|
// TODO: this is a really poor workaround, but the variable is used in a bunch of places
|
|
// to compute normals which are then passed on elsewhere to compute other values...
|
|
output.tangentToWorld = k_identity3x3;
|
|
output.positionSS = input.positionCS; // input.positionCS is SV_Position
|
|
|
|
output.positionRWS = input.positionRWS;
|
|
output.tangentToWorld = BuildTangentToWorld(input.tangentWS, input.normalWS);
|
|
output.texCoord0 = input.texCoord0;
|
|
output.texCoord1 = input.texCoord1;
|
|
output.texCoord2 = input.texCoord2;
|
|
output.texCoord3 = input.texCoord3;
|
|
|
|
#if UNITY_ANY_INSTANCING_ENABLED
|
|
#else
|
|
#endif
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
// FragInputs from VFX come from two places: Interpolator or CBuffer.
|
|
#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
|
|
|
|
// splice point to copy custom interpolator fields from varyings to frag inputs
|
|
|
|
|
|
return output;
|
|
}
|
|
|
|
// existing HDRP code uses the combined function to go directly from packed to frag inputs
|
|
FragInputs UnpackVaryingsMeshToFragInputs(PackedVaryingsMeshToPS input)
|
|
{
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
#if defined(HAVE_VFX_MODIFICATION) && defined(UNITY_INSTANCING_ENABLED)
|
|
unity_InstanceID = input.instanceID;
|
|
#endif
|
|
VaryingsMeshToPS unpacked = UnpackVaryingsMeshToPS(input);
|
|
return BuildFragInputs(unpacked);
|
|
}
|
|
SurfaceDescriptionInputs FragInputsToSurfaceDescriptionInputs(FragInputs input, float3 viewWS)
|
|
{
|
|
SurfaceDescriptionInputs output;
|
|
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
|
|
|
#if defined(SHADER_STAGE_RAY_TRACING)
|
|
#else
|
|
#endif
|
|
output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
|
|
|
|
#if UNITY_UV_STARTS_AT_TOP
|
|
#else
|
|
#endif
|
|
|
|
|
|
output.uv0 = input.texCoord0;
|
|
output.uv3 = input.texCoord3;
|
|
|
|
// splice point to copy frag inputs custom interpolator pack into the SDI
|
|
|
|
|
|
return output;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Surface Data (Specific Material)
|
|
|
|
void ApplyDecalToSurfaceDataNoNormal(DecalSurfaceData decalSurfaceData, inout SurfaceData surfaceData);
|
|
|
|
void ApplyDecalAndGetNormal(FragInputs fragInputs, PositionInputs posInput, SurfaceDescription surfaceDescription,
|
|
inout SurfaceData surfaceData)
|
|
{
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
#ifdef DECAL_NORMAL_BLENDING
|
|
// SG nodes don't ouptut surface gradients, so if decals require surf grad blending, we have to convert
|
|
// the normal to gradient before applying the decal. We then have to resolve the gradient back to world space
|
|
float3 normalTS;
|
|
|
|
normalTS = SurfaceGradientFromTangentSpaceNormalAndFromTBN(surfaceDescription.NormalTS,
|
|
fragInputs.tangentToWorld[0], fragInputs.tangentToWorld[1]);
|
|
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, fragInputs.tangentToWorld[2], normalTS);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
|
|
GetNormalWS_SG(fragInputs, normalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
#else
|
|
// normal delivered to master node
|
|
GetNormalWS(fragInputs, surfaceDescription.NormalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Both uses and modifies 'surfaceData.normalWS'.
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, surfaceData.normalWS.xyz);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
#endif
|
|
}
|
|
void BuildSurfaceData(FragInputs fragInputs, inout SurfaceDescription surfaceDescription, float3 V, PositionInputs posInput, out SurfaceData surfaceData, out float3 bentNormalWS)
|
|
{
|
|
ZERO_INITIALIZE(SurfaceData, surfaceData);
|
|
|
|
// specularOcclusion need to be init ahead of decal to quiet the compiler that modify the SurfaceData struct
|
|
// however specularOcclusion can come from the graph, so need to be init here so it can be override.
|
|
surfaceData.specularOcclusion = 1.0;
|
|
surfaceData.thickness = 0.0;
|
|
|
|
surfaceData.baseColor = surfaceDescription.BaseColor;
|
|
surfaceData.perceptualSmoothness = surfaceDescription.Smoothness;
|
|
surfaceData.ambientOcclusion = surfaceDescription.Occlusion;
|
|
surfaceData.metallic = surfaceDescription.Metallic;
|
|
|
|
#if defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE) || defined(_REFRACTION_THIN)
|
|
if (_EnableSSRefraction)
|
|
{
|
|
|
|
surfaceData.transmittanceMask = (1.0 - surfaceDescription.Alpha);
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
else
|
|
{
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
#else
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
#endif
|
|
|
|
// These static material feature allow compile time optimization
|
|
surfaceData.materialFeatures = MATERIALFEATUREFLAGS_LIT_STANDARD;
|
|
#ifdef _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SUBSURFACE_SCATTERING;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_COLORED_TRANSMISSION;
|
|
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_ANISOTROPY
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_ANISOTROPY;
|
|
|
|
// Initialize the normal to something non-zero to avoid a div-zero warning for anisotropy.
|
|
surfaceData.normalWS = float3(0, 1, 0);
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_IRIDESCENCE
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_IRIDESCENCE;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SPECULAR_COLOR;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_CLEAR_COAT
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_CLEAR_COAT;
|
|
#endif
|
|
|
|
#if defined (_MATERIAL_FEATURE_SPECULAR_COLOR) && defined (_ENERGY_CONSERVING_SPECULAR)
|
|
// Require to have setup baseColor
|
|
// Reproduce the energy conservation done in legacy Unity. Not ideal but better for compatibility and users can unchek it
|
|
surfaceData.baseColor *= (1.0 - Max3(surfaceData.specularColor.r, surfaceData.specularColor.g, surfaceData.specularColor.b));
|
|
#endif
|
|
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
ApplyDecalAndGetNormal(fragInputs, posInput, surfaceDescription, surfaceData);
|
|
|
|
surfaceData.geomNormalWS = fragInputs.tangentToWorld[2];
|
|
|
|
surfaceData.tangentWS = normalize(fragInputs.tangentToWorld[0].xyz); // The tangent is not normalize in tangentToWorld for mikkt. TODO: Check if it expected that we normalize with Morten. Tag: SURFACE_GRADIENT
|
|
|
|
|
|
bentNormalWS = surfaceData.normalWS;
|
|
|
|
surfaceData.tangentWS = Orthonormalize(surfaceData.tangentWS, surfaceData.normalWS);
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
// Mipmap mode debugging isn't supported with ray tracing as it relies on derivatives
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD0
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG(posInput.positionSS, fragInputs.texCoord0);
|
|
#else
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG_NO_UV(posInput.positionSS);
|
|
#endif
|
|
surfaceData.metallic = 0;
|
|
}
|
|
#endif
|
|
|
|
// We need to call ApplyDebugToSurfaceData after filling the surfaceData and before filling builtinData
|
|
// as it can modify attribute use for static lighting
|
|
ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData);
|
|
#endif
|
|
|
|
// By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion.
|
|
// If user provide bent normal then we process a better term
|
|
#if defined(_SPECULAR_OCCLUSION_CUSTOM)
|
|
// Just use the value passed through via the slot (not active otherwise)
|
|
#elif defined(_SPECULAR_OCCLUSION_FROM_AO_BENT_NORMAL)
|
|
// If we have bent normal and ambient occlusion, process a specular occlusion
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromBentAO(V, bentNormalWS, surfaceData.normalWS, surfaceData.ambientOcclusion, PerceptualSmoothnessToPerceptualRoughness(surfaceData.perceptualSmoothness));
|
|
#elif defined(_AMBIENT_OCCLUSION) && defined(_SPECULAR_OCCLUSION_FROM_AO)
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness));
|
|
#endif
|
|
|
|
#if defined(_ENABLE_GEOMETRIC_SPECULAR_AA) && !defined(SHADER_STAGE_RAY_TRACING)
|
|
surfaceData.perceptualSmoothness = GeometricNormalFiltering(surfaceData.perceptualSmoothness, fragInputs.tangentToWorld[2], surfaceDescription.SpecularAAScreenSpaceVariance, surfaceDescription.SpecularAAThreshold);
|
|
#endif
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Get Surface And BuiltinData
|
|
|
|
void GetSurfaceAndBuiltinData(FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData RAY_TRACING_OPTIONAL_PARAMETERS)
|
|
{
|
|
// Don't dither if displaced tessellation (we're fading out the displacement instead to match the next LOD)
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && !defined(_TESSELLATION_DISPLACEMENT)
|
|
#ifdef LOD_FADE_CROSSFADE // enable dithering LOD transition if user select CrossFade transition in LOD group
|
|
LODDitheringTransition(ComputeFadeMaskSeed(V, posInput.positionSS), unity_LODFade.x);
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
#ifdef _DOUBLESIDED_ON
|
|
float3 doubleSidedConstants = _DoubleSidedConstants.xyz;
|
|
#else
|
|
float3 doubleSidedConstants = float3(1.0, 1.0, 1.0);
|
|
#endif
|
|
|
|
ApplyDoubleSidedFlipOrMirror(fragInputs, doubleSidedConstants); // Apply double sided flip on the vertex normal
|
|
#endif // SHADER_UNLIT
|
|
|
|
SurfaceDescriptionInputs surfaceDescriptionInputs = FragInputsToSurfaceDescriptionInputs(fragInputs, V);
|
|
|
|
#if defined(HAVE_VFX_MODIFICATION)
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
GetElementPixelProperties(fragInputs, properties);
|
|
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs, properties);
|
|
#else
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs);
|
|
#endif
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
surfaceDescription.Alpha = 1.0f;
|
|
}
|
|
#endif
|
|
|
|
// Perform alpha test very early to save performance (a killed pixel will not sample textures)
|
|
// TODO: split graph evaluation to grab just alpha dependencies first? tricky..
|
|
#ifdef _ALPHATEST_ON
|
|
float alphaCutoff = surfaceDescription.AlphaClipThreshold;
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
// The TransparentDepthPrepass is also used with SSR transparent.
|
|
// If an artists enable transaprent SSR but not the TransparentDepthPrepass itself, then we use AlphaClipThreshold
|
|
// otherwise if TransparentDepthPrepass is enabled we use AlphaClipThresholdDepthPrepass
|
|
#elif SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_POSTPASS
|
|
// DepthPostpass always use its own alpha threshold
|
|
alphaCutoff = surfaceDescription.AlphaClipThresholdDepthPostpass;
|
|
#elif (SHADERPASS == SHADERPASS_SHADOWS) || (SHADERPASS == SHADERPASS_RAYTRACING_VISIBILITY)
|
|
// If use shadow threshold isn't enable we don't allow any test
|
|
#endif
|
|
|
|
GENERIC_ALPHA_TEST(surfaceDescription.Alpha, alphaCutoff);
|
|
#endif
|
|
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && _DEPTHOFFSET_ON
|
|
ApplyDepthOffsetPositionInput(V, surfaceDescription.DepthOffset, GetViewForwardDir(), GetWorldToHClipMatrix(), posInput);
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
float3 bentNormalWS;
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData, bentNormalWS);
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD1
|
|
float4 lightmapTexCoord1 = fragInputs.texCoord1;
|
|
#else
|
|
float4 lightmapTexCoord1 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD2
|
|
float4 lightmapTexCoord2 = fragInputs.texCoord2;
|
|
#else
|
|
float4 lightmapTexCoord2 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Builtin Data
|
|
// For back lighting we use the oposite vertex normal
|
|
InitBuiltinData(posInput, alpha, bentNormalWS, -fragInputs.tangentToWorld[2], lightmapTexCoord1, lightmapTexCoord2, builtinData);
|
|
|
|
#else
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData);
|
|
|
|
ZERO_BUILTIN_INITIALIZE(builtinData); // No call to InitBuiltinData as we don't have any lighting
|
|
builtinData.opacity = surfaceDescription.Alpha;
|
|
|
|
#if defined(DEBUG_DISPLAY)
|
|
// Light Layers are currently not used for the Unlit shader (because it is not lit)
|
|
// But Unlit objects do cast shadows according to their rendering layer mask, which is what we want to
|
|
// display in the light layers visualization mode, therefore we need the renderingLayers
|
|
builtinData.renderingLayers = GetMeshRenderingLayerMask();
|
|
#endif
|
|
|
|
#endif // SHADER_UNLIT
|
|
|
|
#ifdef _ALPHATEST_ON
|
|
// Used for sharpening by alpha to mask - Alpha to covertage is only used with depth only and forward pass (no shadow pass, no transparent pass)
|
|
builtinData.alphaClipTreshold = alphaCutoff;
|
|
#endif
|
|
|
|
// override sampleBakedGI - not used by Unlit
|
|
// When overriding GI, we need to force the isLightmap flag to make sure we don't add APV (sampled in the lightloop) on top of the overridden value (set at GBuffer stage)
|
|
|
|
builtinData.emissiveColor = surfaceDescription.Emission;
|
|
|
|
// Note this will not fully work on transparent surfaces (can check with _SURFACE_TYPE_TRANSPARENT define)
|
|
// We will always overwrite vt feeback with the nearest. So behind transparent surfaces vt will not be resolved
|
|
// This is a limitation of the current MRT approach.
|
|
#ifdef UNITY_VIRTUAL_TEXTURING
|
|
builtinData.vtPackedFeedback = surfaceDescription.VTPackedFeedback;
|
|
#endif
|
|
|
|
#if _DEPTHOFFSET_ON
|
|
builtinData.depthOffset = surfaceDescription.DepthOffset;
|
|
#endif
|
|
|
|
// TODO: We should generate distortion / distortionBlur for non distortion pass
|
|
#if (SHADERPASS == SHADERPASS_DISTORTION)
|
|
builtinData.distortion = surfaceDescription.Distortion;
|
|
builtinData.distortionBlur = surfaceDescription.DistortionBlur;
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// PostInitBuiltinData call ApplyDebugToBuiltinData
|
|
PostInitBuiltinData(V, posInput, surfaceData, builtinData);
|
|
#else
|
|
ApplyDebugToBuiltinData(builtinData);
|
|
#endif
|
|
|
|
RAY_TRACING_OPTIONAL_ALPHA_TEST_PASS
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Main
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassGBuffer.hlsl"
|
|
|
|
// --------------------------------------------------
|
|
// Visual Effect Vertex Invocations
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/VisualEffectVertex.hlsl"
|
|
#else
|
|
#endif
|
|
#endif
|
|
|
|
ENDHLSL
|
|
}
|
|
Pass
|
|
{
|
|
Name "Forward"
|
|
Tags
|
|
{
|
|
"LightMode" = "Forward"
|
|
}
|
|
|
|
// Render State
|
|
Cull [_CullModeForward]
|
|
Blend [_SrcBlend] [_DstBlend], [_AlphaSrcBlend] [_AlphaDstBlend]
|
|
Blend 1 One OneMinusSrcAlpha
|
|
Blend 2 One [_DstBlend2]
|
|
Blend 3 One [_DstBlend2]
|
|
Blend 4 One OneMinusSrcAlpha
|
|
ZTest [_ZTestDepthEqualForOpaque]
|
|
ZWrite [_ZWrite]
|
|
ColorMask [_ColorMaskTransparentVelOne] 1
|
|
ColorMask [_ColorMaskTransparentVelTwo] 2
|
|
Stencil
|
|
{
|
|
WriteMask [_StencilWriteMask]
|
|
Ref [_StencilRef]
|
|
CompFront Always
|
|
PassFront Replace
|
|
CompBack Always
|
|
PassBack Replace
|
|
}
|
|
|
|
// Debug
|
|
// <None>
|
|
|
|
// --------------------------------------------------
|
|
// Pass
|
|
|
|
HLSLPROGRAM
|
|
|
|
// Pragmas
|
|
#pragma multi_compile _ DOTS_INSTANCING_ON
|
|
#pragma instancing_options renderinglayer
|
|
#pragma target 4.5
|
|
#pragma vertex Vert
|
|
#pragma fragment Frag
|
|
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
|
|
#pragma multi_compile_instancing
|
|
|
|
// Keywords
|
|
#pragma shader_feature _ _SURFACE_TYPE_TRANSPARENT
|
|
#pragma shader_feature_local _ _DOUBLESIDED_ON
|
|
#pragma shader_feature_local _ _ADD_PRECOMPUTED_VELOCITY
|
|
#pragma shader_feature_local _ _TRANSPARENT_WRITES_MOTION_VEC _TRANSPARENT_REFRACTIVE_SORT
|
|
#pragma shader_feature_local_fragment _ _ENABLE_FOG_ON_TRANSPARENT
|
|
#pragma multi_compile _ DEBUG_DISPLAY
|
|
#pragma multi_compile _ LOD_FADE_CROSSFADE
|
|
#pragma shader_feature_local_fragment _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma multi_compile _ LIGHTMAP_ON
|
|
#pragma multi_compile _ DIRLIGHTMAP_COMBINED
|
|
#pragma multi_compile_fragment _ PROBE_VOLUMES_L1 PROBE_VOLUMES_L2
|
|
#pragma multi_compile_raytracing _ PROBE_VOLUMES_L1 PROBE_VOLUMES_L2
|
|
#pragma multi_compile _ DYNAMICLIGHTMAP_ON
|
|
#pragma multi_compile_fragment _ SHADOWS_SHADOWMASK
|
|
#pragma multi_compile_raytracing _ SHADOWS_SHADOWMASK
|
|
#pragma multi_compile_fragment DECALS_OFF DECALS_3RT DECALS_4RT
|
|
#pragma multi_compile_fragment _ DECAL_SURFACE_GRADIENT
|
|
#pragma multi_compile _ USE_LEGACY_LIGHTMAPS
|
|
#pragma multi_compile_fragment PUNCTUAL_SHADOW_LOW PUNCTUAL_SHADOW_MEDIUM PUNCTUAL_SHADOW_HIGH
|
|
#pragma multi_compile_fragment DIRECTIONAL_SHADOW_LOW DIRECTIONAL_SHADOW_MEDIUM DIRECTIONAL_SHADOW_HIGH
|
|
#pragma multi_compile_fragment AREA_SHADOW_MEDIUM AREA_SHADOW_HIGH
|
|
#pragma multi_compile_fragment SCREEN_SPACE_SHADOWS_OFF SCREEN_SPACE_SHADOWS_ON
|
|
#pragma multi_compile_fragment USE_FPTL_LIGHTLIST USE_CLUSTERED_LIGHTLIST
|
|
#pragma shader_feature_local _ _REFRACTION_PLANE _REFRACTION_SPHERE _REFRACTION_THIN
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// GraphKeywords: <None>
|
|
|
|
// Defines
|
|
#define SHADERPASS SHADERPASS_FORWARD
|
|
#define SUPPORT_BLENDMODE_PRESERVE_SPECULAR_LIGHTING 1
|
|
#define HAS_LIGHTLOOP 1
|
|
#define RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define SHADER_LIT 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
|
|
// For custom interpolators to inject a substruct definition before FragInputs definition,
|
|
// allowing for FragInputs to capture CI's intended for ShaderGraph's SDI.
|
|
struct CustomInterpolators
|
|
{
|
|
};
|
|
#define USE_CUSTOMINTERP_SUBSTRUCT
|
|
|
|
|
|
|
|
// TODO: Merge FragInputsVFX substruct with CustomInterpolators.
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
struct FragInputsVFX
|
|
{
|
|
/* WARNING: $splice Could not find named fragment 'FragInputsVFX' */
|
|
};
|
|
#endif
|
|
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/GeometricTools.hlsl" // Required by Tessellation.hlsl
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Tessellation.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" // Required to be include before we include properties as it define DECLARE_STACK_CB
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl" // Required before including properties as it defines UNITY_TEXTURE_STREAMING_DEBUG_VARS
|
|
// Always include Shader Graph version
|
|
// Always include last to avoid double macros
|
|
#include "Packages/com.unity.shadergraph/ShaderGraphLibrary/Functions.hlsl" // Need to be here for Gradient struct definition
|
|
|
|
// --------------------------------------------------
|
|
// Defines
|
|
|
|
// Attribute
|
|
#define ATTRIBUTES_NEED_NORMAL
|
|
#define ATTRIBUTES_NEED_TANGENT
|
|
#define ATTRIBUTES_NEED_TEXCOORD0
|
|
#define ATTRIBUTES_NEED_TEXCOORD1
|
|
#define ATTRIBUTES_NEED_TEXCOORD2
|
|
#define ATTRIBUTES_NEED_TEXCOORD3
|
|
#define ATTRIBUTES_NEED_COLOR
|
|
#define VARYINGS_NEED_POSITION_WS
|
|
#define VARYINGS_NEED_TANGENT_TO_WORLD
|
|
#define VARYINGS_NEED_TEXCOORD0
|
|
#define VARYINGS_NEED_TEXCOORD1
|
|
#define VARYINGS_NEED_TEXCOORD2
|
|
#define VARYINGS_NEED_TEXCOORD3
|
|
|
|
#define HAVE_MESH_MODIFICATION
|
|
|
|
//Strip down the FragInputs.hlsl (on graphics), so we can only optimize the interpolators we use.
|
|
//if by accident something requests contents of FragInputs.hlsl, it will be caught as a compiler error
|
|
//Frag inputs stripping is only enabled when FRAG_INPUTS_ENABLE_STRIPPING is set
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && SHADERPASS != SHADERPASS_RAYTRACING_GBUFFER && SHADERPASS != SHADERPASS_FULL_SCREEN_DEBUG
|
|
#define FRAG_INPUTS_ENABLE_STRIPPING
|
|
#endif
|
|
#define FRAG_INPUTS_USE_TEXCOORD0
|
|
#define FRAG_INPUTS_USE_TEXCOORD1
|
|
#define FRAG_INPUTS_USE_TEXCOORD2
|
|
#define FRAG_INPUTS_USE_TEXCOORD3
|
|
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl"
|
|
|
|
|
|
|
|
|
|
// Following two define are a workaround introduce in 10.1.x for RaytracingQualityNode
|
|
// The ShaderGraph don't support correctly migration of this node as it serialize all the node data
|
|
// in the json file making it impossible to uprgrade. Until we get a fix, we do a workaround here
|
|
// to still allow us to rename the field and keyword of this node without breaking existing code.
|
|
#ifdef RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define RAYTRACING_SHADER_GRAPH_HIGH
|
|
#endif
|
|
|
|
#ifdef RAYTRACING_SHADER_GRAPH_RAYTRACED
|
|
#define RAYTRACING_SHADER_GRAPH_LOW
|
|
#endif
|
|
// end
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// We need isFrontFace when using double sided - it is not required for unlit as in case of unlit double sided only drive the cullmode
|
|
// VARYINGS_NEED_CULLFACE can be define by VaryingsMeshToPS.FaceSign input if a IsFrontFace Node is included in the shader graph.
|
|
#if defined(_DOUBLESIDED_ON) && !defined(VARYINGS_NEED_CULLFACE)
|
|
#define VARYINGS_NEED_CULLFACE
|
|
#endif
|
|
#endif
|
|
|
|
// Specific Material Define
|
|
#define _AMBIENT_OCCLUSION 1
|
|
#define _SPECULAR_OCCLUSION_FROM_AO 1
|
|
#define _ENERGY_CONSERVING_SPECULAR 1
|
|
|
|
#if _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// Colored Transmission doesn't support clear coat
|
|
#undef _MATERIAL_FEATURE_CLEAR_COAT
|
|
#endif
|
|
|
|
// If we use subsurface scattering, enable output split lighting (for forward pass)
|
|
#if defined(_MATERIAL_FEATURE_SUBSURFACE_SCATTERING) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define OUTPUT_SPLIT_LIGHTING
|
|
#endif
|
|
|
|
// This shader support recursive rendering for raytracing
|
|
#define HAVE_RECURSIVE_RENDERING
|
|
|
|
// In Path Tracing, For all single-sided, refractive materials, we want to force a thin refraction model
|
|
#if (SHADERPASS == SHADERPASS_PATH_TRACING) && !defined(_DOUBLESIDED_ON) && (defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE))
|
|
#undef _REFRACTION_PLANE
|
|
#undef _REFRACTION_SPHERE
|
|
#define _REFRACTION_THIN
|
|
#endif
|
|
// Caution: we can use the define SHADER_UNLIT onlit after the above Material include as it is the Unlit template who define it
|
|
|
|
// To handle SSR on transparent correctly with a possibility to enable/disable it per framesettings
|
|
// we should have a code like this:
|
|
// if !defined(_DISABLE_SSR_TRANSPARENT)
|
|
// pragma multi_compile _ WRITE_NORMAL_BUFFER
|
|
// endif
|
|
// i.e we enable the multicompile only if we can receive SSR or not, and then C# code drive
|
|
// it based on if SSR transparent in frame settings and not (and stripper can strip it).
|
|
// this is currently not possible with our current preprocessor as _DISABLE_SSR_TRANSPARENT is a keyword not a define
|
|
// so instead we used this and chose to pay the extra cost of normal write even if SSR transaprent is disabled.
|
|
// Ideally the shader graph generator should handle it but condition below can't be handle correctly for now.
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
#if !defined(_DISABLE_SSR_TRANSPARENT) && !defined(SHADER_UNLIT)
|
|
#define WRITE_NORMAL_BUFFER
|
|
#endif
|
|
#endif
|
|
|
|
// See Lit.shader
|
|
#if SHADERPASS == SHADERPASS_MOTION_VECTORS && defined(WRITE_DECAL_BUFFER_AND_RENDERING_LAYER)
|
|
#define WRITE_DECAL_BUFFER
|
|
#endif
|
|
|
|
#ifndef DEBUG_DISPLAY
|
|
// In case of opaque we don't want to perform the alpha test, it is done in depth prepass and we use depth equal for ztest (setup from UI)
|
|
// Don't do it with debug display mode as it is possible there is no depth prepass in this case
|
|
#if !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#if SHADERPASS == SHADERPASS_FORWARD
|
|
#define SHADERPASS_FORWARD_BYPASS_ALPHA_TEST
|
|
#elif SHADERPASS == SHADERPASS_GBUFFER
|
|
#define SHADERPASS_GBUFFER_BYPASS_ALPHA_TEST
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
// Define _DEFERRED_CAPABLE_MATERIAL for shader capable to run in deferred pass
|
|
#if defined(SHADER_LIT) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _DEFERRED_CAPABLE_MATERIAL
|
|
#endif
|
|
|
|
// Translate transparent motion vector define
|
|
#if (defined(_TRANSPARENT_WRITES_MOTION_VEC) || defined(_TRANSPARENT_REFRACTIVE_SORT)) && defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _WRITE_TRANSPARENT_MOTION_VECTOR
|
|
#endif
|
|
|
|
// -- Graph Properties
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _TrunkBaseColor;
|
|
float4 _TrunkBaseColorMap_TexelSize;
|
|
float4 _TrunkTilingOffset;
|
|
float4 _TrunkNormalMap_TexelSize;
|
|
float _TrunkNormalScale;
|
|
float4 _TrunkMaskMap_TexelSize;
|
|
float _TrunkMetallic;
|
|
float _TrunkAORemapMin;
|
|
float _TrunkAORemapMax;
|
|
float _TrunkSmoothnessRemapMin;
|
|
float _TrunkSmoothnessRemapMax;
|
|
float4 _LayerMask_TexelSize;
|
|
float4 _BarkBlendMaskTilingOffset;
|
|
float4 _BarkBaseColor;
|
|
float4 _BarkBaseColorMap_TexelSize;
|
|
float _BarkUseUV3;
|
|
float4 _BarkTilingOffset;
|
|
float4 _BarkNormalMap_TexelSize;
|
|
float _BarkNormalScale;
|
|
float4 _BarkMaskMap_TexelSize;
|
|
float _BarkMetallic;
|
|
float _BarkSmoothnessRemapMin;
|
|
float _BarkSmoothnessRemapMax;
|
|
float _BarkAORemapMin;
|
|
float _BarkAORemapMax;
|
|
float _Stiffness;
|
|
float _InitialBend;
|
|
float _Drag;
|
|
float _HeightDrag;
|
|
float4 _NewNormal;
|
|
float4 _EmissionColor;
|
|
float _UseShadowThreshold;
|
|
float4 _DoubleSidedConstants;
|
|
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
|
float _BlendMode;
|
|
float _EnableBlendModePreserveSpecularLighting;
|
|
float _RayTracing;
|
|
float _RefractionModel;
|
|
float _MaterialID;
|
|
float _MaterialTypeMask;
|
|
CBUFFER_END
|
|
|
|
|
|
// Object and Global properties
|
|
SAMPLER(SamplerState_Linear_Repeat);
|
|
SAMPLER(SamplerState_Linear_Repeat_Aniso8);
|
|
TEXTURE2D(_TrunkBaseColorMap);
|
|
SAMPLER(sampler_TrunkBaseColorMap);
|
|
TEXTURE2D(_TrunkNormalMap);
|
|
SAMPLER(sampler_TrunkNormalMap);
|
|
TEXTURE2D(_TrunkMaskMap);
|
|
SAMPLER(sampler_TrunkMaskMap);
|
|
TEXTURE2D(_LayerMask);
|
|
SAMPLER(sampler_LayerMask);
|
|
TEXTURE2D(_BarkBaseColorMap);
|
|
SAMPLER(sampler_BarkBaseColorMap);
|
|
TEXTURE2D(_BarkNormalMap);
|
|
SAMPLER(sampler_BarkNormalMap);
|
|
TEXTURE2D(_BarkMaskMap);
|
|
SAMPLER(sampler_BarkMaskMap);
|
|
TEXTURE2D(WIND_SETTINGS_TexNoise);
|
|
SAMPLER(samplerWIND_SETTINGS_TexNoise);
|
|
float4 WIND_SETTINGS_TexNoise_TexelSize;
|
|
TEXTURE2D(WIND_SETTINGS_TexGust);
|
|
SAMPLER(samplerWIND_SETTINGS_TexGust);
|
|
float4 WIND_SETTINGS_TexGust_TexelSize;
|
|
float4 WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float WIND_SETTINGS_FlexNoiseScale;
|
|
float WIND_SETTINGS_ShiverNoiseScale;
|
|
float WIND_SETTINGS_Turbulence;
|
|
float WIND_SETTINGS_GustSpeed;
|
|
float WIND_SETTINGS_GustScale;
|
|
float WIND_SETTINGS_GustWorldScale;
|
|
float4x4 WIND_SETTINGS_Points;
|
|
float4 WIND_SETTINGS_Points_Radius;
|
|
|
|
// -- Property used by ScenePickingPass
|
|
#ifdef SCENEPICKINGPASS
|
|
float4 _SelectionID;
|
|
#endif
|
|
|
|
// -- Properties used by SceneSelectionPass
|
|
#ifdef SCENESELECTIONPASS
|
|
int _ObjectId;
|
|
int _PassValue;
|
|
#endif
|
|
|
|
// Includes
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/NormalSurfaceGradient.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/Lighting.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoopDef.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDecalData.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
// GraphIncludes: <None>
|
|
|
|
// --------------------------------------------------
|
|
// Structs and Packing
|
|
|
|
struct AttributesMesh
|
|
{
|
|
float3 positionOS : POSITION;
|
|
float3 normalOS : NORMAL;
|
|
float4 tangentOS : TANGENT;
|
|
float4 uv0 : TEXCOORD0;
|
|
float4 uv1 : TEXCOORD1;
|
|
float4 uv2 : TEXCOORD2;
|
|
float4 uv3 : TEXCOORD3;
|
|
float4 color : COLOR;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(ATTRIBUTES_NEED_INSTANCEID)
|
|
uint instanceID : INSTANCEID_SEMANTIC;
|
|
#endif
|
|
};
|
|
struct VaryingsMeshToPS
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
float3 positionRWS;
|
|
float3 normalWS;
|
|
float4 tangentWS;
|
|
float4 texCoord0;
|
|
float4 texCoord1;
|
|
float4 texCoord2;
|
|
float4 texCoord3;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
uint instanceID : CUSTOM_INSTANCE_ID;
|
|
#endif
|
|
};
|
|
struct VertexDescriptionInputs
|
|
{
|
|
float3 ObjectSpaceNormal;
|
|
float3 WorldSpaceNormal;
|
|
float3 ObjectSpaceTangent;
|
|
float3 ObjectSpacePosition;
|
|
float4 VertexColor;
|
|
float3 TimeParameters;
|
|
};
|
|
struct SurfaceDescriptionInputs
|
|
{
|
|
float3 TangentSpaceNormal;
|
|
float4 uv0;
|
|
float4 uv3;
|
|
};
|
|
struct PackedVaryingsMeshToPS
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
float4 tangentWS : INTERP0;
|
|
float4 texCoord0 : INTERP1;
|
|
float4 texCoord1 : INTERP2;
|
|
float4 texCoord2 : INTERP3;
|
|
float4 texCoord3 : INTERP4;
|
|
float3 positionRWS : INTERP5;
|
|
float3 normalWS : INTERP6;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
uint instanceID : CUSTOM_INSTANCE_ID;
|
|
#endif
|
|
};
|
|
|
|
PackedVaryingsMeshToPS PackVaryingsMeshToPS (VaryingsMeshToPS input)
|
|
{
|
|
PackedVaryingsMeshToPS output;
|
|
ZERO_INITIALIZE(PackedVaryingsMeshToPS, output);
|
|
output.positionCS = input.positionCS;
|
|
output.tangentWS.xyzw = input.tangentWS;
|
|
output.texCoord0.xyzw = input.texCoord0;
|
|
output.texCoord1.xyzw = input.texCoord1;
|
|
output.texCoord2.xyzw = input.texCoord2;
|
|
output.texCoord3.xyzw = input.texCoord3;
|
|
output.positionRWS.xyz = input.positionRWS;
|
|
output.normalWS.xyz = input.normalWS;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
output.instanceID = input.instanceID;
|
|
#endif
|
|
return output;
|
|
}
|
|
|
|
VaryingsMeshToPS UnpackVaryingsMeshToPS (PackedVaryingsMeshToPS input)
|
|
{
|
|
VaryingsMeshToPS output;
|
|
output.positionCS = input.positionCS;
|
|
output.tangentWS = input.tangentWS.xyzw;
|
|
output.texCoord0 = input.texCoord0.xyzw;
|
|
output.texCoord1 = input.texCoord1.xyzw;
|
|
output.texCoord2 = input.texCoord2.xyzw;
|
|
output.texCoord3 = input.texCoord3.xyzw;
|
|
output.positionRWS = input.positionRWS.xyz;
|
|
output.normalWS = input.normalWS.xyz;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
output.instanceID = input.instanceID;
|
|
#endif
|
|
return output;
|
|
}
|
|
|
|
|
|
// --------------------------------------------------
|
|
// Graph
|
|
|
|
|
|
// Graph Functions
|
|
|
|
void Unity_Add_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
void Unity_Distance_float3(float3 A, float3 B, out float Out)
|
|
{
|
|
Out = distance(A, B);
|
|
}
|
|
|
|
void Unity_Comparison_Less_float(float A, float B, out float Out)
|
|
{
|
|
Out = A < B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_Comparison_Greater_float(float A, float B, out float Out)
|
|
{
|
|
Out = A > B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_Subtract_float(float A, float B, out float Out)
|
|
{
|
|
Out = A - B;
|
|
}
|
|
|
|
void Unity_And_float(float A, float B, out float Out)
|
|
{
|
|
Out = A && B;
|
|
}
|
|
|
|
void Unity_Branch_float(float Predicate, float True, float False, out float Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Multiply_float_float(float A, float B, out float Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Length_float4(float4 In, out float Out)
|
|
{
|
|
Out = length(In);
|
|
}
|
|
|
|
void Unity_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Subtract_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A - B;
|
|
}
|
|
|
|
void Unity_Normalize_float3(float3 In, out float3 Out)
|
|
{
|
|
Out = normalize(In);
|
|
}
|
|
|
|
void Unity_Length_float3(float3 In, out float Out)
|
|
{
|
|
Out = length(In);
|
|
}
|
|
|
|
void Unity_Divide_float(float A, float B, out float Out)
|
|
{
|
|
Out = A / B;
|
|
}
|
|
|
|
void Unity_Clamp_float(float In, float Min, float Max, out float Out)
|
|
{
|
|
Out = clamp(In, Min, Max);
|
|
}
|
|
|
|
void Unity_Lerp_float(float A, float B, float T, out float Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Multiply_float3_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Combine_float(float R, float G, float B, float A, out float4 RGBA, out float3 RGB, out float2 RG)
|
|
{
|
|
RGBA = float4(R, G, B, A);
|
|
RGB = float3(R, G, B);
|
|
RG = float2(R, G);
|
|
}
|
|
|
|
void Unity_Add_float4(float4 A, float4 B, out float4 Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
struct Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float
|
|
{
|
|
};
|
|
|
|
void SG_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float(float4x4 Matrix4_cb72bb33b7a84dfda97778a514f9b60f, float3 Vector3_90379ebf40aa468b8362f8d265f4f234, float4 Vector4_159bb4232f82428893101734a03e2a1e, Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float IN, out float4 WindPoint_1)
|
|
{
|
|
float3 _Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3 = Vector3_90379ebf40aa468b8362f8d265f4f234;
|
|
float4x4 _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4 = Matrix4_cb72bb33b7a84dfda97778a514f9b60f;
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].r);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].g);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].b);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].a);
|
|
float3 _Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4.xyz), _Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3);
|
|
float3 _Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3, _Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3);
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[0];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[1];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[2];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[3];
|
|
float _Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3, _Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float);
|
|
float4 _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4 = Vector4_159bb4232f82428893101734a03e2a1e;
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_R_1_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[0];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_G_2_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[1];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_B_3_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[2];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_A_4_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[3];
|
|
float _Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float;
|
|
Unity_Divide_float(_Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_R_1_Float, _Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float);
|
|
float _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float, float(0), float(1), _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float);
|
|
float _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float;
|
|
Unity_Lerp_float(_Split_d6e088f9ab90466583adc22ea79eb8cc_A_4_Float, float(0), _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float, _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float);
|
|
float3 _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3, (_Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float.xxx), _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3);
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_R_1_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[0];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_G_2_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[1];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_B_3_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[2];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_A_4_Float = 0;
|
|
float4 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4;
|
|
float3 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGB_5_Vector3;
|
|
float2 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_ef99a48850fe4f8f8e30e870c5e2ee09_R_1_Float, _Split_ef99a48850fe4f8f8e30e870c5e2ee09_G_2_Float, _Split_ef99a48850fe4f8f8e30e870c5e2ee09_B_3_Float, _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGB_5_Vector3, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RG_6_Vector2);
|
|
float3 _Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4.xyz), _Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3);
|
|
float3 _Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3, _Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3);
|
|
float _Split_8bbd5052350846968bf312362efd9f01_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[0];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[1];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[2];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[3];
|
|
float _Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3, _Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float);
|
|
float _Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float;
|
|
Unity_Divide_float(_Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_G_2_Float, _Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float);
|
|
float _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float, float(0), float(1), _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float);
|
|
float _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float;
|
|
Unity_Lerp_float(_Split_8bbd5052350846968bf312362efd9f01_A_4_Float, float(0), _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float, _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float);
|
|
float3 _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3, (_Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float.xxx), _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3);
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_R_1_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[0];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_G_2_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[1];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_B_3_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[2];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_A_4_Float = 0;
|
|
float4 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4;
|
|
float3 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGB_5_Vector3;
|
|
float2 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_ab8841795f594d3a90b87ac9fcc98d38_R_1_Float, _Split_ab8841795f594d3a90b87ac9fcc98d38_G_2_Float, _Split_ab8841795f594d3a90b87ac9fcc98d38_B_3_Float, _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGB_5_Vector3, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RG_6_Vector2);
|
|
float4 _Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4;
|
|
Unity_Add_float4(_Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4, _Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4);
|
|
float3 _Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4.xyz), _Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3);
|
|
float3 _Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3, _Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3);
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[0];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[1];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[2];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[3];
|
|
float _Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3, _Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float);
|
|
float _Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float;
|
|
Unity_Divide_float(_Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_B_3_Float, _Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float);
|
|
float _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float, float(0), float(1), _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float);
|
|
float _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float;
|
|
Unity_Lerp_float(_Split_fa21a8022f944854903e06c07c6f079c_A_4_Float, float(0), _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float, _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float);
|
|
float3 _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3, (_Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float.xxx), _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3);
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_R_1_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[0];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_G_2_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[1];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_B_3_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[2];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_A_4_Float = 0;
|
|
float4 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4;
|
|
float3 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGB_5_Vector3;
|
|
float2 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_6b9b5ad9f14a49b9bc49c718430617a8_R_1_Float, _Split_6b9b5ad9f14a49b9bc49c718430617a8_G_2_Float, _Split_6b9b5ad9f14a49b9bc49c718430617a8_B_3_Float, _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGB_5_Vector3, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RG_6_Vector2);
|
|
float4 _Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4;
|
|
Unity_Add_float4(_Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4, _Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4);
|
|
float3 _Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4.xyz), _Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3);
|
|
float3 _Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3, _Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3);
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[0];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[1];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[2];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[3];
|
|
float _Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3, _Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float);
|
|
float _Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float;
|
|
Unity_Divide_float(_Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_A_4_Float, _Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float);
|
|
float _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float, float(0), float(1), _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float);
|
|
float _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float;
|
|
Unity_Lerp_float(_Split_1bfec6763d4b458398e36937b4114c29_A_4_Float, float(0), _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float, _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float);
|
|
float3 _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3, (_Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float.xxx), _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3);
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_R_1_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[0];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_G_2_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[1];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_B_3_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[2];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_A_4_Float = 0;
|
|
float4 _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4;
|
|
float3 _Combine_872906644fc84c8c8286733edba75045_RGB_5_Vector3;
|
|
float2 _Combine_872906644fc84c8c8286733edba75045_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_e22879e6c4574322ab21f6261a21bced_R_1_Float, _Split_e22879e6c4574322ab21f6261a21bced_G_2_Float, _Split_e22879e6c4574322ab21f6261a21bced_B_3_Float, _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float, _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4, _Combine_872906644fc84c8c8286733edba75045_RGB_5_Vector3, _Combine_872906644fc84c8c8286733edba75045_RG_6_Vector2);
|
|
float4 _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4;
|
|
Unity_Add_float4(_Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4, _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4, _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4);
|
|
WindPoint_1 = _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4;
|
|
}
|
|
|
|
void Unity_Power_float(float A, float B, out float Out)
|
|
{
|
|
Out = pow(A, B);
|
|
}
|
|
|
|
void Unity_Or_float(float A, float B, out float Out)
|
|
{
|
|
Out = A || B;
|
|
}
|
|
|
|
void Unity_Branch_float3(float Predicate, float3 True, float3 False, out float3 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Add_float(float A, float B, out float Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
struct Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float
|
|
{
|
|
};
|
|
|
|
void SG_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float(float3 Vector3_604F121F, float3 Vector3_C30D997B, float Vector1_A2C4B4F4, float Vector1_7F78DDD2, UnityTexture2D Texture2D_5BAC276D, UnityTexture2D Texture2D_A3874DB9, float4 Vector4_EBFF8CDE, float Vector1_B4470F9B, float Vector1_2EC6D670, float Vector1_9365F438, float Vector1_F53C4B89, float Vector1_6803B355, float Vector1_5EFF6B1A, Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float IN, out float3 direction_1, out float strength_2)
|
|
{
|
|
float4 _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_R_1_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[0];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_G_2_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[1];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_B_3_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[2];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_A_4_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[3];
|
|
float4 _Combine_39060d5de038a58eb7462ba953e69739_RGBA_4_Vector4;
|
|
float3 _Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3;
|
|
float2 _Combine_39060d5de038a58eb7462ba953e69739_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_f4f701329abd45808bbd6b61ce26dcc8_R_1_Float, _Split_f4f701329abd45808bbd6b61ce26dcc8_G_2_Float, _Split_f4f701329abd45808bbd6b61ce26dcc8_B_3_Float, float(0), _Combine_39060d5de038a58eb7462ba953e69739_RGBA_4_Vector4, _Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3, _Combine_39060d5de038a58eb7462ba953e69739_RG_6_Vector2);
|
|
float3 _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3, _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3);
|
|
float4 _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_R_1_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[0];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_G_2_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[1];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_B_3_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[2];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_A_4_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[3];
|
|
float3 _Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3, (_Split_aeb4c57f09db718e9e14c3afd38465ae_A_4_Float.xxx), _Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3);
|
|
float _Property_72aef364136bb683b08145ce7a1b59a1_Out_0_Float = Vector1_9365F438;
|
|
float _Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_72aef364136bb683b08145ce7a1b59a1_Out_0_Float, float(0), _Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean);
|
|
UnityTexture2D _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D = Texture2D_A3874DB9;
|
|
float3 _Property_f0ff7954720d018395b7da89e2e2d761_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3 = float3(float(1), float(0), float(0));
|
|
float _Property_e53ae21dcf87e286b67de750a59275e7_Out_0_Float = Vector1_9365F438;
|
|
float3 _Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3, (_Property_e53ae21dcf87e286b67de750a59275e7_Out_0_Float.xxx), _Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3);
|
|
float _Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float = Vector1_5EFF6B1A;
|
|
float3 _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3, (_Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float.xxx), _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3);
|
|
float3 _Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_f0ff7954720d018395b7da89e2e2d761_Out_0_Vector3, _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3, _Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3);
|
|
float _Property_7f2599afa6fc5b8394c8fb0389031122_Out_0_Float = Vector1_6803B355;
|
|
float3 _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3, (_Property_7f2599afa6fc5b8394c8fb0389031122_Out_0_Float.xxx), _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3);
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_R_1_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[0];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_G_2_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[1];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_B_3_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[2];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_A_4_Float = 0;
|
|
float4 _Combine_0ac20ec517f076829f01b70d67c5af02_RGBA_4_Vector4;
|
|
float3 _Combine_0ac20ec517f076829f01b70d67c5af02_RGB_5_Vector3;
|
|
float2 _Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_f4466ebe24e7fa838f5735fb1210a3dd_R_1_Float, _Split_f4466ebe24e7fa838f5735fb1210a3dd_B_3_Float, float(0), float(0), _Combine_0ac20ec517f076829f01b70d67c5af02_RGBA_4_Vector4, _Combine_0ac20ec517f076829f01b70d67c5af02_RGB_5_Vector3, _Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2);
|
|
float4 _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4 = SAMPLE_TEXTURE2D_LOD(_Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.tex, _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.samplerstate, _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.GetTransformedUV(_Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2), float(3));
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_R_5_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.r;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_G_6_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.g;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_B_7_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.b;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_A_8_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.a;
|
|
float _Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float;
|
|
Unity_Branch_float(_Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean, _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_R_5_Float, float(0), _Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float);
|
|
float _Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float;
|
|
Unity_Power_float(_Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float, float(2), _Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float);
|
|
float _Property_9592cd5ab3f8628d995c1b79e8b0e51d_Out_0_Float = Vector1_F53C4B89;
|
|
float _Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float;
|
|
Unity_Multiply_float_float(_Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float, _Property_9592cd5ab3f8628d995c1b79e8b0e51d_Out_0_Float, _Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float);
|
|
float3 _Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3((_Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float.xxx), _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3, _Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3);
|
|
float _Property_7be270a4cb312f8ebbfba142f454b30d_Out_0_Float = Vector1_9365F438;
|
|
float3 _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3, (_Property_7be270a4cb312f8ebbfba142f454b30d_Out_0_Float.xxx), _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3);
|
|
float3 _Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3;
|
|
Unity_Add_float3(_Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3, _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3, _Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3);
|
|
float4 _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_e719665c40324e89a536d165d0427a68_R_1_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[0];
|
|
float _Split_e719665c40324e89a536d165d0427a68_G_2_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[1];
|
|
float _Split_e719665c40324e89a536d165d0427a68_B_3_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[2];
|
|
float _Split_e719665c40324e89a536d165d0427a68_A_4_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[3];
|
|
float _Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Split_e719665c40324e89a536d165d0427a68_A_4_Float, float(0), _Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean);
|
|
float _Property_295a45d224dd35829c1fc35a5ac74847_Out_0_Float = Vector1_2EC6D670;
|
|
float _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_295a45d224dd35829c1fc35a5ac74847_Out_0_Float, float(0), _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean);
|
|
float _Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean;
|
|
Unity_Or_float(_Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean, _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean, _Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean);
|
|
UnityTexture2D _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D = Texture2D_5BAC276D;
|
|
float3 _Property_c82f40aba4b7f08db9a97aaccbe0e096_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3, (_Split_e719665c40324e89a536d165d0427a68_A_4_Float.xxx), _Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3);
|
|
float3 _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3, (_Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float.xxx), _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3);
|
|
float3 _Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_c82f40aba4b7f08db9a97aaccbe0e096_Out_0_Vector3, _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3, _Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3);
|
|
float _Property_1ab0df57959c6986a0602bb0abfeaf58_Out_0_Float = Vector1_B4470F9B;
|
|
float3 _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3, (_Property_1ab0df57959c6986a0602bb0abfeaf58_Out_0_Float.xxx), _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3);
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_R_1_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[0];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_G_2_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[1];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_B_3_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[2];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_A_4_Float = 0;
|
|
float4 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGBA_4_Vector4;
|
|
float3 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGB_5_Vector3;
|
|
float2 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_5ff678fef0fb61889da2a8288f7e7d15_R_1_Float, _Split_5ff678fef0fb61889da2a8288f7e7d15_B_3_Float, float(0), float(0), _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGBA_4_Vector4, _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGB_5_Vector3, _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2);
|
|
float4 _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4 = SAMPLE_TEXTURE2D_LOD(_Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.tex, _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.samplerstate, _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.GetTransformedUV(_Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2), float(3));
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_R_5_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.r;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_G_6_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.g;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_B_7_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.b;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_A_8_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.a;
|
|
float4 _Combine_3136fa3d24c46087969f5a3828ccbb98_RGBA_4_Vector4;
|
|
float3 _Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3;
|
|
float2 _Combine_3136fa3d24c46087969f5a3828ccbb98_RG_6_Vector2;
|
|
Unity_Combine_float(_SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_R_5_Float, _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_G_6_Float, _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_B_7_Float, float(0), _Combine_3136fa3d24c46087969f5a3828ccbb98_RGBA_4_Vector4, _Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3, _Combine_3136fa3d24c46087969f5a3828ccbb98_RG_6_Vector2);
|
|
float3 _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3;
|
|
Unity_Add_float3(_Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3, float3(-0.5, -0.5, -0.5), _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3);
|
|
float3 _Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3;
|
|
Unity_Branch_float3(_Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean, _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3, float3(0, 0, 0), _Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3);
|
|
float _Property_9946d066804cc584a96830f8d35269cc_Out_0_Float = Vector1_2EC6D670;
|
|
float3 _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3, (_Property_9946d066804cc584a96830f8d35269cc_Out_0_Float.xxx), _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3);
|
|
float3 _Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3;
|
|
Unity_Add_float3(_Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3, _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3, _Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3);
|
|
float _Property_4ffb3356bdb9c78c815a6e7da47e7a34_Out_0_Float = Vector1_A2C4B4F4;
|
|
float3 _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3, (_Property_4ffb3356bdb9c78c815a6e7da47e7a34_Out_0_Float.xxx), _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3);
|
|
float _Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float;
|
|
Unity_Length_float3(_Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3, _Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float);
|
|
float _Property_51d6736452f5938caf6f83cdfc7df682_Out_0_Float = Vector1_7F78DDD2;
|
|
float _Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float;
|
|
Unity_Add_float(_Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float, _Property_51d6736452f5938caf6f83cdfc7df682_Out_0_Float, _Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float);
|
|
float _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float;
|
|
Unity_Multiply_float_float(_Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float, 0.001, _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float);
|
|
direction_1 = _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3;
|
|
strength_2 = _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float;
|
|
}
|
|
|
|
void Unity_CrossProduct_float(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = cross(A, B);
|
|
}
|
|
|
|
void Unity_Comparison_Equal_float(float A, float B, out float Out)
|
|
{
|
|
Out = A == B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_DotProduct_float3(float3 A, float3 B, out float Out)
|
|
{
|
|
Out = dot(A, B);
|
|
}
|
|
|
|
void Unity_Absolute_float(float In, out float Out)
|
|
{
|
|
Out = abs(In);
|
|
}
|
|
|
|
void Unity_Maximum_float(float A, float B, out float Out)
|
|
{
|
|
Out = max(A, B);
|
|
}
|
|
|
|
void Unity_Cosine_float(float In, out float Out)
|
|
{
|
|
Out = cos(In);
|
|
}
|
|
|
|
void Unity_Sine_float(float In, out float Out)
|
|
{
|
|
Out = sin(In);
|
|
}
|
|
|
|
void Unity_Comparison_NotEqual_float(float A, float B, out float Out)
|
|
{
|
|
Out = A != B ? 1 : 0;
|
|
}
|
|
|
|
struct Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float
|
|
{
|
|
float3 WorldSpaceNormal;
|
|
float4 VertexColor;
|
|
};
|
|
|
|
void SG_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float(float Vector1_BCB03E1A, float3 Vector3_C30D997B, float Vector1_A2C4B4F4, float Vector1_7EE0F94A, float Boolean_527CB26E, float Vector1_DE1BF63A, float Vector1_7F78DDD2, float3 Vector3_DE8CC74D, UnityTexture2D Texture2D_5BAC276D, UnityTexture2D Texture2D_A3874DB9, float4 Vector4_EBFF8CDE, float Vector1_B4470F9B, float Vector1_2EC6D670, float Vector1_9365F438, float Vector1_F53C4B89, float Vector1_6803B355, float4x4 Matrix4_0617b0bd42fc46ff90b1d55303a5477f, float4 Vector4_b44806ec67ca461fbcdf009dc6092cc3, Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float IN, out float3 vertex_1, out float3 normal_2)
|
|
{
|
|
float4 _Vector4_991bdf9badea4b2bb70edc71a7338c1d_Out_0_Vector4 = float4(float(0), float(0), float(0), float(1));
|
|
float3 _Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3;
|
|
{
|
|
// Converting Position from Object to AbsoluteWorld via world space
|
|
float3 world;
|
|
world = TransformObjectToWorld((_Vector4_991bdf9badea4b2bb70edc71a7338c1d_Out_0_Vector4.xyz).xyz);
|
|
_Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3 = GetAbsolutePositionWS(world);
|
|
}
|
|
float _Distance_343883e4e5444664abed46100940f24f_Out_2_Float;
|
|
Unity_Distance_float3(_Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3, float3(0, 0, 0), _Distance_343883e4e5444664abed46100940f24f_Out_2_Float);
|
|
float _Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean;
|
|
Unity_Comparison_Less_float(_Distance_343883e4e5444664abed46100940f24f_Out_2_Float, float(0.001), _Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean);
|
|
float3 _Property_2a4ab46b1d7c45918978aae50bd32b6f_Out_0_Vector3 = Vector3_C30D997B;
|
|
float4 _Vector4_d213eb2790b34988809a251ff9c74c6b_Out_0_Vector4 = float4(float(0), float(0), float(0), float(1));
|
|
float3 _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3;
|
|
_Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3 = TransformObjectToWorld((_Vector4_d213eb2790b34988809a251ff9c74c6b_Out_0_Vector4.xyz).xyz);
|
|
float3 _Property_4a88ff8e6e6b2b84bb2818cf73a0af30_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3;
|
|
_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3 = TransformObjectToWorld(_Property_4a88ff8e6e6b2b84bb2818cf73a0af30_Out_0_Vector3.xyz);
|
|
float _Property_dfda12e25f42bd808e65c99db447e176_Out_0_Boolean = Boolean_527CB26E;
|
|
float _Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float = Vector1_7EE0F94A;
|
|
float _Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float, float(0), _Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean);
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_R_1_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[0];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_G_2_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[1];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_B_3_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[2];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_A_4_Float = 0;
|
|
float _Split_7a634ef857769683b2100876a36535a2_R_1_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[0];
|
|
float _Split_7a634ef857769683b2100876a36535a2_G_2_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[1];
|
|
float _Split_7a634ef857769683b2100876a36535a2_B_3_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[2];
|
|
float _Split_7a634ef857769683b2100876a36535a2_A_4_Float = 0;
|
|
float _Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float;
|
|
Unity_Subtract_float(_Split_05e55a8c1b8cf88f93cbafc67103b677_G_2_Float, _Split_7a634ef857769683b2100876a36535a2_G_2_Float, _Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float);
|
|
float _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean;
|
|
Unity_Comparison_Less_float(_Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float, _Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float, _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean);
|
|
float _And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean;
|
|
Unity_And_float(_Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean, _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean, _And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean);
|
|
float _Property_e5e59fcc565a8b80ac239ba87d1bcf74_Out_0_Float = Vector1_A2C4B4F4;
|
|
float _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float;
|
|
Unity_Branch_float(_And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean, float(1E-05), _Property_e5e59fcc565a8b80ac239ba87d1bcf74_Out_0_Float, _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float);
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_R_1_Float = IN.VertexColor[0];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_G_2_Float = IN.VertexColor[1];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_B_3_Float = IN.VertexColor[2];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_A_4_Float = IN.VertexColor[3];
|
|
float _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float;
|
|
Unity_Multiply_float_float(_Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float, _Split_43013162a81fc4889a1944f2a2b75f66_A_4_Float, _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float);
|
|
float _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float;
|
|
Unity_Branch_float(_Property_dfda12e25f42bd808e65c99db447e176_Out_0_Boolean, _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float, _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float, _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float);
|
|
float _Property_eaab26f57a13988a8a813ad0813c8570_Out_0_Float = Vector1_7F78DDD2;
|
|
UnityTexture2D _Property_0f02225ebee993849ea6be48328c0958_Out_0_Texture2D = Texture2D_5BAC276D;
|
|
UnityTexture2D _Property_fce16cc7b4fcf48097b94eb2d5f1b596_Out_0_Texture2D = Texture2D_A3874DB9;
|
|
float4 _Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float;
|
|
Unity_Length_float4(_Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4, _Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float);
|
|
float _Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float, float(0), _Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean);
|
|
float4 _Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4;
|
|
Unity_Branch_float4(_Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean, _Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4, float4(0, 0, 1, 1), _Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4);
|
|
float4x4 _Property_cb03cb298f0a47d4ae24d85f3c47db75_Out_0_Matrix4 = Matrix4_0617b0bd42fc46ff90b1d55303a5477f;
|
|
float4 _Property_844e35a56a864617b521872c1cee398d_Out_0_Vector4 = Vector4_b44806ec67ca461fbcdf009dc6092cc3;
|
|
Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float _WindNMPoints_071e9370484b4168b560a27fbea64a52;
|
|
float4 _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4;
|
|
SG_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float(_Property_cb03cb298f0a47d4ae24d85f3c47db75_Out_0_Matrix4, SHADERGRAPH_OBJECT_POSITION, _Property_844e35a56a864617b521872c1cee398d_Out_0_Vector4, _WindNMPoints_071e9370484b4168b560a27fbea64a52, _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4);
|
|
float4 _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4;
|
|
Unity_Add_float4(_Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4, _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4, _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4);
|
|
float _Property_02c51f4c8a859f8f88433b435d4452f6_Out_0_Float = Vector1_B4470F9B;
|
|
float _Property_6b508d48a081548385021b27896c0622_Out_0_Float = Vector1_2EC6D670;
|
|
float _Property_d73fed4fb3c7b58d892364765a30498b_Out_0_Float = Vector1_9365F438;
|
|
float _Property_c3101a1b656cac858bfa11dbe7ebd268_Out_0_Float = Vector1_F53C4B89;
|
|
float _Property_c82c2ac458938d86bcc1aae3a58cc1dc_Out_0_Float = Vector1_6803B355;
|
|
float _Property_3f5330d8bec7c681ab9563aad03c7b89_Out_0_Float = Vector1_BCB03E1A;
|
|
Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba;
|
|
float3 _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3;
|
|
float _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float;
|
|
SG_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float, _Property_eaab26f57a13988a8a813ad0813c8570_Out_0_Float, _Property_0f02225ebee993849ea6be48328c0958_Out_0_Texture2D, _Property_fce16cc7b4fcf48097b94eb2d5f1b596_Out_0_Texture2D, _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4, _Property_02c51f4c8a859f8f88433b435d4452f6_Out_0_Float, _Property_6b508d48a081548385021b27896c0622_Out_0_Float, _Property_d73fed4fb3c7b58d892364765a30498b_Out_0_Float, _Property_c3101a1b656cac858bfa11dbe7ebd268_Out_0_Float, _Property_c82c2ac458938d86bcc1aae3a58cc1dc_Out_0_Float, _Property_3f5330d8bec7c681ab9563aad03c7b89_Out_0_Float, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float);
|
|
float3 _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3;
|
|
Unity_CrossProduct_float(float3 (0, 1, 0), _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3, _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3);
|
|
float _Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean;
|
|
Unity_Comparison_Equal_float((_CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3).x, float(0), _Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean);
|
|
float3 _Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean, float3(1E-06, 1E-06, 1E-06), _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3, _Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3);
|
|
float3 _Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3, _Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3);
|
|
float3 _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3);
|
|
float _DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float;
|
|
Unity_DotProduct_float3(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3, _DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float);
|
|
float3 _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, (_DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float.xxx), _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3);
|
|
float3 _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3;
|
|
Unity_Add_float3(_Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3, _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3);
|
|
float3 _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3, _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3);
|
|
float _Distance_702b068f612c7289a99272879da274ed_Out_2_Float;
|
|
Unity_Distance_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Distance_702b068f612c7289a99272879da274ed_Out_2_Float);
|
|
float _Property_f5c255b0f666358291012b78132d6593_Out_0_Float = Vector1_DE1BF63A;
|
|
float _Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float;
|
|
Unity_Divide_float(_Distance_702b068f612c7289a99272879da274ed_Out_2_Float, _Property_f5c255b0f666358291012b78132d6593_Out_0_Float, _Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float);
|
|
float _Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float;
|
|
Unity_Absolute_float(_Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float, _Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float);
|
|
float _Float_96534b09fc72da8da7bad6ebdb2b01ab_Out_0_Float = float(1E-07);
|
|
float _Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float;
|
|
Unity_Maximum_float(_Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float, _Float_96534b09fc72da8da7bad6ebdb2b01ab_Out_0_Float, _Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float);
|
|
float _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float;
|
|
Unity_Divide_float(float(1), _Property_f5c255b0f666358291012b78132d6593_Out_0_Float, _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float);
|
|
float _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float;
|
|
Unity_Power_float(_Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float, _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float, _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float);
|
|
float _Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float;
|
|
Unity_Multiply_float_float(_WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float, _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float, _Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float);
|
|
float _Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float;
|
|
Unity_Cosine_float(_Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float, _Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float);
|
|
float3 _Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3, (_Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float.xxx), _Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3);
|
|
float3 _CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3;
|
|
Unity_CrossProduct_float(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3, _CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3);
|
|
float _Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float;
|
|
Unity_Sine_float(_Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float, _Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float);
|
|
float3 _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3, (_Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float.xxx), _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3);
|
|
float3 _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3;
|
|
Unity_Add_float3(_Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3, _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3, _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3);
|
|
float3 _Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3;
|
|
Unity_Add_float3(_Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3, _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3, _Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3);
|
|
float3 _Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3;
|
|
_Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3 = TransformWorldToObject(_Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3.xyz);
|
|
float3 _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean, _Property_2a4ab46b1d7c45918978aae50bd32b6f_Out_0_Vector3, _Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3, _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3);
|
|
float3 _Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3 = Vector3_DE8CC74D;
|
|
float _Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float;
|
|
Unity_Length_float3(_Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3, _Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float);
|
|
float _Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean;
|
|
Unity_Comparison_NotEqual_float(_Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float, float(0), _Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean);
|
|
float3 _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(IN.WorldSpaceNormal, _Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3, _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3);
|
|
float3 _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean, _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3, IN.WorldSpaceNormal, _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3);
|
|
vertex_1 = _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3;
|
|
normal_2 = _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3;
|
|
}
|
|
|
|
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_Lerp_float4(float4 A, float4 B, float4 T, out float4 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Remap_float(float In, float2 InMinMax, float2 OutMinMax, out float Out)
|
|
{
|
|
Out = OutMinMax.x + (In - InMinMax.x) * (OutMinMax.y - OutMinMax.x) / (InMinMax.y - InMinMax.x);
|
|
}
|
|
|
|
void Unity_Lerp_float3(float3 A, float3 B, float3 T, out float3 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_NormalStrength_float(float3 In, float Strength, out float3 Out)
|
|
{
|
|
Out = float3(In.rg * Strength, lerp(1, In.b, saturate(Strength)));
|
|
}
|
|
|
|
// Graph Vertex
|
|
struct VertexDescription
|
|
{
|
|
float3 Position;
|
|
float3 Normal;
|
|
float3 Tangent;
|
|
};
|
|
|
|
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
|
|
{
|
|
VertexDescription description = (VertexDescription)0;
|
|
float3 _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3;
|
|
Unity_Add_float3(IN.ObjectSpacePosition, float3(1E-07, 1E-07, 1E-07), _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3);
|
|
float _Property_084857c303b23b82b7f2702b4186fa43_Out_0_Float = _Drag;
|
|
float _Property_35ad336ee9b278808178baf539e0133f_Out_0_Float = _HeightDrag;
|
|
float _Property_476e69b3f5653a8c995133f4fccaa757_Out_0_Float = _Stiffness;
|
|
float _Property_805aa6168fe3b08ca209d8ab0fa5d2d3_Out_0_Float = _InitialBend;
|
|
float4 _Property_8e47e7fd5c1a8b88b9cf212a6f62134c_Out_0_Vector4 = _NewNormal;
|
|
UnityTexture2D _Property_3b8cd110cb76a68d88342e4cc1336e0b_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(WIND_SETTINGS_TexNoise);
|
|
UnityTexture2D _Property_a939900eb077ee8593e638c7c457b53b_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(WIND_SETTINGS_TexGust);
|
|
float4 _Property_f59f8f9dc8757f8ab1c1d173e09c0787_Out_0_Vector4 = WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float _Property_89884359995fcf8a8d80bc0e19ce75f1_Out_0_Float = WIND_SETTINGS_FlexNoiseScale;
|
|
float _Property_c460088461241a819f81fd6ab2a8fc04_Out_0_Float = WIND_SETTINGS_Turbulence;
|
|
float _Property_0ef8268ed7d75386b8735f7baab81d22_Out_0_Float = WIND_SETTINGS_GustSpeed;
|
|
float _Property_9f4dae117e65b384a057e2e17ba36791_Out_0_Float = WIND_SETTINGS_GustScale;
|
|
float _Property_8c1472d718ff81889fbd5ee5e93e5291_Out_0_Float = WIND_SETTINGS_GustWorldScale;
|
|
float4x4 _Property_d28187fe6a414fa5b58ca9948c44abca_Out_0_Matrix4 = WIND_SETTINGS_Points;
|
|
float4 _Property_18d7723e0ed14f07992a44bbeb337673_Out_0_Vector4 = WIND_SETTINGS_Points_Radius;
|
|
Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8;
|
|
_WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8.WorldSpaceNormal = IN.WorldSpaceNormal;
|
|
_WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8.VertexColor = IN.VertexColor;
|
|
float3 _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3;
|
|
float3 _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_normal_2_Vector3;
|
|
SG_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float(IN.TimeParameters.x, _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3, _Property_084857c303b23b82b7f2702b4186fa43_Out_0_Float, _Property_35ad336ee9b278808178baf539e0133f_Out_0_Float, 0, _Property_476e69b3f5653a8c995133f4fccaa757_Out_0_Float, _Property_805aa6168fe3b08ca209d8ab0fa5d2d3_Out_0_Float, (_Property_8e47e7fd5c1a8b88b9cf212a6f62134c_Out_0_Vector4.xyz), _Property_3b8cd110cb76a68d88342e4cc1336e0b_Out_0_Texture2D, _Property_a939900eb077ee8593e638c7c457b53b_Out_0_Texture2D, _Property_f59f8f9dc8757f8ab1c1d173e09c0787_Out_0_Vector4, _Property_89884359995fcf8a8d80bc0e19ce75f1_Out_0_Float, _Property_c460088461241a819f81fd6ab2a8fc04_Out_0_Float, _Property_0ef8268ed7d75386b8735f7baab81d22_Out_0_Float, _Property_9f4dae117e65b384a057e2e17ba36791_Out_0_Float, _Property_8c1472d718ff81889fbd5ee5e93e5291_Out_0_Float, _Property_d28187fe6a414fa5b58ca9948c44abca_Out_0_Matrix4, _Property_18d7723e0ed14f07992a44bbeb337673_Out_0_Vector4, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_normal_2_Vector3);
|
|
description.Position = _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3;
|
|
description.Normal = IN.ObjectSpaceNormal;
|
|
description.Tangent = IN.ObjectSpaceTangent;
|
|
return description;
|
|
}
|
|
|
|
// Graph Pixel
|
|
struct SurfaceDescription
|
|
{
|
|
float3 BaseColor;
|
|
float3 Emission;
|
|
float Alpha;
|
|
float3 BentNormal;
|
|
float Smoothness;
|
|
float Occlusion;
|
|
float3 NormalTS;
|
|
float Metallic;
|
|
float4 VTPackedFeedback;
|
|
};
|
|
|
|
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
|
{
|
|
SurfaceDescription surface = (SurfaceDescription)0;
|
|
UnityTexture2D _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkBaseColorMap);
|
|
float4 _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4 = _TrunkTilingOffset;
|
|
float _Split_60538633130155809820b3185c81057f_R_1_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[0];
|
|
float _Split_60538633130155809820b3185c81057f_G_2_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[1];
|
|
float _Split_60538633130155809820b3185c81057f_B_3_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[2];
|
|
float _Split_60538633130155809820b3185c81057f_A_4_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[3];
|
|
float2 _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_R_1_Float, _Split_60538633130155809820b3185c81057f_G_2_Float);
|
|
float2 _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_B_3_Float, _Split_60538633130155809820b3185c81057f_A_4_Float);
|
|
float2 _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2, _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2, _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2);
|
|
float4 _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_R_4_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_G_5_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_B_6_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_A_7_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.a;
|
|
float4 _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4 = _TrunkBaseColor;
|
|
float4 _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4, _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4, _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4);
|
|
UnityTexture2D _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkBaseColorMap);
|
|
float _Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean = _BarkUseUV3;
|
|
float4 _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4 = IN.uv3;
|
|
float4 _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4 = IN.uv0;
|
|
float4 _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4;
|
|
Unity_Branch_float4(_Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean, _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4, _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4, _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4);
|
|
float4 _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4 = _BarkTilingOffset;
|
|
float _Split_ee975774554f6480b33168eff36d8be7_R_1_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[0];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_G_2_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[1];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_B_3_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[2];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_A_4_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[3];
|
|
float2 _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_R_1_Float, _Split_ee975774554f6480b33168eff36d8be7_G_2_Float);
|
|
float2 _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_B_3_Float, _Split_ee975774554f6480b33168eff36d8be7_A_4_Float);
|
|
float2 _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float((_Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4.xy), _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2, _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2, _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2);
|
|
float4 _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_R_4_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_G_5_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_B_6_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_A_7_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.a;
|
|
float4 _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4 = _BarkBaseColor;
|
|
float4 _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4, _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4);
|
|
UnityTexture2D _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_LayerMask);
|
|
float4 _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4 = _BarkBlendMaskTilingOffset;
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[0];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[1];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[2];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[3];
|
|
float2 _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float);
|
|
float2 _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float);
|
|
float2 _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2, _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2, _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2);
|
|
float4 _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2) );
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_R_4_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_G_5_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_B_6_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.a;
|
|
float4 _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4;
|
|
Unity_Lerp_float4(_Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxxx), _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4);
|
|
UnityTexture2D _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkMaskMap);
|
|
float4 _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_B_6_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.a;
|
|
float _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float = _TrunkMetallic;
|
|
float _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float, _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float, _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float);
|
|
float _Property_8142f12b781ad08680220297dab56f14_Out_0_Float = _TrunkAORemapMin;
|
|
float _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float = _TrunkAORemapMax;
|
|
float2 _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2 = float2(_Property_8142f12b781ad08680220297dab56f14_Out_0_Float, _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float);
|
|
float _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float, float2 (0, 1), _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float);
|
|
float _Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float = _TrunkSmoothnessRemapMin;
|
|
float _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float = _TrunkSmoothnessRemapMax;
|
|
float2 _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2 = float2(_Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float, _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float);
|
|
float _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float, float2 (0, 1), _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
float3 _Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3 = float3(_Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
UnityTexture2D _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkMaskMap);
|
|
float4 _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_B_6_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.a;
|
|
float _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float = _BarkMetallic;
|
|
float _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float, _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float, _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float);
|
|
float _Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float = _BarkAORemapMin;
|
|
float _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float = _BarkAORemapMax;
|
|
float2 _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2 = float2(_Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float, _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float);
|
|
float _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float, float2 (0, 1), _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float);
|
|
float _Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float = _BarkSmoothnessRemapMin;
|
|
float _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float = _BarkSmoothnessRemapMax;
|
|
float2 _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2 = float2(_Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float, _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float);
|
|
float _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float, float2 (0, 1), _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3 = float3(_Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3;
|
|
Unity_Lerp_float3(_Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3, _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3);
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[0];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[1];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[2];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_A_4_Float = 0;
|
|
UnityTexture2D _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkNormalMap);
|
|
float4 _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4);
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_R_4_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_G_5_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_B_6_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_A_7_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.a;
|
|
float _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float = _TrunkNormalScale;
|
|
float3 _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.xyz), _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float, _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3);
|
|
UnityTexture2D _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkNormalMap);
|
|
float4 _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4);
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_R_4_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_G_5_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_B_6_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_A_7_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.a;
|
|
float _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float = _BarkNormalScale;
|
|
float3 _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.xyz), _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3);
|
|
float3 _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
Unity_Lerp_float3(_NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3);
|
|
surface.BaseColor = (_Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4.xyz);
|
|
surface.Emission = float3(0, 0, 0);
|
|
surface.Alpha = float(1);
|
|
surface.BentNormal = IN.TangentSpaceNormal;
|
|
surface.Smoothness = _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float;
|
|
surface.Occlusion = _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float;
|
|
surface.NormalTS = _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
surface.Metallic = _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float;
|
|
{
|
|
surface.VTPackedFeedback = float4(1.0f,1.0f,1.0f,1.0f);
|
|
}
|
|
return surface;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Graph Inputs
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#define VFX_SRP_ATTRIBUTES AttributesMesh
|
|
#define VaryingsMeshType VaryingsMeshToPS
|
|
#define VFX_SRP_VARYINGS VaryingsMeshType
|
|
#define VFX_SRP_SURFACE_INPUTS FragInputs
|
|
#endif
|
|
|
|
VertexDescriptionInputs AttributesMeshToVertexDescriptionInputs(AttributesMesh 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.VertexColor = input.color;
|
|
output.TimeParameters = _TimeParameters.xyz; // Note: in case of animation this will be overwrite (allow to handle motion vector)
|
|
#if UNITY_ANY_INSTANCING_ENABLED
|
|
#else
|
|
#endif
|
|
|
|
return output;
|
|
}
|
|
|
|
VertexDescription GetVertexDescription(AttributesMesh input, float3 timeParameters
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
// build graph inputs
|
|
VertexDescriptionInputs vertexDescriptionInputs = AttributesMeshToVertexDescriptionInputs(input);
|
|
// Override time parameters with used one (This is required to correctly handle motion vectors for vertex animation based on time)
|
|
vertexDescriptionInputs.TimeParameters = timeParameters;
|
|
|
|
// evaluate vertex graph
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
// Fetch the vertex graph properties for the particle instance.
|
|
GetElementVertexProperties(element, properties);
|
|
|
|
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs, properties);
|
|
#else
|
|
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs);
|
|
#endif
|
|
return vertexDescription;
|
|
|
|
}
|
|
|
|
AttributesMesh ApplyMeshModification(AttributesMesh input, float3 timeParameters
|
|
#ifdef USE_CUSTOMINTERP_SUBSTRUCT
|
|
#ifdef TESSELLATION_ON
|
|
, inout VaryingsMeshToDS varyings
|
|
#else
|
|
, inout VaryingsMeshToPS varyings
|
|
#endif
|
|
#endif
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
VertexDescription vertexDescription = GetVertexDescription(input, timeParameters
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, element
|
|
#endif
|
|
);
|
|
|
|
// copy graph output to the results
|
|
input.positionOS = vertexDescription.Position;
|
|
input.normalOS = vertexDescription.Normal;
|
|
input.tangentOS.xyz = vertexDescription.Tangent;
|
|
|
|
|
|
|
|
return input;
|
|
}
|
|
|
|
#if defined(_ADD_CUSTOM_VELOCITY) // For shader graph custom velocity
|
|
// Return precomputed Velocity in object space
|
|
float3 GetCustomVelocity(AttributesMesh input
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
VertexDescription vertexDescription = GetVertexDescription(input, _TimeParameters.xyz
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, element
|
|
#endif
|
|
);
|
|
return vertexDescription.CustomVelocity;
|
|
}
|
|
#endif
|
|
|
|
FragInputs BuildFragInputs(VaryingsMeshToPS input)
|
|
{
|
|
FragInputs output;
|
|
ZERO_INITIALIZE(FragInputs, output);
|
|
|
|
// Init to some default value to make the computer quiet (else it output 'divide by zero' warning even if value is not used).
|
|
// TODO: this is a really poor workaround, but the variable is used in a bunch of places
|
|
// to compute normals which are then passed on elsewhere to compute other values...
|
|
output.tangentToWorld = k_identity3x3;
|
|
output.positionSS = input.positionCS; // input.positionCS is SV_Position
|
|
|
|
output.positionRWS = input.positionRWS;
|
|
output.tangentToWorld = BuildTangentToWorld(input.tangentWS, input.normalWS);
|
|
output.texCoord0 = input.texCoord0;
|
|
output.texCoord1 = input.texCoord1;
|
|
output.texCoord2 = input.texCoord2;
|
|
output.texCoord3 = input.texCoord3;
|
|
|
|
#if UNITY_ANY_INSTANCING_ENABLED
|
|
#else
|
|
#endif
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
// FragInputs from VFX come from two places: Interpolator or CBuffer.
|
|
#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
|
|
|
|
// splice point to copy custom interpolator fields from varyings to frag inputs
|
|
|
|
|
|
return output;
|
|
}
|
|
|
|
// existing HDRP code uses the combined function to go directly from packed to frag inputs
|
|
FragInputs UnpackVaryingsMeshToFragInputs(PackedVaryingsMeshToPS input)
|
|
{
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
#if defined(HAVE_VFX_MODIFICATION) && defined(UNITY_INSTANCING_ENABLED)
|
|
unity_InstanceID = input.instanceID;
|
|
#endif
|
|
VaryingsMeshToPS unpacked = UnpackVaryingsMeshToPS(input);
|
|
return BuildFragInputs(unpacked);
|
|
}
|
|
SurfaceDescriptionInputs FragInputsToSurfaceDescriptionInputs(FragInputs input, float3 viewWS)
|
|
{
|
|
SurfaceDescriptionInputs output;
|
|
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
|
|
|
#if defined(SHADER_STAGE_RAY_TRACING)
|
|
#else
|
|
#endif
|
|
output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
|
|
|
|
#if UNITY_UV_STARTS_AT_TOP
|
|
#else
|
|
#endif
|
|
|
|
|
|
output.uv0 = input.texCoord0;
|
|
output.uv3 = input.texCoord3;
|
|
|
|
// splice point to copy frag inputs custom interpolator pack into the SDI
|
|
|
|
|
|
return output;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Surface Data (Specific Material)
|
|
|
|
void ApplyDecalToSurfaceDataNoNormal(DecalSurfaceData decalSurfaceData, inout SurfaceData surfaceData);
|
|
|
|
void ApplyDecalAndGetNormal(FragInputs fragInputs, PositionInputs posInput, SurfaceDescription surfaceDescription,
|
|
inout SurfaceData surfaceData)
|
|
{
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
#ifdef DECAL_NORMAL_BLENDING
|
|
// SG nodes don't ouptut surface gradients, so if decals require surf grad blending, we have to convert
|
|
// the normal to gradient before applying the decal. We then have to resolve the gradient back to world space
|
|
float3 normalTS;
|
|
|
|
normalTS = SurfaceGradientFromTangentSpaceNormalAndFromTBN(surfaceDescription.NormalTS,
|
|
fragInputs.tangentToWorld[0], fragInputs.tangentToWorld[1]);
|
|
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, fragInputs.tangentToWorld[2], normalTS);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
|
|
GetNormalWS_SG(fragInputs, normalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
#else
|
|
// normal delivered to master node
|
|
GetNormalWS(fragInputs, surfaceDescription.NormalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Both uses and modifies 'surfaceData.normalWS'.
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, surfaceData.normalWS.xyz);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
#endif
|
|
}
|
|
void BuildSurfaceData(FragInputs fragInputs, inout SurfaceDescription surfaceDescription, float3 V, PositionInputs posInput, out SurfaceData surfaceData, out float3 bentNormalWS)
|
|
{
|
|
ZERO_INITIALIZE(SurfaceData, surfaceData);
|
|
|
|
// specularOcclusion need to be init ahead of decal to quiet the compiler that modify the SurfaceData struct
|
|
// however specularOcclusion can come from the graph, so need to be init here so it can be override.
|
|
surfaceData.specularOcclusion = 1.0;
|
|
surfaceData.thickness = 0.0;
|
|
|
|
surfaceData.baseColor = surfaceDescription.BaseColor;
|
|
surfaceData.perceptualSmoothness = surfaceDescription.Smoothness;
|
|
surfaceData.ambientOcclusion = surfaceDescription.Occlusion;
|
|
surfaceData.metallic = surfaceDescription.Metallic;
|
|
|
|
#if defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE) || defined(_REFRACTION_THIN)
|
|
if (_EnableSSRefraction)
|
|
{
|
|
|
|
surfaceData.transmittanceMask = (1.0 - surfaceDescription.Alpha);
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
else
|
|
{
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
#else
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
#endif
|
|
|
|
// These static material feature allow compile time optimization
|
|
surfaceData.materialFeatures = MATERIALFEATUREFLAGS_LIT_STANDARD;
|
|
#ifdef _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SUBSURFACE_SCATTERING;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_COLORED_TRANSMISSION;
|
|
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_ANISOTROPY
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_ANISOTROPY;
|
|
|
|
// Initialize the normal to something non-zero to avoid a div-zero warning for anisotropy.
|
|
surfaceData.normalWS = float3(0, 1, 0);
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_IRIDESCENCE
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_IRIDESCENCE;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SPECULAR_COLOR;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_CLEAR_COAT
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_CLEAR_COAT;
|
|
#endif
|
|
|
|
#if defined (_MATERIAL_FEATURE_SPECULAR_COLOR) && defined (_ENERGY_CONSERVING_SPECULAR)
|
|
// Require to have setup baseColor
|
|
// Reproduce the energy conservation done in legacy Unity. Not ideal but better for compatibility and users can unchek it
|
|
surfaceData.baseColor *= (1.0 - Max3(surfaceData.specularColor.r, surfaceData.specularColor.g, surfaceData.specularColor.b));
|
|
#endif
|
|
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
ApplyDecalAndGetNormal(fragInputs, posInput, surfaceDescription, surfaceData);
|
|
|
|
surfaceData.geomNormalWS = fragInputs.tangentToWorld[2];
|
|
|
|
surfaceData.tangentWS = normalize(fragInputs.tangentToWorld[0].xyz); // The tangent is not normalize in tangentToWorld for mikkt. TODO: Check if it expected that we normalize with Morten. Tag: SURFACE_GRADIENT
|
|
|
|
|
|
bentNormalWS = surfaceData.normalWS;
|
|
|
|
surfaceData.tangentWS = Orthonormalize(surfaceData.tangentWS, surfaceData.normalWS);
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
// Mipmap mode debugging isn't supported with ray tracing as it relies on derivatives
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD0
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG(posInput.positionSS, fragInputs.texCoord0);
|
|
#else
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG_NO_UV(posInput.positionSS);
|
|
#endif
|
|
surfaceData.metallic = 0;
|
|
}
|
|
#endif
|
|
|
|
// We need to call ApplyDebugToSurfaceData after filling the surfaceData and before filling builtinData
|
|
// as it can modify attribute use for static lighting
|
|
ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData);
|
|
#endif
|
|
|
|
// By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion.
|
|
// If user provide bent normal then we process a better term
|
|
#if defined(_SPECULAR_OCCLUSION_CUSTOM)
|
|
// Just use the value passed through via the slot (not active otherwise)
|
|
#elif defined(_SPECULAR_OCCLUSION_FROM_AO_BENT_NORMAL)
|
|
// If we have bent normal and ambient occlusion, process a specular occlusion
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromBentAO(V, bentNormalWS, surfaceData.normalWS, surfaceData.ambientOcclusion, PerceptualSmoothnessToPerceptualRoughness(surfaceData.perceptualSmoothness));
|
|
#elif defined(_AMBIENT_OCCLUSION) && defined(_SPECULAR_OCCLUSION_FROM_AO)
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness));
|
|
#endif
|
|
|
|
#if defined(_ENABLE_GEOMETRIC_SPECULAR_AA) && !defined(SHADER_STAGE_RAY_TRACING)
|
|
surfaceData.perceptualSmoothness = GeometricNormalFiltering(surfaceData.perceptualSmoothness, fragInputs.tangentToWorld[2], surfaceDescription.SpecularAAScreenSpaceVariance, surfaceDescription.SpecularAAThreshold);
|
|
#endif
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Get Surface And BuiltinData
|
|
|
|
void GetSurfaceAndBuiltinData(FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData RAY_TRACING_OPTIONAL_PARAMETERS)
|
|
{
|
|
// Don't dither if displaced tessellation (we're fading out the displacement instead to match the next LOD)
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && !defined(_TESSELLATION_DISPLACEMENT)
|
|
#ifdef LOD_FADE_CROSSFADE // enable dithering LOD transition if user select CrossFade transition in LOD group
|
|
LODDitheringTransition(ComputeFadeMaskSeed(V, posInput.positionSS), unity_LODFade.x);
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
#ifdef _DOUBLESIDED_ON
|
|
float3 doubleSidedConstants = _DoubleSidedConstants.xyz;
|
|
#else
|
|
float3 doubleSidedConstants = float3(1.0, 1.0, 1.0);
|
|
#endif
|
|
|
|
ApplyDoubleSidedFlipOrMirror(fragInputs, doubleSidedConstants); // Apply double sided flip on the vertex normal
|
|
#endif // SHADER_UNLIT
|
|
|
|
SurfaceDescriptionInputs surfaceDescriptionInputs = FragInputsToSurfaceDescriptionInputs(fragInputs, V);
|
|
|
|
#if defined(HAVE_VFX_MODIFICATION)
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
GetElementPixelProperties(fragInputs, properties);
|
|
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs, properties);
|
|
#else
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs);
|
|
#endif
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
surfaceDescription.Alpha = 1.0f;
|
|
}
|
|
#endif
|
|
|
|
// Perform alpha test very early to save performance (a killed pixel will not sample textures)
|
|
// TODO: split graph evaluation to grab just alpha dependencies first? tricky..
|
|
#ifdef _ALPHATEST_ON
|
|
float alphaCutoff = surfaceDescription.AlphaClipThreshold;
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
// The TransparentDepthPrepass is also used with SSR transparent.
|
|
// If an artists enable transaprent SSR but not the TransparentDepthPrepass itself, then we use AlphaClipThreshold
|
|
// otherwise if TransparentDepthPrepass is enabled we use AlphaClipThresholdDepthPrepass
|
|
#elif SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_POSTPASS
|
|
// DepthPostpass always use its own alpha threshold
|
|
alphaCutoff = surfaceDescription.AlphaClipThresholdDepthPostpass;
|
|
#elif (SHADERPASS == SHADERPASS_SHADOWS) || (SHADERPASS == SHADERPASS_RAYTRACING_VISIBILITY)
|
|
// If use shadow threshold isn't enable we don't allow any test
|
|
#endif
|
|
|
|
GENERIC_ALPHA_TEST(surfaceDescription.Alpha, alphaCutoff);
|
|
#endif
|
|
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && _DEPTHOFFSET_ON
|
|
ApplyDepthOffsetPositionInput(V, surfaceDescription.DepthOffset, GetViewForwardDir(), GetWorldToHClipMatrix(), posInput);
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
float3 bentNormalWS;
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData, bentNormalWS);
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD1
|
|
float4 lightmapTexCoord1 = fragInputs.texCoord1;
|
|
#else
|
|
float4 lightmapTexCoord1 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD2
|
|
float4 lightmapTexCoord2 = fragInputs.texCoord2;
|
|
#else
|
|
float4 lightmapTexCoord2 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Builtin Data
|
|
// For back lighting we use the oposite vertex normal
|
|
InitBuiltinData(posInput, alpha, bentNormalWS, -fragInputs.tangentToWorld[2], lightmapTexCoord1, lightmapTexCoord2, builtinData);
|
|
|
|
#else
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData);
|
|
|
|
ZERO_BUILTIN_INITIALIZE(builtinData); // No call to InitBuiltinData as we don't have any lighting
|
|
builtinData.opacity = surfaceDescription.Alpha;
|
|
|
|
#if defined(DEBUG_DISPLAY)
|
|
// Light Layers are currently not used for the Unlit shader (because it is not lit)
|
|
// But Unlit objects do cast shadows according to their rendering layer mask, which is what we want to
|
|
// display in the light layers visualization mode, therefore we need the renderingLayers
|
|
builtinData.renderingLayers = GetMeshRenderingLayerMask();
|
|
#endif
|
|
|
|
#endif // SHADER_UNLIT
|
|
|
|
#ifdef _ALPHATEST_ON
|
|
// Used for sharpening by alpha to mask - Alpha to covertage is only used with depth only and forward pass (no shadow pass, no transparent pass)
|
|
builtinData.alphaClipTreshold = alphaCutoff;
|
|
#endif
|
|
|
|
// override sampleBakedGI - not used by Unlit
|
|
// When overriding GI, we need to force the isLightmap flag to make sure we don't add APV (sampled in the lightloop) on top of the overridden value (set at GBuffer stage)
|
|
|
|
builtinData.emissiveColor = surfaceDescription.Emission;
|
|
|
|
// Note this will not fully work on transparent surfaces (can check with _SURFACE_TYPE_TRANSPARENT define)
|
|
// We will always overwrite vt feeback with the nearest. So behind transparent surfaces vt will not be resolved
|
|
// This is a limitation of the current MRT approach.
|
|
#ifdef UNITY_VIRTUAL_TEXTURING
|
|
builtinData.vtPackedFeedback = surfaceDescription.VTPackedFeedback;
|
|
#endif
|
|
|
|
#if _DEPTHOFFSET_ON
|
|
builtinData.depthOffset = surfaceDescription.DepthOffset;
|
|
#endif
|
|
|
|
// TODO: We should generate distortion / distortionBlur for non distortion pass
|
|
#if (SHADERPASS == SHADERPASS_DISTORTION)
|
|
builtinData.distortion = surfaceDescription.Distortion;
|
|
builtinData.distortionBlur = surfaceDescription.DistortionBlur;
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// PostInitBuiltinData call ApplyDebugToBuiltinData
|
|
PostInitBuiltinData(V, posInput, surfaceData, builtinData);
|
|
#else
|
|
ApplyDebugToBuiltinData(builtinData);
|
|
#endif
|
|
|
|
RAY_TRACING_OPTIONAL_ALPHA_TEST_PASS
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Main
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForward.hlsl"
|
|
|
|
// --------------------------------------------------
|
|
// Visual Effect Vertex Invocations
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/VisualEffectVertex.hlsl"
|
|
#else
|
|
#endif
|
|
#endif
|
|
|
|
ENDHLSL
|
|
}
|
|
Pass
|
|
{
|
|
Name "RayTracingPrepass"
|
|
Tags
|
|
{
|
|
"LightMode" = "RayTracingPrepass"
|
|
}
|
|
|
|
// Render State
|
|
Cull [_CullMode]
|
|
Blend One Zero
|
|
ZWrite On
|
|
|
|
// Debug
|
|
// <None>
|
|
|
|
// --------------------------------------------------
|
|
// Pass
|
|
|
|
HLSLPROGRAM
|
|
|
|
// Pragmas
|
|
#pragma target 4.5
|
|
#pragma vertex Vert
|
|
#pragma fragment Frag
|
|
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
|
|
#pragma multi_compile_instancing
|
|
|
|
// Keywords
|
|
#pragma shader_feature _ _SURFACE_TYPE_TRANSPARENT
|
|
#pragma shader_feature_local _ _DOUBLESIDED_ON
|
|
#pragma shader_feature_local _ _ADD_PRECOMPUTED_VELOCITY
|
|
#pragma shader_feature_local _ _TRANSPARENT_WRITES_MOTION_VEC _TRANSPARENT_REFRACTIVE_SORT
|
|
#pragma shader_feature_local_fragment _ _ENABLE_FOG_ON_TRANSPARENT
|
|
#pragma shader_feature_local_fragment _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local _ _REFRACTION_PLANE _REFRACTION_SPHERE _REFRACTION_THIN
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// GraphKeywords: <None>
|
|
|
|
// Defines
|
|
#define SHADERPASS SHADERPASS_CONSTANT
|
|
#define RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
|
|
// For custom interpolators to inject a substruct definition before FragInputs definition,
|
|
// allowing for FragInputs to capture CI's intended for ShaderGraph's SDI.
|
|
struct CustomInterpolators
|
|
{
|
|
};
|
|
#define USE_CUSTOMINTERP_SUBSTRUCT
|
|
|
|
|
|
|
|
// TODO: Merge FragInputsVFX substruct with CustomInterpolators.
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
struct FragInputsVFX
|
|
{
|
|
/* WARNING: $splice Could not find named fragment 'FragInputsVFX' */
|
|
};
|
|
#endif
|
|
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/GeometricTools.hlsl" // Required by Tessellation.hlsl
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Tessellation.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" // Required to be include before we include properties as it define DECLARE_STACK_CB
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl" // Required before including properties as it defines UNITY_TEXTURE_STREAMING_DEBUG_VARS
|
|
// Always include Shader Graph version
|
|
// Always include last to avoid double macros
|
|
#include "Packages/com.unity.shadergraph/ShaderGraphLibrary/Functions.hlsl" // Need to be here for Gradient struct definition
|
|
|
|
// --------------------------------------------------
|
|
// Defines
|
|
|
|
// Attribute
|
|
#define ATTRIBUTES_NEED_NORMAL
|
|
#define ATTRIBUTES_NEED_TANGENT
|
|
#define ATTRIBUTES_NEED_TEXCOORD0
|
|
#define ATTRIBUTES_NEED_TEXCOORD3
|
|
#define ATTRIBUTES_NEED_COLOR
|
|
#define VARYINGS_NEED_TEXCOORD0
|
|
#define VARYINGS_NEED_TEXCOORD3
|
|
|
|
#define HAVE_MESH_MODIFICATION
|
|
|
|
//Strip down the FragInputs.hlsl (on graphics), so we can only optimize the interpolators we use.
|
|
//if by accident something requests contents of FragInputs.hlsl, it will be caught as a compiler error
|
|
//Frag inputs stripping is only enabled when FRAG_INPUTS_ENABLE_STRIPPING is set
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && SHADERPASS != SHADERPASS_RAYTRACING_GBUFFER && SHADERPASS != SHADERPASS_FULL_SCREEN_DEBUG
|
|
#define FRAG_INPUTS_ENABLE_STRIPPING
|
|
#endif
|
|
#define FRAG_INPUTS_USE_TEXCOORD0
|
|
#define FRAG_INPUTS_USE_TEXCOORD3
|
|
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl"
|
|
|
|
|
|
|
|
|
|
// Following two define are a workaround introduce in 10.1.x for RaytracingQualityNode
|
|
// The ShaderGraph don't support correctly migration of this node as it serialize all the node data
|
|
// in the json file making it impossible to uprgrade. Until we get a fix, we do a workaround here
|
|
// to still allow us to rename the field and keyword of this node without breaking existing code.
|
|
#ifdef RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define RAYTRACING_SHADER_GRAPH_HIGH
|
|
#endif
|
|
|
|
#ifdef RAYTRACING_SHADER_GRAPH_RAYTRACED
|
|
#define RAYTRACING_SHADER_GRAPH_LOW
|
|
#endif
|
|
// end
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// We need isFrontFace when using double sided - it is not required for unlit as in case of unlit double sided only drive the cullmode
|
|
// VARYINGS_NEED_CULLFACE can be define by VaryingsMeshToPS.FaceSign input if a IsFrontFace Node is included in the shader graph.
|
|
#if defined(_DOUBLESIDED_ON) && !defined(VARYINGS_NEED_CULLFACE)
|
|
#define VARYINGS_NEED_CULLFACE
|
|
#endif
|
|
#endif
|
|
|
|
// Specific Material Define
|
|
#define _AMBIENT_OCCLUSION 1
|
|
#define _SPECULAR_OCCLUSION_FROM_AO 1
|
|
#define _ENERGY_CONSERVING_SPECULAR 1
|
|
|
|
#if _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// Colored Transmission doesn't support clear coat
|
|
#undef _MATERIAL_FEATURE_CLEAR_COAT
|
|
#endif
|
|
|
|
// If we use subsurface scattering, enable output split lighting (for forward pass)
|
|
#if defined(_MATERIAL_FEATURE_SUBSURFACE_SCATTERING) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define OUTPUT_SPLIT_LIGHTING
|
|
#endif
|
|
|
|
// This shader support recursive rendering for raytracing
|
|
#define HAVE_RECURSIVE_RENDERING
|
|
|
|
// In Path Tracing, For all single-sided, refractive materials, we want to force a thin refraction model
|
|
#if (SHADERPASS == SHADERPASS_PATH_TRACING) && !defined(_DOUBLESIDED_ON) && (defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE))
|
|
#undef _REFRACTION_PLANE
|
|
#undef _REFRACTION_SPHERE
|
|
#define _REFRACTION_THIN
|
|
#endif
|
|
// Caution: we can use the define SHADER_UNLIT onlit after the above Material include as it is the Unlit template who define it
|
|
|
|
// To handle SSR on transparent correctly with a possibility to enable/disable it per framesettings
|
|
// we should have a code like this:
|
|
// if !defined(_DISABLE_SSR_TRANSPARENT)
|
|
// pragma multi_compile _ WRITE_NORMAL_BUFFER
|
|
// endif
|
|
// i.e we enable the multicompile only if we can receive SSR or not, and then C# code drive
|
|
// it based on if SSR transparent in frame settings and not (and stripper can strip it).
|
|
// this is currently not possible with our current preprocessor as _DISABLE_SSR_TRANSPARENT is a keyword not a define
|
|
// so instead we used this and chose to pay the extra cost of normal write even if SSR transaprent is disabled.
|
|
// Ideally the shader graph generator should handle it but condition below can't be handle correctly for now.
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
#if !defined(_DISABLE_SSR_TRANSPARENT) && !defined(SHADER_UNLIT)
|
|
#define WRITE_NORMAL_BUFFER
|
|
#endif
|
|
#endif
|
|
|
|
// See Lit.shader
|
|
#if SHADERPASS == SHADERPASS_MOTION_VECTORS && defined(WRITE_DECAL_BUFFER_AND_RENDERING_LAYER)
|
|
#define WRITE_DECAL_BUFFER
|
|
#endif
|
|
|
|
#ifndef DEBUG_DISPLAY
|
|
// In case of opaque we don't want to perform the alpha test, it is done in depth prepass and we use depth equal for ztest (setup from UI)
|
|
// Don't do it with debug display mode as it is possible there is no depth prepass in this case
|
|
#if !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#if SHADERPASS == SHADERPASS_FORWARD
|
|
#define SHADERPASS_FORWARD_BYPASS_ALPHA_TEST
|
|
#elif SHADERPASS == SHADERPASS_GBUFFER
|
|
#define SHADERPASS_GBUFFER_BYPASS_ALPHA_TEST
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
// Define _DEFERRED_CAPABLE_MATERIAL for shader capable to run in deferred pass
|
|
#if defined(SHADER_LIT) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _DEFERRED_CAPABLE_MATERIAL
|
|
#endif
|
|
|
|
// Translate transparent motion vector define
|
|
#if (defined(_TRANSPARENT_WRITES_MOTION_VEC) || defined(_TRANSPARENT_REFRACTIVE_SORT)) && defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _WRITE_TRANSPARENT_MOTION_VECTOR
|
|
#endif
|
|
|
|
// -- Graph Properties
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _TrunkBaseColor;
|
|
float4 _TrunkBaseColorMap_TexelSize;
|
|
float4 _TrunkTilingOffset;
|
|
float4 _TrunkNormalMap_TexelSize;
|
|
float _TrunkNormalScale;
|
|
float4 _TrunkMaskMap_TexelSize;
|
|
float _TrunkMetallic;
|
|
float _TrunkAORemapMin;
|
|
float _TrunkAORemapMax;
|
|
float _TrunkSmoothnessRemapMin;
|
|
float _TrunkSmoothnessRemapMax;
|
|
float4 _LayerMask_TexelSize;
|
|
float4 _BarkBlendMaskTilingOffset;
|
|
float4 _BarkBaseColor;
|
|
float4 _BarkBaseColorMap_TexelSize;
|
|
float _BarkUseUV3;
|
|
float4 _BarkTilingOffset;
|
|
float4 _BarkNormalMap_TexelSize;
|
|
float _BarkNormalScale;
|
|
float4 _BarkMaskMap_TexelSize;
|
|
float _BarkMetallic;
|
|
float _BarkSmoothnessRemapMin;
|
|
float _BarkSmoothnessRemapMax;
|
|
float _BarkAORemapMin;
|
|
float _BarkAORemapMax;
|
|
float _Stiffness;
|
|
float _InitialBend;
|
|
float _Drag;
|
|
float _HeightDrag;
|
|
float4 _NewNormal;
|
|
float4 _EmissionColor;
|
|
float _UseShadowThreshold;
|
|
float4 _DoubleSidedConstants;
|
|
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
|
float _BlendMode;
|
|
float _EnableBlendModePreserveSpecularLighting;
|
|
float _RayTracing;
|
|
float _RefractionModel;
|
|
float _MaterialID;
|
|
float _MaterialTypeMask;
|
|
CBUFFER_END
|
|
|
|
|
|
// Object and Global properties
|
|
SAMPLER(SamplerState_Linear_Repeat);
|
|
SAMPLER(SamplerState_Linear_Repeat_Aniso8);
|
|
TEXTURE2D(_TrunkBaseColorMap);
|
|
SAMPLER(sampler_TrunkBaseColorMap);
|
|
TEXTURE2D(_TrunkNormalMap);
|
|
SAMPLER(sampler_TrunkNormalMap);
|
|
TEXTURE2D(_TrunkMaskMap);
|
|
SAMPLER(sampler_TrunkMaskMap);
|
|
TEXTURE2D(_LayerMask);
|
|
SAMPLER(sampler_LayerMask);
|
|
TEXTURE2D(_BarkBaseColorMap);
|
|
SAMPLER(sampler_BarkBaseColorMap);
|
|
TEXTURE2D(_BarkNormalMap);
|
|
SAMPLER(sampler_BarkNormalMap);
|
|
TEXTURE2D(_BarkMaskMap);
|
|
SAMPLER(sampler_BarkMaskMap);
|
|
TEXTURE2D(WIND_SETTINGS_TexNoise);
|
|
SAMPLER(samplerWIND_SETTINGS_TexNoise);
|
|
float4 WIND_SETTINGS_TexNoise_TexelSize;
|
|
TEXTURE2D(WIND_SETTINGS_TexGust);
|
|
SAMPLER(samplerWIND_SETTINGS_TexGust);
|
|
float4 WIND_SETTINGS_TexGust_TexelSize;
|
|
float4 WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float WIND_SETTINGS_FlexNoiseScale;
|
|
float WIND_SETTINGS_ShiverNoiseScale;
|
|
float WIND_SETTINGS_Turbulence;
|
|
float WIND_SETTINGS_GustSpeed;
|
|
float WIND_SETTINGS_GustScale;
|
|
float WIND_SETTINGS_GustWorldScale;
|
|
float4x4 WIND_SETTINGS_Points;
|
|
float4 WIND_SETTINGS_Points_Radius;
|
|
|
|
// -- Property used by ScenePickingPass
|
|
#ifdef SCENEPICKINGPASS
|
|
float4 _SelectionID;
|
|
#endif
|
|
|
|
// -- Properties used by SceneSelectionPass
|
|
#ifdef SCENESELECTIONPASS
|
|
int _ObjectId;
|
|
int _PassValue;
|
|
#endif
|
|
|
|
// Includes
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/NormalSurfaceGradient.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDecalData.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
// GraphIncludes: <None>
|
|
|
|
// --------------------------------------------------
|
|
// Structs and Packing
|
|
|
|
struct AttributesMesh
|
|
{
|
|
float3 positionOS : POSITION;
|
|
float3 normalOS : NORMAL;
|
|
float4 tangentOS : TANGENT;
|
|
float4 uv0 : TEXCOORD0;
|
|
float4 uv3 : TEXCOORD3;
|
|
float4 color : COLOR;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(ATTRIBUTES_NEED_INSTANCEID)
|
|
uint instanceID : INSTANCEID_SEMANTIC;
|
|
#endif
|
|
};
|
|
struct VaryingsMeshToPS
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
float4 texCoord0;
|
|
float4 texCoord3;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
uint instanceID : CUSTOM_INSTANCE_ID;
|
|
#endif
|
|
};
|
|
struct VertexDescriptionInputs
|
|
{
|
|
float3 ObjectSpaceNormal;
|
|
float3 WorldSpaceNormal;
|
|
float3 ObjectSpaceTangent;
|
|
float3 ObjectSpacePosition;
|
|
float4 VertexColor;
|
|
float3 TimeParameters;
|
|
};
|
|
struct SurfaceDescriptionInputs
|
|
{
|
|
float3 TangentSpaceNormal;
|
|
float4 uv0;
|
|
float4 uv3;
|
|
};
|
|
struct PackedVaryingsMeshToPS
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
float4 texCoord0 : INTERP0;
|
|
float4 texCoord3 : INTERP1;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
uint instanceID : CUSTOM_INSTANCE_ID;
|
|
#endif
|
|
};
|
|
|
|
PackedVaryingsMeshToPS PackVaryingsMeshToPS (VaryingsMeshToPS input)
|
|
{
|
|
PackedVaryingsMeshToPS output;
|
|
ZERO_INITIALIZE(PackedVaryingsMeshToPS, output);
|
|
output.positionCS = input.positionCS;
|
|
output.texCoord0.xyzw = input.texCoord0;
|
|
output.texCoord3.xyzw = input.texCoord3;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
output.instanceID = input.instanceID;
|
|
#endif
|
|
return output;
|
|
}
|
|
|
|
VaryingsMeshToPS UnpackVaryingsMeshToPS (PackedVaryingsMeshToPS input)
|
|
{
|
|
VaryingsMeshToPS output;
|
|
output.positionCS = input.positionCS;
|
|
output.texCoord0 = input.texCoord0.xyzw;
|
|
output.texCoord3 = input.texCoord3.xyzw;
|
|
#if UNITY_ANY_INSTANCING_ENABLED || defined(VARYINGS_NEED_INSTANCEID)
|
|
output.instanceID = input.instanceID;
|
|
#endif
|
|
return output;
|
|
}
|
|
|
|
|
|
// --------------------------------------------------
|
|
// Graph
|
|
|
|
|
|
// Graph Functions
|
|
|
|
void Unity_Add_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
void Unity_Distance_float3(float3 A, float3 B, out float Out)
|
|
{
|
|
Out = distance(A, B);
|
|
}
|
|
|
|
void Unity_Comparison_Less_float(float A, float B, out float Out)
|
|
{
|
|
Out = A < B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_Comparison_Greater_float(float A, float B, out float Out)
|
|
{
|
|
Out = A > B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_Subtract_float(float A, float B, out float Out)
|
|
{
|
|
Out = A - B;
|
|
}
|
|
|
|
void Unity_And_float(float A, float B, out float Out)
|
|
{
|
|
Out = A && B;
|
|
}
|
|
|
|
void Unity_Branch_float(float Predicate, float True, float False, out float Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Multiply_float_float(float A, float B, out float Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Length_float4(float4 In, out float Out)
|
|
{
|
|
Out = length(In);
|
|
}
|
|
|
|
void Unity_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Subtract_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A - B;
|
|
}
|
|
|
|
void Unity_Normalize_float3(float3 In, out float3 Out)
|
|
{
|
|
Out = normalize(In);
|
|
}
|
|
|
|
void Unity_Length_float3(float3 In, out float Out)
|
|
{
|
|
Out = length(In);
|
|
}
|
|
|
|
void Unity_Divide_float(float A, float B, out float Out)
|
|
{
|
|
Out = A / B;
|
|
}
|
|
|
|
void Unity_Clamp_float(float In, float Min, float Max, out float Out)
|
|
{
|
|
Out = clamp(In, Min, Max);
|
|
}
|
|
|
|
void Unity_Lerp_float(float A, float B, float T, out float Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Multiply_float3_float3(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Combine_float(float R, float G, float B, float A, out float4 RGBA, out float3 RGB, out float2 RG)
|
|
{
|
|
RGBA = float4(R, G, B, A);
|
|
RGB = float3(R, G, B);
|
|
RG = float2(R, G);
|
|
}
|
|
|
|
void Unity_Add_float4(float4 A, float4 B, out float4 Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
struct Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float
|
|
{
|
|
};
|
|
|
|
void SG_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float(float4x4 Matrix4_cb72bb33b7a84dfda97778a514f9b60f, float3 Vector3_90379ebf40aa468b8362f8d265f4f234, float4 Vector4_159bb4232f82428893101734a03e2a1e, Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float IN, out float4 WindPoint_1)
|
|
{
|
|
float3 _Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3 = Vector3_90379ebf40aa468b8362f8d265f4f234;
|
|
float4x4 _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4 = Matrix4_cb72bb33b7a84dfda97778a514f9b60f;
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].r, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].r);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].g, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].g);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].b, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].b);
|
|
float4 _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4 = float4(_Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[0].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[1].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[2].a, _Property_0ccfce542b5a45ac9b2982fe9b0a6f94_Out_0_Matrix4[3].a);
|
|
float3 _Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4.xyz), _Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3);
|
|
float3 _Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3, _Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3);
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[0];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[1];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[2];
|
|
float _Split_d6e088f9ab90466583adc22ea79eb8cc_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M0_1_Vector4[3];
|
|
float _Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_95daedfd69f34cb1bdd7e1efcdaa8440_Out_2_Vector3, _Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float);
|
|
float4 _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4 = Vector4_159bb4232f82428893101734a03e2a1e;
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_R_1_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[0];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_G_2_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[1];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_B_3_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[2];
|
|
float _Split_3d7febba13614fefa50d13642a1d3f97_A_4_Float = _Property_95860f949fd1491fa36d8d177961e858_Out_0_Vector4[3];
|
|
float _Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float;
|
|
Unity_Divide_float(_Length_dbcd47a2d3574d29bd8b12b1cdb0745a_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_R_1_Float, _Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float);
|
|
float _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_19f232d35a834d09895353590c5a8b5a_Out_2_Float, float(0), float(1), _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float);
|
|
float _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float;
|
|
Unity_Lerp_float(_Split_d6e088f9ab90466583adc22ea79eb8cc_A_4_Float, float(0), _Clamp_de1c41c0ba3341a2911a314981cf7a7a_Out_3_Float, _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float);
|
|
float3 _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_bb19d5a0fb6544769cde736c8f2bcf83_Out_1_Vector3, (_Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float.xxx), _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3);
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_R_1_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[0];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_G_2_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[1];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_B_3_Float = _Multiply_d943bd948d9a4a6caab75f7761fc1c8d_Out_2_Vector3[2];
|
|
float _Split_ef99a48850fe4f8f8e30e870c5e2ee09_A_4_Float = 0;
|
|
float4 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4;
|
|
float3 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGB_5_Vector3;
|
|
float2 _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_ef99a48850fe4f8f8e30e870c5e2ee09_R_1_Float, _Split_ef99a48850fe4f8f8e30e870c5e2ee09_G_2_Float, _Split_ef99a48850fe4f8f8e30e870c5e2ee09_B_3_Float, _Lerp_c895c7b6e0e94a65924bfc68c604c69e_Out_3_Float, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGB_5_Vector3, _Combine_d5dcc6adcb9e470599060ef2ff7859e6_RG_6_Vector2);
|
|
float3 _Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4.xyz), _Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3);
|
|
float3 _Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3, _Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3);
|
|
float _Split_8bbd5052350846968bf312362efd9f01_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[0];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[1];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[2];
|
|
float _Split_8bbd5052350846968bf312362efd9f01_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M1_2_Vector4[3];
|
|
float _Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_7197b65dd3b4425fb005b453c221c47d_Out_2_Vector3, _Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float);
|
|
float _Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float;
|
|
Unity_Divide_float(_Length_25176aaf1e3847cb98d4410ff636b560_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_G_2_Float, _Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float);
|
|
float _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_d22ef2f383f94e6cbb0ec05ab2af98d0_Out_2_Float, float(0), float(1), _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float);
|
|
float _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float;
|
|
Unity_Lerp_float(_Split_8bbd5052350846968bf312362efd9f01_A_4_Float, float(0), _Clamp_ec5be35d1db54279a9e0dcdc65ab5420_Out_3_Float, _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float);
|
|
float3 _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_c1cb58821e4547dcbdff92ca338be8b9_Out_1_Vector3, (_Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float.xxx), _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3);
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_R_1_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[0];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_G_2_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[1];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_B_3_Float = _Multiply_7bd4a79d1b37484996b73b3702618628_Out_2_Vector3[2];
|
|
float _Split_ab8841795f594d3a90b87ac9fcc98d38_A_4_Float = 0;
|
|
float4 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4;
|
|
float3 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGB_5_Vector3;
|
|
float2 _Combine_2c29d82626064a91a7c4bd08cce14cc9_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_ab8841795f594d3a90b87ac9fcc98d38_R_1_Float, _Split_ab8841795f594d3a90b87ac9fcc98d38_G_2_Float, _Split_ab8841795f594d3a90b87ac9fcc98d38_B_3_Float, _Lerp_8e9751e8ad6842b3a85b84b5b568aa94_Out_3_Float, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGB_5_Vector3, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RG_6_Vector2);
|
|
float4 _Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4;
|
|
Unity_Add_float4(_Combine_d5dcc6adcb9e470599060ef2ff7859e6_RGBA_4_Vector4, _Combine_2c29d82626064a91a7c4bd08cce14cc9_RGBA_4_Vector4, _Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4);
|
|
float3 _Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4.xyz), _Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3);
|
|
float3 _Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3, _Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3);
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[0];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[1];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[2];
|
|
float _Split_fa21a8022f944854903e06c07c6f079c_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M2_3_Vector4[3];
|
|
float _Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_f38c175f40644157a8c113a8fd7c038c_Out_2_Vector3, _Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float);
|
|
float _Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float;
|
|
Unity_Divide_float(_Length_882dfabd3bce4dbebba98f988f897026_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_B_3_Float, _Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float);
|
|
float _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_997deb354f774bf5b27a9320f16d1a2f_Out_2_Float, float(0), float(1), _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float);
|
|
float _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float;
|
|
Unity_Lerp_float(_Split_fa21a8022f944854903e06c07c6f079c_A_4_Float, float(0), _Clamp_616aa25ccc4b4508957dfe01132d62f5_Out_3_Float, _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float);
|
|
float3 _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_3e728f603e4844f0ada691bd863000b2_Out_1_Vector3, (_Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float.xxx), _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3);
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_R_1_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[0];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_G_2_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[1];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_B_3_Float = _Multiply_0399d775d57741a6b1308fce50cf7216_Out_2_Vector3[2];
|
|
float _Split_6b9b5ad9f14a49b9bc49c718430617a8_A_4_Float = 0;
|
|
float4 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4;
|
|
float3 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGB_5_Vector3;
|
|
float2 _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_6b9b5ad9f14a49b9bc49c718430617a8_R_1_Float, _Split_6b9b5ad9f14a49b9bc49c718430617a8_G_2_Float, _Split_6b9b5ad9f14a49b9bc49c718430617a8_B_3_Float, _Lerp_5d383299b2154039a2583aeed4883a88_Out_3_Float, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGB_5_Vector3, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RG_6_Vector2);
|
|
float4 _Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4;
|
|
Unity_Add_float4(_Add_d1b72dc7a2294f8a86c0f5ae8ed9831b_Out_2_Vector4, _Combine_ef684d29a4b74f918ca38fa0cf6bea4d_RGBA_4_Vector4, _Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4);
|
|
float3 _Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_8921fe8497db4536a36227f7cadb23db_Out_0_Vector3, (_MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4.xyz), _Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3);
|
|
float3 _Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3, _Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3);
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_R_1_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[0];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_G_2_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[1];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_B_3_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[2];
|
|
float _Split_1bfec6763d4b458398e36937b4114c29_A_4_Float = _MatrixSplit_09b25987ae114376bd1deca21c911b24_M3_4_Vector4[3];
|
|
float _Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float;
|
|
Unity_Length_float3(_Subtract_59668fc0d64640d3926a84feeb6cc7d1_Out_2_Vector3, _Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float);
|
|
float _Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float;
|
|
Unity_Divide_float(_Length_8a37c2eaad554eeb885a33813fcb99c7_Out_1_Float, _Split_3d7febba13614fefa50d13642a1d3f97_A_4_Float, _Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float);
|
|
float _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float;
|
|
Unity_Clamp_float(_Divide_1c33f266d32a43d69818e21acd21cc3f_Out_2_Float, float(0), float(1), _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float);
|
|
float _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float;
|
|
Unity_Lerp_float(_Split_1bfec6763d4b458398e36937b4114c29_A_4_Float, float(0), _Clamp_5ea5d4daacbb48b8a052eb0b94a0a46e_Out_3_Float, _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float);
|
|
float3 _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_fb80659c0b1d4ba2b93a9c269e0cc737_Out_1_Vector3, (_Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float.xxx), _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3);
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_R_1_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[0];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_G_2_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[1];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_B_3_Float = _Multiply_67f2ec6d64334332906d5c564d5bb7c5_Out_2_Vector3[2];
|
|
float _Split_e22879e6c4574322ab21f6261a21bced_A_4_Float = 0;
|
|
float4 _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4;
|
|
float3 _Combine_872906644fc84c8c8286733edba75045_RGB_5_Vector3;
|
|
float2 _Combine_872906644fc84c8c8286733edba75045_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_e22879e6c4574322ab21f6261a21bced_R_1_Float, _Split_e22879e6c4574322ab21f6261a21bced_G_2_Float, _Split_e22879e6c4574322ab21f6261a21bced_B_3_Float, _Lerp_b26221cb41884c75acf850b4f66b414b_Out_3_Float, _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4, _Combine_872906644fc84c8c8286733edba75045_RGB_5_Vector3, _Combine_872906644fc84c8c8286733edba75045_RG_6_Vector2);
|
|
float4 _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4;
|
|
Unity_Add_float4(_Add_e88334a2c6bf40e197a79d333645fdb2_Out_2_Vector4, _Combine_872906644fc84c8c8286733edba75045_RGBA_4_Vector4, _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4);
|
|
WindPoint_1 = _Add_710af6873aa744f6838904f22ad657e2_Out_2_Vector4;
|
|
}
|
|
|
|
void Unity_Power_float(float A, float B, out float Out)
|
|
{
|
|
Out = pow(A, B);
|
|
}
|
|
|
|
void Unity_Or_float(float A, float B, out float Out)
|
|
{
|
|
Out = A || B;
|
|
}
|
|
|
|
void Unity_Branch_float3(float Predicate, float3 True, float3 False, out float3 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Add_float(float A, float B, out float Out)
|
|
{
|
|
Out = A + B;
|
|
}
|
|
|
|
struct Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float
|
|
{
|
|
};
|
|
|
|
void SG_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float(float3 Vector3_604F121F, float3 Vector3_C30D997B, float Vector1_A2C4B4F4, float Vector1_7F78DDD2, UnityTexture2D Texture2D_5BAC276D, UnityTexture2D Texture2D_A3874DB9, float4 Vector4_EBFF8CDE, float Vector1_B4470F9B, float Vector1_2EC6D670, float Vector1_9365F438, float Vector1_F53C4B89, float Vector1_6803B355, float Vector1_5EFF6B1A, Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float IN, out float3 direction_1, out float strength_2)
|
|
{
|
|
float4 _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_R_1_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[0];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_G_2_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[1];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_B_3_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[2];
|
|
float _Split_f4f701329abd45808bbd6b61ce26dcc8_A_4_Float = _Property_8eece987bcee5a8681353e05121e2390_Out_0_Vector4[3];
|
|
float4 _Combine_39060d5de038a58eb7462ba953e69739_RGBA_4_Vector4;
|
|
float3 _Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3;
|
|
float2 _Combine_39060d5de038a58eb7462ba953e69739_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_f4f701329abd45808bbd6b61ce26dcc8_R_1_Float, _Split_f4f701329abd45808bbd6b61ce26dcc8_G_2_Float, _Split_f4f701329abd45808bbd6b61ce26dcc8_B_3_Float, float(0), _Combine_39060d5de038a58eb7462ba953e69739_RGBA_4_Vector4, _Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3, _Combine_39060d5de038a58eb7462ba953e69739_RG_6_Vector2);
|
|
float3 _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Combine_39060d5de038a58eb7462ba953e69739_RGB_5_Vector3, _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3);
|
|
float4 _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_R_1_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[0];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_G_2_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[1];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_B_3_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[2];
|
|
float _Split_aeb4c57f09db718e9e14c3afd38465ae_A_4_Float = _Property_2c43c4b554974085ab95cddc7214c1e2_Out_0_Vector4[3];
|
|
float3 _Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3, (_Split_aeb4c57f09db718e9e14c3afd38465ae_A_4_Float.xxx), _Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3);
|
|
float _Property_72aef364136bb683b08145ce7a1b59a1_Out_0_Float = Vector1_9365F438;
|
|
float _Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_72aef364136bb683b08145ce7a1b59a1_Out_0_Float, float(0), _Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean);
|
|
UnityTexture2D _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D = Texture2D_A3874DB9;
|
|
float3 _Property_f0ff7954720d018395b7da89e2e2d761_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3 = float3(float(1), float(0), float(0));
|
|
float _Property_e53ae21dcf87e286b67de750a59275e7_Out_0_Float = Vector1_9365F438;
|
|
float3 _Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3, (_Property_e53ae21dcf87e286b67de750a59275e7_Out_0_Float.xxx), _Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3);
|
|
float _Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float = Vector1_5EFF6B1A;
|
|
float3 _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_ea451e1902009f82a8b8044a4344575e_Out_2_Vector3, (_Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float.xxx), _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3);
|
|
float3 _Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_f0ff7954720d018395b7da89e2e2d761_Out_0_Vector3, _Multiply_ae858d83e1cea885a9aa0a01a1eef954_Out_2_Vector3, _Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3);
|
|
float _Property_7f2599afa6fc5b8394c8fb0389031122_Out_0_Float = Vector1_6803B355;
|
|
float3 _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_b8786cc4ca501c8ba745007b3c25c479_Out_2_Vector3, (_Property_7f2599afa6fc5b8394c8fb0389031122_Out_0_Float.xxx), _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3);
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_R_1_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[0];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_G_2_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[1];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_B_3_Float = _Multiply_4cc0cd205c36b88aa0411aa274ed6066_Out_2_Vector3[2];
|
|
float _Split_f4466ebe24e7fa838f5735fb1210a3dd_A_4_Float = 0;
|
|
float4 _Combine_0ac20ec517f076829f01b70d67c5af02_RGBA_4_Vector4;
|
|
float3 _Combine_0ac20ec517f076829f01b70d67c5af02_RGB_5_Vector3;
|
|
float2 _Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_f4466ebe24e7fa838f5735fb1210a3dd_R_1_Float, _Split_f4466ebe24e7fa838f5735fb1210a3dd_B_3_Float, float(0), float(0), _Combine_0ac20ec517f076829f01b70d67c5af02_RGBA_4_Vector4, _Combine_0ac20ec517f076829f01b70d67c5af02_RGB_5_Vector3, _Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2);
|
|
float4 _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4 = SAMPLE_TEXTURE2D_LOD(_Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.tex, _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.samplerstate, _Property_acc8b35c6330408c905387353b2a48e7_Out_0_Texture2D.GetTransformedUV(_Combine_0ac20ec517f076829f01b70d67c5af02_RG_6_Vector2), float(3));
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_R_5_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.r;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_G_6_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.g;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_B_7_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.b;
|
|
float _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_A_8_Float = _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_RGBA_0_Vector4.a;
|
|
float _Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float;
|
|
Unity_Branch_float(_Comparison_30e6d1ed5d13ea88ac1c717b4cf7f8b6_Out_2_Boolean, _SampleTexture2DLOD_230c200055ef6a87bc7e6561e4cc94a8_R_5_Float, float(0), _Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float);
|
|
float _Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float;
|
|
Unity_Power_float(_Branch_710124ae92f9d88bbca57ab4e6ca8632_Out_3_Float, float(2), _Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float);
|
|
float _Property_9592cd5ab3f8628d995c1b79e8b0e51d_Out_0_Float = Vector1_F53C4B89;
|
|
float _Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float;
|
|
Unity_Multiply_float_float(_Power_62722ebbb5d5b18cb4e41bb5612b4f78_Out_2_Float, _Property_9592cd5ab3f8628d995c1b79e8b0e51d_Out_0_Float, _Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float);
|
|
float3 _Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3((_Multiply_a0cee471fa6b3f81a23110085b9f7901_Out_2_Float.xxx), _Normalize_a38510e5fae5478f897b4be58ae18930_Out_1_Vector3, _Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3);
|
|
float _Property_7be270a4cb312f8ebbfba142f454b30d_Out_0_Float = Vector1_9365F438;
|
|
float3 _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_dbea21b5e949338ba29fe217546785bd_Out_2_Vector3, (_Property_7be270a4cb312f8ebbfba142f454b30d_Out_0_Float.xxx), _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3);
|
|
float3 _Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3;
|
|
Unity_Add_float3(_Multiply_43c9dfe8713d4584b24b33530801a1b9_Out_2_Vector3, _Multiply_57f8f9285ea3698a9db9febf3bb09729_Out_2_Vector3, _Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3);
|
|
float4 _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Split_e719665c40324e89a536d165d0427a68_R_1_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[0];
|
|
float _Split_e719665c40324e89a536d165d0427a68_G_2_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[1];
|
|
float _Split_e719665c40324e89a536d165d0427a68_B_3_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[2];
|
|
float _Split_e719665c40324e89a536d165d0427a68_A_4_Float = _Property_d76b4059b7077987b51af415dfa9bf4a_Out_0_Vector4[3];
|
|
float _Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Split_e719665c40324e89a536d165d0427a68_A_4_Float, float(0), _Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean);
|
|
float _Property_295a45d224dd35829c1fc35a5ac74847_Out_0_Float = Vector1_2EC6D670;
|
|
float _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_295a45d224dd35829c1fc35a5ac74847_Out_0_Float, float(0), _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean);
|
|
float _Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean;
|
|
Unity_Or_float(_Comparison_0e3f11398ddedf898ab9dfc4afb01674_Out_2_Boolean, _Comparison_d11455e909bf08898f06c88542bc8c3c_Out_2_Boolean, _Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean);
|
|
UnityTexture2D _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D = Texture2D_5BAC276D;
|
|
float3 _Property_c82f40aba4b7f08db9a97aaccbe0e096_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Vector3_a72856f64732461f9c308d03c9df6e06_Out_0_Vector3, (_Split_e719665c40324e89a536d165d0427a68_A_4_Float.xxx), _Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3);
|
|
float3 _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Multiply_aabee1c217095b809f71af0c1a159e17_Out_2_Vector3, (_Property_bad047c8692ad38e91118ad73dfde8a1_Out_0_Float.xxx), _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3);
|
|
float3 _Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Property_c82f40aba4b7f08db9a97aaccbe0e096_Out_0_Vector3, _Multiply_dc69447dd485178f8993dfedd03528df_Out_2_Vector3, _Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3);
|
|
float _Property_1ab0df57959c6986a0602bb0abfeaf58_Out_0_Float = Vector1_B4470F9B;
|
|
float3 _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_994d0a10f1b53f89a06319a456a703cb_Out_2_Vector3, (_Property_1ab0df57959c6986a0602bb0abfeaf58_Out_0_Float.xxx), _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3);
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_R_1_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[0];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_G_2_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[1];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_B_3_Float = _Multiply_9653c173603c7f88bb186f1bf4699302_Out_2_Vector3[2];
|
|
float _Split_5ff678fef0fb61889da2a8288f7e7d15_A_4_Float = 0;
|
|
float4 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGBA_4_Vector4;
|
|
float3 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGB_5_Vector3;
|
|
float2 _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2;
|
|
Unity_Combine_float(_Split_5ff678fef0fb61889da2a8288f7e7d15_R_1_Float, _Split_5ff678fef0fb61889da2a8288f7e7d15_B_3_Float, float(0), float(0), _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGBA_4_Vector4, _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RGB_5_Vector3, _Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2);
|
|
float4 _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4 = SAMPLE_TEXTURE2D_LOD(_Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.tex, _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.samplerstate, _Property_0c5a125604df6a8c882ffd08d9ab1eb1_Out_0_Texture2D.GetTransformedUV(_Combine_c6371d3dd2e6e588b17d15becfd9f41f_RG_6_Vector2), float(3));
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_R_5_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.r;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_G_6_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.g;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_B_7_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.b;
|
|
float _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_A_8_Float = _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_RGBA_0_Vector4.a;
|
|
float4 _Combine_3136fa3d24c46087969f5a3828ccbb98_RGBA_4_Vector4;
|
|
float3 _Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3;
|
|
float2 _Combine_3136fa3d24c46087969f5a3828ccbb98_RG_6_Vector2;
|
|
Unity_Combine_float(_SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_R_5_Float, _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_G_6_Float, _SampleTexture2DLOD_f9da942482343b84b60697d06f23721c_B_7_Float, float(0), _Combine_3136fa3d24c46087969f5a3828ccbb98_RGBA_4_Vector4, _Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3, _Combine_3136fa3d24c46087969f5a3828ccbb98_RG_6_Vector2);
|
|
float3 _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3;
|
|
Unity_Add_float3(_Combine_3136fa3d24c46087969f5a3828ccbb98_RGB_5_Vector3, float3(-0.5, -0.5, -0.5), _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3);
|
|
float3 _Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3;
|
|
Unity_Branch_float3(_Or_4341a0900c08ad87bd6a2225f3fa0566_Out_2_Boolean, _Add_ef7a0ab366477c878fbb735a918f7344_Out_2_Vector3, float3(0, 0, 0), _Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3);
|
|
float _Property_9946d066804cc584a96830f8d35269cc_Out_0_Float = Vector1_2EC6D670;
|
|
float3 _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Branch_740c68545077da8f8307f27b8c42ae4a_Out_3_Vector3, (_Property_9946d066804cc584a96830f8d35269cc_Out_0_Float.xxx), _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3);
|
|
float3 _Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3;
|
|
Unity_Add_float3(_Add_02d5dc0d629dcd8f97caf80b6afb884c_Out_2_Vector3, _Multiply_96523fbe5cf67789a958918945aae4af_Out_2_Vector3, _Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3);
|
|
float _Property_4ffb3356bdb9c78c815a6e7da47e7a34_Out_0_Float = Vector1_A2C4B4F4;
|
|
float3 _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Add_36ab0a2baacbf685bfc47193bdd9ede0_Out_2_Vector3, (_Property_4ffb3356bdb9c78c815a6e7da47e7a34_Out_0_Float.xxx), _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3);
|
|
float _Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float;
|
|
Unity_Length_float3(_Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3, _Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float);
|
|
float _Property_51d6736452f5938caf6f83cdfc7df682_Out_0_Float = Vector1_7F78DDD2;
|
|
float _Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float;
|
|
Unity_Add_float(_Length_5a5f71c3d2510f898359c583d75db21b_Out_1_Float, _Property_51d6736452f5938caf6f83cdfc7df682_Out_0_Float, _Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float);
|
|
float _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float;
|
|
Unity_Multiply_float_float(_Add_8b1ff99f4209848e94b032b984c39e3d_Out_2_Float, 0.001, _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float);
|
|
direction_1 = _Multiply_5c06c9a8640ee88fa0516a7a341a0ea9_Out_2_Vector3;
|
|
strength_2 = _Multiply_5a6d4212aae61b828d149e491e799600_Out_2_Float;
|
|
}
|
|
|
|
void Unity_CrossProduct_float(float3 A, float3 B, out float3 Out)
|
|
{
|
|
Out = cross(A, B);
|
|
}
|
|
|
|
void Unity_Comparison_Equal_float(float A, float B, out float Out)
|
|
{
|
|
Out = A == B ? 1 : 0;
|
|
}
|
|
|
|
void Unity_DotProduct_float3(float3 A, float3 B, out float Out)
|
|
{
|
|
Out = dot(A, B);
|
|
}
|
|
|
|
void Unity_Absolute_float(float In, out float Out)
|
|
{
|
|
Out = abs(In);
|
|
}
|
|
|
|
void Unity_Maximum_float(float A, float B, out float Out)
|
|
{
|
|
Out = max(A, B);
|
|
}
|
|
|
|
void Unity_Cosine_float(float In, out float Out)
|
|
{
|
|
Out = cos(In);
|
|
}
|
|
|
|
void Unity_Sine_float(float In, out float Out)
|
|
{
|
|
Out = sin(In);
|
|
}
|
|
|
|
void Unity_Comparison_NotEqual_float(float A, float B, out float Out)
|
|
{
|
|
Out = A != B ? 1 : 0;
|
|
}
|
|
|
|
struct Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float
|
|
{
|
|
float3 WorldSpaceNormal;
|
|
float4 VertexColor;
|
|
};
|
|
|
|
void SG_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float(float Vector1_BCB03E1A, float3 Vector3_C30D997B, float Vector1_A2C4B4F4, float Vector1_7EE0F94A, float Boolean_527CB26E, float Vector1_DE1BF63A, float Vector1_7F78DDD2, float3 Vector3_DE8CC74D, UnityTexture2D Texture2D_5BAC276D, UnityTexture2D Texture2D_A3874DB9, float4 Vector4_EBFF8CDE, float Vector1_B4470F9B, float Vector1_2EC6D670, float Vector1_9365F438, float Vector1_F53C4B89, float Vector1_6803B355, float4x4 Matrix4_0617b0bd42fc46ff90b1d55303a5477f, float4 Vector4_b44806ec67ca461fbcdf009dc6092cc3, Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float IN, out float3 vertex_1, out float3 normal_2)
|
|
{
|
|
float4 _Vector4_991bdf9badea4b2bb70edc71a7338c1d_Out_0_Vector4 = float4(float(0), float(0), float(0), float(1));
|
|
float3 _Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3;
|
|
{
|
|
// Converting Position from Object to AbsoluteWorld via world space
|
|
float3 world;
|
|
world = TransformObjectToWorld((_Vector4_991bdf9badea4b2bb70edc71a7338c1d_Out_0_Vector4.xyz).xyz);
|
|
_Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3 = GetAbsolutePositionWS(world);
|
|
}
|
|
float _Distance_343883e4e5444664abed46100940f24f_Out_2_Float;
|
|
Unity_Distance_float3(_Transform_e3860e53bada42a3ab41609e093dcd30_Out_1_Vector3, float3(0, 0, 0), _Distance_343883e4e5444664abed46100940f24f_Out_2_Float);
|
|
float _Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean;
|
|
Unity_Comparison_Less_float(_Distance_343883e4e5444664abed46100940f24f_Out_2_Float, float(0.001), _Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean);
|
|
float3 _Property_2a4ab46b1d7c45918978aae50bd32b6f_Out_0_Vector3 = Vector3_C30D997B;
|
|
float4 _Vector4_d213eb2790b34988809a251ff9c74c6b_Out_0_Vector4 = float4(float(0), float(0), float(0), float(1));
|
|
float3 _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3;
|
|
_Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3 = TransformObjectToWorld((_Vector4_d213eb2790b34988809a251ff9c74c6b_Out_0_Vector4.xyz).xyz);
|
|
float3 _Property_4a88ff8e6e6b2b84bb2818cf73a0af30_Out_0_Vector3 = Vector3_C30D997B;
|
|
float3 _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3;
|
|
_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3 = TransformObjectToWorld(_Property_4a88ff8e6e6b2b84bb2818cf73a0af30_Out_0_Vector3.xyz);
|
|
float _Property_dfda12e25f42bd808e65c99db447e176_Out_0_Boolean = Boolean_527CB26E;
|
|
float _Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float = Vector1_7EE0F94A;
|
|
float _Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float, float(0), _Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean);
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_R_1_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[0];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_G_2_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[1];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_B_3_Float = _Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3[2];
|
|
float _Split_05e55a8c1b8cf88f93cbafc67103b677_A_4_Float = 0;
|
|
float _Split_7a634ef857769683b2100876a36535a2_R_1_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[0];
|
|
float _Split_7a634ef857769683b2100876a36535a2_G_2_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[1];
|
|
float _Split_7a634ef857769683b2100876a36535a2_B_3_Float = _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3[2];
|
|
float _Split_7a634ef857769683b2100876a36535a2_A_4_Float = 0;
|
|
float _Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float;
|
|
Unity_Subtract_float(_Split_05e55a8c1b8cf88f93cbafc67103b677_G_2_Float, _Split_7a634ef857769683b2100876a36535a2_G_2_Float, _Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float);
|
|
float _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean;
|
|
Unity_Comparison_Less_float(_Subtract_1a45a2cfb2029a85a28951578a3fde32_Out_2_Float, _Property_d2b118dbe85e878e9fec6b0b9baa39c4_Out_0_Float, _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean);
|
|
float _And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean;
|
|
Unity_And_float(_Comparison_5cee8efb01c62783a5e7b747d356c826_Out_2_Boolean, _Comparison_010cc8a451c9dc83967dac44b371c4df_Out_2_Boolean, _And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean);
|
|
float _Property_e5e59fcc565a8b80ac239ba87d1bcf74_Out_0_Float = Vector1_A2C4B4F4;
|
|
float _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float;
|
|
Unity_Branch_float(_And_555aa962b30d6f8fa39e7b48a39aed28_Out_2_Boolean, float(1E-05), _Property_e5e59fcc565a8b80ac239ba87d1bcf74_Out_0_Float, _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float);
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_R_1_Float = IN.VertexColor[0];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_G_2_Float = IN.VertexColor[1];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_B_3_Float = IN.VertexColor[2];
|
|
float _Split_43013162a81fc4889a1944f2a2b75f66_A_4_Float = IN.VertexColor[3];
|
|
float _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float;
|
|
Unity_Multiply_float_float(_Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float, _Split_43013162a81fc4889a1944f2a2b75f66_A_4_Float, _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float);
|
|
float _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float;
|
|
Unity_Branch_float(_Property_dfda12e25f42bd808e65c99db447e176_Out_0_Boolean, _Multiply_9c96a1fd35427788a3d19f08eaffffef_Out_2_Float, _Branch_24dc0e5d7442ff84b33e0e63f143d905_Out_3_Float, _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float);
|
|
float _Property_eaab26f57a13988a8a813ad0813c8570_Out_0_Float = Vector1_7F78DDD2;
|
|
UnityTexture2D _Property_0f02225ebee993849ea6be48328c0958_Out_0_Texture2D = Texture2D_5BAC276D;
|
|
UnityTexture2D _Property_fce16cc7b4fcf48097b94eb2d5f1b596_Out_0_Texture2D = Texture2D_A3874DB9;
|
|
float4 _Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4 = Vector4_EBFF8CDE;
|
|
float _Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float;
|
|
Unity_Length_float4(_Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4, _Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float);
|
|
float _Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean;
|
|
Unity_Comparison_Greater_float(_Length_2deb60e58108481bbea09c2abd4f6360_Out_1_Float, float(0), _Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean);
|
|
float4 _Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4;
|
|
Unity_Branch_float4(_Comparison_e709f727d2ea465cb4118f3949b53fe3_Out_2_Boolean, _Property_deadd39786d94cb381d4d15213801177_Out_0_Vector4, float4(0, 0, 1, 1), _Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4);
|
|
float4x4 _Property_cb03cb298f0a47d4ae24d85f3c47db75_Out_0_Matrix4 = Matrix4_0617b0bd42fc46ff90b1d55303a5477f;
|
|
float4 _Property_844e35a56a864617b521872c1cee398d_Out_0_Vector4 = Vector4_b44806ec67ca461fbcdf009dc6092cc3;
|
|
Bindings_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float _WindNMPoints_071e9370484b4168b560a27fbea64a52;
|
|
float4 _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4;
|
|
SG_WindNMPoints_eafc4540c9670c64fbeda2f043314cec_float(_Property_cb03cb298f0a47d4ae24d85f3c47db75_Out_0_Matrix4, SHADERGRAPH_OBJECT_POSITION, _Property_844e35a56a864617b521872c1cee398d_Out_0_Vector4, _WindNMPoints_071e9370484b4168b560a27fbea64a52, _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4);
|
|
float4 _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4;
|
|
Unity_Add_float4(_Branch_2e6bb4148fd446a993140d85024ed2fd_Out_3_Vector4, _WindNMPoints_071e9370484b4168b560a27fbea64a52_WindPoint_1_Vector4, _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4);
|
|
float _Property_02c51f4c8a859f8f88433b435d4452f6_Out_0_Float = Vector1_B4470F9B;
|
|
float _Property_6b508d48a081548385021b27896c0622_Out_0_Float = Vector1_2EC6D670;
|
|
float _Property_d73fed4fb3c7b58d892364765a30498b_Out_0_Float = Vector1_9365F438;
|
|
float _Property_c3101a1b656cac858bfa11dbe7ebd268_Out_0_Float = Vector1_F53C4B89;
|
|
float _Property_c82c2ac458938d86bcc1aae3a58cc1dc_Out_0_Float = Vector1_6803B355;
|
|
float _Property_3f5330d8bec7c681ab9563aad03c7b89_Out_0_Float = Vector1_BCB03E1A;
|
|
Bindings_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba;
|
|
float3 _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3;
|
|
float _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float;
|
|
SG_WindNMCalculateNoShiver_eb6e21ce3f0928341b88e73dd9c62c10_float(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Branch_61b7d28e5f7d2981b63f0054ac12d71a_Out_3_Float, _Property_eaab26f57a13988a8a813ad0813c8570_Out_0_Float, _Property_0f02225ebee993849ea6be48328c0958_Out_0_Texture2D, _Property_fce16cc7b4fcf48097b94eb2d5f1b596_Out_0_Texture2D, _Add_a113107313614631a97405d9184f98a3_Out_2_Vector4, _Property_02c51f4c8a859f8f88433b435d4452f6_Out_0_Float, _Property_6b508d48a081548385021b27896c0622_Out_0_Float, _Property_d73fed4fb3c7b58d892364765a30498b_Out_0_Float, _Property_c3101a1b656cac858bfa11dbe7ebd268_Out_0_Float, _Property_c82c2ac458938d86bcc1aae3a58cc1dc_Out_0_Float, _Property_3f5330d8bec7c681ab9563aad03c7b89_Out_0_Float, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3, _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float);
|
|
float3 _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3;
|
|
Unity_CrossProduct_float(float3 (0, 1, 0), _WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_direction_1_Vector3, _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3);
|
|
float _Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean;
|
|
Unity_Comparison_Equal_float((_CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3).x, float(0), _Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean);
|
|
float3 _Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_0f5ed7667cdf4578afbecdf1b475e950_Out_2_Boolean, float3(1E-06, 1E-06, 1E-06), _CrossProduct_968274de232ac28180b15962e0cd7d4b_Out_2_Vector3, _Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3);
|
|
float3 _Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3;
|
|
Unity_Normalize_float3(_Branch_c8dd300f10fc4f43be96bb48a7829077_Out_3_Vector3, _Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3);
|
|
float3 _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3);
|
|
float _DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float;
|
|
Unity_DotProduct_float3(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, _Subtract_669f1473ae7e6e8595e30c93528623a2_Out_2_Vector3, _DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float);
|
|
float3 _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, (_DotProduct_4ef6847a2d36df8cac2bf956cc3d32e0_Out_2_Float.xxx), _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3);
|
|
float3 _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3;
|
|
Unity_Add_float3(_Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Multiply_cde444a0de597b8282b544296776bd35_Out_2_Vector3, _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3);
|
|
float3 _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3;
|
|
Unity_Subtract_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3, _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3);
|
|
float _Distance_702b068f612c7289a99272879da274ed_Out_2_Float;
|
|
Unity_Distance_float3(_Transform_d324a56361d94f80935dd05df051490e_Out_1_Vector3, _Transform_4acbe76287b06c88a7e8fd7bf234e885_Out_1_Vector3, _Distance_702b068f612c7289a99272879da274ed_Out_2_Float);
|
|
float _Property_f5c255b0f666358291012b78132d6593_Out_0_Float = Vector1_DE1BF63A;
|
|
float _Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float;
|
|
Unity_Divide_float(_Distance_702b068f612c7289a99272879da274ed_Out_2_Float, _Property_f5c255b0f666358291012b78132d6593_Out_0_Float, _Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float);
|
|
float _Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float;
|
|
Unity_Absolute_float(_Divide_86ba32ec2efb64888f1b432782289403_Out_2_Float, _Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float);
|
|
float _Float_96534b09fc72da8da7bad6ebdb2b01ab_Out_0_Float = float(1E-07);
|
|
float _Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float;
|
|
Unity_Maximum_float(_Absolute_b490a8463d40078e9f49eb1f255aba57_Out_1_Float, _Float_96534b09fc72da8da7bad6ebdb2b01ab_Out_0_Float, _Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float);
|
|
float _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float;
|
|
Unity_Divide_float(float(1), _Property_f5c255b0f666358291012b78132d6593_Out_0_Float, _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float);
|
|
float _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float;
|
|
Unity_Power_float(_Maximum_433c7134dae10d83ad9da03f0d30c4a0_Out_2_Float, _Divide_c45d79d6b2beea8293614db9809045fa_Out_2_Float, _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float);
|
|
float _Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float;
|
|
Unity_Multiply_float_float(_WindNMCalculateNoShiver_ed5866aa196e188893da1307437132ba_strength_2_Float, _Power_aae331b5fcc0168da1590dbbc62504a4_Out_2_Float, _Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float);
|
|
float _Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float;
|
|
Unity_Cosine_float(_Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float, _Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float);
|
|
float3 _Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3, (_Cosine_210f67c5c8fb6c8aa417007f6255e22d_Out_1_Float.xxx), _Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3);
|
|
float3 _CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3;
|
|
Unity_CrossProduct_float(_Normalize_9fd167d60aa1d1809fce8233690a3c5c_Out_1_Vector3, _Subtract_b285d42464e22a80adba2a34d1e89a02_Out_2_Vector3, _CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3);
|
|
float _Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float;
|
|
Unity_Sine_float(_Multiply_13e65c7c3e1e8282bd06a4e2746f709f_Out_2_Float, _Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float);
|
|
float3 _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(_CrossProduct_f5f50ca0805f7080b7fd20844a78afc1_Out_2_Vector3, (_Sine_419aece79cb6a485a9c3dec0b5b09f8c_Out_1_Float.xxx), _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3);
|
|
float3 _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3;
|
|
Unity_Add_float3(_Multiply_2f6dc881c414ee89a8fbbf0a5e0014eb_Out_2_Vector3, _Multiply_df4686bd34ab88839180248e49a9f266_Out_2_Vector3, _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3);
|
|
float3 _Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3;
|
|
Unity_Add_float3(_Add_148ed50f060f2a859e921addaad435fd_Out_2_Vector3, _Add_c14d4bcfa1ccf486a133715f088d8cf7_Out_2_Vector3, _Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3);
|
|
float3 _Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3;
|
|
_Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3 = TransformWorldToObject(_Add_d48375b91f961f89b468b522221fb6ee_Out_2_Vector3.xyz);
|
|
float3 _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_6cf8be06421545a08bdb1356deefd1b9_Out_2_Boolean, _Property_2a4ab46b1d7c45918978aae50bd32b6f_Out_0_Vector3, _Transform_224c24cf5953f18a87e2088380250252_Out_1_Vector3, _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3);
|
|
float3 _Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3 = Vector3_DE8CC74D;
|
|
float _Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float;
|
|
Unity_Length_float3(_Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3, _Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float);
|
|
float _Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean;
|
|
Unity_Comparison_NotEqual_float(_Length_8fac716cbfa5b983ba3cf14312642ac5_Out_1_Float, float(0), _Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean);
|
|
float3 _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3;
|
|
Unity_Multiply_float3_float3(IN.WorldSpaceNormal, _Property_c5f622c3918154808caa04a0cff875eb_Out_0_Vector3, _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3);
|
|
float3 _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3;
|
|
Unity_Branch_float3(_Comparison_17ad34828cc8b986ac7beaf8f6f2b799_Out_2_Boolean, _Multiply_d5e536621795b68bbc95bb5cc341dfcf_Out_2_Vector3, IN.WorldSpaceNormal, _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3);
|
|
vertex_1 = _Branch_bb3f6dc3a34c46ccae98ed5d67676c93_Out_3_Vector3;
|
|
normal_2 = _Branch_e504c7d39baa3084852f5cd5fd3d9d94_Out_3_Vector3;
|
|
}
|
|
|
|
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_Lerp_float4(float4 A, float4 B, float4 T, out float4 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Remap_float(float In, float2 InMinMax, float2 OutMinMax, out float Out)
|
|
{
|
|
Out = OutMinMax.x + (In - InMinMax.x) * (OutMinMax.y - OutMinMax.x) / (InMinMax.y - InMinMax.x);
|
|
}
|
|
|
|
void Unity_Lerp_float3(float3 A, float3 B, float3 T, out float3 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_NormalStrength_float(float3 In, float Strength, out float3 Out)
|
|
{
|
|
Out = float3(In.rg * Strength, lerp(1, In.b, saturate(Strength)));
|
|
}
|
|
|
|
// Graph Vertex
|
|
struct VertexDescription
|
|
{
|
|
float3 Position;
|
|
float3 Normal;
|
|
float3 Tangent;
|
|
};
|
|
|
|
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
|
|
{
|
|
VertexDescription description = (VertexDescription)0;
|
|
float3 _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3;
|
|
Unity_Add_float3(IN.ObjectSpacePosition, float3(1E-07, 1E-07, 1E-07), _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3);
|
|
float _Property_084857c303b23b82b7f2702b4186fa43_Out_0_Float = _Drag;
|
|
float _Property_35ad336ee9b278808178baf539e0133f_Out_0_Float = _HeightDrag;
|
|
float _Property_476e69b3f5653a8c995133f4fccaa757_Out_0_Float = _Stiffness;
|
|
float _Property_805aa6168fe3b08ca209d8ab0fa5d2d3_Out_0_Float = _InitialBend;
|
|
float4 _Property_8e47e7fd5c1a8b88b9cf212a6f62134c_Out_0_Vector4 = _NewNormal;
|
|
UnityTexture2D _Property_3b8cd110cb76a68d88342e4cc1336e0b_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(WIND_SETTINGS_TexNoise);
|
|
UnityTexture2D _Property_a939900eb077ee8593e638c7c457b53b_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(WIND_SETTINGS_TexGust);
|
|
float4 _Property_f59f8f9dc8757f8ab1c1d173e09c0787_Out_0_Vector4 = WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float _Property_89884359995fcf8a8d80bc0e19ce75f1_Out_0_Float = WIND_SETTINGS_FlexNoiseScale;
|
|
float _Property_c460088461241a819f81fd6ab2a8fc04_Out_0_Float = WIND_SETTINGS_Turbulence;
|
|
float _Property_0ef8268ed7d75386b8735f7baab81d22_Out_0_Float = WIND_SETTINGS_GustSpeed;
|
|
float _Property_9f4dae117e65b384a057e2e17ba36791_Out_0_Float = WIND_SETTINGS_GustScale;
|
|
float _Property_8c1472d718ff81889fbd5ee5e93e5291_Out_0_Float = WIND_SETTINGS_GustWorldScale;
|
|
float4x4 _Property_d28187fe6a414fa5b58ca9948c44abca_Out_0_Matrix4 = WIND_SETTINGS_Points;
|
|
float4 _Property_18d7723e0ed14f07992a44bbeb337673_Out_0_Vector4 = WIND_SETTINGS_Points_Radius;
|
|
Bindings_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8;
|
|
_WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8.WorldSpaceNormal = IN.WorldSpaceNormal;
|
|
_WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8.VertexColor = IN.VertexColor;
|
|
float3 _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3;
|
|
float3 _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_normal_2_Vector3;
|
|
SG_WindNMNoShiver_76b4d01171ac5564a83e72b2b046c0cf_float(IN.TimeParameters.x, _Add_358ab0e9c74e4b219a84111fc6a1335e_Out_2_Vector3, _Property_084857c303b23b82b7f2702b4186fa43_Out_0_Float, _Property_35ad336ee9b278808178baf539e0133f_Out_0_Float, 0, _Property_476e69b3f5653a8c995133f4fccaa757_Out_0_Float, _Property_805aa6168fe3b08ca209d8ab0fa5d2d3_Out_0_Float, (_Property_8e47e7fd5c1a8b88b9cf212a6f62134c_Out_0_Vector4.xyz), _Property_3b8cd110cb76a68d88342e4cc1336e0b_Out_0_Texture2D, _Property_a939900eb077ee8593e638c7c457b53b_Out_0_Texture2D, _Property_f59f8f9dc8757f8ab1c1d173e09c0787_Out_0_Vector4, _Property_89884359995fcf8a8d80bc0e19ce75f1_Out_0_Float, _Property_c460088461241a819f81fd6ab2a8fc04_Out_0_Float, _Property_0ef8268ed7d75386b8735f7baab81d22_Out_0_Float, _Property_9f4dae117e65b384a057e2e17ba36791_Out_0_Float, _Property_8c1472d718ff81889fbd5ee5e93e5291_Out_0_Float, _Property_d28187fe6a414fa5b58ca9948c44abca_Out_0_Matrix4, _Property_18d7723e0ed14f07992a44bbeb337673_Out_0_Vector4, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3, _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_normal_2_Vector3);
|
|
description.Position = _WindNMNoShiver_d9bf9d182360bf8e93bf231e497089d8_vertex_1_Vector3;
|
|
description.Normal = IN.ObjectSpaceNormal;
|
|
description.Tangent = IN.ObjectSpaceTangent;
|
|
return description;
|
|
}
|
|
|
|
// Graph Pixel
|
|
struct SurfaceDescription
|
|
{
|
|
float3 BaseColor;
|
|
float3 Emission;
|
|
float Alpha;
|
|
float3 BentNormal;
|
|
float Smoothness;
|
|
float Occlusion;
|
|
float3 NormalTS;
|
|
float Metallic;
|
|
};
|
|
|
|
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
|
{
|
|
SurfaceDescription surface = (SurfaceDescription)0;
|
|
UnityTexture2D _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkBaseColorMap);
|
|
float4 _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4 = _TrunkTilingOffset;
|
|
float _Split_60538633130155809820b3185c81057f_R_1_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[0];
|
|
float _Split_60538633130155809820b3185c81057f_G_2_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[1];
|
|
float _Split_60538633130155809820b3185c81057f_B_3_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[2];
|
|
float _Split_60538633130155809820b3185c81057f_A_4_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[3];
|
|
float2 _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_R_1_Float, _Split_60538633130155809820b3185c81057f_G_2_Float);
|
|
float2 _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_B_3_Float, _Split_60538633130155809820b3185c81057f_A_4_Float);
|
|
float2 _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2, _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2, _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2);
|
|
float4 _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_R_4_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_G_5_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_B_6_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_A_7_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.a;
|
|
float4 _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4 = _TrunkBaseColor;
|
|
float4 _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4, _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4, _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4);
|
|
UnityTexture2D _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkBaseColorMap);
|
|
float _Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean = _BarkUseUV3;
|
|
float4 _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4 = IN.uv3;
|
|
float4 _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4 = IN.uv0;
|
|
float4 _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4;
|
|
Unity_Branch_float4(_Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean, _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4, _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4, _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4);
|
|
float4 _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4 = _BarkTilingOffset;
|
|
float _Split_ee975774554f6480b33168eff36d8be7_R_1_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[0];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_G_2_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[1];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_B_3_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[2];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_A_4_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[3];
|
|
float2 _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_R_1_Float, _Split_ee975774554f6480b33168eff36d8be7_G_2_Float);
|
|
float2 _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_B_3_Float, _Split_ee975774554f6480b33168eff36d8be7_A_4_Float);
|
|
float2 _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float((_Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4.xy), _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2, _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2, _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2);
|
|
float4 _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_R_4_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_G_5_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_B_6_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_A_7_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.a;
|
|
float4 _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4 = _BarkBaseColor;
|
|
float4 _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4, _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4);
|
|
UnityTexture2D _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_LayerMask);
|
|
float4 _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4 = _BarkBlendMaskTilingOffset;
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[0];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[1];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[2];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[3];
|
|
float2 _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float);
|
|
float2 _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float);
|
|
float2 _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2, _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2, _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2);
|
|
float4 _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2) );
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_R_4_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_G_5_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_B_6_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.a;
|
|
float4 _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4;
|
|
Unity_Lerp_float4(_Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxxx), _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4);
|
|
UnityTexture2D _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkMaskMap);
|
|
float4 _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_B_6_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.a;
|
|
float _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float = _TrunkMetallic;
|
|
float _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float, _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float, _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float);
|
|
float _Property_8142f12b781ad08680220297dab56f14_Out_0_Float = _TrunkAORemapMin;
|
|
float _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float = _TrunkAORemapMax;
|
|
float2 _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2 = float2(_Property_8142f12b781ad08680220297dab56f14_Out_0_Float, _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float);
|
|
float _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float, float2 (0, 1), _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float);
|
|
float _Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float = _TrunkSmoothnessRemapMin;
|
|
float _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float = _TrunkSmoothnessRemapMax;
|
|
float2 _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2 = float2(_Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float, _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float);
|
|
float _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float, float2 (0, 1), _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
float3 _Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3 = float3(_Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
UnityTexture2D _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkMaskMap);
|
|
float4 _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_B_6_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.a;
|
|
float _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float = _BarkMetallic;
|
|
float _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float, _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float, _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float);
|
|
float _Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float = _BarkAORemapMin;
|
|
float _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float = _BarkAORemapMax;
|
|
float2 _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2 = float2(_Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float, _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float);
|
|
float _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float, float2 (0, 1), _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float);
|
|
float _Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float = _BarkSmoothnessRemapMin;
|
|
float _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float = _BarkSmoothnessRemapMax;
|
|
float2 _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2 = float2(_Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float, _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float);
|
|
float _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float, float2 (0, 1), _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3 = float3(_Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3;
|
|
Unity_Lerp_float3(_Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3, _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3);
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[0];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[1];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[2];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_A_4_Float = 0;
|
|
UnityTexture2D _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkNormalMap);
|
|
float4 _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4);
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_R_4_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_G_5_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_B_6_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_A_7_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.a;
|
|
float _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float = _TrunkNormalScale;
|
|
float3 _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.xyz), _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float, _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3);
|
|
UnityTexture2D _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkNormalMap);
|
|
float4 _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4);
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_R_4_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_G_5_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_B_6_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_A_7_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.a;
|
|
float _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float = _BarkNormalScale;
|
|
float3 _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.xyz), _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3);
|
|
float3 _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
Unity_Lerp_float3(_NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3);
|
|
surface.BaseColor = (_Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4.xyz);
|
|
surface.Emission = float3(0, 0, 0);
|
|
surface.Alpha = float(1);
|
|
surface.BentNormal = IN.TangentSpaceNormal;
|
|
surface.Smoothness = _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float;
|
|
surface.Occlusion = _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float;
|
|
surface.NormalTS = _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
surface.Metallic = _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float;
|
|
return surface;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Graph Inputs
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#define VFX_SRP_ATTRIBUTES AttributesMesh
|
|
#define VaryingsMeshType VaryingsMeshToPS
|
|
#define VFX_SRP_VARYINGS VaryingsMeshType
|
|
#define VFX_SRP_SURFACE_INPUTS FragInputs
|
|
#endif
|
|
|
|
VertexDescriptionInputs AttributesMeshToVertexDescriptionInputs(AttributesMesh 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.VertexColor = input.color;
|
|
output.TimeParameters = _TimeParameters.xyz; // Note: in case of animation this will be overwrite (allow to handle motion vector)
|
|
#if UNITY_ANY_INSTANCING_ENABLED
|
|
#else
|
|
#endif
|
|
|
|
return output;
|
|
}
|
|
|
|
VertexDescription GetVertexDescription(AttributesMesh input, float3 timeParameters
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
// build graph inputs
|
|
VertexDescriptionInputs vertexDescriptionInputs = AttributesMeshToVertexDescriptionInputs(input);
|
|
// Override time parameters with used one (This is required to correctly handle motion vectors for vertex animation based on time)
|
|
vertexDescriptionInputs.TimeParameters = timeParameters;
|
|
|
|
// evaluate vertex graph
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
// Fetch the vertex graph properties for the particle instance.
|
|
GetElementVertexProperties(element, properties);
|
|
|
|
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs, properties);
|
|
#else
|
|
VertexDescription vertexDescription = VertexDescriptionFunction(vertexDescriptionInputs);
|
|
#endif
|
|
return vertexDescription;
|
|
|
|
}
|
|
|
|
AttributesMesh ApplyMeshModification(AttributesMesh input, float3 timeParameters
|
|
#ifdef USE_CUSTOMINTERP_SUBSTRUCT
|
|
#ifdef TESSELLATION_ON
|
|
, inout VaryingsMeshToDS varyings
|
|
#else
|
|
, inout VaryingsMeshToPS varyings
|
|
#endif
|
|
#endif
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
VertexDescription vertexDescription = GetVertexDescription(input, timeParameters
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, element
|
|
#endif
|
|
);
|
|
|
|
// copy graph output to the results
|
|
input.positionOS = vertexDescription.Position;
|
|
input.normalOS = vertexDescription.Normal;
|
|
input.tangentOS.xyz = vertexDescription.Tangent;
|
|
|
|
|
|
|
|
return input;
|
|
}
|
|
|
|
#if defined(_ADD_CUSTOM_VELOCITY) // For shader graph custom velocity
|
|
// Return precomputed Velocity in object space
|
|
float3 GetCustomVelocity(AttributesMesh input
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, AttributesElement element
|
|
#endif
|
|
)
|
|
{
|
|
VertexDescription vertexDescription = GetVertexDescription(input, _TimeParameters.xyz
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
, element
|
|
#endif
|
|
);
|
|
return vertexDescription.CustomVelocity;
|
|
}
|
|
#endif
|
|
|
|
FragInputs BuildFragInputs(VaryingsMeshToPS input)
|
|
{
|
|
FragInputs output;
|
|
ZERO_INITIALIZE(FragInputs, output);
|
|
|
|
// Init to some default value to make the computer quiet (else it output 'divide by zero' warning even if value is not used).
|
|
// TODO: this is a really poor workaround, but the variable is used in a bunch of places
|
|
// to compute normals which are then passed on elsewhere to compute other values...
|
|
output.tangentToWorld = k_identity3x3;
|
|
output.positionSS = input.positionCS; // input.positionCS is SV_Position
|
|
|
|
output.texCoord0 = input.texCoord0;
|
|
output.texCoord3 = input.texCoord3;
|
|
|
|
#if UNITY_ANY_INSTANCING_ENABLED
|
|
#else
|
|
#endif
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
// FragInputs from VFX come from two places: Interpolator or CBuffer.
|
|
#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
|
|
|
|
// splice point to copy custom interpolator fields from varyings to frag inputs
|
|
|
|
|
|
return output;
|
|
}
|
|
|
|
// existing HDRP code uses the combined function to go directly from packed to frag inputs
|
|
FragInputs UnpackVaryingsMeshToFragInputs(PackedVaryingsMeshToPS input)
|
|
{
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
#if defined(HAVE_VFX_MODIFICATION) && defined(UNITY_INSTANCING_ENABLED)
|
|
unity_InstanceID = input.instanceID;
|
|
#endif
|
|
VaryingsMeshToPS unpacked = UnpackVaryingsMeshToPS(input);
|
|
return BuildFragInputs(unpacked);
|
|
}
|
|
SurfaceDescriptionInputs FragInputsToSurfaceDescriptionInputs(FragInputs input, float3 viewWS)
|
|
{
|
|
SurfaceDescriptionInputs output;
|
|
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
|
|
|
#if defined(SHADER_STAGE_RAY_TRACING)
|
|
#else
|
|
#endif
|
|
output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
|
|
|
|
#if UNITY_UV_STARTS_AT_TOP
|
|
#else
|
|
#endif
|
|
|
|
|
|
output.uv0 = input.texCoord0;
|
|
output.uv3 = input.texCoord3;
|
|
|
|
// splice point to copy frag inputs custom interpolator pack into the SDI
|
|
|
|
|
|
return output;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Surface Data (Specific Material)
|
|
|
|
void ApplyDecalToSurfaceDataNoNormal(DecalSurfaceData decalSurfaceData, inout SurfaceData surfaceData);
|
|
|
|
void ApplyDecalAndGetNormal(FragInputs fragInputs, PositionInputs posInput, SurfaceDescription surfaceDescription,
|
|
inout SurfaceData surfaceData)
|
|
{
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
#ifdef DECAL_NORMAL_BLENDING
|
|
// SG nodes don't ouptut surface gradients, so if decals require surf grad blending, we have to convert
|
|
// the normal to gradient before applying the decal. We then have to resolve the gradient back to world space
|
|
float3 normalTS;
|
|
|
|
normalTS = SurfaceGradientFromTangentSpaceNormalAndFromTBN(surfaceDescription.NormalTS,
|
|
fragInputs.tangentToWorld[0], fragInputs.tangentToWorld[1]);
|
|
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, fragInputs.tangentToWorld[2], normalTS);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
|
|
GetNormalWS_SG(fragInputs, normalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
#else
|
|
// normal delivered to master node
|
|
GetNormalWS(fragInputs, surfaceDescription.NormalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Both uses and modifies 'surfaceData.normalWS'.
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, surfaceData.normalWS.xyz);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
#endif
|
|
}
|
|
void BuildSurfaceData(FragInputs fragInputs, inout SurfaceDescription surfaceDescription, float3 V, PositionInputs posInput, out SurfaceData surfaceData, out float3 bentNormalWS)
|
|
{
|
|
ZERO_INITIALIZE(SurfaceData, surfaceData);
|
|
|
|
// specularOcclusion need to be init ahead of decal to quiet the compiler that modify the SurfaceData struct
|
|
// however specularOcclusion can come from the graph, so need to be init here so it can be override.
|
|
surfaceData.specularOcclusion = 1.0;
|
|
surfaceData.thickness = 0.0;
|
|
|
|
surfaceData.baseColor = surfaceDescription.BaseColor;
|
|
surfaceData.perceptualSmoothness = surfaceDescription.Smoothness;
|
|
surfaceData.ambientOcclusion = surfaceDescription.Occlusion;
|
|
surfaceData.metallic = surfaceDescription.Metallic;
|
|
|
|
#if defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE) || defined(_REFRACTION_THIN)
|
|
if (_EnableSSRefraction)
|
|
{
|
|
|
|
surfaceData.transmittanceMask = (1.0 - surfaceDescription.Alpha);
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
else
|
|
{
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
#else
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
#endif
|
|
|
|
// These static material feature allow compile time optimization
|
|
surfaceData.materialFeatures = MATERIALFEATUREFLAGS_LIT_STANDARD;
|
|
#ifdef _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SUBSURFACE_SCATTERING;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_COLORED_TRANSMISSION;
|
|
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_ANISOTROPY
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_ANISOTROPY;
|
|
|
|
// Initialize the normal to something non-zero to avoid a div-zero warning for anisotropy.
|
|
surfaceData.normalWS = float3(0, 1, 0);
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_IRIDESCENCE
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_IRIDESCENCE;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SPECULAR_COLOR;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_CLEAR_COAT
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_CLEAR_COAT;
|
|
#endif
|
|
|
|
#if defined (_MATERIAL_FEATURE_SPECULAR_COLOR) && defined (_ENERGY_CONSERVING_SPECULAR)
|
|
// Require to have setup baseColor
|
|
// Reproduce the energy conservation done in legacy Unity. Not ideal but better for compatibility and users can unchek it
|
|
surfaceData.baseColor *= (1.0 - Max3(surfaceData.specularColor.r, surfaceData.specularColor.g, surfaceData.specularColor.b));
|
|
#endif
|
|
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
ApplyDecalAndGetNormal(fragInputs, posInput, surfaceDescription, surfaceData);
|
|
|
|
surfaceData.geomNormalWS = fragInputs.tangentToWorld[2];
|
|
|
|
surfaceData.tangentWS = normalize(fragInputs.tangentToWorld[0].xyz); // The tangent is not normalize in tangentToWorld for mikkt. TODO: Check if it expected that we normalize with Morten. Tag: SURFACE_GRADIENT
|
|
|
|
|
|
bentNormalWS = surfaceData.normalWS;
|
|
|
|
surfaceData.tangentWS = Orthonormalize(surfaceData.tangentWS, surfaceData.normalWS);
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
// Mipmap mode debugging isn't supported with ray tracing as it relies on derivatives
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD0
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG(posInput.positionSS, fragInputs.texCoord0);
|
|
#else
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG_NO_UV(posInput.positionSS);
|
|
#endif
|
|
surfaceData.metallic = 0;
|
|
}
|
|
#endif
|
|
|
|
// We need to call ApplyDebugToSurfaceData after filling the surfaceData and before filling builtinData
|
|
// as it can modify attribute use for static lighting
|
|
ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData);
|
|
#endif
|
|
|
|
// By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion.
|
|
// If user provide bent normal then we process a better term
|
|
#if defined(_SPECULAR_OCCLUSION_CUSTOM)
|
|
// Just use the value passed through via the slot (not active otherwise)
|
|
#elif defined(_SPECULAR_OCCLUSION_FROM_AO_BENT_NORMAL)
|
|
// If we have bent normal and ambient occlusion, process a specular occlusion
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromBentAO(V, bentNormalWS, surfaceData.normalWS, surfaceData.ambientOcclusion, PerceptualSmoothnessToPerceptualRoughness(surfaceData.perceptualSmoothness));
|
|
#elif defined(_AMBIENT_OCCLUSION) && defined(_SPECULAR_OCCLUSION_FROM_AO)
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness));
|
|
#endif
|
|
|
|
#if defined(_ENABLE_GEOMETRIC_SPECULAR_AA) && !defined(SHADER_STAGE_RAY_TRACING)
|
|
surfaceData.perceptualSmoothness = GeometricNormalFiltering(surfaceData.perceptualSmoothness, fragInputs.tangentToWorld[2], surfaceDescription.SpecularAAScreenSpaceVariance, surfaceDescription.SpecularAAThreshold);
|
|
#endif
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Get Surface And BuiltinData
|
|
|
|
void GetSurfaceAndBuiltinData(FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData RAY_TRACING_OPTIONAL_PARAMETERS)
|
|
{
|
|
// Don't dither if displaced tessellation (we're fading out the displacement instead to match the next LOD)
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && !defined(_TESSELLATION_DISPLACEMENT)
|
|
#ifdef LOD_FADE_CROSSFADE // enable dithering LOD transition if user select CrossFade transition in LOD group
|
|
LODDitheringTransition(ComputeFadeMaskSeed(V, posInput.positionSS), unity_LODFade.x);
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
#ifdef _DOUBLESIDED_ON
|
|
float3 doubleSidedConstants = _DoubleSidedConstants.xyz;
|
|
#else
|
|
float3 doubleSidedConstants = float3(1.0, 1.0, 1.0);
|
|
#endif
|
|
|
|
ApplyDoubleSidedFlipOrMirror(fragInputs, doubleSidedConstants); // Apply double sided flip on the vertex normal
|
|
#endif // SHADER_UNLIT
|
|
|
|
SurfaceDescriptionInputs surfaceDescriptionInputs = FragInputsToSurfaceDescriptionInputs(fragInputs, V);
|
|
|
|
#if defined(HAVE_VFX_MODIFICATION)
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
GetElementPixelProperties(fragInputs, properties);
|
|
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs, properties);
|
|
#else
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs);
|
|
#endif
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
surfaceDescription.Alpha = 1.0f;
|
|
}
|
|
#endif
|
|
|
|
// Perform alpha test very early to save performance (a killed pixel will not sample textures)
|
|
// TODO: split graph evaluation to grab just alpha dependencies first? tricky..
|
|
#ifdef _ALPHATEST_ON
|
|
float alphaCutoff = surfaceDescription.AlphaClipThreshold;
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
// The TransparentDepthPrepass is also used with SSR transparent.
|
|
// If an artists enable transaprent SSR but not the TransparentDepthPrepass itself, then we use AlphaClipThreshold
|
|
// otherwise if TransparentDepthPrepass is enabled we use AlphaClipThresholdDepthPrepass
|
|
#elif SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_POSTPASS
|
|
// DepthPostpass always use its own alpha threshold
|
|
alphaCutoff = surfaceDescription.AlphaClipThresholdDepthPostpass;
|
|
#elif (SHADERPASS == SHADERPASS_SHADOWS) || (SHADERPASS == SHADERPASS_RAYTRACING_VISIBILITY)
|
|
// If use shadow threshold isn't enable we don't allow any test
|
|
#endif
|
|
|
|
GENERIC_ALPHA_TEST(surfaceDescription.Alpha, alphaCutoff);
|
|
#endif
|
|
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && _DEPTHOFFSET_ON
|
|
ApplyDepthOffsetPositionInput(V, surfaceDescription.DepthOffset, GetViewForwardDir(), GetWorldToHClipMatrix(), posInput);
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
float3 bentNormalWS;
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData, bentNormalWS);
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD1
|
|
float4 lightmapTexCoord1 = fragInputs.texCoord1;
|
|
#else
|
|
float4 lightmapTexCoord1 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD2
|
|
float4 lightmapTexCoord2 = fragInputs.texCoord2;
|
|
#else
|
|
float4 lightmapTexCoord2 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Builtin Data
|
|
// For back lighting we use the oposite vertex normal
|
|
InitBuiltinData(posInput, alpha, bentNormalWS, -fragInputs.tangentToWorld[2], lightmapTexCoord1, lightmapTexCoord2, builtinData);
|
|
|
|
#else
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData);
|
|
|
|
ZERO_BUILTIN_INITIALIZE(builtinData); // No call to InitBuiltinData as we don't have any lighting
|
|
builtinData.opacity = surfaceDescription.Alpha;
|
|
|
|
#if defined(DEBUG_DISPLAY)
|
|
// Light Layers are currently not used for the Unlit shader (because it is not lit)
|
|
// But Unlit objects do cast shadows according to their rendering layer mask, which is what we want to
|
|
// display in the light layers visualization mode, therefore we need the renderingLayers
|
|
builtinData.renderingLayers = GetMeshRenderingLayerMask();
|
|
#endif
|
|
|
|
#endif // SHADER_UNLIT
|
|
|
|
#ifdef _ALPHATEST_ON
|
|
// Used for sharpening by alpha to mask - Alpha to covertage is only used with depth only and forward pass (no shadow pass, no transparent pass)
|
|
builtinData.alphaClipTreshold = alphaCutoff;
|
|
#endif
|
|
|
|
// override sampleBakedGI - not used by Unlit
|
|
// When overriding GI, we need to force the isLightmap flag to make sure we don't add APV (sampled in the lightloop) on top of the overridden value (set at GBuffer stage)
|
|
|
|
builtinData.emissiveColor = surfaceDescription.Emission;
|
|
|
|
// Note this will not fully work on transparent surfaces (can check with _SURFACE_TYPE_TRANSPARENT define)
|
|
// We will always overwrite vt feeback with the nearest. So behind transparent surfaces vt will not be resolved
|
|
// This is a limitation of the current MRT approach.
|
|
#ifdef UNITY_VIRTUAL_TEXTURING
|
|
#endif
|
|
|
|
#if _DEPTHOFFSET_ON
|
|
builtinData.depthOffset = surfaceDescription.DepthOffset;
|
|
#endif
|
|
|
|
// TODO: We should generate distortion / distortionBlur for non distortion pass
|
|
#if (SHADERPASS == SHADERPASS_DISTORTION)
|
|
builtinData.distortion = surfaceDescription.Distortion;
|
|
builtinData.distortionBlur = surfaceDescription.DistortionBlur;
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// PostInitBuiltinData call ApplyDebugToBuiltinData
|
|
PostInitBuiltinData(V, posInput, surfaceData, builtinData);
|
|
#else
|
|
ApplyDebugToBuiltinData(builtinData);
|
|
#endif
|
|
|
|
RAY_TRACING_OPTIONAL_ALPHA_TEST_PASS
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Main
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassConstant.hlsl"
|
|
|
|
// --------------------------------------------------
|
|
// Visual Effect Vertex Invocations
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/VisualEffectVertex.hlsl"
|
|
#else
|
|
#endif
|
|
#endif
|
|
|
|
ENDHLSL
|
|
}
|
|
}
|
|
SubShader
|
|
{
|
|
Tags
|
|
{
|
|
"RenderPipeline"="HDRenderPipeline"
|
|
"RenderType"="HDLitShader"
|
|
"Queue"="Geometry+225"
|
|
"DisableBatching"="LODFading"
|
|
"ShaderGraphShader"="true"
|
|
"ShaderGraphTargetId"="HDLitSubTarget"
|
|
}
|
|
Pass
|
|
{
|
|
Name "IndirectDXR"
|
|
Tags
|
|
{
|
|
"LightMode" = "IndirectDXR"
|
|
}
|
|
|
|
// Render State
|
|
// RenderState: <None>
|
|
|
|
// Debug
|
|
// <None>
|
|
|
|
// --------------------------------------------------
|
|
// Pass
|
|
|
|
HLSLPROGRAM
|
|
|
|
// Pragmas
|
|
#pragma target 5.0
|
|
#pragma raytracing surface_shader
|
|
#pragma only_renderers d3d11 xboxseries ps5
|
|
|
|
// Keywords
|
|
#pragma multi_compile _ MULTI_BOUNCE_INDIRECT
|
|
#pragma shader_feature _ _SURFACE_TYPE_TRANSPARENT
|
|
#pragma shader_feature_local _ _DOUBLESIDED_ON
|
|
#pragma shader_feature_local _ _ADD_PRECOMPUTED_VELOCITY
|
|
#pragma shader_feature_local _ _TRANSPARENT_WRITES_MOTION_VEC _TRANSPARENT_REFRACTIVE_SORT
|
|
#pragma shader_feature_local_fragment _ _ENABLE_FOG_ON_TRANSPARENT
|
|
#pragma multi_compile _ DEBUG_DISPLAY
|
|
#pragma shader_feature_local_fragment _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma multi_compile _ LIGHTMAP_ON
|
|
#pragma multi_compile _ DIRLIGHTMAP_COMBINED
|
|
#pragma multi_compile_fragment _ PROBE_VOLUMES_L1 PROBE_VOLUMES_L2
|
|
#pragma multi_compile_raytracing _ PROBE_VOLUMES_L1 PROBE_VOLUMES_L2
|
|
#pragma multi_compile _ DYNAMICLIGHTMAP_ON
|
|
#pragma multi_compile_raytracing DECALS_OFF DECALS_3RT DECALS_4RT
|
|
#pragma multi_compile_raytracing _ DECAL_SURFACE_GRADIENT
|
|
#pragma shader_feature_local _ _REFRACTION_PLANE _REFRACTION_SPHERE _REFRACTION_THIN
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// GraphKeywords: <None>
|
|
|
|
// Defines
|
|
#define SHADERPASS SHADERPASS_RAYTRACING_INDIRECT
|
|
#define PUNCTUAL_SHADOW_LOW
|
|
#define DIRECTIONAL_SHADOW_LOW
|
|
#define RAYTRACING_SHADER_GRAPH_RAYTRACED
|
|
#define LIGHTLOOP_DISABLE_TILE_AND_CLUSTER 1
|
|
#define PATH_TRACING_CLUSTERED_DECALS 1
|
|
#define HAS_LIGHTLOOP 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
|
|
// For custom interpolators to inject a substruct definition before FragInputs definition,
|
|
// allowing for FragInputs to capture CI's intended for ShaderGraph's SDI.
|
|
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreInclude' */
|
|
|
|
|
|
// TODO: Merge FragInputsVFX substruct with CustomInterpolators.
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
struct FragInputsVFX
|
|
{
|
|
/* WARNING: $splice Could not find named fragment 'FragInputsVFX' */
|
|
};
|
|
#endif
|
|
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/GeometricTools.hlsl" // Required by Tessellation.hlsl
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Tessellation.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" // Required to be include before we include properties as it define DECLARE_STACK_CB
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl" // Required before including properties as it defines UNITY_TEXTURE_STREAMING_DEBUG_VARS
|
|
// Always include Shader Graph version
|
|
// Always include last to avoid double macros
|
|
#include "Packages/com.unity.shadergraph/ShaderGraphLibrary/Functions.hlsl" // Need to be here for Gradient struct definition
|
|
|
|
// --------------------------------------------------
|
|
// Defines
|
|
|
|
// Attribute
|
|
#define ATTRIBUTES_NEED_NORMAL
|
|
#define ATTRIBUTES_NEED_TANGENT
|
|
#define ATTRIBUTES_NEED_TEXCOORD0
|
|
#define ATTRIBUTES_NEED_TEXCOORD1
|
|
#define ATTRIBUTES_NEED_TEXCOORD2
|
|
#define ATTRIBUTES_NEED_TEXCOORD3
|
|
#define VARYINGS_NEED_POSITION_WS
|
|
#define VARYINGS_NEED_TANGENT_TO_WORLD
|
|
#define VARYINGS_NEED_TEXCOORD0
|
|
#define VARYINGS_NEED_TEXCOORD1
|
|
#define VARYINGS_NEED_TEXCOORD2
|
|
#define VARYINGS_NEED_TEXCOORD3
|
|
|
|
|
|
//Strip down the FragInputs.hlsl (on graphics), so we can only optimize the interpolators we use.
|
|
//if by accident something requests contents of FragInputs.hlsl, it will be caught as a compiler error
|
|
//Frag inputs stripping is only enabled when FRAG_INPUTS_ENABLE_STRIPPING is set
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && SHADERPASS != SHADERPASS_RAYTRACING_GBUFFER && SHADERPASS != SHADERPASS_FULL_SCREEN_DEBUG
|
|
#define FRAG_INPUTS_ENABLE_STRIPPING
|
|
#endif
|
|
#define FRAG_INPUTS_USE_TEXCOORD0
|
|
#define FRAG_INPUTS_USE_TEXCOORD1
|
|
#define FRAG_INPUTS_USE_TEXCOORD2
|
|
#define FRAG_INPUTS_USE_TEXCOORD3
|
|
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl"
|
|
|
|
|
|
|
|
|
|
// Following two define are a workaround introduce in 10.1.x for RaytracingQualityNode
|
|
// The ShaderGraph don't support correctly migration of this node as it serialize all the node data
|
|
// in the json file making it impossible to uprgrade. Until we get a fix, we do a workaround here
|
|
// to still allow us to rename the field and keyword of this node without breaking existing code.
|
|
#ifdef RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define RAYTRACING_SHADER_GRAPH_HIGH
|
|
#endif
|
|
|
|
#ifdef RAYTRACING_SHADER_GRAPH_RAYTRACED
|
|
#define RAYTRACING_SHADER_GRAPH_LOW
|
|
#endif
|
|
// end
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// We need isFrontFace when using double sided - it is not required for unlit as in case of unlit double sided only drive the cullmode
|
|
// VARYINGS_NEED_CULLFACE can be define by VaryingsMeshToPS.FaceSign input if a IsFrontFace Node is included in the shader graph.
|
|
#if defined(_DOUBLESIDED_ON) && !defined(VARYINGS_NEED_CULLFACE)
|
|
#define VARYINGS_NEED_CULLFACE
|
|
#endif
|
|
#endif
|
|
|
|
// Specific Material Define
|
|
#define _AMBIENT_OCCLUSION 1
|
|
#define _SPECULAR_OCCLUSION_FROM_AO 1
|
|
#define _ENERGY_CONSERVING_SPECULAR 1
|
|
|
|
#if _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// Colored Transmission doesn't support clear coat
|
|
#undef _MATERIAL_FEATURE_CLEAR_COAT
|
|
#endif
|
|
|
|
// If we use subsurface scattering, enable output split lighting (for forward pass)
|
|
#if defined(_MATERIAL_FEATURE_SUBSURFACE_SCATTERING) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define OUTPUT_SPLIT_LIGHTING
|
|
#endif
|
|
|
|
// This shader support recursive rendering for raytracing
|
|
#define HAVE_RECURSIVE_RENDERING
|
|
|
|
// In Path Tracing, For all single-sided, refractive materials, we want to force a thin refraction model
|
|
#if (SHADERPASS == SHADERPASS_PATH_TRACING) && !defined(_DOUBLESIDED_ON) && (defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE))
|
|
#undef _REFRACTION_PLANE
|
|
#undef _REFRACTION_SPHERE
|
|
#define _REFRACTION_THIN
|
|
#endif
|
|
// Caution: we can use the define SHADER_UNLIT onlit after the above Material include as it is the Unlit template who define it
|
|
|
|
// To handle SSR on transparent correctly with a possibility to enable/disable it per framesettings
|
|
// we should have a code like this:
|
|
// if !defined(_DISABLE_SSR_TRANSPARENT)
|
|
// pragma multi_compile _ WRITE_NORMAL_BUFFER
|
|
// endif
|
|
// i.e we enable the multicompile only if we can receive SSR or not, and then C# code drive
|
|
// it based on if SSR transparent in frame settings and not (and stripper can strip it).
|
|
// this is currently not possible with our current preprocessor as _DISABLE_SSR_TRANSPARENT is a keyword not a define
|
|
// so instead we used this and chose to pay the extra cost of normal write even if SSR transaprent is disabled.
|
|
// Ideally the shader graph generator should handle it but condition below can't be handle correctly for now.
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
#if !defined(_DISABLE_SSR_TRANSPARENT) && !defined(SHADER_UNLIT)
|
|
#define WRITE_NORMAL_BUFFER
|
|
#endif
|
|
#endif
|
|
|
|
// See Lit.shader
|
|
#if SHADERPASS == SHADERPASS_MOTION_VECTORS && defined(WRITE_DECAL_BUFFER_AND_RENDERING_LAYER)
|
|
#define WRITE_DECAL_BUFFER
|
|
#endif
|
|
|
|
#ifndef DEBUG_DISPLAY
|
|
// In case of opaque we don't want to perform the alpha test, it is done in depth prepass and we use depth equal for ztest (setup from UI)
|
|
// Don't do it with debug display mode as it is possible there is no depth prepass in this case
|
|
#if !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#if SHADERPASS == SHADERPASS_FORWARD
|
|
#define SHADERPASS_FORWARD_BYPASS_ALPHA_TEST
|
|
#elif SHADERPASS == SHADERPASS_GBUFFER
|
|
#define SHADERPASS_GBUFFER_BYPASS_ALPHA_TEST
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
// Define _DEFERRED_CAPABLE_MATERIAL for shader capable to run in deferred pass
|
|
#if defined(SHADER_LIT) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _DEFERRED_CAPABLE_MATERIAL
|
|
#endif
|
|
|
|
// Translate transparent motion vector define
|
|
#if (defined(_TRANSPARENT_WRITES_MOTION_VEC) || defined(_TRANSPARENT_REFRACTIVE_SORT)) && defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _WRITE_TRANSPARENT_MOTION_VECTOR
|
|
#endif
|
|
|
|
// -- Graph Properties
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _TrunkBaseColor;
|
|
float4 _TrunkBaseColorMap_TexelSize;
|
|
float4 _TrunkTilingOffset;
|
|
float4 _TrunkNormalMap_TexelSize;
|
|
float _TrunkNormalScale;
|
|
float4 _TrunkMaskMap_TexelSize;
|
|
float _TrunkMetallic;
|
|
float _TrunkAORemapMin;
|
|
float _TrunkAORemapMax;
|
|
float _TrunkSmoothnessRemapMin;
|
|
float _TrunkSmoothnessRemapMax;
|
|
float4 _LayerMask_TexelSize;
|
|
float4 _BarkBlendMaskTilingOffset;
|
|
float4 _BarkBaseColor;
|
|
float4 _BarkBaseColorMap_TexelSize;
|
|
float _BarkUseUV3;
|
|
float4 _BarkTilingOffset;
|
|
float4 _BarkNormalMap_TexelSize;
|
|
float _BarkNormalScale;
|
|
float4 _BarkMaskMap_TexelSize;
|
|
float _BarkMetallic;
|
|
float _BarkSmoothnessRemapMin;
|
|
float _BarkSmoothnessRemapMax;
|
|
float _BarkAORemapMin;
|
|
float _BarkAORemapMax;
|
|
float _Stiffness;
|
|
float _InitialBend;
|
|
float _Drag;
|
|
float _HeightDrag;
|
|
float4 _NewNormal;
|
|
float4 _EmissionColor;
|
|
float _UseShadowThreshold;
|
|
float4 _DoubleSidedConstants;
|
|
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
|
float _BlendMode;
|
|
float _EnableBlendModePreserveSpecularLighting;
|
|
float _RayTracing;
|
|
float _RefractionModel;
|
|
float _MaterialID;
|
|
float _MaterialTypeMask;
|
|
CBUFFER_END
|
|
|
|
|
|
// Object and Global properties
|
|
SAMPLER(SamplerState_Linear_Repeat);
|
|
SAMPLER(SamplerState_Linear_Repeat_Aniso8);
|
|
TEXTURE2D(_TrunkBaseColorMap);
|
|
SAMPLER(sampler_TrunkBaseColorMap);
|
|
TEXTURE2D(_TrunkNormalMap);
|
|
SAMPLER(sampler_TrunkNormalMap);
|
|
TEXTURE2D(_TrunkMaskMap);
|
|
SAMPLER(sampler_TrunkMaskMap);
|
|
TEXTURE2D(_LayerMask);
|
|
SAMPLER(sampler_LayerMask);
|
|
TEXTURE2D(_BarkBaseColorMap);
|
|
SAMPLER(sampler_BarkBaseColorMap);
|
|
TEXTURE2D(_BarkNormalMap);
|
|
SAMPLER(sampler_BarkNormalMap);
|
|
TEXTURE2D(_BarkMaskMap);
|
|
SAMPLER(sampler_BarkMaskMap);
|
|
TEXTURE2D(WIND_SETTINGS_TexNoise);
|
|
SAMPLER(samplerWIND_SETTINGS_TexNoise);
|
|
float4 WIND_SETTINGS_TexNoise_TexelSize;
|
|
TEXTURE2D(WIND_SETTINGS_TexGust);
|
|
SAMPLER(samplerWIND_SETTINGS_TexGust);
|
|
float4 WIND_SETTINGS_TexGust_TexelSize;
|
|
float4 WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float WIND_SETTINGS_FlexNoiseScale;
|
|
float WIND_SETTINGS_ShiverNoiseScale;
|
|
float WIND_SETTINGS_Turbulence;
|
|
float WIND_SETTINGS_GustSpeed;
|
|
float WIND_SETTINGS_GustScale;
|
|
float WIND_SETTINGS_GustWorldScale;
|
|
float4x4 WIND_SETTINGS_Points;
|
|
float4 WIND_SETTINGS_Points_Radius;
|
|
|
|
// -- Property used by ScenePickingPass
|
|
#ifdef SCENEPICKINGPASS
|
|
float4 _SelectionID;
|
|
#endif
|
|
|
|
// -- Properties used by SceneSelectionPass
|
|
#ifdef SCENESELECTIONPASS
|
|
int _ObjectId;
|
|
int _PassValue;
|
|
#endif
|
|
|
|
// Includes
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingMacros.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracing.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracingLightLoop.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingIntersection.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/Lighting.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoopDef.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitRayTracing.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingLightLoop.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RayTracingCommon.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDecalData.hlsl"
|
|
// GraphIncludes: <None>
|
|
|
|
// --------------------------------------------------
|
|
// Structs and Packing
|
|
|
|
struct SurfaceDescriptionInputs
|
|
{
|
|
float3 TangentSpaceNormal;
|
|
float4 uv0;
|
|
float4 uv3;
|
|
};
|
|
|
|
//Interpolator Packs: <None>
|
|
|
|
// --------------------------------------------------
|
|
// Graph
|
|
|
|
|
|
// Graph Functions
|
|
|
|
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_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Lerp_float4(float4 A, float4 B, float4 T, out float4 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Multiply_float_float(float A, float B, out float Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Remap_float(float In, float2 InMinMax, float2 OutMinMax, out float Out)
|
|
{
|
|
Out = OutMinMax.x + (In - InMinMax.x) * (OutMinMax.y - OutMinMax.x) / (InMinMax.y - InMinMax.x);
|
|
}
|
|
|
|
void Unity_Lerp_float3(float3 A, float3 B, float3 T, out float3 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_NormalStrength_float(float3 In, float Strength, out float3 Out)
|
|
{
|
|
Out = float3(In.rg * Strength, lerp(1, In.b, saturate(Strength)));
|
|
}
|
|
|
|
// Graph Vertex
|
|
// GraphVertex: <None>
|
|
|
|
// Graph Pixel
|
|
struct SurfaceDescription
|
|
{
|
|
float3 BaseColor;
|
|
float3 Emission;
|
|
float Alpha;
|
|
float3 BentNormal;
|
|
float Smoothness;
|
|
float Occlusion;
|
|
float3 NormalTS;
|
|
float Metallic;
|
|
};
|
|
|
|
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
|
{
|
|
SurfaceDescription surface = (SurfaceDescription)0;
|
|
UnityTexture2D _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkBaseColorMap);
|
|
float4 _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4 = _TrunkTilingOffset;
|
|
float _Split_60538633130155809820b3185c81057f_R_1_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[0];
|
|
float _Split_60538633130155809820b3185c81057f_G_2_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[1];
|
|
float _Split_60538633130155809820b3185c81057f_B_3_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[2];
|
|
float _Split_60538633130155809820b3185c81057f_A_4_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[3];
|
|
float2 _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_R_1_Float, _Split_60538633130155809820b3185c81057f_G_2_Float);
|
|
float2 _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_B_3_Float, _Split_60538633130155809820b3185c81057f_A_4_Float);
|
|
float2 _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2, _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2, _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2);
|
|
float4 _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_R_4_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_G_5_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_B_6_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_A_7_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.a;
|
|
float4 _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4 = _TrunkBaseColor;
|
|
float4 _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4, _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4, _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4);
|
|
UnityTexture2D _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkBaseColorMap);
|
|
float _Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean = _BarkUseUV3;
|
|
float4 _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4 = IN.uv3;
|
|
float4 _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4 = IN.uv0;
|
|
float4 _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4;
|
|
Unity_Branch_float4(_Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean, _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4, _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4, _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4);
|
|
float4 _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4 = _BarkTilingOffset;
|
|
float _Split_ee975774554f6480b33168eff36d8be7_R_1_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[0];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_G_2_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[1];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_B_3_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[2];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_A_4_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[3];
|
|
float2 _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_R_1_Float, _Split_ee975774554f6480b33168eff36d8be7_G_2_Float);
|
|
float2 _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_B_3_Float, _Split_ee975774554f6480b33168eff36d8be7_A_4_Float);
|
|
float2 _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float((_Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4.xy), _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2, _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2, _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2);
|
|
float4 _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_R_4_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_G_5_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_B_6_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_A_7_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.a;
|
|
float4 _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4 = _BarkBaseColor;
|
|
float4 _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4, _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4);
|
|
UnityTexture2D _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_LayerMask);
|
|
float4 _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4 = _BarkBlendMaskTilingOffset;
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[0];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[1];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[2];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[3];
|
|
float2 _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float);
|
|
float2 _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float);
|
|
float2 _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2, _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2, _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2);
|
|
float4 _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2) );
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_R_4_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_G_5_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_B_6_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.a;
|
|
float4 _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4;
|
|
Unity_Lerp_float4(_Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxxx), _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4);
|
|
UnityTexture2D _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkMaskMap);
|
|
float4 _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_B_6_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.a;
|
|
float _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float = _TrunkMetallic;
|
|
float _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float, _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float, _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float);
|
|
float _Property_8142f12b781ad08680220297dab56f14_Out_0_Float = _TrunkAORemapMin;
|
|
float _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float = _TrunkAORemapMax;
|
|
float2 _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2 = float2(_Property_8142f12b781ad08680220297dab56f14_Out_0_Float, _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float);
|
|
float _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float, float2 (0, 1), _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float);
|
|
float _Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float = _TrunkSmoothnessRemapMin;
|
|
float _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float = _TrunkSmoothnessRemapMax;
|
|
float2 _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2 = float2(_Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float, _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float);
|
|
float _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float, float2 (0, 1), _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
float3 _Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3 = float3(_Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
UnityTexture2D _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkMaskMap);
|
|
float4 _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_B_6_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.a;
|
|
float _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float = _BarkMetallic;
|
|
float _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float, _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float, _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float);
|
|
float _Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float = _BarkAORemapMin;
|
|
float _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float = _BarkAORemapMax;
|
|
float2 _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2 = float2(_Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float, _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float);
|
|
float _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float, float2 (0, 1), _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float);
|
|
float _Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float = _BarkSmoothnessRemapMin;
|
|
float _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float = _BarkSmoothnessRemapMax;
|
|
float2 _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2 = float2(_Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float, _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float);
|
|
float _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float, float2 (0, 1), _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3 = float3(_Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3;
|
|
Unity_Lerp_float3(_Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3, _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3);
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[0];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[1];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[2];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_A_4_Float = 0;
|
|
UnityTexture2D _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkNormalMap);
|
|
float4 _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4);
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_R_4_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_G_5_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_B_6_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_A_7_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.a;
|
|
float _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float = _TrunkNormalScale;
|
|
float3 _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.xyz), _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float, _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3);
|
|
UnityTexture2D _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkNormalMap);
|
|
float4 _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4);
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_R_4_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_G_5_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_B_6_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_A_7_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.a;
|
|
float _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float = _BarkNormalScale;
|
|
float3 _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.xyz), _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3);
|
|
float3 _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
Unity_Lerp_float3(_NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3);
|
|
surface.BaseColor = (_Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4.xyz);
|
|
surface.Emission = float3(0, 0, 0);
|
|
surface.Alpha = float(1);
|
|
surface.BentNormal = IN.TangentSpaceNormal;
|
|
surface.Smoothness = _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float;
|
|
surface.Occlusion = _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float;
|
|
surface.NormalTS = _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
surface.Metallic = _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float;
|
|
return surface;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Graph Inputs
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#define VFX_SRP_ATTRIBUTES AttributesMesh
|
|
#define VaryingsMeshType VaryingsMeshToPS
|
|
#define VFX_SRP_VARYINGS VaryingsMeshType
|
|
#define VFX_SRP_SURFACE_INPUTS FragInputs
|
|
#endif
|
|
SurfaceDescriptionInputs FragInputsToSurfaceDescriptionInputs(FragInputs input, float3 viewWS)
|
|
{
|
|
SurfaceDescriptionInputs output;
|
|
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
|
|
|
#if defined(SHADER_STAGE_RAY_TRACING)
|
|
#else
|
|
#endif
|
|
output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
|
|
|
|
#if UNITY_UV_STARTS_AT_TOP
|
|
#else
|
|
#endif
|
|
|
|
|
|
output.uv0 = input.texCoord0;
|
|
output.uv3 = input.texCoord3;
|
|
|
|
// splice point to copy frag inputs custom interpolator pack into the SDI
|
|
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorCopyToSDI' */
|
|
|
|
return output;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Surface Data (Specific Material)
|
|
|
|
void ApplyDecalToSurfaceDataNoNormal(DecalSurfaceData decalSurfaceData, inout SurfaceData surfaceData);
|
|
|
|
void ApplyDecalAndGetNormal(FragInputs fragInputs, PositionInputs posInput, SurfaceDescription surfaceDescription,
|
|
inout SurfaceData surfaceData)
|
|
{
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
#ifdef DECAL_NORMAL_BLENDING
|
|
// SG nodes don't ouptut surface gradients, so if decals require surf grad blending, we have to convert
|
|
// the normal to gradient before applying the decal. We then have to resolve the gradient back to world space
|
|
float3 normalTS;
|
|
|
|
normalTS = SurfaceGradientFromTangentSpaceNormalAndFromTBN(surfaceDescription.NormalTS,
|
|
fragInputs.tangentToWorld[0], fragInputs.tangentToWorld[1]);
|
|
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, fragInputs.tangentToWorld[2], normalTS);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
|
|
GetNormalWS_SG(fragInputs, normalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
#else
|
|
// normal delivered to master node
|
|
GetNormalWS(fragInputs, surfaceDescription.NormalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Both uses and modifies 'surfaceData.normalWS'.
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, surfaceData.normalWS.xyz);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
#endif
|
|
}
|
|
void BuildSurfaceData(FragInputs fragInputs, inout SurfaceDescription surfaceDescription, float3 V, PositionInputs posInput, out SurfaceData surfaceData, out float3 bentNormalWS)
|
|
{
|
|
ZERO_INITIALIZE(SurfaceData, surfaceData);
|
|
|
|
// specularOcclusion need to be init ahead of decal to quiet the compiler that modify the SurfaceData struct
|
|
// however specularOcclusion can come from the graph, so need to be init here so it can be override.
|
|
surfaceData.specularOcclusion = 1.0;
|
|
surfaceData.thickness = 0.0;
|
|
|
|
surfaceData.baseColor = surfaceDescription.BaseColor;
|
|
surfaceData.perceptualSmoothness = surfaceDescription.Smoothness;
|
|
surfaceData.ambientOcclusion = surfaceDescription.Occlusion;
|
|
surfaceData.metallic = surfaceDescription.Metallic;
|
|
|
|
#if defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE) || defined(_REFRACTION_THIN)
|
|
if (_EnableSSRefraction)
|
|
{
|
|
|
|
surfaceData.transmittanceMask = (1.0 - surfaceDescription.Alpha);
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
else
|
|
{
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
#else
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
#endif
|
|
|
|
// These static material feature allow compile time optimization
|
|
surfaceData.materialFeatures = MATERIALFEATUREFLAGS_LIT_STANDARD;
|
|
#ifdef _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SUBSURFACE_SCATTERING;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_COLORED_TRANSMISSION;
|
|
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_ANISOTROPY
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_ANISOTROPY;
|
|
|
|
// Initialize the normal to something non-zero to avoid a div-zero warning for anisotropy.
|
|
surfaceData.normalWS = float3(0, 1, 0);
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_IRIDESCENCE
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_IRIDESCENCE;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SPECULAR_COLOR;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_CLEAR_COAT
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_CLEAR_COAT;
|
|
#endif
|
|
|
|
#if defined (_MATERIAL_FEATURE_SPECULAR_COLOR) && defined (_ENERGY_CONSERVING_SPECULAR)
|
|
// Require to have setup baseColor
|
|
// Reproduce the energy conservation done in legacy Unity. Not ideal but better for compatibility and users can unchek it
|
|
surfaceData.baseColor *= (1.0 - Max3(surfaceData.specularColor.r, surfaceData.specularColor.g, surfaceData.specularColor.b));
|
|
#endif
|
|
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
ApplyDecalAndGetNormal(fragInputs, posInput, surfaceDescription, surfaceData);
|
|
|
|
surfaceData.geomNormalWS = fragInputs.tangentToWorld[2];
|
|
|
|
surfaceData.tangentWS = normalize(fragInputs.tangentToWorld[0].xyz); // The tangent is not normalize in tangentToWorld for mikkt. TODO: Check if it expected that we normalize with Morten. Tag: SURFACE_GRADIENT
|
|
|
|
|
|
bentNormalWS = surfaceData.normalWS;
|
|
|
|
surfaceData.tangentWS = Orthonormalize(surfaceData.tangentWS, surfaceData.normalWS);
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
// Mipmap mode debugging isn't supported with ray tracing as it relies on derivatives
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD0
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG(posInput.positionSS, fragInputs.texCoord0);
|
|
#else
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG_NO_UV(posInput.positionSS);
|
|
#endif
|
|
surfaceData.metallic = 0;
|
|
}
|
|
#endif
|
|
|
|
// We need to call ApplyDebugToSurfaceData after filling the surfaceData and before filling builtinData
|
|
// as it can modify attribute use for static lighting
|
|
ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData);
|
|
#endif
|
|
|
|
// By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion.
|
|
// If user provide bent normal then we process a better term
|
|
#if defined(_SPECULAR_OCCLUSION_CUSTOM)
|
|
// Just use the value passed through via the slot (not active otherwise)
|
|
#elif defined(_SPECULAR_OCCLUSION_FROM_AO_BENT_NORMAL)
|
|
// If we have bent normal and ambient occlusion, process a specular occlusion
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromBentAO(V, bentNormalWS, surfaceData.normalWS, surfaceData.ambientOcclusion, PerceptualSmoothnessToPerceptualRoughness(surfaceData.perceptualSmoothness));
|
|
#elif defined(_AMBIENT_OCCLUSION) && defined(_SPECULAR_OCCLUSION_FROM_AO)
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness));
|
|
#endif
|
|
|
|
#if defined(_ENABLE_GEOMETRIC_SPECULAR_AA) && !defined(SHADER_STAGE_RAY_TRACING)
|
|
surfaceData.perceptualSmoothness = GeometricNormalFiltering(surfaceData.perceptualSmoothness, fragInputs.tangentToWorld[2], surfaceDescription.SpecularAAScreenSpaceVariance, surfaceDescription.SpecularAAThreshold);
|
|
#endif
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Get Surface And BuiltinData
|
|
|
|
void GetSurfaceAndBuiltinData(FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData RAY_TRACING_OPTIONAL_PARAMETERS)
|
|
{
|
|
// Don't dither if displaced tessellation (we're fading out the displacement instead to match the next LOD)
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && !defined(_TESSELLATION_DISPLACEMENT)
|
|
#ifdef LOD_FADE_CROSSFADE // enable dithering LOD transition if user select CrossFade transition in LOD group
|
|
LODDitheringTransition(ComputeFadeMaskSeed(V, posInput.positionSS), unity_LODFade.x);
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
#ifdef _DOUBLESIDED_ON
|
|
float3 doubleSidedConstants = _DoubleSidedConstants.xyz;
|
|
#else
|
|
float3 doubleSidedConstants = float3(1.0, 1.0, 1.0);
|
|
#endif
|
|
|
|
ApplyDoubleSidedFlipOrMirror(fragInputs, doubleSidedConstants); // Apply double sided flip on the vertex normal
|
|
#endif // SHADER_UNLIT
|
|
|
|
SurfaceDescriptionInputs surfaceDescriptionInputs = FragInputsToSurfaceDescriptionInputs(fragInputs, V);
|
|
|
|
#if defined(HAVE_VFX_MODIFICATION)
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
GetElementPixelProperties(fragInputs, properties);
|
|
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs, properties);
|
|
#else
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs);
|
|
#endif
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
surfaceDescription.Alpha = 1.0f;
|
|
}
|
|
#endif
|
|
|
|
// Perform alpha test very early to save performance (a killed pixel will not sample textures)
|
|
// TODO: split graph evaluation to grab just alpha dependencies first? tricky..
|
|
#ifdef _ALPHATEST_ON
|
|
float alphaCutoff = surfaceDescription.AlphaClipThreshold;
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
// The TransparentDepthPrepass is also used with SSR transparent.
|
|
// If an artists enable transaprent SSR but not the TransparentDepthPrepass itself, then we use AlphaClipThreshold
|
|
// otherwise if TransparentDepthPrepass is enabled we use AlphaClipThresholdDepthPrepass
|
|
#elif SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_POSTPASS
|
|
// DepthPostpass always use its own alpha threshold
|
|
alphaCutoff = surfaceDescription.AlphaClipThresholdDepthPostpass;
|
|
#elif (SHADERPASS == SHADERPASS_SHADOWS) || (SHADERPASS == SHADERPASS_RAYTRACING_VISIBILITY)
|
|
// If use shadow threshold isn't enable we don't allow any test
|
|
#endif
|
|
|
|
GENERIC_ALPHA_TEST(surfaceDescription.Alpha, alphaCutoff);
|
|
#endif
|
|
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && _DEPTHOFFSET_ON
|
|
ApplyDepthOffsetPositionInput(V, surfaceDescription.DepthOffset, GetViewForwardDir(), GetWorldToHClipMatrix(), posInput);
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
float3 bentNormalWS;
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData, bentNormalWS);
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD1
|
|
float4 lightmapTexCoord1 = fragInputs.texCoord1;
|
|
#else
|
|
float4 lightmapTexCoord1 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD2
|
|
float4 lightmapTexCoord2 = fragInputs.texCoord2;
|
|
#else
|
|
float4 lightmapTexCoord2 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Builtin Data
|
|
// For back lighting we use the oposite vertex normal
|
|
InitBuiltinData(posInput, alpha, bentNormalWS, -fragInputs.tangentToWorld[2], lightmapTexCoord1, lightmapTexCoord2, builtinData);
|
|
|
|
#else
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData);
|
|
|
|
ZERO_BUILTIN_INITIALIZE(builtinData); // No call to InitBuiltinData as we don't have any lighting
|
|
builtinData.opacity = surfaceDescription.Alpha;
|
|
|
|
#if defined(DEBUG_DISPLAY)
|
|
// Light Layers are currently not used for the Unlit shader (because it is not lit)
|
|
// But Unlit objects do cast shadows according to their rendering layer mask, which is what we want to
|
|
// display in the light layers visualization mode, therefore we need the renderingLayers
|
|
builtinData.renderingLayers = GetMeshRenderingLayerMask();
|
|
#endif
|
|
|
|
#endif // SHADER_UNLIT
|
|
|
|
#ifdef _ALPHATEST_ON
|
|
// Used for sharpening by alpha to mask - Alpha to covertage is only used with depth only and forward pass (no shadow pass, no transparent pass)
|
|
builtinData.alphaClipTreshold = alphaCutoff;
|
|
#endif
|
|
|
|
// override sampleBakedGI - not used by Unlit
|
|
// When overriding GI, we need to force the isLightmap flag to make sure we don't add APV (sampled in the lightloop) on top of the overridden value (set at GBuffer stage)
|
|
|
|
builtinData.emissiveColor = surfaceDescription.Emission;
|
|
|
|
// Note this will not fully work on transparent surfaces (can check with _SURFACE_TYPE_TRANSPARENT define)
|
|
// We will always overwrite vt feeback with the nearest. So behind transparent surfaces vt will not be resolved
|
|
// This is a limitation of the current MRT approach.
|
|
#ifdef UNITY_VIRTUAL_TEXTURING
|
|
#endif
|
|
|
|
#if _DEPTHOFFSET_ON
|
|
builtinData.depthOffset = surfaceDescription.DepthOffset;
|
|
#endif
|
|
|
|
// TODO: We should generate distortion / distortionBlur for non distortion pass
|
|
#if (SHADERPASS == SHADERPASS_DISTORTION)
|
|
builtinData.distortion = surfaceDescription.Distortion;
|
|
builtinData.distortionBlur = surfaceDescription.DistortionBlur;
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// PostInitBuiltinData call ApplyDebugToBuiltinData
|
|
PostInitBuiltinData(V, posInput, surfaceData, builtinData);
|
|
#else
|
|
ApplyDebugToBuiltinData(builtinData);
|
|
#endif
|
|
|
|
RAY_TRACING_OPTIONAL_ALPHA_TEST_PASS
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Main
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassRaytracingIndirect.hlsl"
|
|
|
|
// --------------------------------------------------
|
|
// Visual Effect Vertex Invocations
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/VisualEffectVertex.hlsl"
|
|
#else
|
|
#endif
|
|
#endif
|
|
|
|
ENDHLSL
|
|
}
|
|
Pass
|
|
{
|
|
Name "VisibilityDXR"
|
|
Tags
|
|
{
|
|
"LightMode" = "VisibilityDXR"
|
|
}
|
|
|
|
// Render State
|
|
// RenderState: <None>
|
|
|
|
// Debug
|
|
// <None>
|
|
|
|
// --------------------------------------------------
|
|
// Pass
|
|
|
|
HLSLPROGRAM
|
|
|
|
// Pragmas
|
|
#pragma target 5.0
|
|
#pragma raytracing surface_shader
|
|
#pragma only_renderers d3d11 xboxseries ps5
|
|
|
|
// Keywords
|
|
#pragma multi_compile _ TRANSPARENT_COLOR_SHADOW
|
|
#pragma shader_feature _ _SURFACE_TYPE_TRANSPARENT
|
|
#pragma shader_feature_local _ _DOUBLESIDED_ON
|
|
#pragma shader_feature_local _ _ADD_PRECOMPUTED_VELOCITY
|
|
#pragma shader_feature_local _ _TRANSPARENT_WRITES_MOTION_VEC _TRANSPARENT_REFRACTIVE_SORT
|
|
#pragma shader_feature_local_fragment _ _ENABLE_FOG_ON_TRANSPARENT
|
|
#pragma shader_feature_local_fragment _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local _ _REFRACTION_PLANE _REFRACTION_SPHERE _REFRACTION_THIN
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// GraphKeywords: <None>
|
|
|
|
// Defines
|
|
#define SHADERPASS SHADERPASS_RAYTRACING_VISIBILITY
|
|
#define RAYTRACING_SHADER_GRAPH_RAYTRACED
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
|
|
// For custom interpolators to inject a substruct definition before FragInputs definition,
|
|
// allowing for FragInputs to capture CI's intended for ShaderGraph's SDI.
|
|
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreInclude' */
|
|
|
|
|
|
// TODO: Merge FragInputsVFX substruct with CustomInterpolators.
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
struct FragInputsVFX
|
|
{
|
|
/* WARNING: $splice Could not find named fragment 'FragInputsVFX' */
|
|
};
|
|
#endif
|
|
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/GeometricTools.hlsl" // Required by Tessellation.hlsl
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Tessellation.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" // Required to be include before we include properties as it define DECLARE_STACK_CB
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl" // Required before including properties as it defines UNITY_TEXTURE_STREAMING_DEBUG_VARS
|
|
// Always include Shader Graph version
|
|
// Always include last to avoid double macros
|
|
#include "Packages/com.unity.shadergraph/ShaderGraphLibrary/Functions.hlsl" // Need to be here for Gradient struct definition
|
|
|
|
// --------------------------------------------------
|
|
// Defines
|
|
|
|
// Attribute
|
|
#define ATTRIBUTES_NEED_TEXCOORD0
|
|
#define ATTRIBUTES_NEED_TEXCOORD3
|
|
#define VARYINGS_NEED_TEXCOORD0
|
|
#define VARYINGS_NEED_TEXCOORD3
|
|
|
|
|
|
//Strip down the FragInputs.hlsl (on graphics), so we can only optimize the interpolators we use.
|
|
//if by accident something requests contents of FragInputs.hlsl, it will be caught as a compiler error
|
|
//Frag inputs stripping is only enabled when FRAG_INPUTS_ENABLE_STRIPPING is set
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && SHADERPASS != SHADERPASS_RAYTRACING_GBUFFER && SHADERPASS != SHADERPASS_FULL_SCREEN_DEBUG
|
|
#define FRAG_INPUTS_ENABLE_STRIPPING
|
|
#endif
|
|
#define FRAG_INPUTS_USE_TEXCOORD0
|
|
#define FRAG_INPUTS_USE_TEXCOORD3
|
|
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl"
|
|
|
|
|
|
|
|
|
|
// Following two define are a workaround introduce in 10.1.x for RaytracingQualityNode
|
|
// The ShaderGraph don't support correctly migration of this node as it serialize all the node data
|
|
// in the json file making it impossible to uprgrade. Until we get a fix, we do a workaround here
|
|
// to still allow us to rename the field and keyword of this node without breaking existing code.
|
|
#ifdef RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define RAYTRACING_SHADER_GRAPH_HIGH
|
|
#endif
|
|
|
|
#ifdef RAYTRACING_SHADER_GRAPH_RAYTRACED
|
|
#define RAYTRACING_SHADER_GRAPH_LOW
|
|
#endif
|
|
// end
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// We need isFrontFace when using double sided - it is not required for unlit as in case of unlit double sided only drive the cullmode
|
|
// VARYINGS_NEED_CULLFACE can be define by VaryingsMeshToPS.FaceSign input if a IsFrontFace Node is included in the shader graph.
|
|
#if defined(_DOUBLESIDED_ON) && !defined(VARYINGS_NEED_CULLFACE)
|
|
#define VARYINGS_NEED_CULLFACE
|
|
#endif
|
|
#endif
|
|
|
|
// Specific Material Define
|
|
#define _AMBIENT_OCCLUSION 1
|
|
#define _SPECULAR_OCCLUSION_FROM_AO 1
|
|
#define _ENERGY_CONSERVING_SPECULAR 1
|
|
|
|
#if _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// Colored Transmission doesn't support clear coat
|
|
#undef _MATERIAL_FEATURE_CLEAR_COAT
|
|
#endif
|
|
|
|
// If we use subsurface scattering, enable output split lighting (for forward pass)
|
|
#if defined(_MATERIAL_FEATURE_SUBSURFACE_SCATTERING) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define OUTPUT_SPLIT_LIGHTING
|
|
#endif
|
|
|
|
// This shader support recursive rendering for raytracing
|
|
#define HAVE_RECURSIVE_RENDERING
|
|
|
|
// In Path Tracing, For all single-sided, refractive materials, we want to force a thin refraction model
|
|
#if (SHADERPASS == SHADERPASS_PATH_TRACING) && !defined(_DOUBLESIDED_ON) && (defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE))
|
|
#undef _REFRACTION_PLANE
|
|
#undef _REFRACTION_SPHERE
|
|
#define _REFRACTION_THIN
|
|
#endif
|
|
// Caution: we can use the define SHADER_UNLIT onlit after the above Material include as it is the Unlit template who define it
|
|
|
|
// To handle SSR on transparent correctly with a possibility to enable/disable it per framesettings
|
|
// we should have a code like this:
|
|
// if !defined(_DISABLE_SSR_TRANSPARENT)
|
|
// pragma multi_compile _ WRITE_NORMAL_BUFFER
|
|
// endif
|
|
// i.e we enable the multicompile only if we can receive SSR or not, and then C# code drive
|
|
// it based on if SSR transparent in frame settings and not (and stripper can strip it).
|
|
// this is currently not possible with our current preprocessor as _DISABLE_SSR_TRANSPARENT is a keyword not a define
|
|
// so instead we used this and chose to pay the extra cost of normal write even if SSR transaprent is disabled.
|
|
// Ideally the shader graph generator should handle it but condition below can't be handle correctly for now.
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
#if !defined(_DISABLE_SSR_TRANSPARENT) && !defined(SHADER_UNLIT)
|
|
#define WRITE_NORMAL_BUFFER
|
|
#endif
|
|
#endif
|
|
|
|
// See Lit.shader
|
|
#if SHADERPASS == SHADERPASS_MOTION_VECTORS && defined(WRITE_DECAL_BUFFER_AND_RENDERING_LAYER)
|
|
#define WRITE_DECAL_BUFFER
|
|
#endif
|
|
|
|
#ifndef DEBUG_DISPLAY
|
|
// In case of opaque we don't want to perform the alpha test, it is done in depth prepass and we use depth equal for ztest (setup from UI)
|
|
// Don't do it with debug display mode as it is possible there is no depth prepass in this case
|
|
#if !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#if SHADERPASS == SHADERPASS_FORWARD
|
|
#define SHADERPASS_FORWARD_BYPASS_ALPHA_TEST
|
|
#elif SHADERPASS == SHADERPASS_GBUFFER
|
|
#define SHADERPASS_GBUFFER_BYPASS_ALPHA_TEST
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
// Define _DEFERRED_CAPABLE_MATERIAL for shader capable to run in deferred pass
|
|
#if defined(SHADER_LIT) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _DEFERRED_CAPABLE_MATERIAL
|
|
#endif
|
|
|
|
// Translate transparent motion vector define
|
|
#if (defined(_TRANSPARENT_WRITES_MOTION_VEC) || defined(_TRANSPARENT_REFRACTIVE_SORT)) && defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _WRITE_TRANSPARENT_MOTION_VECTOR
|
|
#endif
|
|
|
|
// -- Graph Properties
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _TrunkBaseColor;
|
|
float4 _TrunkBaseColorMap_TexelSize;
|
|
float4 _TrunkTilingOffset;
|
|
float4 _TrunkNormalMap_TexelSize;
|
|
float _TrunkNormalScale;
|
|
float4 _TrunkMaskMap_TexelSize;
|
|
float _TrunkMetallic;
|
|
float _TrunkAORemapMin;
|
|
float _TrunkAORemapMax;
|
|
float _TrunkSmoothnessRemapMin;
|
|
float _TrunkSmoothnessRemapMax;
|
|
float4 _LayerMask_TexelSize;
|
|
float4 _BarkBlendMaskTilingOffset;
|
|
float4 _BarkBaseColor;
|
|
float4 _BarkBaseColorMap_TexelSize;
|
|
float _BarkUseUV3;
|
|
float4 _BarkTilingOffset;
|
|
float4 _BarkNormalMap_TexelSize;
|
|
float _BarkNormalScale;
|
|
float4 _BarkMaskMap_TexelSize;
|
|
float _BarkMetallic;
|
|
float _BarkSmoothnessRemapMin;
|
|
float _BarkSmoothnessRemapMax;
|
|
float _BarkAORemapMin;
|
|
float _BarkAORemapMax;
|
|
float _Stiffness;
|
|
float _InitialBend;
|
|
float _Drag;
|
|
float _HeightDrag;
|
|
float4 _NewNormal;
|
|
float4 _EmissionColor;
|
|
float _UseShadowThreshold;
|
|
float4 _DoubleSidedConstants;
|
|
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
|
float _BlendMode;
|
|
float _EnableBlendModePreserveSpecularLighting;
|
|
float _RayTracing;
|
|
float _RefractionModel;
|
|
float _MaterialID;
|
|
float _MaterialTypeMask;
|
|
CBUFFER_END
|
|
|
|
|
|
// Object and Global properties
|
|
SAMPLER(SamplerState_Linear_Repeat);
|
|
SAMPLER(SamplerState_Linear_Repeat_Aniso8);
|
|
TEXTURE2D(_TrunkBaseColorMap);
|
|
SAMPLER(sampler_TrunkBaseColorMap);
|
|
TEXTURE2D(_TrunkNormalMap);
|
|
SAMPLER(sampler_TrunkNormalMap);
|
|
TEXTURE2D(_TrunkMaskMap);
|
|
SAMPLER(sampler_TrunkMaskMap);
|
|
TEXTURE2D(_LayerMask);
|
|
SAMPLER(sampler_LayerMask);
|
|
TEXTURE2D(_BarkBaseColorMap);
|
|
SAMPLER(sampler_BarkBaseColorMap);
|
|
TEXTURE2D(_BarkNormalMap);
|
|
SAMPLER(sampler_BarkNormalMap);
|
|
TEXTURE2D(_BarkMaskMap);
|
|
SAMPLER(sampler_BarkMaskMap);
|
|
TEXTURE2D(WIND_SETTINGS_TexNoise);
|
|
SAMPLER(samplerWIND_SETTINGS_TexNoise);
|
|
float4 WIND_SETTINGS_TexNoise_TexelSize;
|
|
TEXTURE2D(WIND_SETTINGS_TexGust);
|
|
SAMPLER(samplerWIND_SETTINGS_TexGust);
|
|
float4 WIND_SETTINGS_TexGust_TexelSize;
|
|
float4 WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float WIND_SETTINGS_FlexNoiseScale;
|
|
float WIND_SETTINGS_ShiverNoiseScale;
|
|
float WIND_SETTINGS_Turbulence;
|
|
float WIND_SETTINGS_GustSpeed;
|
|
float WIND_SETTINGS_GustScale;
|
|
float WIND_SETTINGS_GustWorldScale;
|
|
float4x4 WIND_SETTINGS_Points;
|
|
float4 WIND_SETTINGS_Points_Radius;
|
|
|
|
// -- Property used by ScenePickingPass
|
|
#ifdef SCENEPICKINGPASS
|
|
float4 _SelectionID;
|
|
#endif
|
|
|
|
// -- Properties used by SceneSelectionPass
|
|
#ifdef SCENESELECTIONPASS
|
|
int _ObjectId;
|
|
int _PassValue;
|
|
#endif
|
|
|
|
// Includes
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingMacros.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracing.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracingLightLoop.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingIntersection.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitRayTracing.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RayTracingCommon.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
// GraphIncludes: <None>
|
|
|
|
// --------------------------------------------------
|
|
// Structs and Packing
|
|
|
|
struct SurfaceDescriptionInputs
|
|
{
|
|
float3 TangentSpaceNormal;
|
|
float4 uv0;
|
|
float4 uv3;
|
|
};
|
|
|
|
//Interpolator Packs: <None>
|
|
|
|
// --------------------------------------------------
|
|
// Graph
|
|
|
|
|
|
// Graph Functions
|
|
|
|
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_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Lerp_float4(float4 A, float4 B, float4 T, out float4 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Multiply_float_float(float A, float B, out float Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Remap_float(float In, float2 InMinMax, float2 OutMinMax, out float Out)
|
|
{
|
|
Out = OutMinMax.x + (In - InMinMax.x) * (OutMinMax.y - OutMinMax.x) / (InMinMax.y - InMinMax.x);
|
|
}
|
|
|
|
void Unity_Lerp_float3(float3 A, float3 B, float3 T, out float3 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_NormalStrength_float(float3 In, float Strength, out float3 Out)
|
|
{
|
|
Out = float3(In.rg * Strength, lerp(1, In.b, saturate(Strength)));
|
|
}
|
|
|
|
// Graph Vertex
|
|
// GraphVertex: <None>
|
|
|
|
// Graph Pixel
|
|
struct SurfaceDescription
|
|
{
|
|
float3 BaseColor;
|
|
float3 Emission;
|
|
float Alpha;
|
|
float3 BentNormal;
|
|
float Smoothness;
|
|
float Occlusion;
|
|
float3 NormalTS;
|
|
float Metallic;
|
|
};
|
|
|
|
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
|
{
|
|
SurfaceDescription surface = (SurfaceDescription)0;
|
|
UnityTexture2D _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkBaseColorMap);
|
|
float4 _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4 = _TrunkTilingOffset;
|
|
float _Split_60538633130155809820b3185c81057f_R_1_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[0];
|
|
float _Split_60538633130155809820b3185c81057f_G_2_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[1];
|
|
float _Split_60538633130155809820b3185c81057f_B_3_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[2];
|
|
float _Split_60538633130155809820b3185c81057f_A_4_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[3];
|
|
float2 _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_R_1_Float, _Split_60538633130155809820b3185c81057f_G_2_Float);
|
|
float2 _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_B_3_Float, _Split_60538633130155809820b3185c81057f_A_4_Float);
|
|
float2 _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2, _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2, _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2);
|
|
float4 _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_R_4_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_G_5_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_B_6_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_A_7_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.a;
|
|
float4 _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4 = _TrunkBaseColor;
|
|
float4 _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4, _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4, _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4);
|
|
UnityTexture2D _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkBaseColorMap);
|
|
float _Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean = _BarkUseUV3;
|
|
float4 _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4 = IN.uv3;
|
|
float4 _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4 = IN.uv0;
|
|
float4 _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4;
|
|
Unity_Branch_float4(_Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean, _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4, _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4, _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4);
|
|
float4 _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4 = _BarkTilingOffset;
|
|
float _Split_ee975774554f6480b33168eff36d8be7_R_1_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[0];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_G_2_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[1];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_B_3_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[2];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_A_4_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[3];
|
|
float2 _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_R_1_Float, _Split_ee975774554f6480b33168eff36d8be7_G_2_Float);
|
|
float2 _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_B_3_Float, _Split_ee975774554f6480b33168eff36d8be7_A_4_Float);
|
|
float2 _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float((_Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4.xy), _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2, _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2, _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2);
|
|
float4 _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_R_4_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_G_5_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_B_6_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_A_7_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.a;
|
|
float4 _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4 = _BarkBaseColor;
|
|
float4 _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4, _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4);
|
|
UnityTexture2D _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_LayerMask);
|
|
float4 _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4 = _BarkBlendMaskTilingOffset;
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[0];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[1];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[2];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[3];
|
|
float2 _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float);
|
|
float2 _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float);
|
|
float2 _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2, _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2, _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2);
|
|
float4 _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2) );
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_R_4_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_G_5_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_B_6_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.a;
|
|
float4 _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4;
|
|
Unity_Lerp_float4(_Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxxx), _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4);
|
|
UnityTexture2D _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkMaskMap);
|
|
float4 _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_B_6_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.a;
|
|
float _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float = _TrunkMetallic;
|
|
float _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float, _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float, _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float);
|
|
float _Property_8142f12b781ad08680220297dab56f14_Out_0_Float = _TrunkAORemapMin;
|
|
float _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float = _TrunkAORemapMax;
|
|
float2 _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2 = float2(_Property_8142f12b781ad08680220297dab56f14_Out_0_Float, _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float);
|
|
float _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float, float2 (0, 1), _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float);
|
|
float _Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float = _TrunkSmoothnessRemapMin;
|
|
float _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float = _TrunkSmoothnessRemapMax;
|
|
float2 _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2 = float2(_Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float, _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float);
|
|
float _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float, float2 (0, 1), _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
float3 _Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3 = float3(_Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
UnityTexture2D _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkMaskMap);
|
|
float4 _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_B_6_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.a;
|
|
float _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float = _BarkMetallic;
|
|
float _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float, _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float, _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float);
|
|
float _Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float = _BarkAORemapMin;
|
|
float _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float = _BarkAORemapMax;
|
|
float2 _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2 = float2(_Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float, _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float);
|
|
float _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float, float2 (0, 1), _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float);
|
|
float _Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float = _BarkSmoothnessRemapMin;
|
|
float _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float = _BarkSmoothnessRemapMax;
|
|
float2 _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2 = float2(_Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float, _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float);
|
|
float _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float, float2 (0, 1), _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3 = float3(_Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3;
|
|
Unity_Lerp_float3(_Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3, _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3);
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[0];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[1];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[2];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_A_4_Float = 0;
|
|
UnityTexture2D _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkNormalMap);
|
|
float4 _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4);
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_R_4_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_G_5_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_B_6_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_A_7_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.a;
|
|
float _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float = _TrunkNormalScale;
|
|
float3 _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.xyz), _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float, _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3);
|
|
UnityTexture2D _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkNormalMap);
|
|
float4 _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4);
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_R_4_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_G_5_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_B_6_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_A_7_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.a;
|
|
float _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float = _BarkNormalScale;
|
|
float3 _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.xyz), _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3);
|
|
float3 _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
Unity_Lerp_float3(_NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3);
|
|
surface.BaseColor = (_Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4.xyz);
|
|
surface.Emission = float3(0, 0, 0);
|
|
surface.Alpha = float(1);
|
|
surface.BentNormal = IN.TangentSpaceNormal;
|
|
surface.Smoothness = _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float;
|
|
surface.Occlusion = _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float;
|
|
surface.NormalTS = _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
surface.Metallic = _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float;
|
|
return surface;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Graph Inputs
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#define VFX_SRP_ATTRIBUTES AttributesMesh
|
|
#define VaryingsMeshType VaryingsMeshToPS
|
|
#define VFX_SRP_VARYINGS VaryingsMeshType
|
|
#define VFX_SRP_SURFACE_INPUTS FragInputs
|
|
#endif
|
|
SurfaceDescriptionInputs FragInputsToSurfaceDescriptionInputs(FragInputs input, float3 viewWS)
|
|
{
|
|
SurfaceDescriptionInputs output;
|
|
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
|
|
|
#if defined(SHADER_STAGE_RAY_TRACING)
|
|
#else
|
|
#endif
|
|
output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
|
|
|
|
#if UNITY_UV_STARTS_AT_TOP
|
|
#else
|
|
#endif
|
|
|
|
|
|
output.uv0 = input.texCoord0;
|
|
output.uv3 = input.texCoord3;
|
|
|
|
// splice point to copy frag inputs custom interpolator pack into the SDI
|
|
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorCopyToSDI' */
|
|
|
|
return output;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Surface Data (Specific Material)
|
|
|
|
void ApplyDecalToSurfaceDataNoNormal(DecalSurfaceData decalSurfaceData, inout SurfaceData surfaceData);
|
|
|
|
void ApplyDecalAndGetNormal(FragInputs fragInputs, PositionInputs posInput, SurfaceDescription surfaceDescription,
|
|
inout SurfaceData surfaceData)
|
|
{
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
#ifdef DECAL_NORMAL_BLENDING
|
|
// SG nodes don't ouptut surface gradients, so if decals require surf grad blending, we have to convert
|
|
// the normal to gradient before applying the decal. We then have to resolve the gradient back to world space
|
|
float3 normalTS;
|
|
|
|
normalTS = SurfaceGradientFromTangentSpaceNormalAndFromTBN(surfaceDescription.NormalTS,
|
|
fragInputs.tangentToWorld[0], fragInputs.tangentToWorld[1]);
|
|
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, fragInputs.tangentToWorld[2], normalTS);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
|
|
GetNormalWS_SG(fragInputs, normalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
#else
|
|
// normal delivered to master node
|
|
GetNormalWS(fragInputs, surfaceDescription.NormalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Both uses and modifies 'surfaceData.normalWS'.
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, surfaceData.normalWS.xyz);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
#endif
|
|
}
|
|
void BuildSurfaceData(FragInputs fragInputs, inout SurfaceDescription surfaceDescription, float3 V, PositionInputs posInput, out SurfaceData surfaceData, out float3 bentNormalWS)
|
|
{
|
|
ZERO_INITIALIZE(SurfaceData, surfaceData);
|
|
|
|
// specularOcclusion need to be init ahead of decal to quiet the compiler that modify the SurfaceData struct
|
|
// however specularOcclusion can come from the graph, so need to be init here so it can be override.
|
|
surfaceData.specularOcclusion = 1.0;
|
|
surfaceData.thickness = 0.0;
|
|
|
|
surfaceData.baseColor = surfaceDescription.BaseColor;
|
|
surfaceData.perceptualSmoothness = surfaceDescription.Smoothness;
|
|
surfaceData.ambientOcclusion = surfaceDescription.Occlusion;
|
|
surfaceData.metallic = surfaceDescription.Metallic;
|
|
|
|
#if defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE) || defined(_REFRACTION_THIN)
|
|
if (_EnableSSRefraction)
|
|
{
|
|
|
|
surfaceData.transmittanceMask = (1.0 - surfaceDescription.Alpha);
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
else
|
|
{
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
#else
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
#endif
|
|
|
|
// These static material feature allow compile time optimization
|
|
surfaceData.materialFeatures = MATERIALFEATUREFLAGS_LIT_STANDARD;
|
|
#ifdef _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SUBSURFACE_SCATTERING;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_COLORED_TRANSMISSION;
|
|
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_ANISOTROPY
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_ANISOTROPY;
|
|
|
|
// Initialize the normal to something non-zero to avoid a div-zero warning for anisotropy.
|
|
surfaceData.normalWS = float3(0, 1, 0);
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_IRIDESCENCE
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_IRIDESCENCE;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SPECULAR_COLOR;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_CLEAR_COAT
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_CLEAR_COAT;
|
|
#endif
|
|
|
|
#if defined (_MATERIAL_FEATURE_SPECULAR_COLOR) && defined (_ENERGY_CONSERVING_SPECULAR)
|
|
// Require to have setup baseColor
|
|
// Reproduce the energy conservation done in legacy Unity. Not ideal but better for compatibility and users can unchek it
|
|
surfaceData.baseColor *= (1.0 - Max3(surfaceData.specularColor.r, surfaceData.specularColor.g, surfaceData.specularColor.b));
|
|
#endif
|
|
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
ApplyDecalAndGetNormal(fragInputs, posInput, surfaceDescription, surfaceData);
|
|
|
|
surfaceData.geomNormalWS = fragInputs.tangentToWorld[2];
|
|
|
|
surfaceData.tangentWS = normalize(fragInputs.tangentToWorld[0].xyz); // The tangent is not normalize in tangentToWorld for mikkt. TODO: Check if it expected that we normalize with Morten. Tag: SURFACE_GRADIENT
|
|
|
|
|
|
bentNormalWS = surfaceData.normalWS;
|
|
|
|
surfaceData.tangentWS = Orthonormalize(surfaceData.tangentWS, surfaceData.normalWS);
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
// Mipmap mode debugging isn't supported with ray tracing as it relies on derivatives
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD0
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG(posInput.positionSS, fragInputs.texCoord0);
|
|
#else
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG_NO_UV(posInput.positionSS);
|
|
#endif
|
|
surfaceData.metallic = 0;
|
|
}
|
|
#endif
|
|
|
|
// We need to call ApplyDebugToSurfaceData after filling the surfaceData and before filling builtinData
|
|
// as it can modify attribute use for static lighting
|
|
ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData);
|
|
#endif
|
|
|
|
// By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion.
|
|
// If user provide bent normal then we process a better term
|
|
#if defined(_SPECULAR_OCCLUSION_CUSTOM)
|
|
// Just use the value passed through via the slot (not active otherwise)
|
|
#elif defined(_SPECULAR_OCCLUSION_FROM_AO_BENT_NORMAL)
|
|
// If we have bent normal and ambient occlusion, process a specular occlusion
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromBentAO(V, bentNormalWS, surfaceData.normalWS, surfaceData.ambientOcclusion, PerceptualSmoothnessToPerceptualRoughness(surfaceData.perceptualSmoothness));
|
|
#elif defined(_AMBIENT_OCCLUSION) && defined(_SPECULAR_OCCLUSION_FROM_AO)
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness));
|
|
#endif
|
|
|
|
#if defined(_ENABLE_GEOMETRIC_SPECULAR_AA) && !defined(SHADER_STAGE_RAY_TRACING)
|
|
surfaceData.perceptualSmoothness = GeometricNormalFiltering(surfaceData.perceptualSmoothness, fragInputs.tangentToWorld[2], surfaceDescription.SpecularAAScreenSpaceVariance, surfaceDescription.SpecularAAThreshold);
|
|
#endif
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Get Surface And BuiltinData
|
|
|
|
void GetSurfaceAndBuiltinData(FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData RAY_TRACING_OPTIONAL_PARAMETERS)
|
|
{
|
|
// Don't dither if displaced tessellation (we're fading out the displacement instead to match the next LOD)
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && !defined(_TESSELLATION_DISPLACEMENT)
|
|
#ifdef LOD_FADE_CROSSFADE // enable dithering LOD transition if user select CrossFade transition in LOD group
|
|
LODDitheringTransition(ComputeFadeMaskSeed(V, posInput.positionSS), unity_LODFade.x);
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
#ifdef _DOUBLESIDED_ON
|
|
float3 doubleSidedConstants = _DoubleSidedConstants.xyz;
|
|
#else
|
|
float3 doubleSidedConstants = float3(1.0, 1.0, 1.0);
|
|
#endif
|
|
|
|
ApplyDoubleSidedFlipOrMirror(fragInputs, doubleSidedConstants); // Apply double sided flip on the vertex normal
|
|
#endif // SHADER_UNLIT
|
|
|
|
SurfaceDescriptionInputs surfaceDescriptionInputs = FragInputsToSurfaceDescriptionInputs(fragInputs, V);
|
|
|
|
#if defined(HAVE_VFX_MODIFICATION)
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
GetElementPixelProperties(fragInputs, properties);
|
|
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs, properties);
|
|
#else
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs);
|
|
#endif
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
surfaceDescription.Alpha = 1.0f;
|
|
}
|
|
#endif
|
|
|
|
// Perform alpha test very early to save performance (a killed pixel will not sample textures)
|
|
// TODO: split graph evaluation to grab just alpha dependencies first? tricky..
|
|
#ifdef _ALPHATEST_ON
|
|
float alphaCutoff = surfaceDescription.AlphaClipThreshold;
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
// The TransparentDepthPrepass is also used with SSR transparent.
|
|
// If an artists enable transaprent SSR but not the TransparentDepthPrepass itself, then we use AlphaClipThreshold
|
|
// otherwise if TransparentDepthPrepass is enabled we use AlphaClipThresholdDepthPrepass
|
|
#elif SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_POSTPASS
|
|
// DepthPostpass always use its own alpha threshold
|
|
alphaCutoff = surfaceDescription.AlphaClipThresholdDepthPostpass;
|
|
#elif (SHADERPASS == SHADERPASS_SHADOWS) || (SHADERPASS == SHADERPASS_RAYTRACING_VISIBILITY)
|
|
// If use shadow threshold isn't enable we don't allow any test
|
|
#endif
|
|
|
|
GENERIC_ALPHA_TEST(surfaceDescription.Alpha, alphaCutoff);
|
|
#endif
|
|
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && _DEPTHOFFSET_ON
|
|
ApplyDepthOffsetPositionInput(V, surfaceDescription.DepthOffset, GetViewForwardDir(), GetWorldToHClipMatrix(), posInput);
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
float3 bentNormalWS;
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData, bentNormalWS);
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD1
|
|
float4 lightmapTexCoord1 = fragInputs.texCoord1;
|
|
#else
|
|
float4 lightmapTexCoord1 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD2
|
|
float4 lightmapTexCoord2 = fragInputs.texCoord2;
|
|
#else
|
|
float4 lightmapTexCoord2 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Builtin Data
|
|
// For back lighting we use the oposite vertex normal
|
|
InitBuiltinData(posInput, alpha, bentNormalWS, -fragInputs.tangentToWorld[2], lightmapTexCoord1, lightmapTexCoord2, builtinData);
|
|
|
|
#else
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData);
|
|
|
|
ZERO_BUILTIN_INITIALIZE(builtinData); // No call to InitBuiltinData as we don't have any lighting
|
|
builtinData.opacity = surfaceDescription.Alpha;
|
|
|
|
#if defined(DEBUG_DISPLAY)
|
|
// Light Layers are currently not used for the Unlit shader (because it is not lit)
|
|
// But Unlit objects do cast shadows according to their rendering layer mask, which is what we want to
|
|
// display in the light layers visualization mode, therefore we need the renderingLayers
|
|
builtinData.renderingLayers = GetMeshRenderingLayerMask();
|
|
#endif
|
|
|
|
#endif // SHADER_UNLIT
|
|
|
|
#ifdef _ALPHATEST_ON
|
|
// Used for sharpening by alpha to mask - Alpha to covertage is only used with depth only and forward pass (no shadow pass, no transparent pass)
|
|
builtinData.alphaClipTreshold = alphaCutoff;
|
|
#endif
|
|
|
|
// override sampleBakedGI - not used by Unlit
|
|
// When overriding GI, we need to force the isLightmap flag to make sure we don't add APV (sampled in the lightloop) on top of the overridden value (set at GBuffer stage)
|
|
|
|
builtinData.emissiveColor = surfaceDescription.Emission;
|
|
|
|
// Note this will not fully work on transparent surfaces (can check with _SURFACE_TYPE_TRANSPARENT define)
|
|
// We will always overwrite vt feeback with the nearest. So behind transparent surfaces vt will not be resolved
|
|
// This is a limitation of the current MRT approach.
|
|
#ifdef UNITY_VIRTUAL_TEXTURING
|
|
#endif
|
|
|
|
#if _DEPTHOFFSET_ON
|
|
builtinData.depthOffset = surfaceDescription.DepthOffset;
|
|
#endif
|
|
|
|
// TODO: We should generate distortion / distortionBlur for non distortion pass
|
|
#if (SHADERPASS == SHADERPASS_DISTORTION)
|
|
builtinData.distortion = surfaceDescription.Distortion;
|
|
builtinData.distortionBlur = surfaceDescription.DistortionBlur;
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// PostInitBuiltinData call ApplyDebugToBuiltinData
|
|
PostInitBuiltinData(V, posInput, surfaceData, builtinData);
|
|
#else
|
|
ApplyDebugToBuiltinData(builtinData);
|
|
#endif
|
|
|
|
RAY_TRACING_OPTIONAL_ALPHA_TEST_PASS
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Main
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassRaytracingVisibility.hlsl"
|
|
|
|
// --------------------------------------------------
|
|
// Visual Effect Vertex Invocations
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/VisualEffectVertex.hlsl"
|
|
#else
|
|
#endif
|
|
#endif
|
|
|
|
ENDHLSL
|
|
}
|
|
Pass
|
|
{
|
|
Name "ForwardDXR"
|
|
Tags
|
|
{
|
|
"LightMode" = "ForwardDXR"
|
|
}
|
|
|
|
// Render State
|
|
// RenderState: <None>
|
|
|
|
// Debug
|
|
// <None>
|
|
|
|
// --------------------------------------------------
|
|
// Pass
|
|
|
|
HLSLPROGRAM
|
|
|
|
// Pragmas
|
|
#pragma target 5.0
|
|
#pragma raytracing surface_shader
|
|
#pragma only_renderers d3d11 xboxseries ps5
|
|
|
|
// Keywords
|
|
#pragma shader_feature _ _SURFACE_TYPE_TRANSPARENT
|
|
#pragma shader_feature_local _ _DOUBLESIDED_ON
|
|
#pragma shader_feature_local _ _ADD_PRECOMPUTED_VELOCITY
|
|
#pragma shader_feature_local _ _TRANSPARENT_WRITES_MOTION_VEC _TRANSPARENT_REFRACTIVE_SORT
|
|
#pragma shader_feature_local_fragment _ _ENABLE_FOG_ON_TRANSPARENT
|
|
#pragma multi_compile _ DEBUG_DISPLAY
|
|
#pragma shader_feature_local_fragment _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma multi_compile _ LIGHTMAP_ON
|
|
#pragma multi_compile _ DIRLIGHTMAP_COMBINED
|
|
#pragma multi_compile_fragment _ PROBE_VOLUMES_L1 PROBE_VOLUMES_L2
|
|
#pragma multi_compile_raytracing _ PROBE_VOLUMES_L1 PROBE_VOLUMES_L2
|
|
#pragma multi_compile _ DYNAMICLIGHTMAP_ON
|
|
#pragma shader_feature_local _ _REFRACTION_PLANE _REFRACTION_SPHERE _REFRACTION_THIN
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// GraphKeywords: <None>
|
|
|
|
// Defines
|
|
#define SHADERPASS SHADERPASS_RAYTRACING_FORWARD
|
|
#define PUNCTUAL_SHADOW_LOW
|
|
#define DIRECTIONAL_SHADOW_LOW
|
|
#define RAYTRACING_SHADER_GRAPH_RAYTRACED
|
|
#define HAS_LIGHTLOOP 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
|
|
// For custom interpolators to inject a substruct definition before FragInputs definition,
|
|
// allowing for FragInputs to capture CI's intended for ShaderGraph's SDI.
|
|
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreInclude' */
|
|
|
|
|
|
// TODO: Merge FragInputsVFX substruct with CustomInterpolators.
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
struct FragInputsVFX
|
|
{
|
|
/* WARNING: $splice Could not find named fragment 'FragInputsVFX' */
|
|
};
|
|
#endif
|
|
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/GeometricTools.hlsl" // Required by Tessellation.hlsl
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Tessellation.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" // Required to be include before we include properties as it define DECLARE_STACK_CB
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl" // Required before including properties as it defines UNITY_TEXTURE_STREAMING_DEBUG_VARS
|
|
// Always include Shader Graph version
|
|
// Always include last to avoid double macros
|
|
#include "Packages/com.unity.shadergraph/ShaderGraphLibrary/Functions.hlsl" // Need to be here for Gradient struct definition
|
|
|
|
// --------------------------------------------------
|
|
// Defines
|
|
|
|
// Attribute
|
|
#define ATTRIBUTES_NEED_NORMAL
|
|
#define ATTRIBUTES_NEED_TANGENT
|
|
#define ATTRIBUTES_NEED_TEXCOORD0
|
|
#define ATTRIBUTES_NEED_TEXCOORD1
|
|
#define ATTRIBUTES_NEED_TEXCOORD2
|
|
#define ATTRIBUTES_NEED_TEXCOORD3
|
|
#define VARYINGS_NEED_POSITION_WS
|
|
#define VARYINGS_NEED_TANGENT_TO_WORLD
|
|
#define VARYINGS_NEED_TEXCOORD0
|
|
#define VARYINGS_NEED_TEXCOORD1
|
|
#define VARYINGS_NEED_TEXCOORD2
|
|
#define VARYINGS_NEED_TEXCOORD3
|
|
|
|
|
|
//Strip down the FragInputs.hlsl (on graphics), so we can only optimize the interpolators we use.
|
|
//if by accident something requests contents of FragInputs.hlsl, it will be caught as a compiler error
|
|
//Frag inputs stripping is only enabled when FRAG_INPUTS_ENABLE_STRIPPING is set
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && SHADERPASS != SHADERPASS_RAYTRACING_GBUFFER && SHADERPASS != SHADERPASS_FULL_SCREEN_DEBUG
|
|
#define FRAG_INPUTS_ENABLE_STRIPPING
|
|
#endif
|
|
#define FRAG_INPUTS_USE_TEXCOORD0
|
|
#define FRAG_INPUTS_USE_TEXCOORD1
|
|
#define FRAG_INPUTS_USE_TEXCOORD2
|
|
#define FRAG_INPUTS_USE_TEXCOORD3
|
|
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl"
|
|
|
|
|
|
|
|
|
|
// Following two define are a workaround introduce in 10.1.x for RaytracingQualityNode
|
|
// The ShaderGraph don't support correctly migration of this node as it serialize all the node data
|
|
// in the json file making it impossible to uprgrade. Until we get a fix, we do a workaround here
|
|
// to still allow us to rename the field and keyword of this node without breaking existing code.
|
|
#ifdef RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define RAYTRACING_SHADER_GRAPH_HIGH
|
|
#endif
|
|
|
|
#ifdef RAYTRACING_SHADER_GRAPH_RAYTRACED
|
|
#define RAYTRACING_SHADER_GRAPH_LOW
|
|
#endif
|
|
// end
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// We need isFrontFace when using double sided - it is not required for unlit as in case of unlit double sided only drive the cullmode
|
|
// VARYINGS_NEED_CULLFACE can be define by VaryingsMeshToPS.FaceSign input if a IsFrontFace Node is included in the shader graph.
|
|
#if defined(_DOUBLESIDED_ON) && !defined(VARYINGS_NEED_CULLFACE)
|
|
#define VARYINGS_NEED_CULLFACE
|
|
#endif
|
|
#endif
|
|
|
|
// Specific Material Define
|
|
#define _AMBIENT_OCCLUSION 1
|
|
#define _SPECULAR_OCCLUSION_FROM_AO 1
|
|
#define _ENERGY_CONSERVING_SPECULAR 1
|
|
|
|
#if _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// Colored Transmission doesn't support clear coat
|
|
#undef _MATERIAL_FEATURE_CLEAR_COAT
|
|
#endif
|
|
|
|
// If we use subsurface scattering, enable output split lighting (for forward pass)
|
|
#if defined(_MATERIAL_FEATURE_SUBSURFACE_SCATTERING) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define OUTPUT_SPLIT_LIGHTING
|
|
#endif
|
|
|
|
// This shader support recursive rendering for raytracing
|
|
#define HAVE_RECURSIVE_RENDERING
|
|
|
|
// In Path Tracing, For all single-sided, refractive materials, we want to force a thin refraction model
|
|
#if (SHADERPASS == SHADERPASS_PATH_TRACING) && !defined(_DOUBLESIDED_ON) && (defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE))
|
|
#undef _REFRACTION_PLANE
|
|
#undef _REFRACTION_SPHERE
|
|
#define _REFRACTION_THIN
|
|
#endif
|
|
// Caution: we can use the define SHADER_UNLIT onlit after the above Material include as it is the Unlit template who define it
|
|
|
|
// To handle SSR on transparent correctly with a possibility to enable/disable it per framesettings
|
|
// we should have a code like this:
|
|
// if !defined(_DISABLE_SSR_TRANSPARENT)
|
|
// pragma multi_compile _ WRITE_NORMAL_BUFFER
|
|
// endif
|
|
// i.e we enable the multicompile only if we can receive SSR or not, and then C# code drive
|
|
// it based on if SSR transparent in frame settings and not (and stripper can strip it).
|
|
// this is currently not possible with our current preprocessor as _DISABLE_SSR_TRANSPARENT is a keyword not a define
|
|
// so instead we used this and chose to pay the extra cost of normal write even if SSR transaprent is disabled.
|
|
// Ideally the shader graph generator should handle it but condition below can't be handle correctly for now.
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
#if !defined(_DISABLE_SSR_TRANSPARENT) && !defined(SHADER_UNLIT)
|
|
#define WRITE_NORMAL_BUFFER
|
|
#endif
|
|
#endif
|
|
|
|
// See Lit.shader
|
|
#if SHADERPASS == SHADERPASS_MOTION_VECTORS && defined(WRITE_DECAL_BUFFER_AND_RENDERING_LAYER)
|
|
#define WRITE_DECAL_BUFFER
|
|
#endif
|
|
|
|
#ifndef DEBUG_DISPLAY
|
|
// In case of opaque we don't want to perform the alpha test, it is done in depth prepass and we use depth equal for ztest (setup from UI)
|
|
// Don't do it with debug display mode as it is possible there is no depth prepass in this case
|
|
#if !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#if SHADERPASS == SHADERPASS_FORWARD
|
|
#define SHADERPASS_FORWARD_BYPASS_ALPHA_TEST
|
|
#elif SHADERPASS == SHADERPASS_GBUFFER
|
|
#define SHADERPASS_GBUFFER_BYPASS_ALPHA_TEST
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
// Define _DEFERRED_CAPABLE_MATERIAL for shader capable to run in deferred pass
|
|
#if defined(SHADER_LIT) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _DEFERRED_CAPABLE_MATERIAL
|
|
#endif
|
|
|
|
// Translate transparent motion vector define
|
|
#if (defined(_TRANSPARENT_WRITES_MOTION_VEC) || defined(_TRANSPARENT_REFRACTIVE_SORT)) && defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _WRITE_TRANSPARENT_MOTION_VECTOR
|
|
#endif
|
|
|
|
// -- Graph Properties
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _TrunkBaseColor;
|
|
float4 _TrunkBaseColorMap_TexelSize;
|
|
float4 _TrunkTilingOffset;
|
|
float4 _TrunkNormalMap_TexelSize;
|
|
float _TrunkNormalScale;
|
|
float4 _TrunkMaskMap_TexelSize;
|
|
float _TrunkMetallic;
|
|
float _TrunkAORemapMin;
|
|
float _TrunkAORemapMax;
|
|
float _TrunkSmoothnessRemapMin;
|
|
float _TrunkSmoothnessRemapMax;
|
|
float4 _LayerMask_TexelSize;
|
|
float4 _BarkBlendMaskTilingOffset;
|
|
float4 _BarkBaseColor;
|
|
float4 _BarkBaseColorMap_TexelSize;
|
|
float _BarkUseUV3;
|
|
float4 _BarkTilingOffset;
|
|
float4 _BarkNormalMap_TexelSize;
|
|
float _BarkNormalScale;
|
|
float4 _BarkMaskMap_TexelSize;
|
|
float _BarkMetallic;
|
|
float _BarkSmoothnessRemapMin;
|
|
float _BarkSmoothnessRemapMax;
|
|
float _BarkAORemapMin;
|
|
float _BarkAORemapMax;
|
|
float _Stiffness;
|
|
float _InitialBend;
|
|
float _Drag;
|
|
float _HeightDrag;
|
|
float4 _NewNormal;
|
|
float4 _EmissionColor;
|
|
float _UseShadowThreshold;
|
|
float4 _DoubleSidedConstants;
|
|
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
|
float _BlendMode;
|
|
float _EnableBlendModePreserveSpecularLighting;
|
|
float _RayTracing;
|
|
float _RefractionModel;
|
|
float _MaterialID;
|
|
float _MaterialTypeMask;
|
|
CBUFFER_END
|
|
|
|
|
|
// Object and Global properties
|
|
SAMPLER(SamplerState_Linear_Repeat);
|
|
SAMPLER(SamplerState_Linear_Repeat_Aniso8);
|
|
TEXTURE2D(_TrunkBaseColorMap);
|
|
SAMPLER(sampler_TrunkBaseColorMap);
|
|
TEXTURE2D(_TrunkNormalMap);
|
|
SAMPLER(sampler_TrunkNormalMap);
|
|
TEXTURE2D(_TrunkMaskMap);
|
|
SAMPLER(sampler_TrunkMaskMap);
|
|
TEXTURE2D(_LayerMask);
|
|
SAMPLER(sampler_LayerMask);
|
|
TEXTURE2D(_BarkBaseColorMap);
|
|
SAMPLER(sampler_BarkBaseColorMap);
|
|
TEXTURE2D(_BarkNormalMap);
|
|
SAMPLER(sampler_BarkNormalMap);
|
|
TEXTURE2D(_BarkMaskMap);
|
|
SAMPLER(sampler_BarkMaskMap);
|
|
TEXTURE2D(WIND_SETTINGS_TexNoise);
|
|
SAMPLER(samplerWIND_SETTINGS_TexNoise);
|
|
float4 WIND_SETTINGS_TexNoise_TexelSize;
|
|
TEXTURE2D(WIND_SETTINGS_TexGust);
|
|
SAMPLER(samplerWIND_SETTINGS_TexGust);
|
|
float4 WIND_SETTINGS_TexGust_TexelSize;
|
|
float4 WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float WIND_SETTINGS_FlexNoiseScale;
|
|
float WIND_SETTINGS_ShiverNoiseScale;
|
|
float WIND_SETTINGS_Turbulence;
|
|
float WIND_SETTINGS_GustSpeed;
|
|
float WIND_SETTINGS_GustScale;
|
|
float WIND_SETTINGS_GustWorldScale;
|
|
float4x4 WIND_SETTINGS_Points;
|
|
float4 WIND_SETTINGS_Points_Radius;
|
|
|
|
// -- Property used by ScenePickingPass
|
|
#ifdef SCENEPICKINGPASS
|
|
float4 _SelectionID;
|
|
#endif
|
|
|
|
// -- Properties used by SceneSelectionPass
|
|
#ifdef SCENESELECTIONPASS
|
|
int _ObjectId;
|
|
int _PassValue;
|
|
#endif
|
|
|
|
// Includes
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingMacros.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracing.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracingLightLoop.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingIntersection.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/Lighting.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoopDef.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitRayTracing.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingLightLoop.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RayTracingCommon.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
// GraphIncludes: <None>
|
|
|
|
// --------------------------------------------------
|
|
// Structs and Packing
|
|
|
|
struct SurfaceDescriptionInputs
|
|
{
|
|
float3 TangentSpaceNormal;
|
|
float4 uv0;
|
|
float4 uv3;
|
|
};
|
|
|
|
//Interpolator Packs: <None>
|
|
|
|
// --------------------------------------------------
|
|
// Graph
|
|
|
|
|
|
// Graph Functions
|
|
|
|
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_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Lerp_float4(float4 A, float4 B, float4 T, out float4 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Multiply_float_float(float A, float B, out float Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Remap_float(float In, float2 InMinMax, float2 OutMinMax, out float Out)
|
|
{
|
|
Out = OutMinMax.x + (In - InMinMax.x) * (OutMinMax.y - OutMinMax.x) / (InMinMax.y - InMinMax.x);
|
|
}
|
|
|
|
void Unity_Lerp_float3(float3 A, float3 B, float3 T, out float3 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_NormalStrength_float(float3 In, float Strength, out float3 Out)
|
|
{
|
|
Out = float3(In.rg * Strength, lerp(1, In.b, saturate(Strength)));
|
|
}
|
|
|
|
// Graph Vertex
|
|
// GraphVertex: <None>
|
|
|
|
// Graph Pixel
|
|
struct SurfaceDescription
|
|
{
|
|
float3 BaseColor;
|
|
float3 Emission;
|
|
float Alpha;
|
|
float3 BentNormal;
|
|
float Smoothness;
|
|
float Occlusion;
|
|
float3 NormalTS;
|
|
float Metallic;
|
|
};
|
|
|
|
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
|
{
|
|
SurfaceDescription surface = (SurfaceDescription)0;
|
|
UnityTexture2D _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkBaseColorMap);
|
|
float4 _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4 = _TrunkTilingOffset;
|
|
float _Split_60538633130155809820b3185c81057f_R_1_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[0];
|
|
float _Split_60538633130155809820b3185c81057f_G_2_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[1];
|
|
float _Split_60538633130155809820b3185c81057f_B_3_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[2];
|
|
float _Split_60538633130155809820b3185c81057f_A_4_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[3];
|
|
float2 _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_R_1_Float, _Split_60538633130155809820b3185c81057f_G_2_Float);
|
|
float2 _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_B_3_Float, _Split_60538633130155809820b3185c81057f_A_4_Float);
|
|
float2 _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2, _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2, _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2);
|
|
float4 _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_R_4_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_G_5_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_B_6_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_A_7_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.a;
|
|
float4 _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4 = _TrunkBaseColor;
|
|
float4 _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4, _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4, _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4);
|
|
UnityTexture2D _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkBaseColorMap);
|
|
float _Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean = _BarkUseUV3;
|
|
float4 _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4 = IN.uv3;
|
|
float4 _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4 = IN.uv0;
|
|
float4 _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4;
|
|
Unity_Branch_float4(_Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean, _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4, _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4, _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4);
|
|
float4 _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4 = _BarkTilingOffset;
|
|
float _Split_ee975774554f6480b33168eff36d8be7_R_1_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[0];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_G_2_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[1];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_B_3_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[2];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_A_4_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[3];
|
|
float2 _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_R_1_Float, _Split_ee975774554f6480b33168eff36d8be7_G_2_Float);
|
|
float2 _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_B_3_Float, _Split_ee975774554f6480b33168eff36d8be7_A_4_Float);
|
|
float2 _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float((_Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4.xy), _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2, _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2, _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2);
|
|
float4 _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_R_4_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_G_5_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_B_6_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_A_7_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.a;
|
|
float4 _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4 = _BarkBaseColor;
|
|
float4 _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4, _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4);
|
|
UnityTexture2D _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_LayerMask);
|
|
float4 _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4 = _BarkBlendMaskTilingOffset;
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[0];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[1];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[2];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[3];
|
|
float2 _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float);
|
|
float2 _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float);
|
|
float2 _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2, _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2, _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2);
|
|
float4 _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2) );
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_R_4_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_G_5_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_B_6_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.a;
|
|
float4 _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4;
|
|
Unity_Lerp_float4(_Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxxx), _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4);
|
|
UnityTexture2D _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkMaskMap);
|
|
float4 _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_B_6_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.a;
|
|
float _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float = _TrunkMetallic;
|
|
float _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float, _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float, _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float);
|
|
float _Property_8142f12b781ad08680220297dab56f14_Out_0_Float = _TrunkAORemapMin;
|
|
float _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float = _TrunkAORemapMax;
|
|
float2 _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2 = float2(_Property_8142f12b781ad08680220297dab56f14_Out_0_Float, _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float);
|
|
float _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float, float2 (0, 1), _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float);
|
|
float _Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float = _TrunkSmoothnessRemapMin;
|
|
float _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float = _TrunkSmoothnessRemapMax;
|
|
float2 _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2 = float2(_Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float, _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float);
|
|
float _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float, float2 (0, 1), _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
float3 _Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3 = float3(_Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
UnityTexture2D _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkMaskMap);
|
|
float4 _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_B_6_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.a;
|
|
float _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float = _BarkMetallic;
|
|
float _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float, _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float, _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float);
|
|
float _Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float = _BarkAORemapMin;
|
|
float _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float = _BarkAORemapMax;
|
|
float2 _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2 = float2(_Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float, _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float);
|
|
float _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float, float2 (0, 1), _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float);
|
|
float _Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float = _BarkSmoothnessRemapMin;
|
|
float _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float = _BarkSmoothnessRemapMax;
|
|
float2 _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2 = float2(_Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float, _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float);
|
|
float _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float, float2 (0, 1), _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3 = float3(_Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3;
|
|
Unity_Lerp_float3(_Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3, _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3);
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[0];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[1];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[2];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_A_4_Float = 0;
|
|
UnityTexture2D _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkNormalMap);
|
|
float4 _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4);
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_R_4_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_G_5_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_B_6_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_A_7_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.a;
|
|
float _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float = _TrunkNormalScale;
|
|
float3 _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.xyz), _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float, _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3);
|
|
UnityTexture2D _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkNormalMap);
|
|
float4 _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4);
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_R_4_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_G_5_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_B_6_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_A_7_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.a;
|
|
float _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float = _BarkNormalScale;
|
|
float3 _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.xyz), _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3);
|
|
float3 _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
Unity_Lerp_float3(_NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3);
|
|
surface.BaseColor = (_Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4.xyz);
|
|
surface.Emission = float3(0, 0, 0);
|
|
surface.Alpha = float(1);
|
|
surface.BentNormal = IN.TangentSpaceNormal;
|
|
surface.Smoothness = _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float;
|
|
surface.Occlusion = _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float;
|
|
surface.NormalTS = _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
surface.Metallic = _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float;
|
|
return surface;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Graph Inputs
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#define VFX_SRP_ATTRIBUTES AttributesMesh
|
|
#define VaryingsMeshType VaryingsMeshToPS
|
|
#define VFX_SRP_VARYINGS VaryingsMeshType
|
|
#define VFX_SRP_SURFACE_INPUTS FragInputs
|
|
#endif
|
|
SurfaceDescriptionInputs FragInputsToSurfaceDescriptionInputs(FragInputs input, float3 viewWS)
|
|
{
|
|
SurfaceDescriptionInputs output;
|
|
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
|
|
|
#if defined(SHADER_STAGE_RAY_TRACING)
|
|
#else
|
|
#endif
|
|
output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
|
|
|
|
#if UNITY_UV_STARTS_AT_TOP
|
|
#else
|
|
#endif
|
|
|
|
|
|
output.uv0 = input.texCoord0;
|
|
output.uv3 = input.texCoord3;
|
|
|
|
// splice point to copy frag inputs custom interpolator pack into the SDI
|
|
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorCopyToSDI' */
|
|
|
|
return output;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Surface Data (Specific Material)
|
|
|
|
void ApplyDecalToSurfaceDataNoNormal(DecalSurfaceData decalSurfaceData, inout SurfaceData surfaceData);
|
|
|
|
void ApplyDecalAndGetNormal(FragInputs fragInputs, PositionInputs posInput, SurfaceDescription surfaceDescription,
|
|
inout SurfaceData surfaceData)
|
|
{
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
#ifdef DECAL_NORMAL_BLENDING
|
|
// SG nodes don't ouptut surface gradients, so if decals require surf grad blending, we have to convert
|
|
// the normal to gradient before applying the decal. We then have to resolve the gradient back to world space
|
|
float3 normalTS;
|
|
|
|
normalTS = SurfaceGradientFromTangentSpaceNormalAndFromTBN(surfaceDescription.NormalTS,
|
|
fragInputs.tangentToWorld[0], fragInputs.tangentToWorld[1]);
|
|
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, fragInputs.tangentToWorld[2], normalTS);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
|
|
GetNormalWS_SG(fragInputs, normalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
#else
|
|
// normal delivered to master node
|
|
GetNormalWS(fragInputs, surfaceDescription.NormalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Both uses and modifies 'surfaceData.normalWS'.
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, surfaceData.normalWS.xyz);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
#endif
|
|
}
|
|
void BuildSurfaceData(FragInputs fragInputs, inout SurfaceDescription surfaceDescription, float3 V, PositionInputs posInput, out SurfaceData surfaceData, out float3 bentNormalWS)
|
|
{
|
|
ZERO_INITIALIZE(SurfaceData, surfaceData);
|
|
|
|
// specularOcclusion need to be init ahead of decal to quiet the compiler that modify the SurfaceData struct
|
|
// however specularOcclusion can come from the graph, so need to be init here so it can be override.
|
|
surfaceData.specularOcclusion = 1.0;
|
|
surfaceData.thickness = 0.0;
|
|
|
|
surfaceData.baseColor = surfaceDescription.BaseColor;
|
|
surfaceData.perceptualSmoothness = surfaceDescription.Smoothness;
|
|
surfaceData.ambientOcclusion = surfaceDescription.Occlusion;
|
|
surfaceData.metallic = surfaceDescription.Metallic;
|
|
|
|
#if defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE) || defined(_REFRACTION_THIN)
|
|
if (_EnableSSRefraction)
|
|
{
|
|
|
|
surfaceData.transmittanceMask = (1.0 - surfaceDescription.Alpha);
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
else
|
|
{
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
#else
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
#endif
|
|
|
|
// These static material feature allow compile time optimization
|
|
surfaceData.materialFeatures = MATERIALFEATUREFLAGS_LIT_STANDARD;
|
|
#ifdef _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SUBSURFACE_SCATTERING;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_COLORED_TRANSMISSION;
|
|
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_ANISOTROPY
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_ANISOTROPY;
|
|
|
|
// Initialize the normal to something non-zero to avoid a div-zero warning for anisotropy.
|
|
surfaceData.normalWS = float3(0, 1, 0);
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_IRIDESCENCE
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_IRIDESCENCE;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SPECULAR_COLOR;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_CLEAR_COAT
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_CLEAR_COAT;
|
|
#endif
|
|
|
|
#if defined (_MATERIAL_FEATURE_SPECULAR_COLOR) && defined (_ENERGY_CONSERVING_SPECULAR)
|
|
// Require to have setup baseColor
|
|
// Reproduce the energy conservation done in legacy Unity. Not ideal but better for compatibility and users can unchek it
|
|
surfaceData.baseColor *= (1.0 - Max3(surfaceData.specularColor.r, surfaceData.specularColor.g, surfaceData.specularColor.b));
|
|
#endif
|
|
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
ApplyDecalAndGetNormal(fragInputs, posInput, surfaceDescription, surfaceData);
|
|
|
|
surfaceData.geomNormalWS = fragInputs.tangentToWorld[2];
|
|
|
|
surfaceData.tangentWS = normalize(fragInputs.tangentToWorld[0].xyz); // The tangent is not normalize in tangentToWorld for mikkt. TODO: Check if it expected that we normalize with Morten. Tag: SURFACE_GRADIENT
|
|
|
|
|
|
bentNormalWS = surfaceData.normalWS;
|
|
|
|
surfaceData.tangentWS = Orthonormalize(surfaceData.tangentWS, surfaceData.normalWS);
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
// Mipmap mode debugging isn't supported with ray tracing as it relies on derivatives
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD0
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG(posInput.positionSS, fragInputs.texCoord0);
|
|
#else
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG_NO_UV(posInput.positionSS);
|
|
#endif
|
|
surfaceData.metallic = 0;
|
|
}
|
|
#endif
|
|
|
|
// We need to call ApplyDebugToSurfaceData after filling the surfaceData and before filling builtinData
|
|
// as it can modify attribute use for static lighting
|
|
ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData);
|
|
#endif
|
|
|
|
// By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion.
|
|
// If user provide bent normal then we process a better term
|
|
#if defined(_SPECULAR_OCCLUSION_CUSTOM)
|
|
// Just use the value passed through via the slot (not active otherwise)
|
|
#elif defined(_SPECULAR_OCCLUSION_FROM_AO_BENT_NORMAL)
|
|
// If we have bent normal and ambient occlusion, process a specular occlusion
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromBentAO(V, bentNormalWS, surfaceData.normalWS, surfaceData.ambientOcclusion, PerceptualSmoothnessToPerceptualRoughness(surfaceData.perceptualSmoothness));
|
|
#elif defined(_AMBIENT_OCCLUSION) && defined(_SPECULAR_OCCLUSION_FROM_AO)
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness));
|
|
#endif
|
|
|
|
#if defined(_ENABLE_GEOMETRIC_SPECULAR_AA) && !defined(SHADER_STAGE_RAY_TRACING)
|
|
surfaceData.perceptualSmoothness = GeometricNormalFiltering(surfaceData.perceptualSmoothness, fragInputs.tangentToWorld[2], surfaceDescription.SpecularAAScreenSpaceVariance, surfaceDescription.SpecularAAThreshold);
|
|
#endif
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Get Surface And BuiltinData
|
|
|
|
void GetSurfaceAndBuiltinData(FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData RAY_TRACING_OPTIONAL_PARAMETERS)
|
|
{
|
|
// Don't dither if displaced tessellation (we're fading out the displacement instead to match the next LOD)
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && !defined(_TESSELLATION_DISPLACEMENT)
|
|
#ifdef LOD_FADE_CROSSFADE // enable dithering LOD transition if user select CrossFade transition in LOD group
|
|
LODDitheringTransition(ComputeFadeMaskSeed(V, posInput.positionSS), unity_LODFade.x);
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
#ifdef _DOUBLESIDED_ON
|
|
float3 doubleSidedConstants = _DoubleSidedConstants.xyz;
|
|
#else
|
|
float3 doubleSidedConstants = float3(1.0, 1.0, 1.0);
|
|
#endif
|
|
|
|
ApplyDoubleSidedFlipOrMirror(fragInputs, doubleSidedConstants); // Apply double sided flip on the vertex normal
|
|
#endif // SHADER_UNLIT
|
|
|
|
SurfaceDescriptionInputs surfaceDescriptionInputs = FragInputsToSurfaceDescriptionInputs(fragInputs, V);
|
|
|
|
#if defined(HAVE_VFX_MODIFICATION)
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
GetElementPixelProperties(fragInputs, properties);
|
|
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs, properties);
|
|
#else
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs);
|
|
#endif
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
surfaceDescription.Alpha = 1.0f;
|
|
}
|
|
#endif
|
|
|
|
// Perform alpha test very early to save performance (a killed pixel will not sample textures)
|
|
// TODO: split graph evaluation to grab just alpha dependencies first? tricky..
|
|
#ifdef _ALPHATEST_ON
|
|
float alphaCutoff = surfaceDescription.AlphaClipThreshold;
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
// The TransparentDepthPrepass is also used with SSR transparent.
|
|
// If an artists enable transaprent SSR but not the TransparentDepthPrepass itself, then we use AlphaClipThreshold
|
|
// otherwise if TransparentDepthPrepass is enabled we use AlphaClipThresholdDepthPrepass
|
|
#elif SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_POSTPASS
|
|
// DepthPostpass always use its own alpha threshold
|
|
alphaCutoff = surfaceDescription.AlphaClipThresholdDepthPostpass;
|
|
#elif (SHADERPASS == SHADERPASS_SHADOWS) || (SHADERPASS == SHADERPASS_RAYTRACING_VISIBILITY)
|
|
// If use shadow threshold isn't enable we don't allow any test
|
|
#endif
|
|
|
|
GENERIC_ALPHA_TEST(surfaceDescription.Alpha, alphaCutoff);
|
|
#endif
|
|
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && _DEPTHOFFSET_ON
|
|
ApplyDepthOffsetPositionInput(V, surfaceDescription.DepthOffset, GetViewForwardDir(), GetWorldToHClipMatrix(), posInput);
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
float3 bentNormalWS;
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData, bentNormalWS);
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD1
|
|
float4 lightmapTexCoord1 = fragInputs.texCoord1;
|
|
#else
|
|
float4 lightmapTexCoord1 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD2
|
|
float4 lightmapTexCoord2 = fragInputs.texCoord2;
|
|
#else
|
|
float4 lightmapTexCoord2 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Builtin Data
|
|
// For back lighting we use the oposite vertex normal
|
|
InitBuiltinData(posInput, alpha, bentNormalWS, -fragInputs.tangentToWorld[2], lightmapTexCoord1, lightmapTexCoord2, builtinData);
|
|
|
|
#else
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData);
|
|
|
|
ZERO_BUILTIN_INITIALIZE(builtinData); // No call to InitBuiltinData as we don't have any lighting
|
|
builtinData.opacity = surfaceDescription.Alpha;
|
|
|
|
#if defined(DEBUG_DISPLAY)
|
|
// Light Layers are currently not used for the Unlit shader (because it is not lit)
|
|
// But Unlit objects do cast shadows according to their rendering layer mask, which is what we want to
|
|
// display in the light layers visualization mode, therefore we need the renderingLayers
|
|
builtinData.renderingLayers = GetMeshRenderingLayerMask();
|
|
#endif
|
|
|
|
#endif // SHADER_UNLIT
|
|
|
|
#ifdef _ALPHATEST_ON
|
|
// Used for sharpening by alpha to mask - Alpha to covertage is only used with depth only and forward pass (no shadow pass, no transparent pass)
|
|
builtinData.alphaClipTreshold = alphaCutoff;
|
|
#endif
|
|
|
|
// override sampleBakedGI - not used by Unlit
|
|
// When overriding GI, we need to force the isLightmap flag to make sure we don't add APV (sampled in the lightloop) on top of the overridden value (set at GBuffer stage)
|
|
|
|
builtinData.emissiveColor = surfaceDescription.Emission;
|
|
|
|
// Note this will not fully work on transparent surfaces (can check with _SURFACE_TYPE_TRANSPARENT define)
|
|
// We will always overwrite vt feeback with the nearest. So behind transparent surfaces vt will not be resolved
|
|
// This is a limitation of the current MRT approach.
|
|
#ifdef UNITY_VIRTUAL_TEXTURING
|
|
#endif
|
|
|
|
#if _DEPTHOFFSET_ON
|
|
builtinData.depthOffset = surfaceDescription.DepthOffset;
|
|
#endif
|
|
|
|
// TODO: We should generate distortion / distortionBlur for non distortion pass
|
|
#if (SHADERPASS == SHADERPASS_DISTORTION)
|
|
builtinData.distortion = surfaceDescription.Distortion;
|
|
builtinData.distortionBlur = surfaceDescription.DistortionBlur;
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// PostInitBuiltinData call ApplyDebugToBuiltinData
|
|
PostInitBuiltinData(V, posInput, surfaceData, builtinData);
|
|
#else
|
|
ApplyDebugToBuiltinData(builtinData);
|
|
#endif
|
|
|
|
RAY_TRACING_OPTIONAL_ALPHA_TEST_PASS
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Main
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassRaytracingForward.hlsl"
|
|
|
|
// --------------------------------------------------
|
|
// Visual Effect Vertex Invocations
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/VisualEffectVertex.hlsl"
|
|
#else
|
|
#endif
|
|
#endif
|
|
|
|
ENDHLSL
|
|
}
|
|
Pass
|
|
{
|
|
Name "GBufferDXR"
|
|
Tags
|
|
{
|
|
"LightMode" = "GBufferDXR"
|
|
}
|
|
|
|
// Render State
|
|
// RenderState: <None>
|
|
|
|
// Debug
|
|
// <None>
|
|
|
|
// --------------------------------------------------
|
|
// Pass
|
|
|
|
HLSLPROGRAM
|
|
|
|
// Pragmas
|
|
#pragma target 5.0
|
|
#pragma raytracing surface_shader
|
|
#pragma only_renderers d3d11 xboxseries ps5
|
|
|
|
// Keywords
|
|
#pragma multi_compile _ MINIMAL_GBUFFER
|
|
#pragma shader_feature _ _SURFACE_TYPE_TRANSPARENT
|
|
#pragma shader_feature_local _ _DOUBLESIDED_ON
|
|
#pragma shader_feature_local _ _ADD_PRECOMPUTED_VELOCITY
|
|
#pragma shader_feature_local _ _TRANSPARENT_WRITES_MOTION_VEC _TRANSPARENT_REFRACTIVE_SORT
|
|
#pragma shader_feature_local_fragment _ _ENABLE_FOG_ON_TRANSPARENT
|
|
#pragma multi_compile _ DEBUG_DISPLAY
|
|
#pragma shader_feature_local_fragment _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma multi_compile _ LIGHTMAP_ON
|
|
#pragma multi_compile _ DIRLIGHTMAP_COMBINED
|
|
#pragma multi_compile_fragment _ PROBE_VOLUMES_L1 PROBE_VOLUMES_L2
|
|
#pragma multi_compile_raytracing _ PROBE_VOLUMES_L1 PROBE_VOLUMES_L2
|
|
#pragma multi_compile _ DYNAMICLIGHTMAP_ON
|
|
#pragma multi_compile_raytracing DECALS_OFF DECALS_3RT DECALS_4RT
|
|
#pragma multi_compile_raytracing _ DECAL_SURFACE_GRADIENT
|
|
#pragma shader_feature_local _ _REFRACTION_PLANE _REFRACTION_SPHERE _REFRACTION_THIN
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// GraphKeywords: <None>
|
|
|
|
// Defines
|
|
#define SHADERPASS SHADERPASS_RAYTRACING_GBUFFER
|
|
#define PUNCTUAL_SHADOW_LOW
|
|
#define DIRECTIONAL_SHADOW_LOW
|
|
#define RAYTRACING_SHADER_GRAPH_RAYTRACED
|
|
#define LIGHTLOOP_DISABLE_TILE_AND_CLUSTER 1
|
|
#define PATH_TRACING_CLUSTERED_DECALS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
|
|
// For custom interpolators to inject a substruct definition before FragInputs definition,
|
|
// allowing for FragInputs to capture CI's intended for ShaderGraph's SDI.
|
|
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreInclude' */
|
|
|
|
|
|
// TODO: Merge FragInputsVFX substruct with CustomInterpolators.
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
struct FragInputsVFX
|
|
{
|
|
/* WARNING: $splice Could not find named fragment 'FragInputsVFX' */
|
|
};
|
|
#endif
|
|
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/GeometricTools.hlsl" // Required by Tessellation.hlsl
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Tessellation.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" // Required to be include before we include properties as it define DECLARE_STACK_CB
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl" // Required before including properties as it defines UNITY_TEXTURE_STREAMING_DEBUG_VARS
|
|
// Always include Shader Graph version
|
|
// Always include last to avoid double macros
|
|
#include "Packages/com.unity.shadergraph/ShaderGraphLibrary/Functions.hlsl" // Need to be here for Gradient struct definition
|
|
|
|
// --------------------------------------------------
|
|
// Defines
|
|
|
|
// Attribute
|
|
#define ATTRIBUTES_NEED_NORMAL
|
|
#define ATTRIBUTES_NEED_TANGENT
|
|
#define ATTRIBUTES_NEED_TEXCOORD0
|
|
#define ATTRIBUTES_NEED_TEXCOORD1
|
|
#define ATTRIBUTES_NEED_TEXCOORD2
|
|
#define ATTRIBUTES_NEED_TEXCOORD3
|
|
#define VARYINGS_NEED_POSITION_WS
|
|
#define VARYINGS_NEED_TANGENT_TO_WORLD
|
|
#define VARYINGS_NEED_TEXCOORD0
|
|
#define VARYINGS_NEED_TEXCOORD1
|
|
#define VARYINGS_NEED_TEXCOORD2
|
|
#define VARYINGS_NEED_TEXCOORD3
|
|
|
|
|
|
//Strip down the FragInputs.hlsl (on graphics), so we can only optimize the interpolators we use.
|
|
//if by accident something requests contents of FragInputs.hlsl, it will be caught as a compiler error
|
|
//Frag inputs stripping is only enabled when FRAG_INPUTS_ENABLE_STRIPPING is set
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && SHADERPASS != SHADERPASS_RAYTRACING_GBUFFER && SHADERPASS != SHADERPASS_FULL_SCREEN_DEBUG
|
|
#define FRAG_INPUTS_ENABLE_STRIPPING
|
|
#endif
|
|
#define FRAG_INPUTS_USE_TEXCOORD0
|
|
#define FRAG_INPUTS_USE_TEXCOORD1
|
|
#define FRAG_INPUTS_USE_TEXCOORD2
|
|
#define FRAG_INPUTS_USE_TEXCOORD3
|
|
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl"
|
|
|
|
|
|
|
|
|
|
// Following two define are a workaround introduce in 10.1.x for RaytracingQualityNode
|
|
// The ShaderGraph don't support correctly migration of this node as it serialize all the node data
|
|
// in the json file making it impossible to uprgrade. Until we get a fix, we do a workaround here
|
|
// to still allow us to rename the field and keyword of this node without breaking existing code.
|
|
#ifdef RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define RAYTRACING_SHADER_GRAPH_HIGH
|
|
#endif
|
|
|
|
#ifdef RAYTRACING_SHADER_GRAPH_RAYTRACED
|
|
#define RAYTRACING_SHADER_GRAPH_LOW
|
|
#endif
|
|
// end
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// We need isFrontFace when using double sided - it is not required for unlit as in case of unlit double sided only drive the cullmode
|
|
// VARYINGS_NEED_CULLFACE can be define by VaryingsMeshToPS.FaceSign input if a IsFrontFace Node is included in the shader graph.
|
|
#if defined(_DOUBLESIDED_ON) && !defined(VARYINGS_NEED_CULLFACE)
|
|
#define VARYINGS_NEED_CULLFACE
|
|
#endif
|
|
#endif
|
|
|
|
// Specific Material Define
|
|
#define _AMBIENT_OCCLUSION 1
|
|
#define _SPECULAR_OCCLUSION_FROM_AO 1
|
|
#define _ENERGY_CONSERVING_SPECULAR 1
|
|
|
|
#if _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// Colored Transmission doesn't support clear coat
|
|
#undef _MATERIAL_FEATURE_CLEAR_COAT
|
|
#endif
|
|
|
|
// If we use subsurface scattering, enable output split lighting (for forward pass)
|
|
#if defined(_MATERIAL_FEATURE_SUBSURFACE_SCATTERING) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define OUTPUT_SPLIT_LIGHTING
|
|
#endif
|
|
|
|
// This shader support recursive rendering for raytracing
|
|
#define HAVE_RECURSIVE_RENDERING
|
|
|
|
// In Path Tracing, For all single-sided, refractive materials, we want to force a thin refraction model
|
|
#if (SHADERPASS == SHADERPASS_PATH_TRACING) && !defined(_DOUBLESIDED_ON) && (defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE))
|
|
#undef _REFRACTION_PLANE
|
|
#undef _REFRACTION_SPHERE
|
|
#define _REFRACTION_THIN
|
|
#endif
|
|
// Caution: we can use the define SHADER_UNLIT onlit after the above Material include as it is the Unlit template who define it
|
|
|
|
// To handle SSR on transparent correctly with a possibility to enable/disable it per framesettings
|
|
// we should have a code like this:
|
|
// if !defined(_DISABLE_SSR_TRANSPARENT)
|
|
// pragma multi_compile _ WRITE_NORMAL_BUFFER
|
|
// endif
|
|
// i.e we enable the multicompile only if we can receive SSR or not, and then C# code drive
|
|
// it based on if SSR transparent in frame settings and not (and stripper can strip it).
|
|
// this is currently not possible with our current preprocessor as _DISABLE_SSR_TRANSPARENT is a keyword not a define
|
|
// so instead we used this and chose to pay the extra cost of normal write even if SSR transaprent is disabled.
|
|
// Ideally the shader graph generator should handle it but condition below can't be handle correctly for now.
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
#if !defined(_DISABLE_SSR_TRANSPARENT) && !defined(SHADER_UNLIT)
|
|
#define WRITE_NORMAL_BUFFER
|
|
#endif
|
|
#endif
|
|
|
|
// See Lit.shader
|
|
#if SHADERPASS == SHADERPASS_MOTION_VECTORS && defined(WRITE_DECAL_BUFFER_AND_RENDERING_LAYER)
|
|
#define WRITE_DECAL_BUFFER
|
|
#endif
|
|
|
|
#ifndef DEBUG_DISPLAY
|
|
// In case of opaque we don't want to perform the alpha test, it is done in depth prepass and we use depth equal for ztest (setup from UI)
|
|
// Don't do it with debug display mode as it is possible there is no depth prepass in this case
|
|
#if !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#if SHADERPASS == SHADERPASS_FORWARD
|
|
#define SHADERPASS_FORWARD_BYPASS_ALPHA_TEST
|
|
#elif SHADERPASS == SHADERPASS_GBUFFER
|
|
#define SHADERPASS_GBUFFER_BYPASS_ALPHA_TEST
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
// Define _DEFERRED_CAPABLE_MATERIAL for shader capable to run in deferred pass
|
|
#if defined(SHADER_LIT) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _DEFERRED_CAPABLE_MATERIAL
|
|
#endif
|
|
|
|
// Translate transparent motion vector define
|
|
#if (defined(_TRANSPARENT_WRITES_MOTION_VEC) || defined(_TRANSPARENT_REFRACTIVE_SORT)) && defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _WRITE_TRANSPARENT_MOTION_VECTOR
|
|
#endif
|
|
|
|
// -- Graph Properties
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _TrunkBaseColor;
|
|
float4 _TrunkBaseColorMap_TexelSize;
|
|
float4 _TrunkTilingOffset;
|
|
float4 _TrunkNormalMap_TexelSize;
|
|
float _TrunkNormalScale;
|
|
float4 _TrunkMaskMap_TexelSize;
|
|
float _TrunkMetallic;
|
|
float _TrunkAORemapMin;
|
|
float _TrunkAORemapMax;
|
|
float _TrunkSmoothnessRemapMin;
|
|
float _TrunkSmoothnessRemapMax;
|
|
float4 _LayerMask_TexelSize;
|
|
float4 _BarkBlendMaskTilingOffset;
|
|
float4 _BarkBaseColor;
|
|
float4 _BarkBaseColorMap_TexelSize;
|
|
float _BarkUseUV3;
|
|
float4 _BarkTilingOffset;
|
|
float4 _BarkNormalMap_TexelSize;
|
|
float _BarkNormalScale;
|
|
float4 _BarkMaskMap_TexelSize;
|
|
float _BarkMetallic;
|
|
float _BarkSmoothnessRemapMin;
|
|
float _BarkSmoothnessRemapMax;
|
|
float _BarkAORemapMin;
|
|
float _BarkAORemapMax;
|
|
float _Stiffness;
|
|
float _InitialBend;
|
|
float _Drag;
|
|
float _HeightDrag;
|
|
float4 _NewNormal;
|
|
float4 _EmissionColor;
|
|
float _UseShadowThreshold;
|
|
float4 _DoubleSidedConstants;
|
|
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
|
float _BlendMode;
|
|
float _EnableBlendModePreserveSpecularLighting;
|
|
float _RayTracing;
|
|
float _RefractionModel;
|
|
float _MaterialID;
|
|
float _MaterialTypeMask;
|
|
CBUFFER_END
|
|
|
|
|
|
// Object and Global properties
|
|
SAMPLER(SamplerState_Linear_Repeat);
|
|
SAMPLER(SamplerState_Linear_Repeat_Aniso8);
|
|
TEXTURE2D(_TrunkBaseColorMap);
|
|
SAMPLER(sampler_TrunkBaseColorMap);
|
|
TEXTURE2D(_TrunkNormalMap);
|
|
SAMPLER(sampler_TrunkNormalMap);
|
|
TEXTURE2D(_TrunkMaskMap);
|
|
SAMPLER(sampler_TrunkMaskMap);
|
|
TEXTURE2D(_LayerMask);
|
|
SAMPLER(sampler_LayerMask);
|
|
TEXTURE2D(_BarkBaseColorMap);
|
|
SAMPLER(sampler_BarkBaseColorMap);
|
|
TEXTURE2D(_BarkNormalMap);
|
|
SAMPLER(sampler_BarkNormalMap);
|
|
TEXTURE2D(_BarkMaskMap);
|
|
SAMPLER(sampler_BarkMaskMap);
|
|
TEXTURE2D(WIND_SETTINGS_TexNoise);
|
|
SAMPLER(samplerWIND_SETTINGS_TexNoise);
|
|
float4 WIND_SETTINGS_TexNoise_TexelSize;
|
|
TEXTURE2D(WIND_SETTINGS_TexGust);
|
|
SAMPLER(samplerWIND_SETTINGS_TexGust);
|
|
float4 WIND_SETTINGS_TexGust_TexelSize;
|
|
float4 WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float WIND_SETTINGS_FlexNoiseScale;
|
|
float WIND_SETTINGS_ShiverNoiseScale;
|
|
float WIND_SETTINGS_Turbulence;
|
|
float WIND_SETTINGS_GustSpeed;
|
|
float WIND_SETTINGS_GustScale;
|
|
float WIND_SETTINGS_GustWorldScale;
|
|
float4x4 WIND_SETTINGS_Points;
|
|
float4 WIND_SETTINGS_Points_Radius;
|
|
|
|
// -- Property used by ScenePickingPass
|
|
#ifdef SCENEPICKINGPASS
|
|
float4 _SelectionID;
|
|
#endif
|
|
|
|
// -- Properties used by SceneSelectionPass
|
|
#ifdef SCENESELECTIONPASS
|
|
int _ObjectId;
|
|
int _PassValue;
|
|
#endif
|
|
|
|
// Includes
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingMacros.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracing.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracingLightLoop.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/Deferred/RaytracingIntersectonGBuffer.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/StandardLit/StandardLit.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitRayTracing.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RayTracingCommon.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDecalData.hlsl"
|
|
// GraphIncludes: <None>
|
|
|
|
// --------------------------------------------------
|
|
// Structs and Packing
|
|
|
|
struct SurfaceDescriptionInputs
|
|
{
|
|
float3 TangentSpaceNormal;
|
|
float4 uv0;
|
|
float4 uv3;
|
|
};
|
|
|
|
//Interpolator Packs: <None>
|
|
|
|
// --------------------------------------------------
|
|
// Graph
|
|
|
|
|
|
// Graph Functions
|
|
|
|
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_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Lerp_float4(float4 A, float4 B, float4 T, out float4 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Multiply_float_float(float A, float B, out float Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Remap_float(float In, float2 InMinMax, float2 OutMinMax, out float Out)
|
|
{
|
|
Out = OutMinMax.x + (In - InMinMax.x) * (OutMinMax.y - OutMinMax.x) / (InMinMax.y - InMinMax.x);
|
|
}
|
|
|
|
void Unity_Lerp_float3(float3 A, float3 B, float3 T, out float3 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_NormalStrength_float(float3 In, float Strength, out float3 Out)
|
|
{
|
|
Out = float3(In.rg * Strength, lerp(1, In.b, saturate(Strength)));
|
|
}
|
|
|
|
// Graph Vertex
|
|
// GraphVertex: <None>
|
|
|
|
// Graph Pixel
|
|
struct SurfaceDescription
|
|
{
|
|
float3 BaseColor;
|
|
float3 Emission;
|
|
float Alpha;
|
|
float3 BentNormal;
|
|
float Smoothness;
|
|
float Occlusion;
|
|
float3 NormalTS;
|
|
float Metallic;
|
|
};
|
|
|
|
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
|
{
|
|
SurfaceDescription surface = (SurfaceDescription)0;
|
|
UnityTexture2D _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkBaseColorMap);
|
|
float4 _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4 = _TrunkTilingOffset;
|
|
float _Split_60538633130155809820b3185c81057f_R_1_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[0];
|
|
float _Split_60538633130155809820b3185c81057f_G_2_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[1];
|
|
float _Split_60538633130155809820b3185c81057f_B_3_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[2];
|
|
float _Split_60538633130155809820b3185c81057f_A_4_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[3];
|
|
float2 _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_R_1_Float, _Split_60538633130155809820b3185c81057f_G_2_Float);
|
|
float2 _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_B_3_Float, _Split_60538633130155809820b3185c81057f_A_4_Float);
|
|
float2 _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2, _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2, _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2);
|
|
float4 _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_R_4_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_G_5_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_B_6_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_A_7_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.a;
|
|
float4 _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4 = _TrunkBaseColor;
|
|
float4 _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4, _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4, _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4);
|
|
UnityTexture2D _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkBaseColorMap);
|
|
float _Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean = _BarkUseUV3;
|
|
float4 _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4 = IN.uv3;
|
|
float4 _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4 = IN.uv0;
|
|
float4 _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4;
|
|
Unity_Branch_float4(_Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean, _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4, _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4, _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4);
|
|
float4 _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4 = _BarkTilingOffset;
|
|
float _Split_ee975774554f6480b33168eff36d8be7_R_1_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[0];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_G_2_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[1];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_B_3_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[2];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_A_4_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[3];
|
|
float2 _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_R_1_Float, _Split_ee975774554f6480b33168eff36d8be7_G_2_Float);
|
|
float2 _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_B_3_Float, _Split_ee975774554f6480b33168eff36d8be7_A_4_Float);
|
|
float2 _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float((_Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4.xy), _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2, _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2, _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2);
|
|
float4 _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_R_4_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_G_5_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_B_6_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_A_7_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.a;
|
|
float4 _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4 = _BarkBaseColor;
|
|
float4 _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4, _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4);
|
|
UnityTexture2D _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_LayerMask);
|
|
float4 _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4 = _BarkBlendMaskTilingOffset;
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[0];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[1];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[2];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[3];
|
|
float2 _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float);
|
|
float2 _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float);
|
|
float2 _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2, _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2, _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2);
|
|
float4 _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2) );
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_R_4_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_G_5_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_B_6_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.a;
|
|
float4 _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4;
|
|
Unity_Lerp_float4(_Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxxx), _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4);
|
|
UnityTexture2D _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkMaskMap);
|
|
float4 _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_B_6_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.a;
|
|
float _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float = _TrunkMetallic;
|
|
float _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float, _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float, _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float);
|
|
float _Property_8142f12b781ad08680220297dab56f14_Out_0_Float = _TrunkAORemapMin;
|
|
float _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float = _TrunkAORemapMax;
|
|
float2 _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2 = float2(_Property_8142f12b781ad08680220297dab56f14_Out_0_Float, _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float);
|
|
float _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float, float2 (0, 1), _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float);
|
|
float _Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float = _TrunkSmoothnessRemapMin;
|
|
float _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float = _TrunkSmoothnessRemapMax;
|
|
float2 _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2 = float2(_Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float, _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float);
|
|
float _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float, float2 (0, 1), _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
float3 _Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3 = float3(_Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
UnityTexture2D _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkMaskMap);
|
|
float4 _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_B_6_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.a;
|
|
float _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float = _BarkMetallic;
|
|
float _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float, _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float, _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float);
|
|
float _Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float = _BarkAORemapMin;
|
|
float _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float = _BarkAORemapMax;
|
|
float2 _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2 = float2(_Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float, _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float);
|
|
float _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float, float2 (0, 1), _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float);
|
|
float _Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float = _BarkSmoothnessRemapMin;
|
|
float _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float = _BarkSmoothnessRemapMax;
|
|
float2 _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2 = float2(_Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float, _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float);
|
|
float _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float, float2 (0, 1), _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3 = float3(_Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3;
|
|
Unity_Lerp_float3(_Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3, _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3);
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[0];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[1];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[2];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_A_4_Float = 0;
|
|
UnityTexture2D _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkNormalMap);
|
|
float4 _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4);
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_R_4_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_G_5_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_B_6_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_A_7_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.a;
|
|
float _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float = _TrunkNormalScale;
|
|
float3 _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.xyz), _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float, _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3);
|
|
UnityTexture2D _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkNormalMap);
|
|
float4 _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4);
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_R_4_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_G_5_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_B_6_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_A_7_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.a;
|
|
float _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float = _BarkNormalScale;
|
|
float3 _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.xyz), _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3);
|
|
float3 _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
Unity_Lerp_float3(_NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3);
|
|
surface.BaseColor = (_Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4.xyz);
|
|
surface.Emission = float3(0, 0, 0);
|
|
surface.Alpha = float(1);
|
|
surface.BentNormal = IN.TangentSpaceNormal;
|
|
surface.Smoothness = _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float;
|
|
surface.Occlusion = _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float;
|
|
surface.NormalTS = _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
surface.Metallic = _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float;
|
|
return surface;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Graph Inputs
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#define VFX_SRP_ATTRIBUTES AttributesMesh
|
|
#define VaryingsMeshType VaryingsMeshToPS
|
|
#define VFX_SRP_VARYINGS VaryingsMeshType
|
|
#define VFX_SRP_SURFACE_INPUTS FragInputs
|
|
#endif
|
|
SurfaceDescriptionInputs FragInputsToSurfaceDescriptionInputs(FragInputs input, float3 viewWS)
|
|
{
|
|
SurfaceDescriptionInputs output;
|
|
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
|
|
|
#if defined(SHADER_STAGE_RAY_TRACING)
|
|
#else
|
|
#endif
|
|
output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
|
|
|
|
#if UNITY_UV_STARTS_AT_TOP
|
|
#else
|
|
#endif
|
|
|
|
|
|
output.uv0 = input.texCoord0;
|
|
output.uv3 = input.texCoord3;
|
|
|
|
// splice point to copy frag inputs custom interpolator pack into the SDI
|
|
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorCopyToSDI' */
|
|
|
|
return output;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Surface Data (Specific Material)
|
|
|
|
void ApplyDecalToSurfaceDataNoNormal(DecalSurfaceData decalSurfaceData, inout SurfaceData surfaceData);
|
|
|
|
void ApplyDecalAndGetNormal(FragInputs fragInputs, PositionInputs posInput, SurfaceDescription surfaceDescription,
|
|
inout SurfaceData surfaceData)
|
|
{
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
#ifdef DECAL_NORMAL_BLENDING
|
|
// SG nodes don't ouptut surface gradients, so if decals require surf grad blending, we have to convert
|
|
// the normal to gradient before applying the decal. We then have to resolve the gradient back to world space
|
|
float3 normalTS;
|
|
|
|
normalTS = SurfaceGradientFromTangentSpaceNormalAndFromTBN(surfaceDescription.NormalTS,
|
|
fragInputs.tangentToWorld[0], fragInputs.tangentToWorld[1]);
|
|
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, fragInputs.tangentToWorld[2], normalTS);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
|
|
GetNormalWS_SG(fragInputs, normalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
#else
|
|
// normal delivered to master node
|
|
GetNormalWS(fragInputs, surfaceDescription.NormalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Both uses and modifies 'surfaceData.normalWS'.
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, surfaceData.normalWS.xyz);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
#endif
|
|
}
|
|
void BuildSurfaceData(FragInputs fragInputs, inout SurfaceDescription surfaceDescription, float3 V, PositionInputs posInput, out SurfaceData surfaceData, out float3 bentNormalWS)
|
|
{
|
|
ZERO_INITIALIZE(SurfaceData, surfaceData);
|
|
|
|
// specularOcclusion need to be init ahead of decal to quiet the compiler that modify the SurfaceData struct
|
|
// however specularOcclusion can come from the graph, so need to be init here so it can be override.
|
|
surfaceData.specularOcclusion = 1.0;
|
|
surfaceData.thickness = 0.0;
|
|
|
|
surfaceData.baseColor = surfaceDescription.BaseColor;
|
|
surfaceData.perceptualSmoothness = surfaceDescription.Smoothness;
|
|
surfaceData.ambientOcclusion = surfaceDescription.Occlusion;
|
|
surfaceData.metallic = surfaceDescription.Metallic;
|
|
|
|
#if defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE) || defined(_REFRACTION_THIN)
|
|
if (_EnableSSRefraction)
|
|
{
|
|
|
|
surfaceData.transmittanceMask = (1.0 - surfaceDescription.Alpha);
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
else
|
|
{
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
#else
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
#endif
|
|
|
|
// These static material feature allow compile time optimization
|
|
surfaceData.materialFeatures = MATERIALFEATUREFLAGS_LIT_STANDARD;
|
|
#ifdef _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SUBSURFACE_SCATTERING;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_COLORED_TRANSMISSION;
|
|
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_ANISOTROPY
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_ANISOTROPY;
|
|
|
|
// Initialize the normal to something non-zero to avoid a div-zero warning for anisotropy.
|
|
surfaceData.normalWS = float3(0, 1, 0);
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_IRIDESCENCE
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_IRIDESCENCE;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SPECULAR_COLOR;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_CLEAR_COAT
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_CLEAR_COAT;
|
|
#endif
|
|
|
|
#if defined (_MATERIAL_FEATURE_SPECULAR_COLOR) && defined (_ENERGY_CONSERVING_SPECULAR)
|
|
// Require to have setup baseColor
|
|
// Reproduce the energy conservation done in legacy Unity. Not ideal but better for compatibility and users can unchek it
|
|
surfaceData.baseColor *= (1.0 - Max3(surfaceData.specularColor.r, surfaceData.specularColor.g, surfaceData.specularColor.b));
|
|
#endif
|
|
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
ApplyDecalAndGetNormal(fragInputs, posInput, surfaceDescription, surfaceData);
|
|
|
|
surfaceData.geomNormalWS = fragInputs.tangentToWorld[2];
|
|
|
|
surfaceData.tangentWS = normalize(fragInputs.tangentToWorld[0].xyz); // The tangent is not normalize in tangentToWorld for mikkt. TODO: Check if it expected that we normalize with Morten. Tag: SURFACE_GRADIENT
|
|
|
|
|
|
bentNormalWS = surfaceData.normalWS;
|
|
|
|
surfaceData.tangentWS = Orthonormalize(surfaceData.tangentWS, surfaceData.normalWS);
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
// Mipmap mode debugging isn't supported with ray tracing as it relies on derivatives
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD0
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG(posInput.positionSS, fragInputs.texCoord0);
|
|
#else
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG_NO_UV(posInput.positionSS);
|
|
#endif
|
|
surfaceData.metallic = 0;
|
|
}
|
|
#endif
|
|
|
|
// We need to call ApplyDebugToSurfaceData after filling the surfaceData and before filling builtinData
|
|
// as it can modify attribute use for static lighting
|
|
ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData);
|
|
#endif
|
|
|
|
// By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion.
|
|
// If user provide bent normal then we process a better term
|
|
#if defined(_SPECULAR_OCCLUSION_CUSTOM)
|
|
// Just use the value passed through via the slot (not active otherwise)
|
|
#elif defined(_SPECULAR_OCCLUSION_FROM_AO_BENT_NORMAL)
|
|
// If we have bent normal and ambient occlusion, process a specular occlusion
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromBentAO(V, bentNormalWS, surfaceData.normalWS, surfaceData.ambientOcclusion, PerceptualSmoothnessToPerceptualRoughness(surfaceData.perceptualSmoothness));
|
|
#elif defined(_AMBIENT_OCCLUSION) && defined(_SPECULAR_OCCLUSION_FROM_AO)
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness));
|
|
#endif
|
|
|
|
#if defined(_ENABLE_GEOMETRIC_SPECULAR_AA) && !defined(SHADER_STAGE_RAY_TRACING)
|
|
surfaceData.perceptualSmoothness = GeometricNormalFiltering(surfaceData.perceptualSmoothness, fragInputs.tangentToWorld[2], surfaceDescription.SpecularAAScreenSpaceVariance, surfaceDescription.SpecularAAThreshold);
|
|
#endif
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Get Surface And BuiltinData
|
|
|
|
void GetSurfaceAndBuiltinData(FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData RAY_TRACING_OPTIONAL_PARAMETERS)
|
|
{
|
|
// Don't dither if displaced tessellation (we're fading out the displacement instead to match the next LOD)
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && !defined(_TESSELLATION_DISPLACEMENT)
|
|
#ifdef LOD_FADE_CROSSFADE // enable dithering LOD transition if user select CrossFade transition in LOD group
|
|
LODDitheringTransition(ComputeFadeMaskSeed(V, posInput.positionSS), unity_LODFade.x);
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
#ifdef _DOUBLESIDED_ON
|
|
float3 doubleSidedConstants = _DoubleSidedConstants.xyz;
|
|
#else
|
|
float3 doubleSidedConstants = float3(1.0, 1.0, 1.0);
|
|
#endif
|
|
|
|
ApplyDoubleSidedFlipOrMirror(fragInputs, doubleSidedConstants); // Apply double sided flip on the vertex normal
|
|
#endif // SHADER_UNLIT
|
|
|
|
SurfaceDescriptionInputs surfaceDescriptionInputs = FragInputsToSurfaceDescriptionInputs(fragInputs, V);
|
|
|
|
#if defined(HAVE_VFX_MODIFICATION)
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
GetElementPixelProperties(fragInputs, properties);
|
|
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs, properties);
|
|
#else
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs);
|
|
#endif
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
surfaceDescription.Alpha = 1.0f;
|
|
}
|
|
#endif
|
|
|
|
// Perform alpha test very early to save performance (a killed pixel will not sample textures)
|
|
// TODO: split graph evaluation to grab just alpha dependencies first? tricky..
|
|
#ifdef _ALPHATEST_ON
|
|
float alphaCutoff = surfaceDescription.AlphaClipThreshold;
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
// The TransparentDepthPrepass is also used with SSR transparent.
|
|
// If an artists enable transaprent SSR but not the TransparentDepthPrepass itself, then we use AlphaClipThreshold
|
|
// otherwise if TransparentDepthPrepass is enabled we use AlphaClipThresholdDepthPrepass
|
|
#elif SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_POSTPASS
|
|
// DepthPostpass always use its own alpha threshold
|
|
alphaCutoff = surfaceDescription.AlphaClipThresholdDepthPostpass;
|
|
#elif (SHADERPASS == SHADERPASS_SHADOWS) || (SHADERPASS == SHADERPASS_RAYTRACING_VISIBILITY)
|
|
// If use shadow threshold isn't enable we don't allow any test
|
|
#endif
|
|
|
|
GENERIC_ALPHA_TEST(surfaceDescription.Alpha, alphaCutoff);
|
|
#endif
|
|
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && _DEPTHOFFSET_ON
|
|
ApplyDepthOffsetPositionInput(V, surfaceDescription.DepthOffset, GetViewForwardDir(), GetWorldToHClipMatrix(), posInput);
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
float3 bentNormalWS;
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData, bentNormalWS);
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD1
|
|
float4 lightmapTexCoord1 = fragInputs.texCoord1;
|
|
#else
|
|
float4 lightmapTexCoord1 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD2
|
|
float4 lightmapTexCoord2 = fragInputs.texCoord2;
|
|
#else
|
|
float4 lightmapTexCoord2 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Builtin Data
|
|
// For back lighting we use the oposite vertex normal
|
|
InitBuiltinData(posInput, alpha, bentNormalWS, -fragInputs.tangentToWorld[2], lightmapTexCoord1, lightmapTexCoord2, builtinData);
|
|
|
|
#else
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData);
|
|
|
|
ZERO_BUILTIN_INITIALIZE(builtinData); // No call to InitBuiltinData as we don't have any lighting
|
|
builtinData.opacity = surfaceDescription.Alpha;
|
|
|
|
#if defined(DEBUG_DISPLAY)
|
|
// Light Layers are currently not used for the Unlit shader (because it is not lit)
|
|
// But Unlit objects do cast shadows according to their rendering layer mask, which is what we want to
|
|
// display in the light layers visualization mode, therefore we need the renderingLayers
|
|
builtinData.renderingLayers = GetMeshRenderingLayerMask();
|
|
#endif
|
|
|
|
#endif // SHADER_UNLIT
|
|
|
|
#ifdef _ALPHATEST_ON
|
|
// Used for sharpening by alpha to mask - Alpha to covertage is only used with depth only and forward pass (no shadow pass, no transparent pass)
|
|
builtinData.alphaClipTreshold = alphaCutoff;
|
|
#endif
|
|
|
|
// override sampleBakedGI - not used by Unlit
|
|
// When overriding GI, we need to force the isLightmap flag to make sure we don't add APV (sampled in the lightloop) on top of the overridden value (set at GBuffer stage)
|
|
|
|
builtinData.emissiveColor = surfaceDescription.Emission;
|
|
|
|
// Note this will not fully work on transparent surfaces (can check with _SURFACE_TYPE_TRANSPARENT define)
|
|
// We will always overwrite vt feeback with the nearest. So behind transparent surfaces vt will not be resolved
|
|
// This is a limitation of the current MRT approach.
|
|
#ifdef UNITY_VIRTUAL_TEXTURING
|
|
#endif
|
|
|
|
#if _DEPTHOFFSET_ON
|
|
builtinData.depthOffset = surfaceDescription.DepthOffset;
|
|
#endif
|
|
|
|
// TODO: We should generate distortion / distortionBlur for non distortion pass
|
|
#if (SHADERPASS == SHADERPASS_DISTORTION)
|
|
builtinData.distortion = surfaceDescription.Distortion;
|
|
builtinData.distortionBlur = surfaceDescription.DistortionBlur;
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// PostInitBuiltinData call ApplyDebugToBuiltinData
|
|
PostInitBuiltinData(V, posInput, surfaceData, builtinData);
|
|
#else
|
|
ApplyDebugToBuiltinData(builtinData);
|
|
#endif
|
|
|
|
RAY_TRACING_OPTIONAL_ALPHA_TEST_PASS
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Main
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassRaytracingGBuffer.hlsl"
|
|
|
|
// --------------------------------------------------
|
|
// Visual Effect Vertex Invocations
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/VisualEffectVertex.hlsl"
|
|
#else
|
|
#endif
|
|
#endif
|
|
|
|
ENDHLSL
|
|
}
|
|
Pass
|
|
{
|
|
Name "DebugDXR"
|
|
Tags
|
|
{
|
|
"LightMode" = "DebugDXR"
|
|
}
|
|
|
|
// Debug
|
|
// <None>
|
|
|
|
// --------------------------------------------------
|
|
// Pass
|
|
|
|
HLSLPROGRAM
|
|
|
|
// Pragmas
|
|
#pragma target 5.0
|
|
#pragma raytracing surface_shader
|
|
#pragma only_renderers d3d11 xboxseries ps5
|
|
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl"
|
|
|
|
// Includes
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingMacros.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracing.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingIntersection.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RayTracingCommon.hlsl"
|
|
// GraphIncludes: <None>
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassRayTracingDebug.hlsl"
|
|
|
|
ENDHLSL
|
|
}
|
|
Pass
|
|
{
|
|
Name "PathTracingDXR"
|
|
Tags
|
|
{
|
|
"LightMode" = "PathTracingDXR"
|
|
}
|
|
|
|
// Render State
|
|
// RenderState: <None>
|
|
|
|
// Debug
|
|
// <None>
|
|
|
|
// --------------------------------------------------
|
|
// Pass
|
|
|
|
HLSLPROGRAM
|
|
|
|
// Pragmas
|
|
#pragma target 5.0
|
|
#pragma raytracing surface_shader
|
|
#pragma only_renderers d3d11 xboxseries ps5
|
|
|
|
// Keywords
|
|
#pragma shader_feature _ _SURFACE_TYPE_TRANSPARENT
|
|
#pragma shader_feature_local _ _DOUBLESIDED_ON
|
|
#pragma shader_feature_local _ _ADD_PRECOMPUTED_VELOCITY
|
|
#pragma shader_feature_local _ _TRANSPARENT_WRITES_MOTION_VEC _TRANSPARENT_REFRACTIVE_SORT
|
|
#pragma shader_feature_local_fragment _ _ENABLE_FOG_ON_TRANSPARENT
|
|
#pragma multi_compile _ DEBUG_DISPLAY
|
|
#pragma shader_feature_local_fragment _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_DECALS
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR
|
|
#pragma shader_feature_local_fragment _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma shader_feature_local_raytracing _ _DISABLE_SSR_TRANSPARENT
|
|
#pragma multi_compile _ LIGHTMAP_ON
|
|
#pragma multi_compile _ DIRLIGHTMAP_COMBINED
|
|
#pragma multi_compile_fragment _ PROBE_VOLUMES_L1 PROBE_VOLUMES_L2
|
|
#pragma multi_compile_raytracing _ PROBE_VOLUMES_L1 PROBE_VOLUMES_L2
|
|
#pragma multi_compile _ DYNAMICLIGHTMAP_ON
|
|
#pragma multi_compile_raytracing DECALS_OFF DECALS_3RT DECALS_4RT
|
|
#pragma multi_compile_raytracing _ DECAL_SURFACE_GRADIENT
|
|
#pragma shader_feature_local _ _REFRACTION_PLANE _REFRACTION_SPHERE _REFRACTION_THIN
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_TRANSMISSION
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_ANISOTROPY
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_IRIDESCENCE
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
#pragma shader_feature_local_fragment _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
#pragma shader_feature_local_raytracing _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// GraphKeywords: <None>
|
|
|
|
// Defines
|
|
#define SHADERPASS SHADERPASS_PATH_TRACING
|
|
#define PUNCTUAL_SHADOW_LOW
|
|
#define DIRECTIONAL_SHADOW_LOW
|
|
#define RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define LIGHTLOOP_DISABLE_TILE_AND_CLUSTER 1
|
|
#define PATH_TRACING_CLUSTERED_DECALS 1
|
|
#define HAS_LIGHTLOOP 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
#define SUPPORT_GLOBAL_MIP_BIAS 1
|
|
|
|
// For custom interpolators to inject a substruct definition before FragInputs definition,
|
|
// allowing for FragInputs to capture CI's intended for ShaderGraph's SDI.
|
|
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreInclude' */
|
|
|
|
|
|
// TODO: Merge FragInputsVFX substruct with CustomInterpolators.
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
struct FragInputsVFX
|
|
{
|
|
/* WARNING: $splice Could not find named fragment 'FragInputsVFX' */
|
|
};
|
|
#endif
|
|
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/GeometricTools.hlsl" // Required by Tessellation.hlsl
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Tessellation.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" // Required to be include before we include properties as it define DECLARE_STACK_CB
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl" // Required before including properties as it defines UNITY_TEXTURE_STREAMING_DEBUG_VARS
|
|
// Always include Shader Graph version
|
|
// Always include last to avoid double macros
|
|
#include "Packages/com.unity.shadergraph/ShaderGraphLibrary/Functions.hlsl" // Need to be here for Gradient struct definition
|
|
|
|
// --------------------------------------------------
|
|
// Defines
|
|
|
|
// Attribute
|
|
#define ATTRIBUTES_NEED_NORMAL
|
|
#define ATTRIBUTES_NEED_TANGENT
|
|
#define ATTRIBUTES_NEED_TEXCOORD0
|
|
#define ATTRIBUTES_NEED_TEXCOORD1
|
|
#define ATTRIBUTES_NEED_TEXCOORD2
|
|
#define ATTRIBUTES_NEED_TEXCOORD3
|
|
#define VARYINGS_NEED_POSITION_WS
|
|
#define VARYINGS_NEED_TANGENT_TO_WORLD
|
|
#define VARYINGS_NEED_TEXCOORD0
|
|
#define VARYINGS_NEED_TEXCOORD1
|
|
#define VARYINGS_NEED_TEXCOORD2
|
|
#define VARYINGS_NEED_TEXCOORD3
|
|
|
|
|
|
//Strip down the FragInputs.hlsl (on graphics), so we can only optimize the interpolators we use.
|
|
//if by accident something requests contents of FragInputs.hlsl, it will be caught as a compiler error
|
|
//Frag inputs stripping is only enabled when FRAG_INPUTS_ENABLE_STRIPPING is set
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && SHADERPASS != SHADERPASS_RAYTRACING_GBUFFER && SHADERPASS != SHADERPASS_FULL_SCREEN_DEBUG
|
|
#define FRAG_INPUTS_ENABLE_STRIPPING
|
|
#endif
|
|
#define FRAG_INPUTS_USE_TEXCOORD0
|
|
#define FRAG_INPUTS_USE_TEXCOORD1
|
|
#define FRAG_INPUTS_USE_TEXCOORD2
|
|
#define FRAG_INPUTS_USE_TEXCOORD3
|
|
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl"
|
|
|
|
|
|
|
|
|
|
// Following two define are a workaround introduce in 10.1.x for RaytracingQualityNode
|
|
// The ShaderGraph don't support correctly migration of this node as it serialize all the node data
|
|
// in the json file making it impossible to uprgrade. Until we get a fix, we do a workaround here
|
|
// to still allow us to rename the field and keyword of this node without breaking existing code.
|
|
#ifdef RAYTRACING_SHADER_GRAPH_DEFAULT
|
|
#define RAYTRACING_SHADER_GRAPH_HIGH
|
|
#endif
|
|
|
|
#ifdef RAYTRACING_SHADER_GRAPH_RAYTRACED
|
|
#define RAYTRACING_SHADER_GRAPH_LOW
|
|
#endif
|
|
// end
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// We need isFrontFace when using double sided - it is not required for unlit as in case of unlit double sided only drive the cullmode
|
|
// VARYINGS_NEED_CULLFACE can be define by VaryingsMeshToPS.FaceSign input if a IsFrontFace Node is included in the shader graph.
|
|
#if defined(_DOUBLESIDED_ON) && !defined(VARYINGS_NEED_CULLFACE)
|
|
#define VARYINGS_NEED_CULLFACE
|
|
#endif
|
|
#endif
|
|
|
|
// Specific Material Define
|
|
#define _AMBIENT_OCCLUSION 1
|
|
#define _SPECULAR_OCCLUSION_FROM_AO 1
|
|
#define _ENERGY_CONSERVING_SPECULAR 1
|
|
|
|
#if _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
// Colored Transmission doesn't support clear coat
|
|
#undef _MATERIAL_FEATURE_CLEAR_COAT
|
|
#endif
|
|
|
|
// If we use subsurface scattering, enable output split lighting (for forward pass)
|
|
#if defined(_MATERIAL_FEATURE_SUBSURFACE_SCATTERING) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define OUTPUT_SPLIT_LIGHTING
|
|
#endif
|
|
|
|
// This shader support recursive rendering for raytracing
|
|
#define HAVE_RECURSIVE_RENDERING
|
|
|
|
// In Path Tracing, For all single-sided, refractive materials, we want to force a thin refraction model
|
|
#if (SHADERPASS == SHADERPASS_PATH_TRACING) && !defined(_DOUBLESIDED_ON) && (defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE))
|
|
#undef _REFRACTION_PLANE
|
|
#undef _REFRACTION_SPHERE
|
|
#define _REFRACTION_THIN
|
|
#endif
|
|
// Caution: we can use the define SHADER_UNLIT onlit after the above Material include as it is the Unlit template who define it
|
|
|
|
// To handle SSR on transparent correctly with a possibility to enable/disable it per framesettings
|
|
// we should have a code like this:
|
|
// if !defined(_DISABLE_SSR_TRANSPARENT)
|
|
// pragma multi_compile _ WRITE_NORMAL_BUFFER
|
|
// endif
|
|
// i.e we enable the multicompile only if we can receive SSR or not, and then C# code drive
|
|
// it based on if SSR transparent in frame settings and not (and stripper can strip it).
|
|
// this is currently not possible with our current preprocessor as _DISABLE_SSR_TRANSPARENT is a keyword not a define
|
|
// so instead we used this and chose to pay the extra cost of normal write even if SSR transaprent is disabled.
|
|
// Ideally the shader graph generator should handle it but condition below can't be handle correctly for now.
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
#if !defined(_DISABLE_SSR_TRANSPARENT) && !defined(SHADER_UNLIT)
|
|
#define WRITE_NORMAL_BUFFER
|
|
#endif
|
|
#endif
|
|
|
|
// See Lit.shader
|
|
#if SHADERPASS == SHADERPASS_MOTION_VECTORS && defined(WRITE_DECAL_BUFFER_AND_RENDERING_LAYER)
|
|
#define WRITE_DECAL_BUFFER
|
|
#endif
|
|
|
|
#ifndef DEBUG_DISPLAY
|
|
// In case of opaque we don't want to perform the alpha test, it is done in depth prepass and we use depth equal for ztest (setup from UI)
|
|
// Don't do it with debug display mode as it is possible there is no depth prepass in this case
|
|
#if !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#if SHADERPASS == SHADERPASS_FORWARD
|
|
#define SHADERPASS_FORWARD_BYPASS_ALPHA_TEST
|
|
#elif SHADERPASS == SHADERPASS_GBUFFER
|
|
#define SHADERPASS_GBUFFER_BYPASS_ALPHA_TEST
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
// Define _DEFERRED_CAPABLE_MATERIAL for shader capable to run in deferred pass
|
|
#if defined(SHADER_LIT) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _DEFERRED_CAPABLE_MATERIAL
|
|
#endif
|
|
|
|
// Translate transparent motion vector define
|
|
#if (defined(_TRANSPARENT_WRITES_MOTION_VEC) || defined(_TRANSPARENT_REFRACTIVE_SORT)) && defined(_SURFACE_TYPE_TRANSPARENT)
|
|
#define _WRITE_TRANSPARENT_MOTION_VECTOR
|
|
#endif
|
|
|
|
// -- Graph Properties
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _TrunkBaseColor;
|
|
float4 _TrunkBaseColorMap_TexelSize;
|
|
float4 _TrunkTilingOffset;
|
|
float4 _TrunkNormalMap_TexelSize;
|
|
float _TrunkNormalScale;
|
|
float4 _TrunkMaskMap_TexelSize;
|
|
float _TrunkMetallic;
|
|
float _TrunkAORemapMin;
|
|
float _TrunkAORemapMax;
|
|
float _TrunkSmoothnessRemapMin;
|
|
float _TrunkSmoothnessRemapMax;
|
|
float4 _LayerMask_TexelSize;
|
|
float4 _BarkBlendMaskTilingOffset;
|
|
float4 _BarkBaseColor;
|
|
float4 _BarkBaseColorMap_TexelSize;
|
|
float _BarkUseUV3;
|
|
float4 _BarkTilingOffset;
|
|
float4 _BarkNormalMap_TexelSize;
|
|
float _BarkNormalScale;
|
|
float4 _BarkMaskMap_TexelSize;
|
|
float _BarkMetallic;
|
|
float _BarkSmoothnessRemapMin;
|
|
float _BarkSmoothnessRemapMax;
|
|
float _BarkAORemapMin;
|
|
float _BarkAORemapMax;
|
|
float _Stiffness;
|
|
float _InitialBend;
|
|
float _Drag;
|
|
float _HeightDrag;
|
|
float4 _NewNormal;
|
|
float4 _EmissionColor;
|
|
float _UseShadowThreshold;
|
|
float4 _DoubleSidedConstants;
|
|
UNITY_TEXTURE_STREAMING_DEBUG_VARS;
|
|
float _BlendMode;
|
|
float _EnableBlendModePreserveSpecularLighting;
|
|
float _RayTracing;
|
|
float _RefractionModel;
|
|
float _MaterialID;
|
|
float _MaterialTypeMask;
|
|
CBUFFER_END
|
|
|
|
|
|
// Object and Global properties
|
|
SAMPLER(SamplerState_Linear_Repeat);
|
|
SAMPLER(SamplerState_Linear_Repeat_Aniso8);
|
|
TEXTURE2D(_TrunkBaseColorMap);
|
|
SAMPLER(sampler_TrunkBaseColorMap);
|
|
TEXTURE2D(_TrunkNormalMap);
|
|
SAMPLER(sampler_TrunkNormalMap);
|
|
TEXTURE2D(_TrunkMaskMap);
|
|
SAMPLER(sampler_TrunkMaskMap);
|
|
TEXTURE2D(_LayerMask);
|
|
SAMPLER(sampler_LayerMask);
|
|
TEXTURE2D(_BarkBaseColorMap);
|
|
SAMPLER(sampler_BarkBaseColorMap);
|
|
TEXTURE2D(_BarkNormalMap);
|
|
SAMPLER(sampler_BarkNormalMap);
|
|
TEXTURE2D(_BarkMaskMap);
|
|
SAMPLER(sampler_BarkMaskMap);
|
|
TEXTURE2D(WIND_SETTINGS_TexNoise);
|
|
SAMPLER(samplerWIND_SETTINGS_TexNoise);
|
|
float4 WIND_SETTINGS_TexNoise_TexelSize;
|
|
TEXTURE2D(WIND_SETTINGS_TexGust);
|
|
SAMPLER(samplerWIND_SETTINGS_TexGust);
|
|
float4 WIND_SETTINGS_TexGust_TexelSize;
|
|
float4 WIND_SETTINGS_WorldDirectionAndSpeed;
|
|
float WIND_SETTINGS_FlexNoiseScale;
|
|
float WIND_SETTINGS_ShiverNoiseScale;
|
|
float WIND_SETTINGS_Turbulence;
|
|
float WIND_SETTINGS_GustSpeed;
|
|
float WIND_SETTINGS_GustScale;
|
|
float WIND_SETTINGS_GustWorldScale;
|
|
float4x4 WIND_SETTINGS_Points;
|
|
float4 WIND_SETTINGS_Points_Radius;
|
|
|
|
// -- Property used by ScenePickingPass
|
|
#ifdef SCENEPICKINGPASS
|
|
float4 _SelectionID;
|
|
#endif
|
|
|
|
// -- Properties used by SceneSelectionPass
|
|
#ifdef SCENESELECTIONPASS
|
|
int _ObjectId;
|
|
int _PassValue;
|
|
#endif
|
|
|
|
// Includes
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingMacros.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracing.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracingLightLoop.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingIntersection.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/Lighting.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoopDef.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RayTracingLightCluster.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/NormalSurfaceGradient.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitPathTracing.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RayTracingCommon.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalUtilities.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDecalData.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
// GraphIncludes: <None>
|
|
|
|
// --------------------------------------------------
|
|
// Structs and Packing
|
|
|
|
struct SurfaceDescriptionInputs
|
|
{
|
|
float3 TangentSpaceNormal;
|
|
float4 uv0;
|
|
float4 uv3;
|
|
};
|
|
|
|
//Interpolator Packs: <None>
|
|
|
|
// --------------------------------------------------
|
|
// Graph
|
|
|
|
|
|
// Graph Functions
|
|
|
|
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_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
|
|
{
|
|
Out = Predicate ? True : False;
|
|
}
|
|
|
|
void Unity_Lerp_float4(float4 A, float4 B, float4 T, out float4 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_Multiply_float_float(float A, float B, out float Out)
|
|
{
|
|
Out = A * B;
|
|
}
|
|
|
|
void Unity_Remap_float(float In, float2 InMinMax, float2 OutMinMax, out float Out)
|
|
{
|
|
Out = OutMinMax.x + (In - InMinMax.x) * (OutMinMax.y - OutMinMax.x) / (InMinMax.y - InMinMax.x);
|
|
}
|
|
|
|
void Unity_Lerp_float3(float3 A, float3 B, float3 T, out float3 Out)
|
|
{
|
|
Out = lerp(A, B, T);
|
|
}
|
|
|
|
void Unity_NormalStrength_float(float3 In, float Strength, out float3 Out)
|
|
{
|
|
Out = float3(In.rg * Strength, lerp(1, In.b, saturate(Strength)));
|
|
}
|
|
|
|
// Graph Vertex
|
|
// GraphVertex: <None>
|
|
|
|
// Graph Pixel
|
|
struct SurfaceDescription
|
|
{
|
|
float3 BaseColor;
|
|
float3 Emission;
|
|
float Alpha;
|
|
float3 BentNormal;
|
|
float Smoothness;
|
|
float Occlusion;
|
|
float3 NormalTS;
|
|
float Metallic;
|
|
};
|
|
|
|
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
|
|
{
|
|
SurfaceDescription surface = (SurfaceDescription)0;
|
|
UnityTexture2D _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkBaseColorMap);
|
|
float4 _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4 = _TrunkTilingOffset;
|
|
float _Split_60538633130155809820b3185c81057f_R_1_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[0];
|
|
float _Split_60538633130155809820b3185c81057f_G_2_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[1];
|
|
float _Split_60538633130155809820b3185c81057f_B_3_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[2];
|
|
float _Split_60538633130155809820b3185c81057f_A_4_Float = _Property_8ec0d512145619859d288abab740e3bf_Out_0_Vector4[3];
|
|
float2 _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_R_1_Float, _Split_60538633130155809820b3185c81057f_G_2_Float);
|
|
float2 _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2 = float2(_Split_60538633130155809820b3185c81057f_B_3_Float, _Split_60538633130155809820b3185c81057f_A_4_Float);
|
|
float2 _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_15346b291dcf02819b02e7f1e318f90e_Out_0_Vector2, _Vector2_30576cbd50be128591cac1e9fc3e8bc7_Out_0_Vector2, _TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2);
|
|
float4 _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_821e07b38fd0a08d85c4dd6e5b6bbac9_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_R_4_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_G_5_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_B_6_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_A_7_Float = _SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4.a;
|
|
float4 _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4 = _TrunkBaseColor;
|
|
float4 _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_91f1784012cdb683a2ab7a12fc14c94d_RGBA_0_Vector4, _Property_41859d117584758eb8002ecc938f9bce_Out_0_Vector4, _Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4);
|
|
UnityTexture2D _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkBaseColorMap);
|
|
float _Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean = _BarkUseUV3;
|
|
float4 _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4 = IN.uv3;
|
|
float4 _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4 = IN.uv0;
|
|
float4 _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4;
|
|
Unity_Branch_float4(_Property_ff19d1bd9b29a789b89dedfa7d79c552_Out_0_Boolean, _UV_6fa3089219fee9819a0b2f5861160a50_Out_0_Vector4, _UV_abd1a6d68d5a4d8592160ab28487fc18_Out_0_Vector4, _Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4);
|
|
float4 _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4 = _BarkTilingOffset;
|
|
float _Split_ee975774554f6480b33168eff36d8be7_R_1_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[0];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_G_2_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[1];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_B_3_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[2];
|
|
float _Split_ee975774554f6480b33168eff36d8be7_A_4_Float = _Property_505b745e4ff42080ba6edcadb9575a6a_Out_0_Vector4[3];
|
|
float2 _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_R_1_Float, _Split_ee975774554f6480b33168eff36d8be7_G_2_Float);
|
|
float2 _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2 = float2(_Split_ee975774554f6480b33168eff36d8be7_B_3_Float, _Split_ee975774554f6480b33168eff36d8be7_A_4_Float);
|
|
float2 _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float((_Branch_469b76a1ba3e6782aa30674e436d8172_Out_3_Vector4.xy), _Vector2_dab5fd33863b7087b4d30d7a42b40bd4_Out_0_Vector2, _Vector2_002dec3a702cc0839108460ec7882df5_Out_0_Vector2, _TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2);
|
|
float4 _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_f0e70a431fc2958d9010b03283beee34_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_R_4_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_G_5_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_B_6_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_A_7_Float = _SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4.a;
|
|
float4 _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4 = _BarkBaseColor;
|
|
float4 _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4;
|
|
Unity_Multiply_float4_float4(_SampleTexture2D_cb5d91dbbbcaf481a59e34fbfc512d33_RGBA_0_Vector4, _Property_913f955d98f27d8eae1e9aa2594d6903_Out_0_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4);
|
|
UnityTexture2D _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_LayerMask);
|
|
float4 _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4 = _BarkBlendMaskTilingOffset;
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[0];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[1];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[2];
|
|
float _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float = _Property_21cdc88cb831d086bb9afaeabf4de4cd_Out_0_Vector4[3];
|
|
float2 _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_R_1_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_G_2_Float);
|
|
float2 _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2 = float2(_Split_62cf1e6443dc7884bebb6f59fa018c39_B_3_Float, _Split_62cf1e6443dc7884bebb6f59fa018c39_A_4_Float);
|
|
float2 _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2;
|
|
Unity_TilingAndOffset_float(IN.uv0.xy, _Vector2_17a7d2a57403c68ebae327601cdf0a53_Out_0_Vector2, _Vector2_2cfc2cc45e03bd80903634e1e3ddf736_Out_0_Vector2, _TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2);
|
|
float4 _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_e4f36987ce299e8594a2a5fccce28358_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_3c21183e7c503681ad15665947bc36ab_Out_3_Vector2) );
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_R_4_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_G_5_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_B_6_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float = _SampleTexture2D_ac5550b56f005784b219743fdaf08340_RGBA_0_Vector4.a;
|
|
float4 _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4;
|
|
Unity_Lerp_float4(_Multiply_4d0f82599060228a9092027fd43912c8_Out_2_Vector4, _Multiply_98c5efd706ed988babc5c29fc647d990_Out_2_Vector4, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxxx), _Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4);
|
|
UnityTexture2D _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkMaskMap);
|
|
float4 _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_bb9b47702e64ec8c8d8ad011fd521576_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_B_6_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float = _SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_RGBA_0_Vector4.a;
|
|
float _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float = _TrunkMetallic;
|
|
float _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_R_4_Float, _Property_bbb7f63dc018f9828732f80495a95444_Out_0_Float, _Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float);
|
|
float _Property_8142f12b781ad08680220297dab56f14_Out_0_Float = _TrunkAORemapMin;
|
|
float _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float = _TrunkAORemapMax;
|
|
float2 _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2 = float2(_Property_8142f12b781ad08680220297dab56f14_Out_0_Float, _Property_48e1c5285b48c78e8af19e38f4bd77f9_Out_0_Float);
|
|
float _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_G_5_Float, float2 (0, 1), _Vector2_344526038e228b85ad9c2d33f000c5ea_Out_0_Vector2, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float);
|
|
float _Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float = _TrunkSmoothnessRemapMin;
|
|
float _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float = _TrunkSmoothnessRemapMax;
|
|
float2 _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2 = float2(_Property_0682b9e13137ec8f8de23962e6db211c_Out_0_Float, _Property_0edea7916ed7a189a62b0faf2c274601_Out_0_Float);
|
|
float _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_9c7e926e274f4b8c8af167e1d6430273_A_7_Float, float2 (0, 1), _Vector2_8d45bee64b64f087b44fb9b02317dfdd_Out_0_Vector2, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
float3 _Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3 = float3(_Multiply_ee089bb3595c0c8da7ca2ff054def6d5_Out_2_Float, _Remap_f4684fae31257d82aa14c39233760e21_Out_3_Float, _Remap_857d26677c8e8a809704b89dbca71045_Out_3_Float);
|
|
UnityTexture2D _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkMaskMap);
|
|
float4 _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_41d7b60d37a127849d09e1dd2734aaec_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_B_6_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float = _SampleTexture2D_aa594744064ae38b98eeb70ae1062378_RGBA_0_Vector4.a;
|
|
float _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float = _BarkMetallic;
|
|
float _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float;
|
|
Unity_Multiply_float_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_R_4_Float, _Property_da25d24e4fd2108fa3e2cae8cf268ad1_Out_0_Float, _Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float);
|
|
float _Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float = _BarkAORemapMin;
|
|
float _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float = _BarkAORemapMax;
|
|
float2 _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2 = float2(_Property_02bd8e6a672d1f8ebd2c50b4d822d29c_Out_0_Float, _Property_7c7a0acfa72e4a8d9e89fd92eb4fde51_Out_0_Float);
|
|
float _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_G_5_Float, float2 (0, 1), _Vector2_61efe41bd1ca5283ae09f418d56dce98_Out_0_Vector2, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float);
|
|
float _Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float = _BarkSmoothnessRemapMin;
|
|
float _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float = _BarkSmoothnessRemapMax;
|
|
float2 _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2 = float2(_Property_e93e026149f1bb888d5c7f055f55d34c_Out_0_Float, _Property_9e1d05a5f3bb4687bd2a9ef8e632a88c_Out_0_Float);
|
|
float _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float;
|
|
Unity_Remap_float(_SampleTexture2D_aa594744064ae38b98eeb70ae1062378_A_7_Float, float2 (0, 1), _Vector2_d434b3a98fac8f88a713affdbe931846_Out_0_Vector2, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3 = float3(_Multiply_1a54c23c25172e89acacc2ea32718ab1_Out_2_Float, _Remap_09fcf6edbba96e8daee966084ddc87eb_Out_3_Float, _Remap_098b362070432e8e9aa6ed165b86b141_Out_3_Float);
|
|
float3 _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3;
|
|
Unity_Lerp_float3(_Vector3_9674c0c5cc0ee18b8a034c3707647d56_Out_0_Vector3, _Vector3_5e29ab09107fad85ba1690ff5b3fc7e8_Out_0_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3);
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[0];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[1];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float = _Lerp_9ead17ba6612748da79c34b12c2f6456_Out_3_Vector3[2];
|
|
float _Split_645358fc1f0e278fbfc2ccb5594c95e3_A_4_Float = 0;
|
|
UnityTexture2D _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_TrunkNormalMap);
|
|
float4 _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_147b07430832c98eb0a470557ee61c5e_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_a2e0bda8e800d280b7064fc016a7e6cd_Out_3_Vector2) );
|
|
_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4);
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_R_4_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_G_5_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_B_6_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_A_7_Float = _SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.a;
|
|
float _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float = _TrunkNormalScale;
|
|
float3 _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_3a56330a29e2f58a96a29a2135b19cbc_RGBA_0_Vector4.xyz), _Property_72e436a108ad64868e46d548c585c5f3_Out_0_Float, _NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3);
|
|
UnityTexture2D _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D = UnityBuildTexture2DStructNoScale(_BarkNormalMap);
|
|
float4 _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4 = SAMPLE_TEXTURE2D(_Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.tex, UnityBuildSamplerStateStruct(SamplerState_Linear_Repeat_Aniso8).samplerstate, _Property_30f2c188c6b1e688ae667a89dbd70992_Out_0_Texture2D.GetTransformedUV(_TilingAndOffset_b229fd06304b7c8f9f70f8c34b899992_Out_3_Vector2) );
|
|
_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.rgb = UnpackNormal(_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4);
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_R_4_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.r;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_G_5_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.g;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_B_6_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.b;
|
|
float _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_A_7_Float = _SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.a;
|
|
float _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float = _BarkNormalScale;
|
|
float3 _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3;
|
|
Unity_NormalStrength_float((_SampleTexture2D_7d19dd1bd9502e84949a089f346db00b_RGBA_0_Vector4.xyz), _Property_13b1e8709820828195ef548d1d72ea04_Out_0_Float, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3);
|
|
float3 _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
Unity_Lerp_float3(_NormalStrength_366affc5c8b42482a633d201ef52b9d6_Out_2_Vector3, _NormalStrength_61e15bbaec29ca8098158de814ef56cb_Out_2_Vector3, (_SampleTexture2D_ac5550b56f005784b219743fdaf08340_A_7_Float.xxx), _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3);
|
|
surface.BaseColor = (_Lerp_3709d39d028094888d4dc963f9d40358_Out_3_Vector4.xyz);
|
|
surface.Emission = float3(0, 0, 0);
|
|
surface.Alpha = float(1);
|
|
surface.BentNormal = IN.TangentSpaceNormal;
|
|
surface.Smoothness = _Split_645358fc1f0e278fbfc2ccb5594c95e3_B_3_Float;
|
|
surface.Occlusion = _Split_645358fc1f0e278fbfc2ccb5594c95e3_G_2_Float;
|
|
surface.NormalTS = _Lerp_e125e5fa3b55528f9c93b66cf30f25d3_Out_3_Vector3;
|
|
surface.Metallic = _Split_645358fc1f0e278fbfc2ccb5594c95e3_R_1_Float;
|
|
return surface;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Graph Inputs
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#define VFX_SRP_ATTRIBUTES AttributesMesh
|
|
#define VaryingsMeshType VaryingsMeshToPS
|
|
#define VFX_SRP_VARYINGS VaryingsMeshType
|
|
#define VFX_SRP_SURFACE_INPUTS FragInputs
|
|
#endif
|
|
SurfaceDescriptionInputs FragInputsToSurfaceDescriptionInputs(FragInputs input, float3 viewWS)
|
|
{
|
|
SurfaceDescriptionInputs output;
|
|
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
|
|
|
|
#if defined(SHADER_STAGE_RAY_TRACING)
|
|
#else
|
|
#endif
|
|
output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
|
|
|
|
#if UNITY_UV_STARTS_AT_TOP
|
|
#else
|
|
#endif
|
|
|
|
|
|
output.uv0 = input.texCoord0;
|
|
output.uv3 = input.texCoord3;
|
|
|
|
// splice point to copy frag inputs custom interpolator pack into the SDI
|
|
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorCopyToSDI' */
|
|
|
|
return output;
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Build Surface Data (Specific Material)
|
|
|
|
void ApplyDecalToSurfaceDataNoNormal(DecalSurfaceData decalSurfaceData, inout SurfaceData surfaceData);
|
|
|
|
void ApplyDecalAndGetNormal(FragInputs fragInputs, PositionInputs posInput, SurfaceDescription surfaceDescription,
|
|
inout SurfaceData surfaceData)
|
|
{
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
#ifdef DECAL_NORMAL_BLENDING
|
|
// SG nodes don't ouptut surface gradients, so if decals require surf grad blending, we have to convert
|
|
// the normal to gradient before applying the decal. We then have to resolve the gradient back to world space
|
|
float3 normalTS;
|
|
|
|
normalTS = SurfaceGradientFromTangentSpaceNormalAndFromTBN(surfaceDescription.NormalTS,
|
|
fragInputs.tangentToWorld[0], fragInputs.tangentToWorld[1]);
|
|
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, fragInputs.tangentToWorld[2], normalTS);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
|
|
GetNormalWS_SG(fragInputs, normalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
#else
|
|
// normal delivered to master node
|
|
GetNormalWS(fragInputs, surfaceDescription.NormalTS, surfaceData.normalWS, doubleSidedConstants);
|
|
|
|
#if HAVE_DECALS
|
|
if (_EnableDecals)
|
|
{
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Both uses and modifies 'surfaceData.normalWS'.
|
|
DecalSurfaceData decalSurfaceData = GetDecalSurfaceData(posInput, fragInputs, alpha);
|
|
ApplyDecalToSurfaceNormal(decalSurfaceData, surfaceData.normalWS.xyz);
|
|
ApplyDecalToSurfaceDataNoNormal(decalSurfaceData, surfaceData);
|
|
}
|
|
#endif
|
|
#endif
|
|
}
|
|
void BuildSurfaceData(FragInputs fragInputs, inout SurfaceDescription surfaceDescription, float3 V, PositionInputs posInput, out SurfaceData surfaceData, out float3 bentNormalWS)
|
|
{
|
|
ZERO_INITIALIZE(SurfaceData, surfaceData);
|
|
|
|
// specularOcclusion need to be init ahead of decal to quiet the compiler that modify the SurfaceData struct
|
|
// however specularOcclusion can come from the graph, so need to be init here so it can be override.
|
|
surfaceData.specularOcclusion = 1.0;
|
|
surfaceData.thickness = 0.0;
|
|
|
|
surfaceData.baseColor = surfaceDescription.BaseColor;
|
|
surfaceData.perceptualSmoothness = surfaceDescription.Smoothness;
|
|
surfaceData.ambientOcclusion = surfaceDescription.Occlusion;
|
|
surfaceData.metallic = surfaceDescription.Metallic;
|
|
|
|
#if defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE) || defined(_REFRACTION_THIN)
|
|
if (_EnableSSRefraction)
|
|
{
|
|
|
|
surfaceData.transmittanceMask = (1.0 - surfaceDescription.Alpha);
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
else
|
|
{
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
surfaceDescription.Alpha = 1.0;
|
|
}
|
|
#else
|
|
surfaceData.ior = 1.0;
|
|
surfaceData.transmittanceColor = float3(1.0, 1.0, 1.0);
|
|
surfaceData.atDistance = 1.0;
|
|
surfaceData.transmittanceMask = 0.0;
|
|
#endif
|
|
|
|
// These static material feature allow compile time optimization
|
|
surfaceData.materialFeatures = MATERIALFEATUREFLAGS_LIT_STANDARD;
|
|
#ifdef _MATERIAL_FEATURE_SUBSURFACE_SCATTERING
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SUBSURFACE_SCATTERING;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_COLORED_TRANSMISSION
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_TRANSMISSION;
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_COLORED_TRANSMISSION;
|
|
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_ANISOTROPY
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_ANISOTROPY;
|
|
|
|
// Initialize the normal to something non-zero to avoid a div-zero warning for anisotropy.
|
|
surfaceData.normalWS = float3(0, 1, 0);
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_IRIDESCENCE
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_IRIDESCENCE;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_SPECULAR_COLOR
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_SPECULAR_COLOR;
|
|
#endif
|
|
|
|
#ifdef _MATERIAL_FEATURE_CLEAR_COAT
|
|
surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_CLEAR_COAT;
|
|
#endif
|
|
|
|
#if defined (_MATERIAL_FEATURE_SPECULAR_COLOR) && defined (_ENERGY_CONSERVING_SPECULAR)
|
|
// Require to have setup baseColor
|
|
// Reproduce the energy conservation done in legacy Unity. Not ideal but better for compatibility and users can unchek it
|
|
surfaceData.baseColor *= (1.0 - Max3(surfaceData.specularColor.r, surfaceData.specularColor.g, surfaceData.specularColor.b));
|
|
#endif
|
|
|
|
float3 doubleSidedConstants = GetDoubleSidedConstants();
|
|
|
|
ApplyDecalAndGetNormal(fragInputs, posInput, surfaceDescription, surfaceData);
|
|
|
|
surfaceData.geomNormalWS = fragInputs.tangentToWorld[2];
|
|
|
|
surfaceData.tangentWS = normalize(fragInputs.tangentToWorld[0].xyz); // The tangent is not normalize in tangentToWorld for mikkt. TODO: Check if it expected that we normalize with Morten. Tag: SURFACE_GRADIENT
|
|
|
|
|
|
bentNormalWS = surfaceData.normalWS;
|
|
|
|
surfaceData.tangentWS = Orthonormalize(surfaceData.tangentWS, surfaceData.normalWS);
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
// Mipmap mode debugging isn't supported with ray tracing as it relies on derivatives
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD0
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG(posInput.positionSS, fragInputs.texCoord0);
|
|
#else
|
|
surfaceData.baseColor = GET_TEXTURE_STREAMING_DEBUG_NO_UV(posInput.positionSS);
|
|
#endif
|
|
surfaceData.metallic = 0;
|
|
}
|
|
#endif
|
|
|
|
// We need to call ApplyDebugToSurfaceData after filling the surfaceData and before filling builtinData
|
|
// as it can modify attribute use for static lighting
|
|
ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData);
|
|
#endif
|
|
|
|
// By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion.
|
|
// If user provide bent normal then we process a better term
|
|
#if defined(_SPECULAR_OCCLUSION_CUSTOM)
|
|
// Just use the value passed through via the slot (not active otherwise)
|
|
#elif defined(_SPECULAR_OCCLUSION_FROM_AO_BENT_NORMAL)
|
|
// If we have bent normal and ambient occlusion, process a specular occlusion
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromBentAO(V, bentNormalWS, surfaceData.normalWS, surfaceData.ambientOcclusion, PerceptualSmoothnessToPerceptualRoughness(surfaceData.perceptualSmoothness));
|
|
#elif defined(_AMBIENT_OCCLUSION) && defined(_SPECULAR_OCCLUSION_FROM_AO)
|
|
surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness));
|
|
#endif
|
|
|
|
#if defined(_ENABLE_GEOMETRIC_SPECULAR_AA) && !defined(SHADER_STAGE_RAY_TRACING)
|
|
surfaceData.perceptualSmoothness = GeometricNormalFiltering(surfaceData.perceptualSmoothness, fragInputs.tangentToWorld[2], surfaceDescription.SpecularAAScreenSpaceVariance, surfaceDescription.SpecularAAThreshold);
|
|
#endif
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Get Surface And BuiltinData
|
|
|
|
void GetSurfaceAndBuiltinData(FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData RAY_TRACING_OPTIONAL_PARAMETERS)
|
|
{
|
|
// Don't dither if displaced tessellation (we're fading out the displacement instead to match the next LOD)
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && !defined(_TESSELLATION_DISPLACEMENT)
|
|
#ifdef LOD_FADE_CROSSFADE // enable dithering LOD transition if user select CrossFade transition in LOD group
|
|
LODDitheringTransition(ComputeFadeMaskSeed(V, posInput.positionSS), unity_LODFade.x);
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
#ifdef _DOUBLESIDED_ON
|
|
float3 doubleSidedConstants = _DoubleSidedConstants.xyz;
|
|
#else
|
|
float3 doubleSidedConstants = float3(1.0, 1.0, 1.0);
|
|
#endif
|
|
|
|
ApplyDoubleSidedFlipOrMirror(fragInputs, doubleSidedConstants); // Apply double sided flip on the vertex normal
|
|
#endif // SHADER_UNLIT
|
|
|
|
SurfaceDescriptionInputs surfaceDescriptionInputs = FragInputsToSurfaceDescriptionInputs(fragInputs, V);
|
|
|
|
#if defined(HAVE_VFX_MODIFICATION)
|
|
GraphProperties properties;
|
|
ZERO_INITIALIZE(GraphProperties, properties);
|
|
|
|
GetElementPixelProperties(fragInputs, properties);
|
|
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs, properties);
|
|
#else
|
|
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs);
|
|
#endif
|
|
|
|
#ifdef DEBUG_DISPLAY
|
|
if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
|
|
{
|
|
surfaceDescription.Alpha = 1.0f;
|
|
}
|
|
#endif
|
|
|
|
// Perform alpha test very early to save performance (a killed pixel will not sample textures)
|
|
// TODO: split graph evaluation to grab just alpha dependencies first? tricky..
|
|
#ifdef _ALPHATEST_ON
|
|
float alphaCutoff = surfaceDescription.AlphaClipThreshold;
|
|
#if SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_PREPASS
|
|
// The TransparentDepthPrepass is also used with SSR transparent.
|
|
// If an artists enable transaprent SSR but not the TransparentDepthPrepass itself, then we use AlphaClipThreshold
|
|
// otherwise if TransparentDepthPrepass is enabled we use AlphaClipThresholdDepthPrepass
|
|
#elif SHADERPASS == SHADERPASS_TRANSPARENT_DEPTH_POSTPASS
|
|
// DepthPostpass always use its own alpha threshold
|
|
alphaCutoff = surfaceDescription.AlphaClipThresholdDepthPostpass;
|
|
#elif (SHADERPASS == SHADERPASS_SHADOWS) || (SHADERPASS == SHADERPASS_RAYTRACING_VISIBILITY)
|
|
// If use shadow threshold isn't enable we don't allow any test
|
|
#endif
|
|
|
|
GENERIC_ALPHA_TEST(surfaceDescription.Alpha, alphaCutoff);
|
|
#endif
|
|
|
|
#if !defined(SHADER_STAGE_RAY_TRACING) && _DEPTHOFFSET_ON
|
|
ApplyDepthOffsetPositionInput(V, surfaceDescription.DepthOffset, GetViewForwardDir(), GetWorldToHClipMatrix(), posInput);
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
float3 bentNormalWS;
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData, bentNormalWS);
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD1
|
|
float4 lightmapTexCoord1 = fragInputs.texCoord1;
|
|
#else
|
|
float4 lightmapTexCoord1 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
#ifdef FRAG_INPUTS_USE_TEXCOORD2
|
|
float4 lightmapTexCoord2 = fragInputs.texCoord2;
|
|
#else
|
|
float4 lightmapTexCoord2 = float4(0,0,0,0);
|
|
#endif
|
|
|
|
float alpha = 1.0;
|
|
alpha = surfaceDescription.Alpha;
|
|
|
|
// Builtin Data
|
|
// For back lighting we use the oposite vertex normal
|
|
InitBuiltinData(posInput, alpha, bentNormalWS, -fragInputs.tangentToWorld[2], lightmapTexCoord1, lightmapTexCoord2, builtinData);
|
|
|
|
#else
|
|
BuildSurfaceData(fragInputs, surfaceDescription, V, posInput, surfaceData);
|
|
|
|
ZERO_BUILTIN_INITIALIZE(builtinData); // No call to InitBuiltinData as we don't have any lighting
|
|
builtinData.opacity = surfaceDescription.Alpha;
|
|
|
|
#if defined(DEBUG_DISPLAY)
|
|
// Light Layers are currently not used for the Unlit shader (because it is not lit)
|
|
// But Unlit objects do cast shadows according to their rendering layer mask, which is what we want to
|
|
// display in the light layers visualization mode, therefore we need the renderingLayers
|
|
builtinData.renderingLayers = GetMeshRenderingLayerMask();
|
|
#endif
|
|
|
|
#endif // SHADER_UNLIT
|
|
|
|
#ifdef _ALPHATEST_ON
|
|
// Used for sharpening by alpha to mask - Alpha to covertage is only used with depth only and forward pass (no shadow pass, no transparent pass)
|
|
builtinData.alphaClipTreshold = alphaCutoff;
|
|
#endif
|
|
|
|
// override sampleBakedGI - not used by Unlit
|
|
// When overriding GI, we need to force the isLightmap flag to make sure we don't add APV (sampled in the lightloop) on top of the overridden value (set at GBuffer stage)
|
|
|
|
builtinData.emissiveColor = surfaceDescription.Emission;
|
|
|
|
// Note this will not fully work on transparent surfaces (can check with _SURFACE_TYPE_TRANSPARENT define)
|
|
// We will always overwrite vt feeback with the nearest. So behind transparent surfaces vt will not be resolved
|
|
// This is a limitation of the current MRT approach.
|
|
#ifdef UNITY_VIRTUAL_TEXTURING
|
|
#endif
|
|
|
|
#if _DEPTHOFFSET_ON
|
|
builtinData.depthOffset = surfaceDescription.DepthOffset;
|
|
#endif
|
|
|
|
// TODO: We should generate distortion / distortionBlur for non distortion pass
|
|
#if (SHADERPASS == SHADERPASS_DISTORTION)
|
|
builtinData.distortion = surfaceDescription.Distortion;
|
|
builtinData.distortionBlur = surfaceDescription.DistortionBlur;
|
|
#endif
|
|
|
|
#ifndef SHADER_UNLIT
|
|
// PostInitBuiltinData call ApplyDebugToBuiltinData
|
|
PostInitBuiltinData(V, posInput, surfaceData, builtinData);
|
|
#else
|
|
ApplyDebugToBuiltinData(builtinData);
|
|
#endif
|
|
|
|
RAY_TRACING_OPTIONAL_ALPHA_TEST_PASS
|
|
}
|
|
|
|
// --------------------------------------------------
|
|
// Main
|
|
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassPathTracing.hlsl"
|
|
|
|
// --------------------------------------------------
|
|
// Visual Effect Vertex Invocations
|
|
|
|
#ifdef HAVE_VFX_MODIFICATION
|
|
#if !defined(SHADER_STAGE_RAY_TRACING)
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/VisualEffectVertex.hlsl"
|
|
#else
|
|
#endif
|
|
#endif
|
|
|
|
ENDHLSL
|
|
}
|
|
}
|
|
CustomEditor "UnityEditor.ShaderGraph.GenericShaderGraphMaterialGUI"
|
|
CustomEditorForRenderPipeline "Rendering.HighDefinition.LitShaderGraphGUI" "UnityEngine.Rendering.HighDefinition.HDRenderPipelineAsset"
|
|
FallBack "Hidden/Shader Graph/FallbackError"
|
|
} |