Files
5.24BuYu/Assets/fishResources/192/urp_linear_character.shader
2026-03-27 15:18:35 +08:00

101 lines
3.8 KiB
GLSL

Shader "BokeGame/URP_Linear_Character" {
Properties {
[Toggle(_USEUNITYINDIRSPECULAR_ON)] _UseUnityIndirSpecular ("是否使用unity内置的cubemap", Float) = 1
[Toggle(_USESSS_ON)] _UseSSS ("是否使用SSS", Float) = 1
_TintColor ("baseColr", Vector) = (1,1,1,1)
_MainTex ("RGB=BaseTex,A=Emission", 2D) = "white" {}
_NormalTex ("法线贴图", 2D) = "bump" {}
_MetalSmoothTex ("R粗糙度,G金属度,B=AO,A=SSS", 2D) = "white" {}
[Header(Rough Metal Control)] _AOIntensity ("AO强度", Range(0, 1)) = 1
_Metalness ("金属度", Range(0, 1)) = 1
_Roughness ("粗糙度", Range(0, 1)) = 1
[Header(Light Control)] _DirLightColor ("平行光颜色", Vector) = (1,1,1,0)
_SpecularColor ("高光颜色", Vector) = (1,1,1,0)
_DirLightExposure ("平行光亮度", Range(0, 10)) = 0.8
_EnvExposure ("环境光强度", Range(0, 10)) = 0.96
_SHExposure ("SH亮度(烘焙lightmap后失效)", Range(0, 10)) = 0.53
_LightMapExposure ("LightMap亮度", Range(0, 10)) = 1
[Header(IndirSpecular)] _IndirCubeMap ("IndirCubeMap", Cube) = "black" {}
_IndirIntensity ("IndirIntensity", Range(0, 1)) = 1
_RotateAngle ("RotateAngle", Float) = 0
_IndirColor ("IndirColor", Vector) = (1,1,1,1)
[Header(SSS Control)] _SkinSSSfresnelMask ("皮肤菲尼尔", Range(0, 1)) = 0.128
_SkinSSSTransmission ("SSS强度", Range(0, 1)) = 0.866
_SkinSSSScatterColor ("SSS颜色", Vector) = (1,0.3161765,0.3161765,0)
[Header(Shadow Control)] _ShadowDarkness ("阴影深浅", Range(0, 1)) = 0
_ShadowCol ("阴影颜色", Vector) = (0,0,0,0)
[HDR] _EmissionCol ("自发光颜色", Vector) = (0.448,0.591,0.662,0)
_EmissionExposure ("自发光亮度", Float) = 1
[Header(Advanced Control (Ask TA About This))] _PunctualLightSpecularExposure ("高光亮度", Range(0, 10)) = 1
_PointLightExposure ("点光亮度", Range(0, 10)) = 1
_CosMin ("暗部曝光", Range(0.01, 0.95)) = 0.01
_envBDRFFactor ("高光色泽度", Range(-1, 1)) = 0.58
_DarkCornerColor ("DarkCornerColor", Vector) = (0,0,0,0)
[Header(Surface)] _SurfaceTex ("SurfaceTex", 2D) = "black" {}
_SurfaceSpeed ("SurfaceSpeed", Range(0, 1)) = 0.5
_SurfaceAlpha ("SurfaceAlpha", Range(0, 1)) = 0.5
_SurfaceBlend ("SurfaceBlend", Range(0, 1)) = 0.5
[Header(Dissolve)] [Toggle(_DISSOLVE_ON)] _DISSOLVE_ON ("_DISSOLVE_ON", Float) = 0
_DissolveTex ("溶解贴图", 2D) = "white" {}
_DissAmount ("_DissAmount", Range(0, 1)) = 0
_DissolveSpread ("溶解扩散值", Range(0.001, 1)) = 0.11
_EdgeColor ("溶解边缘颜色", Vector) = (0.5019608,0.5019608,0.5019608,0)
_EdgeWidth ("溶解边缘宽度", Range(0.001, 2)) = 0.5
_EdgeIntensity ("溶解颜色强度", Float) = 10
[Toggle(_CLIP_HIDE)] _CLIP_HIDE ("开启Clip渐隐", Float) = 0
_AlphaClip ("Clip强度", Range(0, 1)) = 1
[HideInInspector] _OverlayColor ("叠加的颜色(做受击效果的)", Vector) = (0,0,0,0)
}
//DummyShaderTextExporter
SubShader{
Tags { "RenderType"="Opaque" }
LOD 200
Pass
{
HLSLPROGRAM
#pragma vertex vert
#pragma fragment frag
float4x4 unity_ObjectToWorld;
float4x4 unity_MatrixVP;
float4 _MainTex_ST;
struct Vertex_Stage_Input
{
float4 pos : POSITION;
float2 uv : TEXCOORD0;
};
struct Vertex_Stage_Output
{
float2 uv : TEXCOORD0;
float4 pos : SV_POSITION;
};
Vertex_Stage_Output vert(Vertex_Stage_Input input)
{
Vertex_Stage_Output output;
output.uv = (input.uv.xy * _MainTex_ST.xy) + _MainTex_ST.zw;
output.pos = mul(unity_MatrixVP, mul(unity_ObjectToWorld, input.pos));
return output;
}
Texture2D<float4> _MainTex;
SamplerState sampler_MainTex;
struct Fragment_Stage_Input
{
float2 uv : TEXCOORD0;
};
float4 frag(Fragment_Stage_Input input) : SV_TARGET
{
return _MainTex.Sample(sampler_MainTex, input.uv.xy);
}
ENDHLSL
}
}
Fallback "Hidden/Universal Render Pipeline/FallbackError"
}