--------------------> X
|
|
|
|
|
|
V
Y
When using data from texture, the above is screen coordinates and origin is at the top-left. However some applications creates map like:
Y
A
|
|
|
|
|
-----------------> X
So, in the code the formula is based on screen coordinates and you should interpret Y as flipped, which is green channel in fact.
Example:
Encoding of a bumpy (outwards) sphere taking care of
screen coordinates would look like this.
NORMAL MAP (encoded topleft as origin)
RED
GREEN
See the red channel gradient (0-255) goes from left to right and the green channel gradient goes from up to down. Because the origin is top-left and this kind of normal map will be rendered without flipping any axis by the core.
And for most common packages like C4D, ZBrush etc, the same bumpy (outwards) sphere is encoded like the following:
NORMAL MAP (encoded bottomleft as origin)
RED
GREEN
See now the origin is based on bottom left and so the green gradient is going from down to up. Which means, such maps' Y direction have to be treated invert according to screen coordinates. So, the flipped interpretation comes. Here, the word "Flip" doesn't mean flipping the map itself. It's about interpretation of the map by the core. This could be done internally and default checkboxes could be left as unchecked but we want to keep the origin intact as screen based.
There are basically the above 2 kind of encodings are present in terms of Y directions but you may find several other maps which has invert encoded red (x) axis too. Thus, we provided rendering of all possibilities. Therefore, if you toggle both flags, you'll have the effect inverted. But if you toggle just one of them, it will look incorrect. This is for special cases when one axis of the map is outof standards. Why? Because the normal map creation applications let this, so we should...
Hope this helps.
btw...here's Kabe's scene with 1.05 using Flip Y checked.
Further reading:
http://www.pinwire.com/article82.html
...and if you wonder Wide Z, it's here for Blender maps.
http://blender3d.org/cms/Normal_Maps.491.0.html