mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-09-01 18:23:54 +00:00
rename background color property to make KSP happy
This commit is contained in:
parent
afcc19c843
commit
5560eee368
@ -8,10 +8,10 @@ Shader "ConformalDecals/Feature/Bumped"
|
|||||||
|
|
||||||
_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
|
_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
|
||||||
_DecalOpacity("Opacity", Range(0,1) ) = 1
|
_DecalOpacity("Opacity", Range(0,1) ) = 1
|
||||||
_Background("Background Color", Color) = (0.9,0.9,0.9,0.7)
|
_Color("Background Color", Color) = (0.9,0.9,0.9,0.7)
|
||||||
|
|
||||||
[Enum(UnityEngine.Rendering.CullMode)] _Cull ("Cull", Float) = 0
|
[Enum(UnityEngine.Rendering.CullMode)] _Cull ("Cull", int) = 2
|
||||||
[Toggle(DECAL_PREVIEW)] _Preview ("Preview", Float) = 0
|
[Toggle(DECAL_PREVIEW)] _Preview ("Preview", int) = 0
|
||||||
|
|
||||||
[Header(Effects)]
|
[Header(Effects)]
|
||||||
[PerRendererData]_Opacity("_Opacity", Range(0,1) ) = 1
|
[PerRendererData]_Opacity("_Opacity", Range(0,1) ) = 1
|
||||||
|
@ -11,10 +11,10 @@ Shader "ConformalDecals/Paint/Diffuse"
|
|||||||
|
|
||||||
_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
|
_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
|
||||||
_DecalOpacity("Opacity", Range(0,1) ) = 1
|
_DecalOpacity("Opacity", Range(0,1) ) = 1
|
||||||
_Background("Background Color", Color) = (0.9,0.9,0.9,0.7)
|
_Color("Background Color", Color) = (0.9,0.9,0.9,0.7)
|
||||||
|
|
||||||
[Enum(UnityEngine.Rendering.CullMode)] _Cull ("Cull", Float) = 0
|
[Enum(UnityEngine.Rendering.CullMode)] _Cull ("Cull", int) = 2
|
||||||
[Toggle(DECAL_PREVIEW)] _Preview ("Preview", Float) = 0
|
[Toggle(DECAL_PREVIEW)] _Preview ("Preview", int) = 0
|
||||||
|
|
||||||
[Header(Effects)]
|
[Header(Effects)]
|
||||||
[PerRendererData]_Opacity("_Opacity", Range(0,1) ) = 1
|
[PerRendererData]_Opacity("_Opacity", Range(0,1) ) = 1
|
||||||
|
@ -12,17 +12,17 @@ Shader "ConformalDecals/Paint/Specular"
|
|||||||
|
|
||||||
_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
|
_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
|
||||||
_DecalOpacity("Opacity", Range(0,1) ) = 1
|
_DecalOpacity("Opacity", Range(0,1) ) = 1
|
||||||
_Background("Background Color", Color) = (0.9,0.9,0.9,0.7)
|
_Color("Background Color", Color) = (0.9,0.9,0.9,0.7)
|
||||||
|
|
||||||
[Header(Specularity)]
|
[Header(Specularity)]
|
||||||
_SpecColor ("_SpecColor", Color) = (0.25, 0.25, 0.25, 1)
|
_SpecColor ("_SpecColor", Color) = (0.25, 0.25, 0.25, 1)
|
||||||
_Shininess ("Shininess", Range (0.03, 10)) = 0.3
|
_Shininess ("Shininess", Range (0.03, 10)) = 0.3
|
||||||
|
|
||||||
[Enum(UnityEngine.Rendering.CullMode)] _Cull ("Cull", Float) = 0
|
[Enum(UnityEngine.Rendering.CullMode)] _Cull ("Cull", int) = 2
|
||||||
[Toggle(DECAL_PREVIEW)] _Preview ("Preview", Float) = 0
|
[Toggle(DECAL_PREVIEW)] _Preview ("Preview", int) = 0
|
||||||
|
|
||||||
[Header(Effects)]
|
[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]_RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1
|
||||||
[PerRendererData]_RimColor("_RimColor", Color) = (0,0,0,0)
|
[PerRendererData]_RimColor("_RimColor", Color) = (0,0,0,0)
|
||||||
[PerRendererData]_UnderwaterFogFactor ("Underwater Fog Factor", Range(0,1)) = 0
|
[PerRendererData]_UnderwaterFogFactor ("Underwater Fog Factor", Range(0,1)) = 0
|
||||||
|
@ -71,9 +71,7 @@ float3 _DecalTangent;
|
|||||||
|
|
||||||
float _Cutoff;
|
float _Cutoff;
|
||||||
float _DecalOpacity;
|
float _DecalOpacity;
|
||||||
|
|
||||||
float _Opacity;
|
float _Opacity;
|
||||||
float4 _Background;
|
|
||||||
|
|
||||||
inline void decalClipAlpha(float alpha) {
|
inline void decalClipAlpha(float alpha) {
|
||||||
#ifndef DECAL_PREVIEW
|
#ifndef DECAL_PREVIEW
|
||||||
@ -223,9 +221,9 @@ fixed4 frag_forward(v2f IN) : SV_Target
|
|||||||
surf(i, o);
|
surf(i, o);
|
||||||
|
|
||||||
#ifdef DECAL_PREVIEW
|
#ifdef DECAL_PREVIEW
|
||||||
o.Albedo = lerp(_Background.rgb,o.Albedo, o.Alpha);
|
o.Albedo = lerp(_Color.rgb,o.Albedo, o.Alpha);
|
||||||
o.Normal = lerp(float3(0,0,1), o.Normal, o.Alpha);
|
o.Normal = lerp(float3(0,0,1), o.Normal, o.Alpha);
|
||||||
o.Gloss = lerp(_Background.a, o.Gloss, o.Alpha);
|
o.Gloss = lerp(_Color.a, o.Gloss, o.Alpha);
|
||||||
o.Emission = lerp(0, o.Emission, o.Alpha);
|
o.Emission = lerp(0, o.Emission, o.Alpha);
|
||||||
o.Alpha = _Opacity;
|
o.Alpha = _Opacity;
|
||||||
#endif //DECAL_PREVIEW
|
#endif //DECAL_PREVIEW
|
||||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user