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:
@ -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
|
||||
|
Reference in New Issue
Block a user