processing/processing — pull request #2644 by JakubValtar (2014-07-22 17:00:19+00:00)
Title: Fixes dual-side lighting

Fixes #2014, fixes #2018. Lighting is computed twice in vertex shader and one of the two colors is chosen in fragment shader, which has information whether the fragment is facing front or back. Polygons are expected to be specified by user in CW order in left handed coordinate system (X extends to the right, Y extends downwards, Z extends towards the camera). Normals are expected to extend from front faces.

Bonus: more robust arc implementation which also displays CHORD and OPEN correctly. Distribustion of light on the surface might not be perfect since for these two modes the center of triangle fan is moved to the side, but it is not very noticeablce.