My "implementation" was literally a c&p from the GLES, with just the (very) minor changes the shaders needed.