Over 11,000 five-star assets

Rated by 85,000+ customers

Supported by 100,000+ forum members

Every asset moderated by Unity

Home
VFX
Shaders
Fullscreen & Camera Effects
1/6
*** Requires Unity Pro ***
*** Advanced: requires you to modify all of your shaders***
*** Read all caveats below before purchasing***


Description:
Mobile Optimized Depth of Field is a recognizable optical effect to add an extra layer of realism to your next 2.5D or 3D mobile game. We provide a number of options to achieve the right look and feel while still maintaining a reasonable frame rate. Developed for the award-winning iOS/Android puzzle game Lost Toys

Features:
- Mobile optimised. Saves approx. 50% GPU vs. the same Unity Pro Image Effect.
- Foreground and background blur out of the box.
- Preview the effect in the editor without running your game on every tweak.
- Integrates with existing image effects, using the built-in Unity post-processing pipeline. (Too many will hinder your framerate.)
- Adjustable camera aperture.
- Adjustable blurriness (downsampling). (More blurriness will improve your framerate.)
- Aspect-ratio independent and smoothly handles screen resizes.

Example Scene Benchmarks:
iPad 3 (retina)

Mobile-optimized DoF:
30 FPS, 84% Utilization, 27.7ms Frame Time

Unity Pro Image Effects DoF:
17 FPS, 100% Utilization, 57.7ms Frame Time

Baseline:
30 FPS, 48% Utilization, 15.8ms Frame Time

Caveats:
No matter what, depth of field (or any post-process effect) will incur a performance hit on mobile, which are fill-rate constrained. 1st gen retina iPad 3's are particularly prone, which is why it was chosen as the benchmark device.

In order to achieve the performance necessary for real-time mobile depth-of-field you must modify all shaders in the scene that are expected to be out of focus or occlude focus. This package includes step-by-step instructions and helpers for making these changes and examples of their usage in a variety of shaders: Surface, Vertex-Fragment shaders, Terrain, Cutout-Transparency, Diffuse, Normal, Specular and Excluded.

ShaderLab shaders are not supported. This asset is dependent on vertex functions.

Only cutout-transparency is supported. Alpha blending isn't easily supported due to how the performance improvements work. Since alpha blending is expensive on mobile this should generally be avoided anyway.

Support

Depth of Field Mobile Shader

(15)
405 users have favourite this asset
(405)
$35
Taxes/VAT calculated at checkout
11 views in the past week
License type: Single Entity
Single Entity
Recommended for individuals and small businesses.
Multi Entity
Recommended for large enterprises working across multiple locations.
Refund policy
This asset is covered by the Unity Asset Store Refund Policy. Please see section 2.9.3 of the EULA for details.
Secure checkout:
Supported payment methods: Visa, Mastercard, Maestro, Paypal, Amex
9 years ago
Worked for me
The documentation was sufficient for me to eventually modify my shaders. The included shader examples were nice. (I wish there was more than one verte...
Quality assets
Over 11,000 five-star assets
Trusted
Rated by 85,000+ customers
Community support
Supported by 100,000+ forum members
Unity logo
Language
Feedback
Partners Program
Partners
USD
EUR
Copyright © 2025 Unity Technologies
All prices are exclusive of tax
USD
EUR