Shadow offset of a textBlock doesn't scale properly with AdvancedDynamicTexture that has an ideal size

OK @dinutaleanu, I’m done investigating, and I believe you found a bug! When using the adaptive scaling feature (ideal width and height), all pixel values are supposed to be scaled, but the shadowOffsetX and shadowOffsetY values were not.

I’ve got a fix in this PR: GUI 2D: Fix shadowOffsetX and shadowOffsetY to respect adaptive scaling by AmoebaChant · Pull Request #17377 · BabylonJS/Babylon.js · GitHub

FYI: I tried a little workaround in Babylon.js Playground where I modify shadowOffsetX and shadowOffsetY to account for idealRatio (that’s the ratio of how the current size compares to the ideal size). This isn’t the real fix, because we wouldn’t want shadowOffsetX and Y to change based on the adaptive scaling, but it does simulate the results of the real fix.

Thanks again for reporting this!