|
|
|
|
|
|
Shader "HDRenderPipeline/Decal" |
|
|
|
{ |
|
|
|
Properties |
|
|
|
{ |
|
|
|
{ |
|
|
|
_MaskMap("MaskMap", 2D) = "white" {} |
|
|
|
_MaskMap("MaskMap", 2D) = "white" {} |
|
|
|
_DecalBlend("_DecalBlend", Range(0.0, 1.0)) = 0.5 |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------------- |
|
|
|
// Define |
|
|
|
//------------------------------------------------------------------------------------- |
|
|
|
#define UNITY_MATERIAL_DECAL |
|
|
|
|
|
|
|
#define UNITY_MATERIAL_DECAL |
|
|
|
|
|
|
|
//------------------------------------------------------------------------------------- |
|
|
|
// Include |
|
|
|
//------------------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|
|
SubShader |
|
|
|
{ |
|
|
|
Tags{ "RenderPipeline" = "HDRenderPipeline"} |
|
|
|
|
|
|
|
Tags { "RenderPipeline" = "HDPipeline" "LightMode" = "DBuffer" } // This will be only for opaque object based on the RenderQueue index |
|
|
|
Tags { "LightMode" = "DBuffer" } // This will be only for opaque object based on the RenderQueue index |
|
|
|
|
|
|
|
// back faces with zfail, for cases when camera is inside the decal volume |
|
|
|
Cull Front |
|
|
|
|
|
|
#define SHADERPASS SHADERPASS_DBUFFER |
|
|
|
#include "../../ShaderVariables.hlsl" |
|
|
|
#include "Decal.hlsl" |
|
|
|
#include "ShaderPass/DecalSharePass.hlsl" |
|
|
|
#include "ShaderPass/DecalSharePass.hlsl" |
|
|
|
#include "DecalData.hlsl" |
|
|
|
#include "../../ShaderPass/ShaderPassDBuffer.hlsl" |
|
|
|
|
|
|
|