Unity Issue Tracker - Dynamic branching shader code can't be shared with passes that don't declare the keywords
Fixed
UUM-59203
Dynamic branching shader code can't be shared with passes that don't declare the keywords
Unity: Shader System
Fixed
2023.3.X
2023.2.X
2022.3.X
Added auto-generated _KEYWORD_DECLARED defines for all declared keywords. This allows the shader authors to structure their shader includes in a way that depend on the presence of the specific keywords.
Added auto-generated _KEYWORD_DECLARED defines for all declared keywords. This allows the shader authors to structure their shader includes in a way that depend on the presence of the specific keywords.
Added auto-generated _KEYWORD_DECLARED defines for all declared keywords. This allows the shader authors to structure their shader includes in a way that depend on the presence of the specific keywords.
If an include file contains dynamic branching code based on dynamic_branch keywords then all the passes including the file must declare those keywords. Otherwise the compilation will fail.
This is essentially preventing users from using dynamic branching in shared utility includes.
Prioritise and Follow this issue
Have a workaround or additional info about this issue?