mrdoob/three.js — pull request #5225 by CharlotteGore (2014-08-20 22:31:51+00:00)
Title: Fix Deferred Rendering Examples on Retina Displays

At the moment all the deferred lighting examples are broken for Retina users - the rendered output is shrunk to the bottom left corner of the screen.

This seems to be because the WebGLRenderer now uses devicePixelRatio, whereas the WebGLDeferredRenderer is still working in virtual pixels.

I have updated WebGLDeferredRenderer so that it passes the 'virtual' pixels to the instance of WebGLRenderer it's using, and then uses the number of real pixels internally.

I dread to think the effect this will have on performance for people using retina displays but it looks pretty nice. It's configurable in the same way it's configurable for the standard WebGLRenderer, and passes any user configured devicePixelRatio parameter on.