Build Soundings cruise management simulator
This commit is contained in:
45
Assets/Soundings/Resources/HarborReflection.shader
Normal file
45
Assets/Soundings/Resources/HarborReflection.shader
Normal file
@@ -0,0 +1,45 @@
|
||||
Shader "Soundings/Harbor Reflection"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_Color ("Paint", Color) = (1,1,1,1)
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "Queue"="Background+3" "RenderType"="Transparent" }
|
||||
Pass
|
||||
{
|
||||
Cull Off
|
||||
ZWrite Off
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
fixed4 _Color;
|
||||
struct Output { float4 clip : SV_POSITION; float3 world : TEXCOORD0; };
|
||||
|
||||
Output vert(appdata_base input)
|
||||
{
|
||||
Output output;
|
||||
float4 worldPosition = mul(unity_ObjectToWorld, input.vertex);
|
||||
worldPosition.y = -worldPosition.y * .59;
|
||||
worldPosition.z += sin(worldPosition.x * .53 + worldPosition.y * 2.14 + _Time.y * 1.55) * .27;
|
||||
worldPosition.x += sin(worldPosition.y * .88 - _Time.y) * .29;
|
||||
output.clip = UnityWorldToClipPos(worldPosition.xyz);
|
||||
output.world = worldPosition.xyz;
|
||||
return output;
|
||||
}
|
||||
|
||||
fixed4 frag(Output input) : SV_Target
|
||||
{
|
||||
clip(-input.world.y);
|
||||
float breakup = .48 + .38 * sin(input.world.y * 14 + input.world.x * .62 - _Time.y * 1.02);
|
||||
float alpha = saturate(1 + input.world.y / 7.5) * breakup * .34;
|
||||
return fixed4(_Color.rgb * float3(.51,.60,.64), alpha);
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user