Make voyages active with dockside orders, crew calls, and ship PA
This commit is contained in:
40
Assets/Soundings/Resources/PassengerSurface.shader
Normal file
40
Assets/Soundings/Resources/PassengerSurface.shader
Normal file
@@ -0,0 +1,40 @@
|
||||
Shader "Soundings/Passenger Surface"
|
||||
{
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Opaque" "Queue"="Geometry" }
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct Input { float4 vertex : POSITION; float3 normal : NORMAL; fixed4 tint : COLOR; };
|
||||
struct Output { float4 clip : SV_POSITION; float3 normal : TEXCOORD0; fixed4 tint : COLOR; };
|
||||
|
||||
Output vert(Input input)
|
||||
{
|
||||
Output output;
|
||||
output.clip = UnityObjectToClipPos(input.vertex);
|
||||
output.normal = UnityObjectToWorldNormal(input.normal);
|
||||
output.tint = input.tint;
|
||||
return output;
|
||||
}
|
||||
|
||||
fixed4 frag(Output input) : SV_Target
|
||||
{
|
||||
// A gradual coverage ramp keeps changing service occupancy from cutting people in and out abruptly.
|
||||
float noise = frac(dot(floor(input.clip.xy), float2(.754877, .56984)));
|
||||
clip(input.tint.a - noise - .001);
|
||||
float3 normal = normalize(input.normal);
|
||||
float sun = saturate(dot(normal, normalize(float3(-.69,.40,-.43))));
|
||||
float overhead = saturate(normal.y * .5 + .5);
|
||||
float3 light = lerp(float3(.55,.63,.71), float3(.83,.88,.94), overhead)
|
||||
+ sun * float3(.38,.29,.176);
|
||||
return fixed4(saturate(input.tint.rgb * light), 1);
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user