You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

46 lines
1.3 KiB

Shader "Hidden/HDRP/BlitColorAndDepth"
{
HLSLINCLUDE
#pragma target 4.5
#pragma editor_sync_compilation
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
#pragma multi_compile _ DISABLE_TEXTURE2D_X_ARRAY
#pragma multi_compile _ BLIT_SINGLE_SLICE
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
#include "Packages/com.unity.render-pipelines.core/Runtime/Utilities/BlitColorAndDepth.hlsl"
ENDHLSL
SubShader
{
Tags{ "RenderPipeline" = "HDRenderPipeline" }
// 0: Color Only
Pass
{
ZWrite Off ZTest Always Blend Off Cull Off
Name "ColorOnly"
HLSLPROGRAM
#pragma vertex Vert
#pragma fragment FragColorOnly
ENDHLSL
}
// 1: Color Only and Depth
Pass
{
ZWrite On ZTest Always Blend Off Cull Off
Name "ColorAndDepth"
HLSLPROGRAM
#pragma vertex Vert
#pragma fragment FragColorAndDepth
ENDHLSL
}
}
Fallback Off
}