skip to Main Content

Build Tips

Common Mistakes

1) Make sure Beautify Render Feature is added to all URP assets in Project Settings / Quality. There can be a different URP asset per quality level.
2) Don’t use Beautify shader stripping options in more than one volume in your project. Use these options in only one volume since they are global and affect the entire application. Don’t use automatic strip unused features in more than one volume.

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:

  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_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_VIGNETTING_MASK Texture-mask vignette
BEAUTIFY_EYE_ADAPTATION Eye adaptation 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

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