- Asia and South America are finished.
- Added line width adjustments to correct map UV projection issues.
This commit is contained in:
@@ -12,6 +12,7 @@ Shader "Carmen/Maps/SDF Map Borders"
|
||||
_ColourTex ("Country Colours", 2D) = "white" {}
|
||||
|
||||
_LineThickness ("Line Thickness", float) = 0.15
|
||||
_VerticalLineCorrection ("Vertical Line Correction", float) = 0.0
|
||||
}
|
||||
|
||||
SubShader
|
||||
@@ -45,6 +46,7 @@ Shader "Carmen/Maps/SDF Map Borders"
|
||||
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
float _LineThickness;
|
||||
float _VerticalLineCorrection;
|
||||
CBUFFER_END
|
||||
|
||||
struct SurfaceOutputVRC
|
||||
@@ -66,7 +68,7 @@ Shader "Carmen/Maps/SDF Map Borders"
|
||||
|
||||
void surf (Input IN, inout SurfaceOutputVRC o)
|
||||
{
|
||||
half linestep = step(UNITY_SAMPLE_TEX2D(_MainTex, IN.uv_MainTex), _LineThickness);
|
||||
half linestep = step(UNITY_SAMPLE_TEX2D(_MainTex, IN.uv_MainTex), _LineThickness + (_VerticalLineCorrection * IN.uv_MainTex.y));
|
||||
o.Albedo = lerp(UNITY_SAMPLE_TEX2D(_ColourTex, IN.uv_MainTex), half4(0.0, 0.0, 0.0, 1.0), linestep);
|
||||
o.Alpha = 1.0f;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user