 				return normalize(normal);
 			}
 
-			// Reference:
-			// RGB/XYZ Matrices
-			// http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
 			vec3 convertRGB2XYZ(vec3 _rgb)
 			{
+				// Reference:
+				// RGB/XYZ Matrices
+				// http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
 				vec3 xyz;
 				xyz.x = dot(vec3(0.4124564, 0.3575761, 0.1804375), _rgb);
 				xyz.y = dot(vec3(0.2126729, 0.7151522, 0.0721750), _rgb);

				return vec3(normalize(_encodedNormal.xy) * sqrt(1.0 - zz*zz), zz);
			}

			// Reference:
			// Octahedron normal vector encoding
			// http://kriscg.blogspot.com/2014/04/octahedron-normal-vector-encoding.html
			vec2 octahedronWrap(vec2 _val)
			{
				return (1.0 - abs(_val.yx) )
					 * mix(vec2_splat(-1.0), vec2_splat(1.0), vec2(greaterThanEqual(_val.xy, vec2_splat(0.0) ) ) );
			}

	common = {
		code = "
			/*
			 * Copyright 2011-2016 Branimir Karadzic. All rights reserved.
			 * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
			 */

			#if !defined(BGFX_CONFIG_MAX_BONES)
