#ifndef INPUT_LUXLWRP_BASE_INCLUDED #define INPUT_LUXLWRP_BASE_INCLUDED #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" // defines a bunch of helper functions (like lerpwhiteto) #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonMaterial.hlsl" // defines SurfaceData, textures and the functions Alpha, SampleAlbedoAlpha, SampleNormal, SampleEmission #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceInput.hlsl" // defines e.g. "DECLARE_LIGHTMAP_OR_SH" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" #include "../Includes/Lux URP Skin Lighting.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/UnityInstancing.hlsl" // Material Inputs CBUFFER_START(UnityPerMaterial) half4 _BaseColor; half4 _SpecularColor; float4 _BaseMap_ST; half _Smoothness; half _BumpScale; half _Bias; half _SkinShadowBias; half _SkinShadowSamplingBias; half _OcclusionStrength; half4 _SubsurfaceColor; half _SampleCurvature; half _Curvature; float2 _DistanceFade; half _TranslucencyPower; half _TranslucencyStrength; half _ShadowStrength; half _MaskByShadowStrength; half _Distortion; half _AmbientReflectionStrength; //#if defined(_RIMLIGHTING) half4 _RimColor; half _RimPower; half _RimMinPower; half _RimFrequency; half _RimPerPositionFrequency; //#endif // Needed by URP 10.1. and depthnormal half _Cutoff; half _Surface; half _Backscatter; half _VertexNormal; // Custom Inputs // Emission float3 _EmissionColor; // Mask float4 _MakeUpMask1_RGB_ST; float4 _MakeUpMask2_RGB_ST; float4 _Mask1_Rchannel_ColorAmountA; float4 _Mask1_Gchannel_ColorAmountA; float4 _Mask1_Bchannel_ColorAmountA; float4 _Mask1_Achannel_ColorAmountA; float4 _Mask2_Rchannel_ColorAmountA; float4 _Mask2_Gchannel_ColorAmountA; float4 _Mask2_Bchannel_ColorAmountA; float4 _Mask1_Rchannel_TextureAmountA_ST; float4 _Mask1_Gchannel_TextureAmountA_ST; float4 _Mask1_Bchannel_TextureAmountA_ST; float4 _Mask1_Achannel_TextureAmountA_ST; float4 _Mask2_Rchannel_TextureAmountA_ST; float4 _Mask2_Gchannel_TextureAmountA_ST; float4 _Mask2_Bchannel_TextureAmountA_ST; float4 _EmissionMap_ST; //catoon float _ToonThesHold; float _ToonHardness; float4 _SpecColor; float _SpecSize; float4 _RimLightDir; float4 _RimLightColor; CBUFFER_END // Additional textures TEXTURE2D(_SSSAOMap); SAMPLER(sampler_SSSAOMap); // Custom Textures // Emission (defined in SurfaceInput.hlsl) //TEXTURE2D(_EmissionMap); //SAMPLER(sampler_EmissionMap); // cloth mask TEXTURE2D(_ClothMask1); SAMPLER(sampler_ClothMask1); TEXTURE2D(_ClothMask2); //SAMPLER(sampler_ClothMask2); TEXTURE2D(_ClothMask3); //SAMPLER(sampler_ClothMask3); TEXTURE2D(_MakeUpMask1_RGB); SAMPLER(sampler_MakeUpMask1_RGB); TEXTURE2D(_MakeUpMask2_RGB); SAMPLER(sampler_MakeUpMask2_RGB); TEXTURE2D(_Mask1_Rchannel_TextureAmountA); SAMPLER(sampler_Mask1_Rchannel_TextureAmountA); TEXTURE2D(_Mask1_Gchannel_TextureAmountA); SAMPLER(sampler_Mask1_Gchannel_TextureAmountA); TEXTURE2D(_Mask1_Bchannel_TextureAmountA); SAMPLER(sampler_Mask1_Bchannel_TextureAmountA); TEXTURE2D(_Mask1_Achannel_TextureAmountA); SAMPLER(sampler_Mask1_Achannel_TextureAmountA); TEXTURE2D(_Mask2_Rchannel_TextureAmountA); SAMPLER(sampler_Mask2_Rchannel_TextureAmountA); TEXTURE2D(_Mask2_Gchannel_TextureAmountA); SAMPLER(sampler_Mask2_Gchannel_TextureAmountA); TEXTURE2D(_Mask2_Bchannel_TextureAmountA); SAMPLER(sampler_Mask2_Bchannel_TextureAmountA); // Global Inputs // Structs struct VertexInput { float3 positionOS : POSITION; float3 normalOS : NORMAL; float4 tangentOS : TANGENT; float2 texcoord : TEXCOORD0; float2 lightmapUV : TEXCOORD1; half4 color : COLOR; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float4 positionCS : SV_POSITION; float2 uv : TEXCOORD0; half fade : TEXCOORD9; #if !defined(UNITY_PASS_SHADOWCASTER) && !defined(DEPTHONLYPASS) DECLARE_LIGHTMAP_OR_SH(lightmapUV, vertexSH, 1); #if defined(REQUIRES_WORLD_SPACE_POS_INTERPOLATOR) float3 positionWS : TEXCOORD2; #endif float3 normalWS : TEXCOORD3; float3 viewDirWS : TEXCOORD4; #ifdef _NORMALMAP float4 tangentWS : TEXCOORD5; #endif half4 fogFactorAndVertexLight : TEXCOORD6; #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) float4 shadowCoord : TEXCOORD7; #endif #endif UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; struct SurfaceDescription { half3 albedo; half alpha; half3 normalTS; half3 diffuseNormalTS; half3 emission; half metallic; half3 specular; half smoothness; half occlusion; half translucency; half skinMask; half curvature; }; #endif