         if visualizeNormals
           # Visualized normals mode.
           if pixel.normal
-            normal = new THREE.Vector3 pixel.normal.x, pixel.normal.y, pixel.normal.z
-            normal.x *= -1 if flippedHorizontal
-            backward = new THREE.Vector3 0, 0, 1
-
-            horizontalAngle = Math.atan2(normal.y, normal.x) + Math.PI
-            verticalAngle = normal.angleTo backward
+            @_normal.copy pixel.normal
+            @_normal.x *= -1 if flippedHorizontal
+
+            horizontalAngle = Math.atan2(@_normal.y, @_normal.x) + Math.PI
+            verticalAngle = @_normal.angleTo @_backward
 
             hue = horizontalAngle / (2 * Math.PI)
             saturation = verticalAngle / (Math.PI / 2)

            else
              lightness = 0.5

            destinationColor = new THREE.Color().setHSL hue, saturation, lightness

          else
            destinationColor = r: 0, g: 0, b: 0

        else if renderOptions.renderNormalData
          # Rendering of raw normal data for use in shaders.
          if pixel.normal
            destinationColor = r: pixel.normal.x * 0.5 + 0.5, g: pixel.normal.y * 0.5 + 0.5, b: pixel.normal.z * 0.5 + 0.5
            destinationColor.r = -pixel.normal.x * 0.5 + 0.5 if flippedHorizontal

          else
            destinationColor = r: 0, g: 0, b: 0

        else if renderOptions.renderPaletteData
          # Rendering of ramp + shade + dither data for use in shaders.


            # Calculate diffuse lighting.
            if pixel.normal
              @_normal.copy pixel.normal
              @_normal.x *= -1 if flippedHorizontal

            else
              @_normal.set 0, 0, 1

            normalLightProduct = THREE.Math.clamp @_normal.dot(inverseLightDirection), 0, 1

            lightDiffuseCoefficient = 0.6
            materialDiffuseCoefficient = 1
