Files
BABA_YAGA/Assets/Third Parties/Opsive/UltimateCharacterController/Demo/Shaders/TerrainSurface.shader
Scove 3e39117acc Consolidate third-party plugins into Assets/Plugins
Move and consolidate many third-party plugin files and metadata from various locations (notably Assets/Third Parties/Plugins 1 and scattered Opsive/Photon folders) into a unified Assets/Plugins directory. Includes DOTween, PrimeTween, Native/BackroomsNoise, Sirenix/Odin Inspector, and Opsive UltimateCharacterController/shared libs, plus updates to several .meta files and removal of obsolete installer/legacy files. This standardizes plugin layout and cleans up duplicate/obsolete assets.
2026-06-16 18:41:44 +07:00

68 lines
1.6 KiB
Plaintext

Shader "Ultimate Character Controller/Demo/TerrainSurface"
{
Properties
{
_Mask ("Mask", 2D) = "black" {}
_MainTex ("Albedo 0", 2D) = "white" {}
_MainTex2 ("Albedo 1", 2D) = "white" {}
_NormalMap ("NormalMap 0", 2D) = "bump" {}
_NormalMap2 ("NormalMap 1", 2D) = "bump" {}
[LM_Specular] [LM_Glossiness] _SpecGlossMap("Specular 0", 2D) = "white" {}
[LM_Specular] [LM_Glossiness] _SpecGlossMap2("Specular 1", 2D) = "white" {}
}
// SM3+
SubShader
{
Tags { "RenderType" = "Opaque" }
CGPROGRAM
#pragma surface surf StandardSpecular fullforwardshadows addshadow
// until texCubeLOD is solved
#pragma exclude_renderers gles
#pragma target 3.0
struct Input
{
float4 color;
float2 uv_MainTex;
float2 uv_MainTex2;
float2 uv_Mask;
};
sampler2D _MainTex;
sampler2D _MainTex2;
sampler2D _NormalMap;
sampler2D _NormalMap2;
sampler2D _SpecGlossMap;
sampler2D _SpecGlossMap2;
sampler2D _Mask;
void surf (Input IN, inout SurfaceOutputStandardSpecular o)
{
fixed blend = tex2D(_Mask, IN.uv_Mask).a;
fixed4 albedo1 = tex2D(_MainTex, IN.uv_MainTex);
fixed4 spec1 = tex2D(_SpecGlossMap, IN.uv_MainTex);
fixed3 normal1 = UnpackNormal (tex2D (_NormalMap, IN.uv_MainTex));
fixed4 albedo2 = tex2D(_MainTex2, IN.uv_MainTex2);
fixed4 spec2 = tex2D(_SpecGlossMap2, IN.uv_MainTex2);
fixed3 normal2 = UnpackNormal (tex2D (_NormalMap2, IN.uv_MainTex2));
fixed4 specGloss = lerp (spec1, spec2, blend);
o.Albedo = lerp (albedo1, albedo2, blend);
o.Specular = specGloss.rgb;
o.Smoothness = specGloss.a;
o.Normal = lerp (normal1, normal2, blend);
}
ENDCG
}
}