Version: Unity 6.2 Alpha (6000.2)
Language : English
Strip fog shader variants in URP
Shader Material Inspector window reference for URP

Remove shader variants when using a custom Renderer Feature in URP

If you create a custom Renderer Feature, you can use the FilterAttribute API to remove shaderA program that runs on the GPU. More info
See in Glossary
variants when you enable or disable settings in the URP Asset.

For example, you can do the following:

  1. Use SerializeField to add a Boolean variable to the custom Renderer Feature and add it as a checkbox in the URP Asset InspectorA Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info
    See in Glossary
    .
  2. Use ShaderKeywordFilter.RemoveIf to remove shader variants when you enable the checkbox.

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答
Strip fog shader variants in URP
Shader Material Inspector window reference for URP
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961