MultiRenderTarget with size set to ratio

I noticed that when setting the size parameter to some variation of { ratio: ... } that the incorrect size is stored in MultiRenderTarget.

This playground shows the result.

RenderTargetTexture uses ._processSizeParameter(...) to ensure that ._size is set correctly (i.e. w/ width and height), but MultiRenderTarget overrides that value after calling super(...):

This produces a ._size that looks like { width: { ratio: x }, height: { ratio: x } } which causes a host of other errors.

Similarly, MultiRenderTarget.resize(...) never correctly formats ._size either.

ping @Evgeni_Popov

Thanks for reporting, here’s the fix:

4 Likes