Skip to content

Commit

Permalink
New shaders for text on ship's bases
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandrem committed Feb 8, 2019
1 parent e2a6ced commit 9001ed4
Show file tree
Hide file tree
Showing 26 changed files with 116 additions and 1 deletion.
Binary file added Assets/Materials/3DTextOrange.mat
Binary file not shown.
8 changes: 8 additions & 0 deletions Assets/Materials/3DTextOrange.mat.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/Materials/3DTextWhite.mat
Binary file not shown.
8 changes: 8 additions & 0 deletions Assets/Materials/3DTextWhite.mat.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Assets/Resources/Prefabs/ShipModel/ShipBase/ShipBaseLarge.prefab
Binary file not shown.
Binary file modified Assets/Resources/Prefabs/ShipModel/ShipBase/ShipBaseMedium.prefab
Binary file not shown.
Binary file modified Assets/Resources/Prefabs/ShipModel/ShipBase/ShipBaseSmall.prefab
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Assets/Scripts/View/Ship/GenericShip.cs
Expand Up @@ -165,7 +165,7 @@ public void SetShipBaseImageSecondEdition()
//Ship Info
newTexture = "ShipStandInsert/Universal/SecondEdition/" + this.ShipInfo.BaseSize.ToString() + "/" + this.Faction.ToString() + "/Info";
newMaterial = CreateMaterial(newTexture);
StandardShaderUtils.ChangeRenderMode(newMaterial, StandardShaderUtils.BlendMode.Fade);
StandardShaderUtils.ChangeRenderMode(newMaterial, StandardShaderUtils.BlendMode.Cutout);
shipAllParts.Find("ShipBase/ShipStandInsert/ShipStandInsertImage/ShipInfo").GetComponent<Renderer>().material = newMaterial;
shipAllParts.Find("ShipBase/ShipStandInsert/ShipStandInsertImage/ShipInfo").GetComponent<Renderer>().shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off;
shipAllParts.Find("ShipBase/ShipStandInsert/ShipStandInsertImage/ShipInfo").GetComponent<MeshRenderer>().enabled = true;
Expand Down
18 changes: 18 additions & 0 deletions Assets/Shaders/3DTextOneSided.shader
@@ -0,0 +1,18 @@
Shader "Custom/3D Text One Sided" {
Properties {
_MainTex ("Font Texture", 2D) = "white" {}
_Color ("Text Color", Color) = (1,1,1,1)
}

SubShader {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Lighting Off Cull Back ZWrite Off Fog { Mode Off }
Blend SrcAlpha OneMinusSrcAlpha
Pass {
Color [_Color]
SetTexture [_MainTex] {
combine primary, texture * primary
}
}
}
}
9 changes: 9 additions & 0 deletions Assets/Shaders/3DTextOneSided.shader.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified ProjectSettings/GraphicsSettings.asset
Binary file not shown.
Binary file modified ProjectSettings/QualitySettings.asset
Binary file not shown.

0 comments on commit 9001ed4

Please sign in to comment.