Hello!
It seems that after the refactoring of PBR fragment shader code the order of #define CUSTOM_FRAGMENT_...
blocks inside of it got broken.
For example, now this block:
#define CUSTOM_FRAGMENT_UPDATE_ALBEDO
comes before that block:
#define CUSTOM_FRAGMENT_DEFINITIONS
So since custom uniforms have to be defined in the latter block, while being used in the first block, shader fails to compile with FRAGMENT SHADER ERROR: undeclared identifier
error.
Please check Babylon.js Playground for the reference. There’s an error with the latest version of BJS, while with v.4.1.0 everything works fine.