Hello,
does the internal render target of Reflector.js need to be disposed?
Reflector does not expose a method to dispose it
You could get the render target via getRenderTarget()
and then call dispose()
on it.
However, it seems more clear to add a dispose()
method for both Reflector
and Refractor
which calls dispose()
on the render target and the internal material.
Would you like to make a PR with such a change?
Yes, I can try. Do you think it could be useful to modify Reflector constructor ‘options’ parameter in order to let the user pass a callback that creates the render target? in this way it would be possible to create also a WebGLMultisampleRenderTarget
That sounds to complicated to me. We should not offer users the possibilty to create render targets. I would keep it simple and do it like mentioned in Poor resolution in Reflector? - #5 by Mugen87.
If you are interested in doing both changes, please make separate PRs. One for dispose()
and another one for the antialias issue.
Done!