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

Commit

Permalink
Fixed DoF on very low end platforms without float texture support
Browse files Browse the repository at this point in the history
  • Loading branch information
Chman committed Jul 27, 2017
1 parent a87442f commit df8259f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions PostProcessing/Runtime/Components/DepthOfFieldComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public override bool active
get
{
return model.enabled
&& SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGBHalf)
&& !context.interrupted;
}
}
Expand Down Expand Up @@ -81,11 +80,11 @@ RenderTextureFormat SelectFormat(RenderTextureFormat primary, RenderTextureForma
public void Prepare(RenderTexture source, Material uberMaterial, bool antialiasCoC, Vector2 taaJitter, float taaBlending)
{
var settings = model.settings;
var colorFormat = RenderTextureFormat.ARGBHalf;
var colorFormat = RenderTextureFormat.DefaultHDR;
var cocFormat = SelectFormat(RenderTextureFormat.R8, RenderTextureFormat.RHalf);

// Avoid using R8 on OSX with Metal. #896121, https://goo.gl/MgKqu6
#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
#if (UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX) && !UNITY_2017_1_OR_NEWER
if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Metal)
cocFormat = SelectFormat(RenderTextureFormat.RHalf, RenderTextureFormat.Default);
#endif
Expand Down

0 comments on commit df8259f

Please sign in to comment.