ドキュメント

Unity Engine


User Manual

Script Reference

Unity Engine


Reducing shader variants

Reduce the number of compiled shaders in your project.
読み終わるまでの所要時間 1 分最終更新 24日前

Strategies for reducing shader variants to optimize builds and performance.

Page

Description

Introduction to shader variantsUnderstand how Unity compiles shaders into multiple shader variants.
Check how many shader variants you haveUse the shader logging and profiling tools in Unity.
Reduce shader variantsPrevent Unity compiling shader variants.
Reduce shader variants in custom shader codeUse the
#pragma
directive or preprocessor macros to limit shader variants in custom shaders.
Default keyword setsResources for the default shader keywords in Unity, and creating sets of built-in keywords.

Additional resources