‘One Bit‘ will give your games a retro and original look using a dithering with blue noise to achieve an stable render image.
Use ‘One Bit‘ is easy. Select the camera you’re going to use (usually called ‘Main Camera‘) in the ‘Hierarchy‘ editor window (1), then click on ‘Add Component‘ button in the ‘Inspector‘ window (2).
Now you can select the effect in two different ways. The first way is using the search field and write ‘One Bit‘, then select the effect.
Check the documentation included in the code and take a look at the example code in the ‘demo‘ folder.
When you add it you will see something like:
In the first zone (1) you can change the strength of the effect. You can also (2) change ‘Mode‘ between ‘Screen’, ‘Layer’ and ‘Distance’. Later we will see how they work. You can also control how the effect is mixed with the original image (3).
In the second zone (4) you can modify the effect parameters and the colors (5).
The ‘Color’ (6) area is used to modify color parameters and you must activate it (in the small circle near the label) to be able to use it. In ‘Advanced settings’ (4) you can adjust the ‘Depth threshold‘ parameter to adjust the sensitivity in the layers mode.
Pressing at ‘[doc]’ (8) will go to the online help and in the ‘Reset‘ (9) button some parameters will return to their default values.
I said that there are four different modes. The first one is ‘Screen‘ and is the one used by default. It makes the effect apply to the whole screen. Another mode is ‘Layer‘ and with it you can apply the effect only to the layers you want.
With ‘Distance‘ mode you can select the depth curve to modulate the effects strength. The range starts at the ‘Near‘ distance of the camera and ends at ‘Far‘. If you see any accuracy faults, you can adjust the sensitivity with ‘Depth threshold‘ at ‘Advanced settings’.
‘Layer‘, and ‘Distance‘ modes add a depth texture to the camera, and may not be available on some mobile platforms. You should also keep in mind that both modes depend on the ‘Far‘ parameter of your camera. If you use a ‘Far‘ too large (default is 1000), you may have precision problems, so I advise you to reduce it as much as possible.
The effect supports virtual reality devices (VR), but at the moment, only ‘Screen‘ mode does work in VR mode.
All code is inside the namespace ‘Ibuprogames.OneBitAsset‘ and the main component is ‘OneBit‘. So if you want to use it you must first import its namespace:
If ‘myCamera‘ is a valid camera and you want to add the effect, you should do something like:
All the code are well commented, I recommend reading the code if you want more information.
Any questions or suggestions you have, we will be happy to answer you in our mail: