85 lines
2.6 KiB
Plaintext
85 lines
2.6 KiB
Plaintext
Shader "Relief Pack - Bonus Shaders/Water/ FlowMap" {
|
|
Properties {
|
|
_Color ("Color", Vector) = (0.5,0.5,0.5,1)
|
|
_MainTex ("Albedo (A - Smoothness)", 2D) = "white" {}
|
|
_GlossMin ("Gloss Min", Range(0, 1)) = 0
|
|
_GlossMax ("Gloss Max", Range(0, 1)) = 1
|
|
_Metalness ("Metalness", Range(0, 1)) = 0
|
|
_BumpMap ("Normal Map", 2D) = "bump" {}
|
|
_HeightMap ("Heightmap", 2D) = "black" {}
|
|
TERRAIN_ExtrudeHeight ("Extrude Height", Range(0.001, 0.08)) = 0.02
|
|
_FlowMap ("FlowMap (RG)", 2D) = "grey" {}
|
|
TERRAIN_FlowingMap ("Flowingmap (water bumps)", 2D) = "gray" {}
|
|
TERRAIN_RippleMap ("Ripplemap (droplets)", 2D) = "gray" {}
|
|
TERRAIN_RippleScale ("Ripple scale", Float) = 1
|
|
TERRAIN_LayerWetStrength ("Layer wetness", Range(0, 1)) = 1
|
|
TERRAIN_WaterLevelSlopeDamp ("Water level slope damp", Range(0.25, 8)) = 4
|
|
TERRAIN_WaterLevel ("Water Level", Range(0, 2)) = 0.5
|
|
TERRAIN_WaterColor ("Water Color (A - opacity)", Vector) = (1,1,1,0)
|
|
TERRAIN_WaterGloss ("Water Gloss", Range(0, 1)) = 0.95
|
|
TERRAIN_WaterEdge ("Water Edge", Range(1, 4)) = 1
|
|
TERRAIN_DropletsSpeed ("Droplets speed", Float) = 15
|
|
TERRAIN_RainIntensity ("Rain intensity", Range(0, 1)) = 1
|
|
TERRAIN_WetDropletsStrength ("Rain on wet", Range(0, 1)) = 0
|
|
TERRAIN_Refraction ("Refraction", Range(0, 0.04)) = 0.02
|
|
TERRAIN_WetRefraction ("Wet refraction", Range(0, 1)) = 1
|
|
TERRAIN_WetGloss ("Wet Gloss", Range(0, 1)) = 0.1
|
|
TERRAIN_Flow ("Flow", Range(0, 1)) = 0.1
|
|
TERRAIN_FlowScale ("Flow Scale", Float) = 1
|
|
TERRAIN_FlowSpeed ("Flow Speed", Range(0, 3)) = 0.25
|
|
TERRAIN_FlowSpeedMap ("Flow Speed (map)", Range(0, 0.2)) = 0.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"
|
|
} |