mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-09-01 18:23:54 +00:00
Fix icon color when disabled in VAB menu
This commit is contained in:
parent
ebaeaa2182
commit
2cae31b20f
@ -8,13 +8,14 @@ Shader "ConformalDecals/Feature/Bumped"
|
||||
|
||||
_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
|
||||
_DecalOpacity("Opacity", Range(0,1) ) = 1
|
||||
_Color("Background Color", Color) = (0.9,0.9,0.9,0.7)
|
||||
_Background("Background Color", Color) = (0.9,0.9,0.9,0.7)
|
||||
|
||||
[Enum(UnityEngine.Rendering.CullMode)] _Cull ("Cull", int) = 2
|
||||
[Toggle(DECAL_PREVIEW)] _Preview ("Preview", int) = 0
|
||||
|
||||
[Header(Effects)]
|
||||
[PerRendererData]_Opacity("_Opacity", Range(0,1) ) = 1
|
||||
[PerRendererData]_Color("_Color", Color) = (1,1,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
|
||||
|
@ -11,13 +11,14 @@ Shader "ConformalDecals/Paint/Diffuse"
|
||||
|
||||
_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
|
||||
_DecalOpacity("Opacity", Range(0,1) ) = 1
|
||||
_Color("Background Color", Color) = (0.9,0.9,0.9,0.7)
|
||||
_Background("Background Color", Color) = (0.9,0.9,0.9,0.7)
|
||||
|
||||
[Enum(UnityEngine.Rendering.CullMode)] _Cull ("Cull", int) = 2
|
||||
[Toggle(DECAL_PREVIEW)] _Preview ("Preview", int) = 0
|
||||
|
||||
[Header(Effects)]
|
||||
[PerRendererData]_Opacity("_Opacity", Range(0,1) ) = 1
|
||||
[PerRendererData]_Color("_Color", Color) = (1,1,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
|
||||
|
@ -12,7 +12,7 @@ Shader "ConformalDecals/Paint/Specular"
|
||||
|
||||
_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
|
||||
_DecalOpacity("Opacity", Range(0,1) ) = 1
|
||||
_Color("Background Color", Color) = (0.9,0.9,0.9,0.7)
|
||||
_Background("Background Color", Color) = (0.9,0.9,0.9,0.7)
|
||||
|
||||
[Header(Specularity)]
|
||||
_SpecColor ("_SpecColor", Color) = (0.25, 0.25, 0.25, 1)
|
||||
@ -23,6 +23,7 @@ Shader "ConformalDecals/Paint/Specular"
|
||||
|
||||
[Header(Effects)]
|
||||
[PerRendererData]_Opacity("_Opacity", Range(0,1) ) = 1
|
||||
[PerRendererData]_Color("_Color", Color) = (1,1,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
|
||||
|
@ -72,6 +72,7 @@ float3 _DecalTangent;
|
||||
float _Cutoff;
|
||||
float _DecalOpacity;
|
||||
float _Opacity;
|
||||
float4 _Background;
|
||||
|
||||
inline void decalClipAlpha(float alpha) {
|
||||
#ifndef DECAL_PREVIEW
|
||||
@ -239,9 +240,9 @@ fixed4 frag_forward(v2f IN) : SV_Target
|
||||
#ifdef DECAL_PREVIEW
|
||||
if (any(IN.uv_decal > 1) || any(IN.uv_decal < 0)) o.Alpha = 0;
|
||||
|
||||
o.Albedo = lerp(_Color.rgb, o.Albedo, o.Alpha);
|
||||
o.Albedo = lerp(_Background.rgb, o.Albedo, o.Alpha) * _Color.rgb;
|
||||
o.Normal = lerp(float3(0,0,1), o.Normal, o.Alpha);
|
||||
o.Gloss = lerp(_Color.a, o.Gloss, o.Alpha);
|
||||
o.Gloss = lerp(_Background.a, o.Gloss, o.Alpha);
|
||||
o.Emission = lerp(0, o.Emission, o.Alpha);
|
||||
o.Alpha = _Opacity;
|
||||
#endif //DECAL_PREVIEW
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user