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

Commit df8259f

Browse files
committed
Fixed DoF on very low end platforms without float texture support
1 parent a87442f commit df8259f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

PostProcessing/Runtime/Components/DepthOfFieldComponent.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public override bool active
2828
get
2929
{
3030
return model.enabled
31-
&& SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGBHalf)
3231
&& !context.interrupted;
3332
}
3433
}
@@ -81,11 +80,11 @@ RenderTextureFormat SelectFormat(RenderTextureFormat primary, RenderTextureForma
8180
public void Prepare(RenderTexture source, Material uberMaterial, bool antialiasCoC, Vector2 taaJitter, float taaBlending)
8281
{
8382
var settings = model.settings;
84-
var colorFormat = RenderTextureFormat.ARGBHalf;
83+
var colorFormat = RenderTextureFormat.DefaultHDR;
8584
var cocFormat = SelectFormat(RenderTextureFormat.R8, RenderTextureFormat.RHalf);
8685

8786
// Avoid using R8 on OSX with Metal. #896121, https://goo.gl/MgKqu6
88-
#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
87+
#if (UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX) && !UNITY_2017_1_OR_NEWER
8988
if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Metal)
9089
cocFormat = SelectFormat(RenderTextureFormat.RHalf, RenderTextureFormat.Default);
9190
#endif

0 commit comments

Comments
 (0)