Refractor for use in OrthographicCamera?


Using @Mugen87 's Refraction class on a scene that uses an Orthographic Camera (essentially using the Refractor a post-processing plane for a specific area and z-position on the scene). Just noticed it works if I’m using a PerspectiveCamera, but not with an OrthographicCamera…it seems to have to do on the inner working of the Refraction Camera depending on a perspective to render to the framebuffer, but shouldn’t it work nonetheless?

No, the internal virtual camera of Reflector and Refractor is a perspective camera. I’m actually not sure what happens if you change it to an orthographic camera :innocent:.

You’re right. I changed it to ortographic and that alone shows nothing rn.
Probably has to do with all the matrix calculations below

I think the calculation of an oblique view frustum does not work with orthographic projection.