I added Cascaded Shadow generators to Blender 2.93 exporter, then realized this is not in the class of ShadowGenerators like all the others. For those, I group them inside a
"shadowGenerators":[]
Inside FileLoader, I do not even see when the Parse for them is called. Kind of a wild guess, but probably need a section like this, right?
I think I am encountering a bug when putting a Cascaded shadow generator in a babylon file. It is a little tricky to publish, because both sandbox & playground use the minimized versions of BJS. Here is the full scene using max with inlined JSON:
It dies in the CascadedShadowGenerator constructor. Here is the stack from there down
Unsupported filter "2"!
_validateFilter cascadedShadowGenerator.ts:85
set shadowGenerator.ts:445
set shadowGenerator.ts:412
set shadowGenerator.ts:545
CascadedShadowGenerator cascadedShadowGenerator.ts:725
The line numbers from stack are different source files, but line 725 is the last line of the constructor
this.usePercentageCloserFiltering = true;
This is a setter. I am not sure what happens, but as this problem is occurring in the constructor, and there is no opportunity to even specify a filter, I do not see how this could be fixed in JSON.
Only “none”, “PCF” and “PCSS” are supported as filter values for CSM. Value 2 is Poisson sampling => it seems the json file is setting the filter value to 2.