diff --git a/Assets/Shaders/DecalBack.shader b/Assets/Shaders/DecalBack.shader index 11a4358..3d5a11e 100644 --- a/Assets/Shaders/DecalBack.shader +++ b/Assets/Shaders/DecalBack.shader @@ -14,7 +14,7 @@ Shader "ConformalDecals/Decal Back" _Shininess ("Shininess", Range (0.03, 10)) = 0.4 [Header(Effects)] - [PerRendererData]_Opacity("_Opacity", Range(0,1) ) = 1 + [PerRendererData]_Opacity("_Opacity", Range(0,1) ) = 1 [PerRendererData]_RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 [PerRendererData]_RimColor("_RimColor", Color) = (0,0,0,0) [PerRendererData]_UnderwaterFogFactor ("Underwater Fog Factor", Range(0,1)) = 0 @@ -29,7 +29,7 @@ Shader "ConformalDecals/Decal Back" CGPROGRAM #include "LightingKSP.cginc" - #pragma surface surf BlinnPhongSmooth + #pragma surface surf BlinnPhongSmooth vertex:vert #pragma target 3.0 sampler2D _MainTex; @@ -50,14 +50,24 @@ Shader "ConformalDecals/Decal Back" float3 viewDir; float3 worldPos; }; + + void vert (inout appdata_full v) { + } + void surf (Input IN, inout SurfaceOutput o) { - float2 uv_MainTex = IN.uv_MainTex; float2 uv_BumpMap = IN.uv_BumpMap; + float2 uv_MainTex = 0; - fixed row = floor(uv_MainTex.y); + // 45° rotation + uv_MainTex.x = IN.uv_MainTex.x - IN.uv_MainTex.y; + uv_MainTex.y = IN.uv_MainTex.x + IN.uv_MainTex.y; + + // stagger every other row + int row = floor(uv_MainTex.y); uv_MainTex.x += row * _RowOffset; + uv_MainTex.y *= 2; float4 color = _Color * tex2D(_MainTex,(uv_MainTex)); float3 normal = UnpackNormal(tex2D(_BumpMap, uv_BumpMap)); diff --git a/Assets/Textures/Decal-Back-spec.png b/Assets/Textures/Decal-Back-spec.png index 9787cb8..c95d8b4 100644 Binary files a/Assets/Textures/Decal-Back-spec.png and b/Assets/Textures/Decal-Back-spec.png differ diff --git a/Assets/Textures/Decal-Back.png b/Assets/Textures/Decal-Back.png index 79d5b23..bb9173f 100644 Binary files a/Assets/Textures/Decal-Back.png and b/Assets/Textures/Decal-Back.png differ diff --git a/Assets/Textures/Peel-N-Stik Flag.png b/Assets/Textures/Peel-N-Stik Flag.png index c3d50c0..6577cf6 100644 Binary files a/Assets/Textures/Peel-N-Stik Flag.png and b/Assets/Textures/Peel-N-Stik Flag.png differ diff --git a/Assets/Textures/Peel-N-Stik Flag.svg b/Assets/Textures/Peel-N-Stik Flag.svg index 5813f96..a35615c 100644 --- a/Assets/Textures/Peel-N-Stik Flag.svg +++ b/Assets/Textures/Peel-N-Stik Flag.svg @@ -2,7 +2,7 @@ - + @@ -10,7 +10,7 @@ - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/Assets/Textures/Peel-N-Stik Flag@2x.png b/Assets/Textures/Peel-N-Stik Flag@2x.png index 4c4abf2..80c7ca5 100644 Binary files a/Assets/Textures/Peel-N-Stik Flag@2x.png and b/Assets/Textures/Peel-N-Stik Flag@2x.png differ diff --git a/Assets/Textures/Peel-N-Stik Scaled.png b/Assets/Textures/Peel-N-Stik Scaled.png new file mode 100644 index 0000000..4db7ff1 Binary files /dev/null and b/Assets/Textures/Peel-N-Stik Scaled.png differ diff --git a/Assets/Textures/blank.png b/Assets/Textures/blank.png new file mode 100644 index 0000000..4126c5e Binary files /dev/null and b/Assets/Textures/blank.png differ diff --git a/Distribution/GameData/ConformalDecals/Agencies/Peel-N-Stik-scaled.truecolor b/Distribution/GameData/ConformalDecals/Agencies/Peel-N-Stik-scaled.truecolor new file mode 100644 index 0000000..4db7ff1 Binary files /dev/null and b/Distribution/GameData/ConformalDecals/Agencies/Peel-N-Stik-scaled.truecolor differ diff --git a/Distribution/GameData/ConformalDecals/Assets/blank.dds b/Distribution/GameData/ConformalDecals/Assets/blank.dds new file mode 100644 index 0000000..186b5e1 Binary files /dev/null and b/Distribution/GameData/ConformalDecals/Assets/blank.dds differ diff --git a/Distribution/GameData/ConformalDecals/Assets/decal-blank.mu b/Distribution/GameData/ConformalDecals/Assets/decal-blank.mu index b6c5c44..2f66765 100644 Binary files a/Distribution/GameData/ConformalDecals/Assets/decal-blank.mu and b/Distribution/GameData/ConformalDecals/Assets/decal-blank.mu differ diff --git a/Distribution/GameData/ConformalDecals/Assets/decal-flag.mu b/Distribution/GameData/ConformalDecals/Assets/decal-flag.mu new file mode 100644 index 0000000..7bdc9cf Binary files /dev/null and b/Distribution/GameData/ConformalDecals/Assets/decal-flag.mu differ diff --git a/Distribution/GameData/ConformalDecals/Flags/Peel-N-Stik.dds b/Distribution/GameData/ConformalDecals/Flags/Peel-N-Stik.dds new file mode 100644 index 0000000..3ea9557 Binary files /dev/null and b/Distribution/GameData/ConformalDecals/Flags/Peel-N-Stik.dds differ diff --git a/Distribution/GameData/ConformalDecals/Parts/decal-flag.cfg b/Distribution/GameData/ConformalDecals/Parts/decal-flag.cfg index aff1d20..89d117c 100644 --- a/Distribution/GameData/ConformalDecals/Parts/decal-flag.cfg +++ b/Distribution/GameData/ConformalDecals/Parts/decal-flag.cfg @@ -7,8 +7,9 @@ PART author = Andrew Cassidy MODEL { - model = ConformalDecals/Assets/decal-blank + model = ConformalDecals/Assets/decal-flag scale = 1.0, 1.0, 1.0 + texture = blank, ConformalDecals/Flags/Peel-N-Stik } scale = 1 rescaleFactor = 1 diff --git a/Distribution/GameData/ConformalDecals/Plugins/ConformalDecals.dll b/Distribution/GameData/ConformalDecals/Plugins/ConformalDecals.dll index 36522d2..cb49537 100644 Binary files a/Distribution/GameData/ConformalDecals/Plugins/ConformalDecals.dll and b/Distribution/GameData/ConformalDecals/Plugins/ConformalDecals.dll differ diff --git a/Distribution/GameData/ConformalDecals/Resources/conformaldecals.shab b/Distribution/GameData/ConformalDecals/Resources/conformaldecals.shab index 1f4e5e1..4a7cd76 100644 Binary files a/Distribution/GameData/ConformalDecals/Resources/conformaldecals.shab and b/Distribution/GameData/ConformalDecals/Resources/conformaldecals.shab differ