106 lines
3.7 KiB
GLSL
106 lines
3.7 KiB
GLSL
Shader "SkyMaster/FullVolumeCloudsShadowSM" {
|
|
Properties {
|
|
_SunColor ("_SunColor", Vector) = (0.95,0.95,0.95,0.8)
|
|
_ShadowColor ("_ShadowColor", Vector) = (0.05,0.05,0.1,0.3)
|
|
_ColorDiff ("_ColorDiff", Float) = 0.5
|
|
_CloudMap ("_CloudMap", 2D) = "white" {}
|
|
_CloudMap1 ("_CloudMap1", 2D) = "white" {}
|
|
_Density ("_Density", Float) = -0.4
|
|
_Coverage ("_Coverage", Float) = 4250
|
|
_Transparency ("_Transparency", Float) = 1
|
|
_Velocity1 ("_Velocity1", Vector) = (1,23,0,1)
|
|
_Velocity2 ("_Velocity2", Vector) = (1,22,0,1)
|
|
_LightingControl ("_LightingControl", Vector) = (1,1,-1,0)
|
|
_HorizonFactor ("_HorizonFactor", Range(0, 10)) = 2
|
|
_EdgeFactors ("_EdgeFactor2", Vector) = (0,0.52,-1,0)
|
|
_Cutoff ("Alpha cutoff", Range(0, 1)) = 0.5
|
|
_CutHeight ("_CutHeight", Float) = 240
|
|
_CutHeight2 ("_CutHeight2", Float) = 1285
|
|
Thickness ("Thickness", Float) = 1
|
|
_CoverageOffset ("_Coverage Offset", Float) = -0.15
|
|
_ColorDiffOffset ("_ColorDiff Offset", Float) = -0.1
|
|
_TranspOffset ("_Transparency Offset", Float) = 0
|
|
_Control ("Control Color", Vector) = (1,1,1,1)
|
|
_Color ("Color", Vector) = (1,1,1,1)
|
|
_FogColor ("Fog Color", Vector) = (1,1,1,1)
|
|
_FogFactor ("Fog factor", Float) = 1
|
|
_FogUnity ("Fog on/off(1,0)", Float) = 0
|
|
_PaintMap ("_CloudMap", 2D) = "white" {}
|
|
_SampleCount0 ("Sample Count (min)", Float) = 30
|
|
_SampleCount1 ("Sample Count (max)", Float) = 90
|
|
_SampleCountL ("Sample Count (light)", Float) = 16
|
|
[Space] _NoiseTex1 ("Noise Volume", 3D) = "" {}
|
|
_NoiseTex2 ("Noise Volume", 3D) = "" {}
|
|
_NoiseFreq1 ("Frequency 1", Float) = 3.1
|
|
_NoiseFreq2 ("Frequency 2", Float) = 35.1
|
|
_NoiseAmp1 ("Amplitude 1", Float) = 5
|
|
_NoiseAmp2 ("Amplitude 2", Float) = 1
|
|
_NoiseBias ("Bias", Float) = -0.2
|
|
[Space] _Scroll1 ("Scroll Speed 1", Vector) = (0.01,0.08,0.06,0)
|
|
_Scroll2 ("Scroll Speed 2", Vector) = (0.01,0.05,0.03,0)
|
|
[Space] _Altitude0 ("Altitude (bottom)", Float) = 1500
|
|
_Altitude1 ("Altitude (top)", Float) = 3500
|
|
_FarDist ("Far Distance", Float) = 30000
|
|
_BackShade ("Back shade of cloud top", Float) = 1
|
|
_UndersideCurveFactor ("Underside Curve Factor", Float) = 0
|
|
_InteractTexture ("_Interact Texture", 2D) = "white" {}
|
|
_InteractTexturePos ("Interact Texture Pos", Vector) = (1,1,0,0)
|
|
_InteractTextureAtr ("Interact Texture Attributes - 2multi 2offset", Vector) = (1,1,0,0)
|
|
_InteractTextureOffset ("Interact Texture offsets", Vector) = (0,0,0,0)
|
|
_NearZCutoff ("Away from camera Cutoff", Float) = -2
|
|
_HorizonYAdjust ("Adjust horizon Height", Float) = 0
|
|
_FadeThreshold ("Fade Near", Float) = 0
|
|
_LocalLightPos ("Local Light Pos & Intensity", Vector) = (0,0,0,0)
|
|
_WeatherMap ("_WeatherMap", 2D) = "white" {}
|
|
_WeatherScale ("_WeatherScale", Float) = 0
|
|
_CoverageA ("_CoverageA", Float) = 0
|
|
_WindSpeed ("_WindSpeed", Float) = 0
|
|
_WindDirection ("_WindDirection", Vector) = (0,0,0,0)
|
|
_WindOffset ("_WindOffset", Vector) = (0,0,0,0)
|
|
_CoverageWindOffset ("_CoverageWindOffset", Vector) = (0,0,0,0)
|
|
cameraWSOffset ("cameraWSOffset", Vector) = (0,0,0,0)
|
|
_shadowMode ("Shadow Mode (0,1)", Float) = 1
|
|
}
|
|
//DummyShaderTextExporter
|
|
SubShader{
|
|
Tags { "RenderType"="Opaque" }
|
|
LOD 200
|
|
|
|
Pass
|
|
{
|
|
HLSLPROGRAM
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
|
|
float4x4 unity_ObjectToWorld;
|
|
float4x4 unity_MatrixVP;
|
|
|
|
struct Vertex_Stage_Input
|
|
{
|
|
float4 pos : POSITION;
|
|
};
|
|
|
|
struct Vertex_Stage_Output
|
|
{
|
|
float4 pos : SV_POSITION;
|
|
};
|
|
|
|
Vertex_Stage_Output vert(Vertex_Stage_Input input)
|
|
{
|
|
Vertex_Stage_Output output;
|
|
output.pos = mul(unity_MatrixVP, mul(unity_ObjectToWorld, input.pos));
|
|
return output;
|
|
}
|
|
|
|
float4 _Color;
|
|
|
|
float4 frag(Vertex_Stage_Output input) : SV_TARGET
|
|
{
|
|
return _Color; // RGBA
|
|
}
|
|
|
|
ENDHLSL
|
|
}
|
|
}
|
|
Fallback "Transparent/Cutout/VertexLit"
|
|
} |