88 lines
2.9 KiB
GLSL
88 lines
2.9 KiB
GLSL
Shader "Mtree/Leafs" {
|
|
Properties {
|
|
[Header(Albedo Texture)] _Color ("Color", Vector) = (1,1,1,1)
|
|
_MainTex ("Albedo", 2D) = "white" {}
|
|
[Enum(Off,0,Front,1,Back,2)] _CullMode ("Cull Mode", Float) = 0
|
|
[Enum(Flip,0,Mirror,1,None,2)] _DoubleSidedNormalMode ("Double Sided Normal Mode", Float) = 0
|
|
_Cutoff ("Cutoff", Range(0, 1)) = 0.5
|
|
[Header(Normal Texture)] _BumpMap ("Normal Map", 2D) = "bump" {}
|
|
_BumpScale ("Normal Strength", Float) = 1
|
|
[Enum(On,0,Off,1)] [Header(Color Settings)] _ColorShifting ("Color Shifting", Float) = 1
|
|
_Hue ("Hue", Range(-0.5, 0.5)) = -0.5
|
|
_Value ("Value", Range(0, 3)) = 1
|
|
_Saturation ("Saturation", Range(0, 2)) = 1
|
|
_ColorVariation ("Color Variation", Range(0, 0.3)) = 0.15
|
|
[Header(Other Settings)] _OcclusionStrength ("AO strength", Range(0, 1)) = 0.6
|
|
_Metallic ("Metallic", Range(0, 1)) = 0
|
|
_Glossiness ("Smoothness", Range(0, 1)) = 0
|
|
[Header(Translucency)] _Translucency ("Strength", Range(0, 50)) = 1
|
|
_TransNormalDistortion ("Normal Distortion", Range(0, 1)) = 0.1
|
|
_TransScattering ("Scaterring Falloff", Range(1, 50)) = 2
|
|
_TransDirect ("Direct", Range(0, 1)) = 1
|
|
_TransAmbient ("Ambient", Range(0, 1)) = 0.2
|
|
_TransShadow ("Shadow", Range(0, 1)) = 0.9
|
|
[HDR] _TranslucencyTint ("Translucency Tint", Vector) = (0.2364577,0.3301887,0,1)
|
|
[HDR] _TransmissionTint ("Transmission Tint", Vector) = (0.2352941,0.3294118,0,1)
|
|
[Header(Wind)] _GlobalWindInfluence ("Global Wind Influence", Range(0, 1)) = 1
|
|
_GlobalTurbulenceInfluence ("Global Turbulence Influence", Range(0, 1)) = 1
|
|
[Enum(Leaves,0,Palm,1,Grass,2,Off,3)] _WindModeLeaves ("Wind Mode Leaves", Float) = 0
|
|
[HideInInspector] _texcoord4 ("", 2D) = "white" {}
|
|
[HideInInspector] _texcoord ("", 2D) = "white" {}
|
|
[HideInInspector] __dirty ("", Float) = 1
|
|
[Header(Forward Rendering Options)] [ToggleOff] _SpecularHighlights ("Specular Highlights", Float) = 1
|
|
[ToggleOff] _GlossyReflections ("Reflections", Float) = 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;
|
|
float4 _Color;
|
|
|
|
struct Fragment_Stage_Input
|
|
{
|
|
float2 uv : TEXCOORD0;
|
|
};
|
|
|
|
float4 frag(Fragment_Stage_Input input) : SV_TARGET
|
|
{
|
|
return _MainTex.Sample(sampler_MainTex, input.uv.xy) * _Color;
|
|
}
|
|
|
|
ENDHLSL
|
|
}
|
|
}
|
|
Fallback "Diffuse"
|
|
} |