Improve close-up ship cameras and marine rendering
This commit is contained in:
@@ -270,8 +270,15 @@ namespace Soundings
|
||||
for (int i = 0; i < outline.Length; i++)
|
||||
{
|
||||
Vector2 a = outline[i], b = outline[(i + 1) % outline.Length];
|
||||
structure.Mesh(1).Rod(HarborMesh.Point(a, y + .52f), HarborMesh.Point(b, y + .52f), .031f);
|
||||
structure.Mesh(1).Rod(HarborMesh.Point(a, y), HarborMesh.Point(a, y + .52f), .035f);
|
||||
structure.Mesh(Joinery).Rod(HarborMesh.Point(a, y + .98f), HarborMesh.Point(b, y + .98f), .033f);
|
||||
structure.Mesh(Alloy).Rod(HarborMesh.Point(a, y + .65f), HarborMesh.Point(b, y + .65f), .017f);
|
||||
structure.Mesh(Alloy).Rod(HarborMesh.Point(a, y + .33f), HarborMesh.Point(b, y + .33f), .015f);
|
||||
int posts = Mathf.Max(1, Mathf.CeilToInt(Vector2.Distance(a, b) / 2.25f));
|
||||
for (int post = 0; post < posts; post++)
|
||||
{
|
||||
Vector2 p = Vector2.Lerp(a, b, (float)post / posts);
|
||||
structure.Mesh(Alloy).Rod(HarborMesh.Point(p, y), HarborMesh.Point(p, y + .98f), .026f);
|
||||
}
|
||||
}
|
||||
|
||||
float usableLength = fore - aft;
|
||||
@@ -938,6 +945,17 @@ namespace Soundings
|
||||
if (id != WindowGlass)
|
||||
{
|
||||
bool metal = id is 4 or Alloy or Gasket;
|
||||
Harbor.SurfaceFinish surfaceFinish = id switch
|
||||
{
|
||||
0 => Harbor.SurfaceFinish.Hull,
|
||||
2 or Joinery => Harbor.SurfaceFinish.Timber,
|
||||
Carpet or BridgeFloor or Upholstery or 11 => Harbor.SurfaceFinish.Fabric,
|
||||
Alloy => Harbor.SurfaceFinish.Alloy,
|
||||
_ => Harbor.SurfaceFinish.Paint
|
||||
};
|
||||
material.SetFloat("_Finish", (float)surfaceFinish);
|
||||
if (id == 0)
|
||||
material.SetFloat("_Waterline", 1);
|
||||
material.SetFloat("_Roughness", metal ? .39f : .76f);
|
||||
material.SetFloat("_Metal", metal ? .45f : .04f);
|
||||
material.SetFloat("_Weather", id is Carpet or BridgeFloor or Upholstery ? .57f : .12f);
|
||||
|
||||
Reference in New Issue
Block a user