A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.unity3d.com/Manual/../ScriptReference/../Manual/avoid-shader-duplication.html below:

Manual: Troubleshooting shader duplication from AssetBundles

Control how much memory shaders use

Troubleshooting shader duplication from AssetBundles

If you use AssetBundles, Unity might compile duplicate shaders if you reference one shaderA program that runs on the GPU. More info
See in Glossary
in two or more objects. For example:

This can increase the memory and storage space shaders use, and break draw call batching.

To avoid this, you can use the following approaches:

You can add materials and shader variant collections to an AssetBundle to specify which shader variants to include.

If you create a single AssetBundle, some shaders might stay in memory even if they’re no longer needed, because you cannot partially unload an AssetBundle. You can avoid this by creating a separate AssetBundle for each group of shaders you use together, for example a ‘forest’ AssetBundle and a ‘desert’ AssetBundle. See Managing loaded AssetBundles, or Memory management in the Addressables system if you use Addressables.

Control how much memory shaders use


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4