Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


shaderkeyword

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
shaderkeyword [2021/05/02 17:20]
192.99.36.166 old revision restored (2021/03/22 16:18)
shaderkeyword [2021/05/10 21:16] (current)
uninomiconadmin old revision restored (2021/03/22 16:20)
Line 16: Line 16:
  
 But the only shaders present in the build (after stripping) are: But the only shaders present in the build (after stripping) are:
-''_KEYWORD1 _KEYWORD2'' +<code> 
-''_KEYWORD2 _KEYWORD3''+_KEYWORD1 _KEYWORD2 
 +_KEYWORD2 _KEYWORD3 
 +</code>
  
 Unity will apply a fallback mechanism((I'm not sure what the fallback mechanism is, exactly)) to select a variant shader with the closest set of keywords. Unity will apply a fallback mechanism((I'm not sure what the fallback mechanism is, exactly)) to select a variant shader with the closest set of keywords.
Line 25: Line 27:
 Sometimes it's useful to debug which shader variants and keywords are actually being included into a build. The "Compiled Code" drop-down in the shader inspector has a button to show the variants included in a build, and more importantly, //why//. Some keywords are always included in a build, globally, and some are only included if a scene uses a material with those keywords. Sometimes it's useful to debug which shader variants and keywords are actually being included into a build. The "Compiled Code" drop-down in the shader inspector has a button to show the variants included in a build, and more importantly, //why//. Some keywords are always included in a build, globally, and some are only included if a scene uses a material with those keywords.
  
-{{ :unity_4llyy1titq.png }}+{{ :unity_4llyy1titq.png?200 }}
shaderkeyword.1619976009.txt.gz · Last modified: 2021/05/02 17:20 by 192.99.36.166