|
|
|
|
|
|
[ToggleOff] _EnableFogOnTransparent("Enable Fog", Float) = 0.0 |
|
|
|
[ToggleOff] _DoubleSidedEnable("Double sided enable", Float) = 0.0 |
|
|
|
|
|
|
|
// Stencil state |
|
|
|
[HideInInspector] _StencilRef("_StencilRef", Int) = 2 // StencilLightingUsage.RegularLighting (fixed at compile time) |
|
|
|
[HideInInspector] _StencilWriteMask("_StencilWriteMask", Int) = 7 // StencilMask.Lighting (fixed at compile time) |
|
|
|
[HideInInspector] _StencilRefMV("_StencilRefMV", Int) = 128 // StencilLightingUsage.RegularLighting (fixed at compile time) |
|
|
|
[HideInInspector] _StencilWriteMaskMV("_StencilWriteMaskMV", Int) = 128 // StencilMask.ObjectsVelocity (fixed at compile time) |
|
|
|
|
|
|
|
// Caution: C# code in BaseLitUI.cs call LightmapEmissionFlagsProperty() which assume that there is an existing "_EmissionColor" |
|
|
|
// value that exist to identify if the GI emission need to be enabled. |
|
|
|
// In our case we don't use such a mechanism but need to keep the code quiet. We declare the value and always enable it. |
|
|
|
|
|
|
#include "ShaderPass/UnlitSharePass.hlsl" |
|
|
|
#include "UnlitData.hlsl" |
|
|
|
#include "../../ShaderPass/ShaderPassLightTransport.hlsl" |
|
|
|
|
|
|
|
ENDHLSL |
|
|
|
} |
|
|
|
|
|
|
|
Pass |
|
|
|
{ |
|
|
|
Name "Motion Vectors" |
|
|
|
Tags{ "LightMode" = "MotionVectors" } // Caution, this need to be call like this to setup the correct parameters by C++ (legacy Unity) |
|
|
|
|
|
|
|
// If velocity pass (motion vectors) is enabled we tag the stencil so it don't perform CameraMotionVelocity |
|
|
|
Stencil |
|
|
|
{ |
|
|
|
WriteMask [_StencilWriteMaskMV] |
|
|
|
Ref [_StencilRefMV] |
|
|
|
Comp Always |
|
|
|
Pass Replace |
|
|
|
} |
|
|
|
|
|
|
|
Cull[_CullMode] |
|
|
|
|
|
|
|
ZWrite On |
|
|
|
|
|
|
|
HLSLPROGRAM |
|
|
|
|
|
|
|
#define SHADERPASS SHADERPASS_VELOCITY |
|
|
|
#include "../../ShaderVariables.hlsl" |
|
|
|
#include "../../Material/Material.hlsl" |
|
|
|
#include "ShaderPass/UnlitSharePass.hlsl" |
|
|
|
#include "UnlitData.hlsl" |
|
|
|
#include "../../ShaderPass/ShaderPassVelocity.hlsl" |
|
|
|
|
|
|
|
ENDHLSL |
|
|
|
} |
|
|
|