One Bit - Unity Asset Store - Nephasto

One Bit will give your games a retro and original look using a dithering with blue noise to achieve an stable render image.

🕹️ Demo  🛒 Store

Editor

Once installed, select the camera for your scene and add the ‘One Bit’ component.

 

Once the effect is added, you will see something like this:

 

With ‘Strength’ (1) you can select the strength of the effect. In ‘Mode’ (2) you can select which areas of the screen the effect affects. The first is ‘Screen’ and if selecting it the entire screen will use the effect. If you use ‘Layer’, only the objects in the layers you select in ‘Layer mask’ (14) will be affected by the effect.

 

The last mode is ‘Distance’ and with it you can modulate the intensity of the effect according to the distance of the camera. Use ‘Curve’ (15) to adjust the intensity.

 

It starts at the ‘Near’ of the camera and ends at the ‘Far’. Surely you have to adjust these values ​​(especially ‘Far') in the camera of your game.

If you see any precision errors in the ‘Layer’ or ‘Distance’ modes, it may be due to precision problems with the depth buffer. You can fix it by adjusting the ‘Far’ value of your camera or ‘Depth threshold’ in ‘Advanced settings’ (11).

With ‘Blend ops’ (3) you can change how the effect blends with the original image. By default it is ‘Solid’ which completely overwrites the original image for the effect image. Here are some examples:

By adjusting the ‘Seed’, ‘Strength’ and ‘Edges’ values ​​you can change the pattern that will be used for the dithering effect. The first one changes the seed used to generate the blue noise. The second modifies the intensity and the third modifies the strength of the edges.

You can also change the color gradient (7) and invert the color (8). The default gradient is ‘Solid’ (no gradient). Other options are ‘Horizontal’, ‘Vertical’ and ‘Circular’.

If you want to further adjust the final color, turn on ‘Color’ (9) to access more adjustments. If you want to smooth the edges that the effect generates, activate ‘Antialiasing’ (10) (this option adds a pass to the effect so the performance can be worse).

 

Code

All the code is inside the namespace ‘Nephasto.OneBitAsset’. The first thing you should do is import the namespace:

1
 using Nephasto.OneBitAsset;

 

If ‘myCamera’ is a valid camera and you want to add the effect to it, you can do something like this:

1
 OneBit oneBit = mycamera.gameObject.AddComponent<OneBit>();

 

For more information, you can consult the code comments and the attached demo.

Any questions or suggestions you have, I will be happy to answer you in

hello@nephasto.com