npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

jp.keijiro.minibokeh

v1.2.0

Published

Lightweight depth of field effect (bokeh).

Readme

MiniBokeh

gif

MiniBokeh is a lightweight depth-of-field effect for Unity's Universal Render Pipeline (URP).

Instead of sampling a camera depth texture, MiniBokeh models scene depth with a single reference plane. It assumes content lies on or near that plane, which makes it a good fit for planar scenes such as tabletop games, card games, or top-down strategy titles, and less suitable for general 3D scenes.

MiniBokeh uses a user-defined reference plane to compute depth. Place content near that plane for best results.

Reference Plane

MiniBokeh works well for top-down strategy scenes, especially when aiming for a miniature look (tilt-shift effect).

Fantasy Kingdom

It uses efficient separable blurs and provides two variants:

  • Hexagonal Separable Filter (L. McIntosh et al.) 1
  • Circular Separable Convolution Depth of Field (K. Garcia) 2

By using separable filters, MiniBokeh reduces GPU load compared to typical depth-of-field implementations, making it well-suited for mobile use.

System Requirements

  • Unity 6
  • Universal Render Pipeline (URP)
  • Render Graph enabled: MiniBokeh requires the URP Render Graph backend and is not compatible with "Compatibility Mode (Render Graph Disabled)" in the URP Global Settings.

Installation

The MiniBokeh package (jp.keijiro.minibokeh) can be installed via the "Keijiro" scoped registry using Package Manager. To add the registry to your project, please follow these instructions.

Setup

  • Add MiniBokehFeature to the Renderer Features list in your URP Renderer asset. See the Unity documentation for step-by-step instructions.
  • Attach the MiniBokehController component to each camera that should use the effect. The effect runs only on cameras with this component.

Controller Component

Inspector

Reference Plane

Transform that defines the reference plane used to compute depth.

Auto Focus

When enabled, focus distance is computed by intersecting the camera's forward ray with the reference plane. Disable to set it manually.

Focus Distance

Manual focus distance, used when Auto Focus is off.

Bokeh Strength

Controls bokeh sensitivity. Higher values create stronger blur with smaller depth differences. Value represents blur radius (% of screen height) when object distance equals focus distance.

Max Blur Radius

Maximum blur radius limit, specified as a percentage of screen height.

Boundary Fade

Controls edge darkening for out-of-bounds samples. See Limitations: Edge Sample Artifacts for details.

Bokeh Mode

Aperture shape. Hexagonal is faster but may show artifacts; Circular is smoother but uses more bandwidth.

Downsample Mode

Processing resolution. Half is faster with a slightly softer result; Full preserves more detail at higher cost.

Limitations

Artifacts with Hexagonal Bokeh

Hexagonal mode can produce artifacts near bright highlights.

Hex Artifacts

These artifacts are most visible in high-contrast scenes, for example with bright floating particles on a dark background.

Bokeh Shape Distortion

Bokeh shapes can appear distorted (teardrop-like) when the camera views the reference plane at a shallow angle.

Distorted Bokeh

A correct DoF scatters using the source pixel’s CoC; MiniBokeh gathers and uses the receiver’s CoC, which leads to distortion.

Edge Sample Artifacts

MiniBokeh uses clamp texture sampling for out-of-bounds samples. This can cause noticeable temporal artifacts at boundaries, especially with high-frequency elements (e.g., small dots, thin lines).

Edge artifacts example

You can reduce these by darkening out-of-bounds samples using the Boundary Fade property.

Boundary Fade applied

However, this also darkens screen edges, so balance it to suit the scene's tone.