mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-09-01 18:23:54 +00:00
fix cutoff value on shaders
This commit is contained in:
parent
38ce1184ea
commit
2af192966f
@ -61,10 +61,7 @@ Shader "ConformalDecals/Feature/Bumped"
|
||||
float4 color = tex2D(_Decal, IN.uv_decal);
|
||||
float3 normal = UnpackNormalDXT5nm(tex2D(_DecalBumpMap, IN.uv_bump));
|
||||
|
||||
#ifdef DECAL_PROJECT
|
||||
// clip alpha
|
||||
clip(color.a - _Cutoff + 0.01);
|
||||
#endif //DECAL_PROJECT
|
||||
decalClipAlpha(color.a - _Cutoff);
|
||||
|
||||
half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal));
|
||||
float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a;
|
||||
@ -113,10 +110,7 @@ Shader "ConformalDecals/Feature/Bumped"
|
||||
float4 color = tex2D(_Decal, IN.uv_decal);
|
||||
float3 normal = UnpackNormal(tex2D(_DecalBumpMap, IN.uv_bump));
|
||||
|
||||
#ifdef DECAL_PROJECT
|
||||
// clip alpha
|
||||
clip(color.a - _Cutoff + 0.01);
|
||||
#endif //DECAL_PROJECT
|
||||
decalClipAlpha(color.a - _Cutoff);
|
||||
|
||||
half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal));
|
||||
float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a;
|
||||
|
@ -64,7 +64,7 @@ Shader "ConformalDecals/Paint/Diffuse"
|
||||
{
|
||||
float4 color = tex2D(_Decal, IN.uv_decal);
|
||||
|
||||
decalClipAlpha(color.a);
|
||||
decalClipAlpha(color.a - _Cutoff);
|
||||
|
||||
float3 normal = IN.normal;
|
||||
half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal));
|
||||
@ -118,7 +118,7 @@ Shader "ConformalDecals/Paint/Diffuse"
|
||||
{
|
||||
float4 color = tex2D(_Decal, IN.uv_decal);
|
||||
|
||||
decalClipAlpha(color.a);
|
||||
decalClipAlpha(color.a - _Cutoff);
|
||||
|
||||
float3 normal = IN.normal;
|
||||
half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal));
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user