Files
UltimateFishing/Assets/Shader/CTI_LOD Billboard.shader
2026-02-21 16:45:37 +08:00

69 lines
1.9 KiB
GLSL

Shader "CTI/LOD Billboard" {
Properties {
[Space(5)] _HueVariation ("Color Variation (RGB) Strength (A)", Vector) = (0.9,0.5,0,0.1)
[Space(5)] [NoScaleOffset] _MainTex ("Albedo (RGB) Alpha/Occlusion (A)", 2D) = "white" {}
_Cutoff ("Alpha Cutoff", Range(0, 0.45)) = 0.3
_AlphaLeak ("Alpha Leak Suppression", Range(0.5, 1)) = 0.6
[Space(5)] [NoScaleOffset] _BumpTex ("Normal (AG) Translucency(R) Smoothness(B)", 2D) = "bump" {}
_SpecColor ("Specular", Vector) = (0.2,0.2,0.2,1)
[Space(5)] _TranslucencyStrength ("Translucency Strength", Range(0, 1)) = 0.5
_ViewDependency ("View Dependency", Range(0, 1)) = 0.8
_TreeHeightLimit ("Tree Height Limit", Range(0, 1)) = 1
[Header(Wind)] [Space(3)] [Toggle(_EMISSION)] _UseWind ("Enable Wind", Float) = 0
[Space(5)] _WindStrength ("Wind Strength", Float) = 1
[HideInInspector] _TreeScale ("Tree Scale", Range(0, 50)) = 1
[HideInInspector] _TreeWidth ("Tree Width Factor", Range(0, 1)) = 1
}
//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 "Transparent/Cutout/VertexLit"
}