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

Commit 113ad3b

Browse files
committed
DoF compatibility fix
Platforms without float texture support won't get any front plane DoF, but that's better than nothing I guess
1 parent e8faac1 commit 113ad3b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

PostProcessing/Runtime/Effects/DepthOfField.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ RenderTexture CheckHistory(int id, int width, int height, RenderTextureFormat fo
108108

109109
public override void Render(PostProcessRenderContext context)
110110
{
111-
var colorFormat = RenderTextureFormat.ARGBHalf;
111+
var colorFormat = RenderTextureFormat.DefaultHDR;
112112
var cocFormat = SelectFormat(RenderTextureFormat.R8, RenderTextureFormat.RHalf);
113113

114114
// Avoid using R8 on OSX with Metal. #896121, https://goo.gl/MgKqu6
115-
#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
115+
#if (UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX) && !UNITY_2017_1_OR_NEWER
116116
if (SystemInfo.graphicsDeviceType == UnityEngine.Rendering.GraphicsDeviceType.Metal)
117117
cocFormat = SelectFormat(RenderTextureFormat.RHalf, RenderTextureFormat.Default);
118118
#endif

0 commit comments

Comments
 (0)