skip to Main Content

Performance Tips

Performance tips

We recommend providing 3 levels of quality in your game. Each level quality (which the user could select from a main menu) defines a specific profile with custom settings.

Tips to get the best performance:

  • If you don’t use Unity Post Processing, disable Post Processing checkbox on the camera and enable the “Ignore Post Processing Option” in Beautify Render Feature.

  • Enable “Prioritize Shader Performance”.

  • Enable “Direct Write To Camera” (this option is only available in 2019 or 2021 Unity versions – not needed in 2022 or later).
  • In the URP renderer asset, try Depth Texture Mode = Force Prepass (this can improve performance on some platforms, depends on the scene as well so you must try it).
  • Increase “Downscale” value with “Full Frame” mode if needed. A small downscale is unnoticeable on mobile and can improve the FPS considerably.

  • Reduce number of effects.

Reducing build size

Tips to improve build times:

  • Enable “Strip All” under Optimize Unity Post Processing Build to remove most shader variants from Unity post processing (if you are using only Beautify, this option is very useful).

  • Enable “Automatically Strip Unused Features” or manually strip the effects that you won’t use by editing BeautifyCore.shader file (see next section).

Manually setting shader keywords/features

Edit BeautifyCore.shader file and search any line starting with #pragma multi_compile_local. For example:

#pragma multi_compile_local __ BEAUTIFY_TONEMAP_ACES

This line will generate 2 variants of the shader. One that use the ACES tonemapper and other that doesn’t.

A way to reduce shader variants involves setting manually the shader keyword:

  1. If your game uses the ACES feature, you can just replace that line with:

#define BEAUTIFY_TONEMAP_ACES 1
  1. If your game does not use the ACES feature at all, you can just remove completely that line (or keyword if there’re more keywords in the same line).

List of keywords used:

BEAUTIFY_TONEMAP_ACES Uses the custom ACES tonemapper
BEAUTIFY_LUT Uses LUT (color look-up texture) option
BEAUTIFY_NIGHT_VISION Night vision effect
BEAUTIFY_BLOOM Bloom effect
BEAUTIFY_BLOOM_USE_DEPTH Used to attenuate bloom with depth
BEAUTIFY_BLOOM_USE_LAYER Used by the option to apply bloom only to specific layers
BEAUTIFY_ANAMORPHIC_FLARES_USE_DEPTH Used by the option to apply anamorphic flares only to specific layers
BEAUTIFY_DIRT Lens dirt effect
BEAUTIFY_DEPTH_OF_FIELD Depth of field effect
BEAUTIFY_DOF_TRANSPARENT Special treatment to transparent objects with depth of field
BEAUTIFY_CHROMATIC_ABERRATION Chromatic aberration effect
BEAUTIFY_PURKINJE Purkinje effect
BEAUTIFY_VIGNETTING Vigenette effect
BEAUTIFY_VIGNETTING_MASK Texture-mask vignette
BEAUTIFY_EYE_ADAPTATION Eye adaptation effect
BEAUTIFY_OUTLINE Outline effect
BEAUTIFY_COLOR_TWEAKS Color adjustments listed under Tonemapping and Color Grading section in the inspector
BEAUTIFY_TURBO Uses faster shader code
BEAUTIFY_DITHER Dithering effect
BEAUTIFY_SHARPEN Sharpen effect

Important! Please note that:

  1. All these keywords are defined as “local keyword” meaning that they don’t count towards the total of 256 maximum global keywords.

  2. Any modification to BeautifyCore.shader will be lost when updating the asset to a newer version. Remember to apply the same modifications after updating.

Back To Top