Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit 0f1237e

Browse files
committed
Fixed shader compilation issue on dx9 and disabled DoF on d3d11_9x
1 parent 5b5dea4 commit 0f1237e

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

PostProcessing/Resources/Shaders/DepthOfField.cginc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include "DiskKernels.cginc"
77

88
#define PREFILTER_LUMA_WEIGHT 1
9-
#pragma target 3.0
109

1110
sampler2D_float _CameraDepthTexture;
1211
sampler2D_float _HistoryCoC;
@@ -101,7 +100,7 @@ half4 FragPrefilter(VaryingsDOF i) : SV_Target
101100
struct Output
102101
{
103102
half4 base : SV_Target0;
104-
half history : SV_Target1;
103+
half4 history : SV_Target1;
105104
};
106105

107106
Output FragAntialiasCoC(VaryingsDOF i)
@@ -113,7 +112,7 @@ Output FragAntialiasCoC(VaryingsDOF i)
113112

114113
Output output;
115114
output.base = half4(base.rgb, nCoC);
116-
output.history = nCoC;
115+
output.history = nCoC.xxxx;
117116
return output;
118117
}
119118

PostProcessing/Resources/Shaders/DepthOfField.shader

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ Shader "Hidden/Post FX/Depth Of Field"
55
_MainTex ("", 2D) = "black"
66
}
77

8+
CGINCLUDE
9+
#pragma exclude_renderers d3d11_9x
10+
#pragma target 3.0
11+
ENDCG
12+
813
SubShader
914
{
1015
Cull Off ZWrite Off ZTest Always
@@ -15,7 +20,6 @@ Shader "Hidden/Post FX/Depth Of Field"
1520
CGPROGRAM
1621
#pragma vertex VertDOF
1722
#pragma fragment FragPrefilter
18-
#pragma target 3.0
1923
#include "DepthOfField.cginc"
2024
ENDCG
2125
}

0 commit comments

Comments
 (0)