diff --git a/Assets/Shaders/DecalFeatureBumped.shader b/Assets/Shaders/DecalFeatureBumped.shader index bbdeacba..c670c5b8 100644 --- a/Assets/Shaders/DecalFeatureBumped.shader +++ b/Assets/Shaders/DecalFeatureBumped.shader @@ -22,7 +22,7 @@ Shader "ConformalDecals/Feature/Bumped" } SubShader { - Tags { "Queue" = "Geometry+100" } + Tags { "Queue" = "Geometry+100" "IgnoreProjector" = "true"} Cull [_Cull] Ztest LEqual diff --git a/Assets/Shaders/DecalPaint.shader b/Assets/Shaders/DecalPaint.shader index 7543afd2..754989db 100644 --- a/Assets/Shaders/DecalPaint.shader +++ b/Assets/Shaders/DecalPaint.shader @@ -25,7 +25,7 @@ Shader "ConformalDecals/Paint/Diffuse" } SubShader { - Tags { "Queue" = "Geometry+100" } + Tags { "Queue" = "Geometry+100" "IgnoreProjector" = "true"} Cull [_Cull] Ztest LEqual diff --git a/Assets/Shaders/DecalPaintSDF.shader b/Assets/Shaders/DecalPaintSDF.shader index 633ebca5..9070a028 100644 --- a/Assets/Shaders/DecalPaintSDF.shader +++ b/Assets/Shaders/DecalPaintSDF.shader @@ -27,7 +27,7 @@ Shader "ConformalDecals/Paint/DiffuseSDF" } SubShader { - Tags { "Queue" = "Geometry+100" } + Tags { "Queue" = "Geometry+100" "IgnoreProjector" = "true"} Cull [_Cull] Ztest LEqual diff --git a/Assets/Shaders/DecalPaintSpecular.shader b/Assets/Shaders/DecalPaintSpecular.shader index 88b8713d..d577d36c 100644 --- a/Assets/Shaders/DecalPaintSpecular.shader +++ b/Assets/Shaders/DecalPaintSpecular.shader @@ -30,7 +30,7 @@ Shader "ConformalDecals/Paint/Specular" } SubShader { - Tags { "Queue" = "Geometry+100" } + Tags { "Queue" = "Geometry+100" "IgnoreProjector" = "true"} Cull [_Cull] Ztest LEqual diff --git a/Assets/Shaders/DecalPaintSpecularSDF.shader b/Assets/Shaders/DecalPaintSpecularSDF.shader index 7c253a9e..59575b64 100644 --- a/Assets/Shaders/DecalPaintSpecularSDF.shader +++ b/Assets/Shaders/DecalPaintSpecularSDF.shader @@ -32,7 +32,7 @@ Shader "ConformalDecals/Paint/SpecularSDF" } SubShader { - Tags { "Queue" = "Geometry+100" } + Tags { "Queue" = "Geometry+100" "IgnoreProjector" = "true"} Cull [_Cull] Ztest LEqual diff --git a/Assets/Shaders/SelectionGlow.shader b/Assets/Shaders/SelectionGlow.shader index 217850f9..fd75aa8e 100644 --- a/Assets/Shaders/SelectionGlow.shader +++ b/Assets/Shaders/SelectionGlow.shader @@ -12,7 +12,7 @@ Shader "ConformalDecals/SelectionGlow" } SubShader { - Tags { "Queue" = "Transparent" } + Tags { "Queue" = "Transparent" "IgnoreProjector" = "true" } Cull Back ZWrite Off diff --git a/GameData/ConformalDecals/Assets/decal-blank.mu b/GameData/ConformalDecals/Assets/decal-blank.mu index 3c13c113..55c05b9a 100644 Binary files a/GameData/ConformalDecals/Assets/decal-blank.mu and b/GameData/ConformalDecals/Assets/decal-blank.mu differ diff --git a/GameData/ConformalDecals/Plugins/ConformalDecals.dll b/GameData/ConformalDecals/Plugins/ConformalDecals.dll index a42d00a0..5629590f 100644 Binary files a/GameData/ConformalDecals/Plugins/ConformalDecals.dll and b/GameData/ConformalDecals/Plugins/ConformalDecals.dll differ diff --git a/GameData/ConformalDecals/Resources/conformaldecals.shab b/GameData/ConformalDecals/Resources/conformaldecals.shab index 8a2979da..b08d3097 100644 Binary files a/GameData/ConformalDecals/Resources/conformaldecals.shab and b/GameData/ConformalDecals/Resources/conformaldecals.shab differ diff --git a/GameData/ConformalDecals/Versioning/ConformalDecals.version b/GameData/ConformalDecals/Versioning/ConformalDecals.version index 7289185e..c5108715 100644 --- a/GameData/ConformalDecals/Versioning/ConformalDecals.version +++ b/GameData/ConformalDecals/Versioning/ConformalDecals.version @@ -6,7 +6,7 @@ { "MAJOR":0, "MINOR":1, - "PATCH":3, + "PATCH":4, "BUILD":0 }, "KSP_VERSION": @@ -22,7 +22,7 @@ }, "KSP_VERSION_MAX":{ "MAJOR":1, - "MINOR":9, + "MINOR":10, "PATCH":99 } } \ No newline at end of file diff --git a/README.md b/README.md index 18e51797..f06eca20 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Conformal Decals v0.1.3 +# Conformal Decals v0.1.4 [![Build Status](https://travis-ci.org/drewcassidy/KSP-Conformal-Decals.svg?branch=release)](https://travis-ci.org/drewcassidy/KSP-Conformal-Decals) [![Art: CC BY-SA 4.0](https://img.shields.io/badge/Art%20License-CC%20BY--SA%204.0-orange.svg)](https://creativecommons.org/licenses/by-sa/4.0/) [![Code: GPL v3](https://img.shields.io/badge/Code%20License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) ![Screenshot](http://pileof.rocks/KSP/images/ConformalDecalsHeader.png) @@ -8,7 +8,7 @@ Conformal Decals adds a set of decal stickers to KSP, as well as providing a fra ## Dependencies Required: -- KSP (1.8.x to 1.9.x) +- KSP (1.8.x to 1.10.x) - B9 Part Switch (2.16.0). Bundled with release. - ModuleManager (4.1.3). Bundled with release. - Shabby (0.1.2). Bundled with release. diff --git a/Source/ConformalDecals/ModuleConformalDecal.cs b/Source/ConformalDecals/ModuleConformalDecal.cs index c5b06e2c..578d23b5 100644 --- a/Source/ConformalDecals/ModuleConformalDecal.cs +++ b/Source/ConformalDecals/ModuleConformalDecal.cs @@ -237,14 +237,23 @@ public override void OnIconCreate() { public override void OnStart(StartState state) { this.Log("Starting module"); - - materialProperties.RenderQueue = DecalQueue; _boundsRenderer = decalProjectorTransform.GetComponent(); UpdateMaterials(); + // handle tweakables + if (HighLogic.LoadedSceneIsEditor) { + GameEvents.onEditorPartEvent.Add(OnEditorEvent); + GameEvents.onVariantApplied.Add(OnVariantApplied); + + UpdateTweakables(); + } + } + + public override void OnStartFinished(StartState state) { + // handle game events if (HighLogic.LoadedSceneIsGame) { // set initial attachment state if (part.parent == null) { @@ -254,27 +263,20 @@ public override void OnStart(StartState state) { OnAttach(); } } - - // handle tweakables - if (HighLogic.LoadedSceneIsEditor) { - GameEvents.onEditorPartEvent.Add(OnEditorEvent); - GameEvents.onVariantApplied.Add(OnVariantApplied); - - UpdateTweakables(); - } // handle flight events if (HighLogic.LoadedSceneIsFlight) { GameEvents.onPartWillDie.Add(OnPartWillDie); + if (part.parent == null) part.explode(); + Part.layerMask |= 1 << DecalConfig.DecalLayer; decalColliderTransform.gameObject.layer = DecalConfig.DecalLayer; if (!selectableInFlight || !DecalConfig.SelectableInFlight) { decalColliderTransform.GetComponent().enabled = false; + _boundsRenderer.enabled = false; } - - if (part.parent == null) part.explode(); } } diff --git a/changelog.txt b/changelog.txt index 3d730e58..6b849ffe 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,12 @@ +v0.1.4 +------ +- Supported KSP versions: 1.8.x to 1.10.x +- Fixes: + - Fixed decals rendering onto disabled B9PS part variants + - Decals will still not update whan their parent part's B9PS variant is changed, both in flight and in the editor. This is known and awaiting a change to B9PS to be fixed. + - Fixed decal bounds rendering as dark cubes when shadowed by EVE clouds. + - Fixed decals being shadowed by EVE clouds, causing the part underneath to appear overly dark. + v0.1.3 ------ Fixes: @@ -10,8 +19,6 @@ Changes: - Small refactor of node parsing code - Colors can now be specified in hex (#RGB, #RGBA, #RRGGBB, or #RRGGBBAA) or using the colors specified in the XKCDColors class - - v0.1.2 ------ Fixes: