mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-09-01 18:23:54 +00:00
Tweaks to clean up shader multi-compiles and formatting
This commit is contained in:
parent
92818edfaa
commit
f1115ef188
@ -43,13 +43,19 @@
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "Queue" = "Geometry+100" "IgnoreProjector" = "true" "DisableBatching" = "true"}
|
||||
Tags
|
||||
{
|
||||
"Queue" = "Geometry+100" "IgnoreProjector" = "true" "DisableBatching" = "true"
|
||||
}
|
||||
Cull [_Cull]
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "FORWARD"
|
||||
Tags { "LightMode" = "ForwardBase" }
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "ForwardBase"
|
||||
}
|
||||
ZWrite [_ZWrite]
|
||||
ZTest LEqual
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
@ -58,8 +64,7 @@
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag_forward
|
||||
|
||||
#pragma multi_compile_fwdbase nolightmap nodirlightmap nodynlightmap
|
||||
#pragma skip_variants SHADOWS_DEPTH SHADOWS_CUBE SHADOWS_SHADOWMASK LIGHTMAP_SHADOW_MIXING POINT_COOKIE
|
||||
#pragma multi_compile DIRECTIONAL
|
||||
#pragma multi_compile_local __ DECAL_PREVIEW
|
||||
#pragma multi_compile_local __ DECAL_BASE_NORMAL DECAL_BUMPMAP
|
||||
#pragma multi_compile_local __ DECAL_SPECMAP
|
||||
@ -67,14 +72,16 @@
|
||||
#pragma multi_compile_local __ DECAL_SDF_ALPHA
|
||||
|
||||
#include "StandardDecal.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "FORWARD"
|
||||
Tags { "LightMode" = "ForwardAdd" }
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "ForwardAdd"
|
||||
}
|
||||
ZWrite Off
|
||||
ZTest LEqual
|
||||
Blend SrcAlpha One
|
||||
@ -84,8 +91,7 @@
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag_forward
|
||||
|
||||
#pragma multi_compile_fwdadd nolightmap nodirlightmap nodynlightmap
|
||||
#pragma skip_variants SHADOWS_DEPTH SHADOWS_CUBE SHADOWS_SHADOWMASK LIGHTMAP_SHADOW_MIXING POINT_COOKIE
|
||||
#pragma multi_compile DIRECTIONAL SPOT POINT
|
||||
#pragma multi_compile_local __ DECAL_PREVIEW
|
||||
#pragma multi_compile_local __ DECAL_BASE_NORMAL DECAL_BUMPMAP
|
||||
#pragma multi_compile_local __ DECAL_SPECMAP
|
||||
@ -93,14 +99,16 @@
|
||||
#pragma multi_compile_local __ DECAL_SDF_ALPHA
|
||||
|
||||
#include "StandardDecal.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "DEFERRED_PREPASS"
|
||||
Tags { "LightMode" = "Deferred" }
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "Deferred"
|
||||
}
|
||||
ZWrite Off
|
||||
ZTest LEqual
|
||||
Offset -1, -1
|
||||
@ -115,15 +123,19 @@
|
||||
#pragma multi_compile_local __ DECAL_BASE_NORMAL
|
||||
#pragma multi_compile_local __ DECAL_SDF_ALPHA
|
||||
|
||||
#include "StandardDecal.cginc"
|
||||
#define DECAL_PREPASS
|
||||
|
||||
#include "StandardDecal.cginc"
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "DEFERRED"
|
||||
Tags { "LightMode" = "Deferred" }
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "Deferred"
|
||||
}
|
||||
ZWrite Off
|
||||
ZTest LEqual
|
||||
Offset -1, -1
|
||||
@ -132,7 +144,8 @@
|
||||
Blend 2 SrcAlpha OneMinusSrcAlpha, Zero One
|
||||
Blend 3 SrcAlpha OneMinusSrcAlpha, Zero One
|
||||
|
||||
Stencil {
|
||||
Stencil
|
||||
{
|
||||
Ref 1
|
||||
Comp Always
|
||||
Pass Replace
|
||||
@ -151,7 +164,6 @@
|
||||
#pragma multi_compile_local __ DECAL_SDF_ALPHA
|
||||
|
||||
#include "StandardDecal.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user