Make voyages active with dockside orders, crew calls, and ship PA

This commit is contained in:
josh
2026-11-27 23:14:38 -05:00
parent 7951e1c878
commit cc7620c431
71 changed files with 2723 additions and 233 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 KiB

View File

@@ -0,0 +1,132 @@
fileFormatVersion: 2
guid: 908799eddb64409784df90744e666af8
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 512
textureSettings:
serializedVersion: 2
filterMode: 2
aniso: 4
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationMethod: 0
spriteTessellationDetail: -1
spriteGeometrySubdivision: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WebGL
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 11dca20d70e42490c876759d5e3af804
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0acab46c810f26ddfb18d6fbc7d80c28
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
The Soundings shipboard announcements use original scripts synthesized offline with the af_heart voice from Kokoro-82M v1.0 by hexgrad. The Kokoro model is released under Apache 2.0. Only rendered announcement audio is included in Soundings.
Model card and training-data credits
https://huggingface.co/hexgrad/Kokoro-82M
The audio was generated with kokoro-onnx 0.6.0.
https://github.com/thewh1teagle/kokoro-onnx

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 82f15791e2ecd53d38fcce00fc901c68
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 06accf73f0e5dea068a191c6b79e812e
AudioImporter:
externalObjects: {}
serializedVersion: 8
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 290966337ddab1358964477fc7a3202d
AudioImporter:
externalObjects: {}
serializedVersion: 8
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: ea2c7e5d0d8bc1b5da77b0e0a8d791dc
AudioImporter:
externalObjects: {}
serializedVersion: 8
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 53420062d12c46893aa758dc4fbb67bc
AudioImporter:
externalObjects: {}
serializedVersion: 8
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 32f007cea9c4ab25c867e04b222d9dac
AudioImporter:
externalObjects: {}
serializedVersion: 8
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: d45dcb6ac9382e62a9d2991e9cbb5d5e
AudioImporter:
externalObjects: {}
serializedVersion: 8
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -423,3 +423,160 @@
color: #35654d;
-unity-font-style: bold;
}
.port-orders-link {
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-top: 7px;
padding: 6px 7px;
background-color: rgba(115, 95, 57, .09);
border-left-width: 2px;
border-left-color: #ac8b59;
}
.port-orders-link-copy,
.port-orders-header-copy {
flex-grow: 1;
flex-shrink: 1;
min-width: 0;
}
.port-orders-summary {
color: #344845;
font-size: 11px;
white-space: normal;
}
.navigation-chart .port-orders-edit {
min-height: 23px;
margin-left: 5px;
font-size: 11px;
}
.port-orders-stage {
position: absolute;
left: 34px;
right: 382px;
top: 153px;
bottom: 88px;
background-color: #e8dcc0;
border-color: #c2a474;
border-width: 1px;
border-radius: 3px;
}
.port-orders-paper {
padding: 18px 24px 15px;
}
.port-orders-header,
.port-orders-total {
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.port-orders-title {
color: #284a4c;
font-size: 36px;
margin-top: 2px;
}
.port-orders-section {
color: #344845;
font-size: 22px;
margin-top: 12px;
margin-bottom: 2px;
}
.port-orders-note {
color: #655844;
font-size: 12px;
white-space: normal;
}
.port-orders-shortage {
color: #8a4331;
-unity-font-style: bold;
}
.port-orders-food {
flex-direction: row;
flex-wrap: wrap;
align-items: center;
margin-top: 6px;
margin-bottom: 5px;
}
.port-orders-food .chart-ink-button {
margin-right: 5px;
min-height: 28px;
font-size: 12px;
}
.port-orders-input {
width: 78px;
margin: 0 5px 0 0;
color: #243e3a;
}
.port-orders-input .unity-base-field__input,
.port-orders-input .unity-base-text-field__input,
.port-orders-input .unity-integer-field__input {
min-height: 28px;
background-color: #f6e9c9;
border-color: #b89f73;
border-radius: 2px;
color: #243e3a;
font-size: 14px;
-unity-font-style: bold;
-unity-text-align: middle-center;
}
.port-orders-input .unity-text-element { color: #243e3a; }
.navigation-chart .port-program-choice {
min-height: 45px;
flex-direction: row;
align-items: center;
background-color: #efe1c4;
border-color: #bda883;
border-radius: 2px;
padding: 6px 10px;
margin-top: 4px;
}
.navigation-chart .port-program-choice:hover,
.navigation-chart .port-program-choice:focus,
.navigation-chart .port-program-booked {
background-color: #dfdfc4;
border-color: #668078;
}
.port-program-choice .port-orders-link-copy { align-items: flex-start; }
.port-program-choice .port-orders-link-copy Label { -unity-text-align: middle-left; }
.port-program-title,
.port-orders-price {
color: #294745;
font-size: 13px;
-unity-font-style: bold;
}
.port-orders-price {
margin-left: 7px;
}
.port-orders-total {
margin-top: 12px;
padding-top: 8px;
border-top-width: 1px;
border-top-color: #bda883;
}
.port-orders-total-value {
color: #294745;
font-size: 24px;
margin-left: 10px;
}

View File

@@ -13,20 +13,26 @@ Shader "Soundings/Harbor Reflection"
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
CGPROGRAM
#pragma target 3.0
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
#include "OceanWaves.cginc"
fixed4 _Color;
float _SoundingsSeaSailing, _SoundingsSeaWeather, _SoundingsSeaTime;
struct Output { float4 clip : SV_POSITION; float3 world : TEXCOORD0; };
Output vert(appdata_base input)
{
Output output;
float4 worldPosition = mul(unity_ObjectToWorld, input.vertex);
float time = lerp(_Time.y, _SoundingsSeaTime, _SoundingsSeaSailing);
float3 wave = OceanWave(worldPosition.xz, time, _SoundingsSeaWeather) * _SoundingsSeaSailing;
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;
worldPosition.y += wave.x * 1.5;
worldPosition.z += sin(worldPosition.x * .53 + worldPosition.y * 2.14 + time * 1.55) * .27 + wave.z * 4;
worldPosition.x += sin(worldPosition.y * .88 - time) * .29 + wave.y * 4;
output.clip = UnityWorldToClipPos(worldPosition.xyz);
output.world = worldPosition.xyz;
return output;
@@ -35,8 +41,9 @@ Shader "Soundings/Harbor Reflection"
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;
float time = lerp(_Time.y, _SoundingsSeaTime, _SoundingsSeaSailing);
float breakup = .48 + .38 * sin(input.world.y * 14 + input.world.x * .62 - time * 1.02);
float alpha = saturate(1 + input.world.y / 7.5) * breakup * lerp(.34, .24 - .11 * _SoundingsSeaWeather, _SoundingsSeaSailing);
return fixed4(_Color.rgb * float3(.51,.60,.64), alpha);
}
ENDCG

View File

@@ -3,10 +3,11 @@ Shader "Soundings/Harbor Water"
Properties
{
_Backdrop ("Harbor photograph", 2D) = "black" {}
_OceanDetail ("Ocean surface detail", 2D) = "gray" {}
_BackdropCrop ("Harbor crop", Vector) = (1,1,0,0)
_HullSpan ("Hull length and beam", Vector) = (71,7,0,0)
_HullCourse ("Hull heading and wake strength", Vector) = (1,0,0,0)
_Underway ("Open water blend", Range(0,1)) = 0
_Underway ("Open water", Float) = 0
_WeatherSeverity ("Sea conditions", Range(0,1)) = 0
}
SubShader
@@ -17,14 +18,17 @@ Shader "Soundings/Harbor Water"
Cull Off
ZWrite Off
CGPROGRAM
#pragma target 3.0
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
#include "OceanWaves.cginc"
sampler2D _Backdrop;
sampler2D _Backdrop, _OceanDetail;
float4 _BackdropCrop, _HullSpan, _HullCourse, _ViewSize;
float3 _ViewOrigin, _ViewForward, _ViewRight, _ViewUp;
float _Underway, _WeatherSeverity, _SeaTime;
static const float3 Sun = float3(-.761,.441,-.474);
struct Output { float4 clip : SV_POSITION; float2 screen : TEXCOORD0; };
Output vert(appdata_base input)
@@ -36,6 +40,117 @@ Shader "Soundings/Harbor Water"
return output;
}
float3 SkyGradient(float3 ray)
{
float warmth = pow(saturate(.55 + dot(ray.xz, Sun.xz) * .55), 2.3);
float3 horizon = lerp(float3(.50,.63,.68), float3(.91,.66,.46), warmth * .88);
float elevation = pow(saturate(ray.y), .52);
float3 sky = lerp(horizon, float3(.084,.218,.347), elevation);
float3 squall = lerp(float3(.39,.48,.53), float3(.102,.156,.202), elevation);
return lerp(sky, squall, _WeatherSeverity);
}
float3 Sky(float3 ray, float time)
{
float2 wind = float2(.0014,-.0010) * time;
float2 layers = ray.xz * (.76 / (max(0, ray.y) + .21)) + wind;
float cloud = tex2Dlod(_OceanDetail, float4(layers * .19, 0, 2)).b * .68
+ tex2Dlod(_OceanDetail, float4(layers * .40 + .38, 0, 2)).b * .32;
float coverage = smoothstep(.57 - .15 * _WeatherSeverity, .82, cloud);
coverage *= smoothstep(-.015,.16,ray.y) * (1 - smoothstep(.66, 1, ray.y));
float facing = pow(saturate(dot(ray, Sun)), 5);
float3 color = SkyGradient(ray);
float3 vapor = lerp(color * 1.14 + float3(.124,.106,.087) * facing,
color * .65 + float3(.038,.048,.056), _WeatherSeverity);
return lerp(color, vapor, coverage * (.65 + .3 * _WeatherSeverity));
}
float2 HullPoint(float2 world)
{
float2 relative = world - _HullSpan.zw;
return float2(dot(relative, float2(_HullCourse.x, -_HullCourse.y)), dot(relative, _HullCourse.yx));
}
float HullShade(float2 hullPoint)
{
float halfLength = _HullSpan.x * .5;
float along = abs(hullPoint.x / max(1, halfLength));
float beam = _HullSpan.y * lerp(.24, 1, saturate(1 - pow(along, 3.2)));
return (1 - smoothstep(.1, 5.8, abs(hullPoint.y) - beam)) * (1 - smoothstep(.91, 1.105, along));
}
float BowWhitewater(float2 hull, float breakup)
{
float beam = _HullSpan.y;
float fromStem = _HullSpan.x * .49 - hull.x;
float steer = sqrt(_HullCourse.z);
float bandWidth = 1.55 + max(0, fromStem) * .022;
float glass = abs(hull.y) - (1 + max(0, fromStem) * .37);
float wedge = 1 - smoothstep(.2, bandWidth, abs(glass));
float stem = 1 - smoothstep(.4, 2.9 + steer * 2.8, length(float2(fromStem + .9, hull.y * .68)));
float flare = smoothstep(-1.9, 7, fromStem) * (1 - smoothstep(_HullSpan.x * .56, _HullSpan.x * 1.16, fromStem));
float rip = .75 + .25 * sin(fromStem * 1.45 + hull.y + _SeaTime * 7);
float nearBeam = beam * lerp(.22, 1, smoothstep(0, _HullSpan.x * .33, fromStem));
float hullWash = 1 - smoothstep(.18, 2.05, abs(abs(hull.y) - nearBeam));
hullWash *= smoothstep(0, 8, fromStem) * (1 - smoothstep(_HullSpan.x * .88, _HullSpan.x, fromStem));
return saturate((wedge * flare * .81 + stem * .89 + hullWash * .57) * rip * breakup) * (steer * .93);
}
float3 OpenSea(float3 origin, float3 ray, float2 screen)
{
float skyLine = smoothstep(-.0033, .0010, ray.y);
float down = max(.00042, -ray.y);
float distance = min(5800, origin.y / down);
float2 position = origin.xz + ray.xz * distance;
float3 waves = OceanWave(position, _SeaTime, _WeatherSeverity);
float intersectionBlend = 1 - smoothstep(180, 600, distance);
position -= ray.xz * clamp(waves.x / down, -9, 9) * intersectionBlend;
waves = OceanWave(position, _SeaTime, _WeatherSeverity);
float2 rotated = float2(position.x * .82 - position.y * .57, position.x * .57 + position.y * .82);
float mip = clamp(log2(max(1, distance) / 76), 0, 7);
float3 chop = tex2Dlod(_OceanDetail, float4(position * .041 + float2(-.022,.013) * _SeaTime, 0, mip)).rgb;
float3 ripples = tex2Dlod(_OceanDetail, float4(rotated * .107 + float2(.032,.020) * _SeaTime, 0, mip + .65)).rgb;
float detail = 1 - smoothstep(85, 670, distance);
float swellDetail = 1 - smoothstep(180, 690, distance);
float roughness = lerp(.43, .96, _WeatherSeverity);
float2 slope = waves.yz * swellDetail
+ ((chop.rg - .5) * .47 + (ripples.rg - .5) * .25) * detail * roughness;
float3 normal = normalize(float3(-slope.x, 1, -slope.y));
float rough = ((chop.b - .5) * .045 + (ripples.b - .5) * .015) * detail;
float light = saturate(dot(normal, Sun));
float3 fromBelow = lerp(float3(.031,.159,.220), float3(.064,.205,.274), .23 + .53 * light + rough * 7);
fromBelow = lerp(fromBelow, fromBelow * .60 + float3(.019,.028,.030), _WeatherSeverity * .82);
float reflection = .19 + .64 * pow(1 - saturate(dot(-ray, normal)), 4);
float3 reflected = reflect(ray, normal);
float3 color = lerp(fromBelow, SkyGradient(reflected) * .75, reflection);
float glint = pow(saturate(dot(reflected, Sun)), lerp(78, 29, _WeatherSeverity));
color += glint * float3(.48,.38,.24) * (1 - .86 * _WeatherSeverity);
float nightFoam = smoothstep(.74,.96, chop.b * .67 + ripples.b * .33 + slope.x * .39);
color = lerp(color, float3(.53,.67,.69), nightFoam * detail * (.22 + _WeatherSeverity * .57));
if (_HullSpan.x > 1)
{
float2 hull = HullPoint(position);
color *= 1 - HullShade(hull) * .35;
float breakup = .63 + smoothstep(.28,.73, chop.b + ripples.b * .33) * .55;
float foam = BowWhitewater(hull, breakup);
color = lerp(color, float3(.79,.89,.89), foam);
}
float mist = 1 - exp(-distance * (.00040 + .00077 * _WeatherSeverity));
color = lerp(color, SkyGradient(float3(ray.x, 0, ray.z)) * .90, mist * .80);
if (skyLine > 0)
color = lerp(color, Sky(ray, _SeaTime), skyLine);
if (_WeatherSeverity > .75)
{
float2 grid = float2(screen.x * 165 + screen.y * 42, screen.y * 23 + _SeaTime * 17);
float rain = step(.978, frac(grid.x + floor(grid.y) * .381)) * smoothstep(.56, .68, frac(grid.y));
color += rain * float3(.095,.133,.15);
}
return color;
}
fixed4 frag(Output input) : SV_Target
{
float2 screen = input.screen;
@@ -43,67 +158,22 @@ Shader "Soundings/Harbor Water"
float3 viewOffset = offsetOnFilm.x * _ViewRight + offsetOnFilm.y * _ViewUp;
float3 origin = _ViewOrigin + viewOffset * _ViewSize.z;
float3 ray = normalize(_ViewForward + viewOffset * (1 - _ViewSize.z));
float distanceToWater = min(2600, max(0, -origin.y / min(ray.y, -.0001)));
float2 world = origin.xz + ray.xz * distanceToWater;
if (_Underway > .5)
{
if (ray.y >= .0010)
return fixed4(Sky(ray, _SeaTime), 1);
return fixed4(OpenSea(origin, ray, screen), 1);
}
float2 uv = (screen - .5) * _BackdropCrop.xy + .5 + _BackdropCrop.zw;
float waterMask = 1 - smoothstep(.55,.69,uv.y);
float2 relative = world - _HullSpan.zw;
float2 p = float2(dot(relative, float2(_HullCourse.x, -_HullCourse.y)),
dot(relative, _HullCourse.yx));
float t = lerp(_Time.y, _SeaTime, _Underway);
float textureWave = sin(world.y * 1.94 + world.x * .30 + sin(world.x * .44 - t * (.30 + 1.2 * _WeatherSeverity)))
* (.0015 + .003 * _WeatherSeverity);
float waterMask = 1 - smoothstep(.55, .69, uv.y);
float distance = min(2600, max(0, -origin.y / min(ray.y, -.0001)));
float2 world = origin.xz + ray.xz * distance;
float textureWave = sin(world.y * 1.94 + world.x * .30 + sin(world.x * .44 - _Time.y * .30)) * .0015;
uv += waterMask * float2(textureWave, textureWave * .14);
float3 color = tex2D(_Backdrop, uv).rgb;
if (_Underway > 0)
{
float seaHeight = clamp(uv.y * .59 + .056, .055, .49);
float drift = sin(p.y * .166 + t * .19) * .017;
float3 openWater = tex2D(_Backdrop, float2(saturate(uv.x + drift), seaHeight)).rgb;
float skyBand = lerp(smoothstep(-.006, .004, ray.y), smoothstep(.67, .70, screen.y), _ViewSize.z);
float twilight = lerp(saturate(ray.y * 2.8), saturate((screen.y - .70) * 3.8), _ViewSize.z);
float west = pow(1 - screen.x, 1.65);
float3 horizon = lerp(float3(.45,.53,.59), float3(.83,.60,.46), west);
float3 sky = lerp(horizon, float3(.13,.24,.38), twilight);
float cloud = .76 + .24 * sin(screen.x * 18 + screen.y * 8 + sin(screen.x * 41 - t * .2));
float3 stormSky = lerp(float3(.37,.45,.49), float3(.10,.15,.20), twilight) * cloud;
sky = lerp(sky, stormSky, _WeatherSeverity);
float chop = sin(world.y * .83 + world.x * .45 - t * 2.4) * sin(world.x * .48 + world.y * 2.2 + t * 1.6);
openWater = lerp(openWater, openWater * .56 + float3(.055,.082,.09), _WeatherSeverity);
openWater += max(0, chop - .70) * .19 * _WeatherSeverity;
color = lerp(color, lerp(openWater, sky, skyBand), _Underway);
if (_WeatherSeverity > .75)
{
float2 rainGrid = float2(screen.x * 160 + screen.y * 42, screen.y * 22 + t * 15);
float rain = step(.973, frac(rainGrid.x + floor(rainGrid.y) * .381)) * step(.58, frac(rainGrid.y));
color += rain * .22 * _Underway * float3(.55,.69,.77);
}
waterMask = lerp(waterMask, 1 - skyBand, _Underway);
}
if (_HullSpan.x < 1)
return fixed4(color, 1);
float halfLength = _HullSpan.x * .5;
float along = abs((p.x + halfLength * .022) / halfLength);
float shaft = saturate(1 - pow(max(0,along), 3.2));
float waterline = _HullSpan.y * lerp(.28, 1, shaft);
float offset = abs(p.y + .5) - waterline;
float shadow = (1 - smoothstep(-.8, 5.1, offset)) * (1 - smoothstep(.90,1.12,along));
color *= 1 - .39 * shadow * waterMask;
float edgeWave = sin(p.x * 1.46 + p.y * 1.88 + t * .65) + .36 * sin(p.x * 3.3 + p.y * 2.42 - t * .50);
float foam = saturate(edgeWave - .55) * (1 - smoothstep(.12, 1.3, abs(offset - .25))) * (1 - smoothstep(.81,1.06,along));
color += float3(.19,.23,.24) * foam * waterMask;
if (_Underway > 0)
{
float trail = max(0, -p.x - halfLength * .88);
float v = abs(p.y) - (2.2 + trail * .19);
float turbulence = .5 + .28 * sin(p.x * 1.5 + p.y * 5.6 + t * 4)
+ .22 * sin(p.y * 13.7 - p.x * .37 - t * 2.2);
float wake = smoothstep(.05, 2, trail) * (1 - smoothstep(1, 5 + trail * .062, abs(v)))
* (1 - smoothstep(12, 89, trail)) * turbulence;
color = lerp(color, float3(.72,.84,.84), wake * waterMask * .43 * _Underway * _HullCourse.z);
}
if (_HullSpan.x > 1)
color *= 1 - HullShade(HullPoint(world)) * .33 * waterMask;
return fixed4(color, 1);
}
ENDCG

View File

@@ -0,0 +1,18 @@
#ifndef SOUNDINGS_OCEAN_WAVES
#define SOUNDINGS_OCEAN_WAVES
float3 OceanWave(float2 position, float time, float storm)
{
float amplitude = lerp(.35, 1.46, storm * storm);
float2 windWave = float2(.052, .115);
float2 swellWave = float2(-.073, .170);
float2 crossWave = float2(.217, -.136);
float s1, c1, s2, c2, s3, c3;
sincos(dot(position, windWave) - time * .93, s1, c1);
sincos(dot(position, swellWave) - time * 1.22 + 1.3, s2, c2);
sincos(dot(position, crossWave) - time * 1.64 + 2.9, s3, c3);
float2 gradient = .65 * windWave * c1 + .25 * swellWave * c2 + .10 * crossWave * c3;
return amplitude * float3(.65 * s1 + .25 * s2 + .10 * s3, gradient);
}
#endif

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 5ffe9ba48d1c4ac3beef4f1623b1c331
ShaderIncludeImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -82,11 +82,14 @@
.action.voyage-event-accept { background-color: #d8b680; color: #1b302f; border-color: #e8c992; margin-top: 8px; min-height: 32px; }
.action.voyage-event-decline { margin-top: 5px; min-height: 30px; }
.voyage-event-result { border-top-width: 1px; padding: 8px 10px; }
.voyage-deckbar {
.voyage-footer {
position: absolute;
bottom: 100px;
left: 7%;
right: 7%;
bottom: 18px;
left: 5%;
right: 5%;
}
.voyage-deckbar {
margin: 0 2% 7px;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
@@ -107,10 +110,6 @@
.action.voyage-control-active { background-color: #d8b680; border-color: #e8c992; color: #1b302f; }
.action.voyage-reset { margin-left: 7px; }
.voyage-rail {
position: absolute;
left: 5%;
right: 5%;
bottom: 18px;
min-height: 70px;
padding: 7px 11px;
flex-direction: row;
@@ -151,3 +150,51 @@
.action.helm-order { flex-grow: 1; min-height: 25px; padding: 2px 4px; margin-right: 2px; font-size: 11px; }
.helm-help { color: #b7c8c4; font-size: 11px; margin: 2px 0 6px; }
.action.helm-toggle { min-height: 32px; font-size: 12px; }
.station-reticle {
position: absolute;
left: 50%;
top: 50%;
width: 6px;
height: 6px;
margin-left: -3px;
margin-top: -3px;
border-width: 1px;
border-color: #f0e7c5;
border-radius: 3px;
background-color: rgba(10, 23, 30, .46);
}
.station-prompt, .station-feedback {
position: absolute;
left: 36%;
right: 36%;
align-items: center;
padding: 7px 12px;
border-width: 1px;
background-color: rgba(7, 23, 29, .94);
border-color: #768e86;
}
.station-prompt { top: 54%; }
.station-requested { border-color: #d0af71; }
.station-title { font-size: 11px; color: #d8b77f; -unity-font-style: bold; }
.station-command { font-size: 14px; color: #f0ecda; margin-top: 2px; white-space: normal; -unity-text-align: middle-center; }
.station-feedback { bottom: 149px; color: #f4dbad; font-size: 13px; white-space: normal; -unity-text-align: middle-center; }
.crew-call-readout { color: #e7c78b; font-size: 11px; margin-top: 3px; }
.crew-call-urgent { color: #ffc290; }
.passage-announcement {
position: absolute;
left: 28%;
right: 28%;
bottom: 184px;
padding: 6px 12px 7px;
background-color: rgba(9, 20, 28, .91);
border-top-width: 1px;
border-top-color: #b99966;
}
.passage-announcement-caption {
color: #efe9d8;
font-size: 13px;
white-space: normal;
margin-top: 2px;
}

View File

@@ -0,0 +1,58 @@
Shader "Soundings/Passage Wake"
{
Properties { _OceanDetail ("Wake detail", 2D) = "gray" {} }
SubShader
{
Tags { "Queue"="Background+2" "RenderType"="Transparent" }
Pass
{
Cull Off
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
CGPROGRAM
#pragma target 3.0
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
#include "OceanWaves.cginc"
sampler2D _OceanDetail;
float _SeaTime, _WeatherSeverity;
struct Input { float4 vertex : POSITION; float4 trace : TEXCOORD0; };
struct Output { float4 clip : SV_POSITION; float4 trace : TEXCOORD0; float2 water : TEXCOORD1; };
Output vert(Input input)
{
Output output;
float3 vertex = input.vertex.xyz;
vertex.y += OceanWave(vertex.xz, _SeaTime, _WeatherSeverity).x;
output.clip = UnityObjectToClipPos(float4(vertex, 1));
output.trace = input.trace;
output.water = vertex.xz;
return output;
}
fixed4 frag(Output input) : SV_Target
{
float across = abs(input.trace.x);
float age = input.trace.y;
float thrust = input.trace.z;
float distance = input.trace.w;
float2 water = input.water;
float eddies = tex2D(_OceanDetail, water * .118 + float2(-.016,.016) * _SeaTime).b;
float flecks = tex2D(_OceanDetail, water * .285 + float2(.008,-.011) * _SeaTime).b;
float disturbed = 1 - smoothstep(.28,.47, across + .065 * (eddies - .5));
float stripes = sin(across * 22 + eddies * 5 + distance * .055);
float churn = smoothstep(.36,.78, eddies * .57 + flecks * .43 + stripes * .14);
float kelvin = 1 - smoothstep(.044,.155, abs(across - .76 + .08 * (eddies - .5)));
float ripples = .41 + .59 * sin(distance * .47 + across * 16 - _SeaTime * 2.8);
float whitewater = disturbed * (.54 + .45 * churn) + kelvin * saturate(ripples) * (.33 + .42 * eddies);
float lifetime = (1 - smoothstep(4, 34, age));
float alpha = whitewater * thrust * lifetime * (.89 - _WeatherSeverity * .13);
float3 foam = lerp(float3(.47,.68,.71), float3(.87,.94,.93), churn * .84 + .15);
return fixed4(foam, saturate(alpha));
}
ENDCG
}
}
}

View File

@@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: a457616e3bfc4633be04e46ee0f39e33
ShaderImporter:
defaultTextures: []
nonModifiableTextures: []

View 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
}
}
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 6b1e9755ea9d51f529eea0041be47cad
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant: