Roi Atalla avatar Roi Atalla committed 489be49

Fully ported Example 14.3.

Comments (0)

Files changed (15)

.idea/workspace.xml

 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="ChangeListManager">
-    <list default="true" id="3bd3582b-975a-4915-888d-8e2c52d85938" name="Default" comment="Modified the OTHER README files haha.">
-      <change type="DELETED" beforePath="E:\Roi Atalla\Documents\Programming Files\Java Files\Personal Projects\OpenGL\src\com\ra4king\opengl\test\README.md" afterPath="" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/ra4king/opengl/superbible/osb5/README.md" afterPath="$PROJECT_DIR$/src/com/ra4king/opengl/superbible/osb5/README.md" />
+    <list default="true" id="3bd3582b-975a-4915-888d-8e2c52d85938" name="Default" comment="">
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.main.dds" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/Example14_3.java" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.FixedShininess.frag" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.Infinity.xml" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.PN.vert" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.PNT.vert" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.TextureCompute.frag" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.TextureShininess.frag" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.UnitCube.xml" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.UnitPlane.xml" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.Unlit.frag" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.Unlit.vert" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/ra4king/opengl/util/img/dds/DdsLoader.java" afterPath="$PROJECT_DIR$/src/com/ra4king/opengl/util/img/dds/DdsLoader.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example1/Example14_1.java" afterPath="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example1/Example14_1.java" />
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
     </list>
     <ignored path="OpenGL.iws" />
     <ignored path=".idea/workspace.xml" />
     <file path="/a.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1362976669989" ignored="false" />
-    <file path="/fragment.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1363654211652" ignored="false" />
+    <file path="/fragment.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1364011370638" ignored="false" />
     <file path="/a.xml" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1361850040520" ignored="false" />
     <file path="/a.html" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1361850041808" ignored="false" />
     <file path="/a.groovy" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1361850042481" ignored="false" />
-    <file path="/Dummy.txt" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1363656343687" ignored="false" />
+    <file path="/Dummy.txt" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1363656361196" ignored="false" />
     <file path="/Example12_1.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1362027020824" ignored="false" />
     <file path="/example12.1.DiffuseSpecular.frag" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1361702005810" ignored="false" />
     <file path="/LightManager.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1362461124226" ignored="false" />
     <file path="/CommonCodeStyleSettings.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1361943912554" ignored="false" />
     <file path="$PROJECT_DIR$/../../../../../Downloads/Downloaded Folders/IntelliJ IDEA/java/java-impl/src/com/intellij/application/options/JavaIndentOptionsEditor.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1361943925808" ignored="false" />
     <file path="/JavaIndentOptionsEditor.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1361943925425" ignored="false" />
-    <file path="/a.dummy" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1362977001895" ignored="false" />
+    <file path="/a.dummy" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1364104826826" ignored="false" />
     <file path="$PROJECT_DIR$/../../../../../Downloads/Downloaded Folders/IntelliJ IDEA/platform/platform-resources-en/src/messages/ApplicationBundle.properties" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1361942803305" ignored="false" />
     <file path="/ApplicationBundle.properties" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1361942802444" ignored="false" />
     <file path="$PROJECT_DIR$/../../../../../Downloads/Downloaded Folders/IntelliJ IDEA/system/conversion/Test4fc3a780.xml" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1361942830409" ignored="false" />
     <file path="$PROJECT_DIR$/src/com/ra4king/opengl/superbible/osb4/chapter3/Example3_14.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1362804214555" ignored="false" />
     <file path="$PROJECT_DIR$/src/com/ra4king/opengl/superbible/osb4/chapter3/Example3_2.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1362804214555" ignored="false" />
     <file path="$PROJECT_DIR$/src/com/ra4king/opengl/superbible/osb4/chapter3/Example3_3.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1362804214555" ignored="false" />
-    <file path="/Test.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1362807437516" ignored="false" />
+    <file path="/Test.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1363753313655" ignored="false" />
     <file path="/Example14_1.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1363150175267" ignored="false" />
     <file path="/Example11_1.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1362977099998" ignored="false" />
     <file path="/Example11_2.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1362977123654" ignored="false" />
     <file path="/example14.2.SmoothVertexColors.frag" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1363582664813" ignored="false" />
     <file path="/DDSLoader.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1363584553109" ignored="false" />
     <file path="$PROJECT_DIR$/src/com/ra4king/opengl/util/img/DDSLoader.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1363584604777" ignored="false" />
-    <file path="/DdsLoader.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1363585350677" ignored="false" />
+    <file path="/DdsLoader.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1364103074334" ignored="false" />
     <file path="/Util.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1363584889897" ignored="false" />
     <file path="/ImageCreator.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1363585211375" ignored="false" />
     <file path="/README.md" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1363656075446" ignored="false" />
+    <file path="/Example14_3.java" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1364187045528" ignored="false" />
+    <file path="/example14.3.PN.vert" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1364105197945" ignored="false" />
+    <file path="/example14.3.FixedShininess.frag" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1364157856722" ignored="false" />
+    <file path="/example14.3.TextureShininess.frag" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1364105514172" ignored="false" />
+    <file path="/example14.3.TextureCompute.frag" changelist="3bd3582b-975a-4915-888d-8e2c52d85938" time="1364105486637" ignored="false" />
     <option name="TRACKING_ENABLED" value="true" />
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
     <disable_hints />
   </component>
   <component name="DebuggerManager">
+    <line_breakpoints default_suspend_policy="SuspendAll" default_condition_enabled="true" />
+    <ui_properties default_suspend_policy="SuspendAll" default_condition_enabled="true" />
     <breakpoint_any default_suspend_policy="SuspendAll" default_condition_enabled="true">
       <breakpoint>
         <option name="NOTIFY_CAUGHT" value="true" />
         <option name="LOG_MESSAGE" value="&#13;&#13;JAVA" />
       </breakpoint>
     </breakpoint_any>
-    <line_breakpoints default_suspend_policy="SuspendAll" default_condition_enabled="true" />
-    <ui_properties default_suspend_policy="SuspendAll" default_condition_enabled="true" />
     <breakpoint_rules />
     <ui_properties />
   </component>
   </component>
   <component name="FileEditorManager">
     <leaf>
-      <file leaf-file-name="README.md" pinned="false" current="true" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/README.md">
+      <file leaf-file-name="Example14_3.java" pinned="false" current="true" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/Example14_3.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state line="18" column="68" selection-start="667" selection-end="667" vertical-scroll-proportion="0.29605263">
-              <folding />
+            <state line="42" column="0" selection-start="1715" selection-end="1715" vertical-scroll-proportion="0.5254902">
+              <folding>
+                <element signature="imports" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
   <component name="IdeDocumentHistory">
     <option name="changedFiles">
       <list>
-        <option value="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example2/FixedConstantTimeArray.java" />
-        <option value="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example2/example14.2.SmoothVertexColors.vert" />
-        <option value="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example2/example14.2.SmoothVertexColors.frag" />
-        <option value="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example2/example14.2.RealHallway.xml" />
-        <option value="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example2/example14.2.FauxHallway.xml" />
-        <option value="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example2/example14.2.NoCorrectVertexColors.vert" />
-        <option value="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example2/example14.2.NoCorrectVertexColors.frag" />
-        <option value="$PROJECT_DIR$/src/com/ra4king/opengl/util/img/DDSLoader.java" />
-        <option value="$PROJECT_DIR$/src/com/ra4king/opengl/util/img/Util.java" />
-        <option value="$PROJECT_DIR$/src/com/ra4king/opengl/util/img/ImageSet.java" />
         <option value="$PROJECT_DIR$/src/com/ra4king/opengl/util/img/ImageFormat.java" />
         <option value="$PROJECT_DIR$/src/com/ra4king/opengl/util/img/ImageCreator.java" />
         <option value="$PROJECT_DIR$/src/com/ra4king/opengl/util/img/DdsLoader.java" />
         <option value="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example2/Example14_2.java" />
         <option value="$PROJECT_DIR$/README.md" />
         <option value="$PROJECT_DIR$/src/com/ra4king/opengl/superbible/osb5/README.md" />
+        <option value="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/Test.java" />
+        <option value="$PROJECT_DIR$/src/com/ra4king/opengl/util/img/dds/DdsLoader.java" />
+        <option value="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example1/Example14_1.java" />
+        <option value="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.PN.vert" />
+        <option value="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.TextureCompute.frag" />
+        <option value="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.UnitPlane.xml" />
+        <option value="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.TextureShininess.frag" />
+        <option value="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.PNT.vert" />
+        <option value="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.FixedShininess.frag" />
+        <option value="$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/Example14_3.java" />
       </list>
     </option>
   </component>
       <sortByType />
     </navigator>
     <panes>
-      <pane id="PackagesPane">
-        <subPane />
-      </pane>
       <pane id="Scope" />
       <pane id="ProjectPane">
         <subPane>
               <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
             </PATH_ELEMENT>
           </PATH>
+          <PATH>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="OpenGL" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="OpenGL" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="src" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="opengl" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="util" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+          </PATH>
+          <PATH>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="OpenGL" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="OpenGL" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="src" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="opengl" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="util" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="img" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+          </PATH>
+          <PATH>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="OpenGL" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="OpenGL" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="src" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="opengl" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="util" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="img" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="dds" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+          </PATH>
+          <PATH>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="OpenGL" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="OpenGL" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="src" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="opengl" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="gl33" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="chapter14" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="example3" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+          </PATH>
+          <PATH>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="OpenGL" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="OpenGL" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="src" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="opengl" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="gl33" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="chapter14" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+          </PATH>
+          <PATH>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="OpenGL" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="OpenGL" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="src" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="opengl" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="gl33" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+          </PATH>
         </subPane>
       </pane>
+      <pane id="PackagesPane">
+        <subPane />
+      </pane>
     </panes>
   </component>
   <component name="PropertiesComponent">
-    <property name="project.structure.last.edited" value="Artifacts" />
+    <property name="project.structure.last.edited" value="Facets" />
     <property name="project.structure.proportion" value="0.15" />
     <property name="options.splitter.main.proportions" value="0.3" />
+    <property name="FileHistory.org.zmlx.hg4idea.provider.HgHistoryProvider_treeWidth1" value="285" />
+    <property name="MemberChooser.sorted" value="false" />
     <property name="recentsLimit" value="5" />
-    <property name="MemberChooser.sorted" value="false" />
-    <property name="FileHistory.org.zmlx.hg4idea.provider.HgHistoryProvider_treeWidth1" value="285" />
     <property name="FileHistory.org.zmlx.hg4idea.provider.HgHistoryProvider_treeWidth2" value="292" />
     <property name="last_opened_file_path" value="$PROJECT_DIR$/out/production/OpenGL/com/ra4king/opengl/arcsynthesis/gl33/chapter13/example2" />
     <property name="FileHistory.org.zmlx.hg4idea.provider.HgHistoryProvider_treeWidth0" value="296" />
     <property name="FileHistory.org.zmlx.hg4idea.provider.HgHistoryProvider_flatWidth2" value="293" />
     <property name="FileHistory.org.zmlx.hg4idea.provider.HgHistoryProvider_flatWidth1" value="292" />
     <property name="FileHistory.org.zmlx.hg4idea.provider.HgHistoryProvider_flatWidth0" value="292" />
-    <property name="options.lastSelected" value="preferences.keymap" />
+    <property name="options.lastSelected" value="reference.idesettings.debugger.hotswap" />
     <property name="FileHistory.org.zmlx.hg4idea.provider.HgHistoryProvider_flatOrder1" value="1" />
+    <property name="project.structure.side.proportion" value="0.2" />
     <property name="FileHistory.org.zmlx.hg4idea.provider.HgHistoryProvider_flatOrder0" value="0" />
-    <property name="project.structure.side.proportion" value="0.2" />
     <property name="FileHistory.org.zmlx.hg4idea.provider.HgHistoryProvider_flatOrder3" value="3" />
+    <property name="MemberChooser.copyJavadoc" value="false" />
     <property name="FileHistory.org.zmlx.hg4idea.provider.HgHistoryProvider_flatOrder2" value="2" />
-    <property name="MemberChooser.copyJavadoc" value="false" />
     <property name="restartRequiresConfirmation" value="true" />
+    <property name="dynamic.classpath" value="false" />
     <property name="options.searchVisible" value="true" />
-    <property name="dynamic.classpath" value="false" />
   </component>
   <component name="RecentsManager">
     <key name="CopyClassDialog.RECENTS_KEY">
       <recent name="com.ra4king.opengl.arcsynthesis.gl33.chapter12.example2" />
     </key>
     <key name="CopyFile.RECENT_KEYS">
+      <recent name="E:\Roi Atalla\Documents\Programming Files\Java Files\Personal Projects\OpenGL\src\com\ra4king\opengl\arcsynthesis\gl33\chapter14\example3" />
       <recent name="E:\Roi Atalla\Documents\Programming Files\Java Files\Personal Projects\OpenGL\src\com\ra4king\opengl\arcsynthesis\gl33\chapter14\example1" />
       <recent name="E:\Roi Atalla\Documents\Programming Files\Java Files\Personal Projects\OpenGL\src\com\ra4king\opengl\arcsynthesis\gl33\chapter13\example2" />
       <recent name="E:\Roi Atalla\Documents\Programming Files\Java Files\Personal Projects\OpenGL\src\com\ra4king\opengl\arcsynthesis\gl33\chapter13\example1" />
       <recent name="E:\Roi Atalla\Documents\Programming Files\Java Files\Personal Projects\OpenGL\src\com\ra4king\opengl\arcsynthesis\gl33\chapter12\example3" />
-      <recent name="E:\Roi Atalla\Documents\Programming Files\Java Files\Personal Projects\OpenGL\src\com\ra4king\opengl\arcsynthesis\gl33\chapter12\example2" />
     </key>
   </component>
-  <component name="RunManager" selected="Application.Example14_2">
+  <component name="RunManager" selected="Application.Example14_3">
+    <configuration default="false" name="Example14_3" type="Application" factoryName="Application" temporary="true">
+      <option name="MAIN_CLASS_NAME" value="com.ra4king.opengl.arcsynthesis.gl33.chapter14.example3.Example14_3" />
+      <option name="VM_PARAMETERS" value="-Djava.library.path=files/natives/" />
+      <option name="PROGRAM_PARAMETERS" value="" />
+      <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" value="" />
+      <option name="ENABLE_SWING_INSPECTOR" value="false" />
+      <option name="ENV_VARIABLES" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <module name="OpenGL" />
+      <envs />
+      <RunnerSettings RunnerId="Debug">
+        <option name="DEBUG_PORT" value="" />
+        <option name="TRANSPORT" value="0" />
+        <option name="LOCAL" value="true" />
+      </RunnerSettings>
+      <RunnerSettings RunnerId="Run" />
+      <ConfigurationWrapper RunnerId="Debug" />
+      <ConfigurationWrapper RunnerId="Run" />
+      <method />
+    </configuration>
     <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
       <module name="" />
       <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m" />
       <option name="PROGRAM_PARAMETERS" />
       <method />
     </configuration>
-    <configuration default="true" type="AndroidTestRunConfigurationType" factoryName="Android Tests">
-      <module name="" />
-      <option name="TESTING_TYPE" value="0" />
-      <option name="INSTRUMENTATION_RUNNER_CLASS" value="" />
-      <option name="METHOD_NAME" value="" />
-      <option name="CLASS_NAME" value="" />
-      <option name="PACKAGE_NAME" value="" />
-      <option name="TARGET_SELECTION_MODE" value="EMULATOR" />
-      <option name="PREFERRED_AVD" value="" />
-      <option name="COMMAND_LINE" value="" />
-      <option name="WIPE_USER_DATA" value="false" />
-      <option name="DISABLE_BOOT_ANIMATION" value="false" />
-      <option name="NETWORK_SPEED" value="full" />
-      <option name="NETWORK_LATENCY" value="none" />
-      <option name="CLEAR_LOGCAT" value="false" />
-      <method />
-    </configuration>
     <configuration default="true" type="MavenRunConfiguration" factoryName="Maven">
       <MavenSettings>
         <option name="myGeneralSettings" />
       </MavenSettings>
       <method />
     </configuration>
+    <configuration default="true" type="AndroidTestRunConfigurationType" factoryName="Android Tests">
+      <module name="" />
+      <option name="TESTING_TYPE" value="0" />
+      <option name="INSTRUMENTATION_RUNNER_CLASS" value="" />
+      <option name="METHOD_NAME" value="" />
+      <option name="CLASS_NAME" value="" />
+      <option name="PACKAGE_NAME" value="" />
+      <option name="TARGET_SELECTION_MODE" value="EMULATOR" />
+      <option name="PREFERRED_AVD" value="" />
+      <option name="COMMAND_LINE" value="" />
+      <option name="WIPE_USER_DATA" value="false" />
+      <option name="DISABLE_BOOT_ANIMATION" value="false" />
+      <option name="NETWORK_SPEED" value="full" />
+      <option name="NETWORK_LATENCY" value="none" />
+      <option name="CLEAR_LOGCAT" value="false" />
+      <method />
+    </configuration>
     <configuration default="true" type="Remote" factoryName="Remote">
       <option name="USE_SOCKET_TRANSPORT" value="true" />
       <option name="SERVER_MODE" value="false" />
       <option name="PORT" value="5005" />
       <method />
     </configuration>
+    <configuration default="true" type="Applet" factoryName="Applet">
+      <module name="" />
+      <option name="MAIN_CLASS_NAME" />
+      <option name="HTML_FILE_NAME" />
+      <option name="HTML_USED" value="false" />
+      <option name="WIDTH" value="400" />
+      <option name="HEIGHT" value="300" />
+      <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
+      <option name="VM_PARAMETERS" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <method />
+    </configuration>
     <configuration default="true" type="TestNG" factoryName="TestNG">
       <module name="" />
       <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
       <listeners />
       <method />
     </configuration>
-    <configuration default="true" type="Applet" factoryName="Applet">
-      <module name="" />
-      <option name="MAIN_CLASS_NAME" />
-      <option name="HTML_FILE_NAME" />
-      <option name="HTML_USED" value="false" />
-      <option name="WIDTH" value="400" />
-      <option name="HEIGHT" value="300" />
-      <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
-      <option name="VM_PARAMETERS" />
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-      <option name="ALTERNATIVE_JRE_PATH" />
-      <method />
-    </configuration>
     <configuration default="true" type="Application" factoryName="Application">
       <option name="MAIN_CLASS_NAME" value="" />
       <option name="VM_PARAMETERS" value="-Djava.library.path=files/natives/" />
       <ConfigurationWrapper RunnerId="Run" />
       <method />
     </configuration>
-    <list size="5">
+    <list size="6">
       <item index="0" class="java.lang.String" itemvalue="Application.Example14_1" />
       <item index="1" class="java.lang.String" itemvalue="Application.Example14_2" />
       <item index="2" class="java.lang.String" itemvalue="Application.Example12_3" />
       <item index="3" class="java.lang.String" itemvalue="Application.Example13_1" />
       <item index="4" class="java.lang.String" itemvalue="Application.Example13_2" />
+      <item index="5" class="java.lang.String" itemvalue="Application.Example14_3" />
     </list>
+    <recent_temporary>
+      <list size="1">
+        <item index="0" class="java.lang.String" itemvalue="Application.Example14_3" />
+      </list>
+    </recent_temporary>
     <configuration name="&lt;template&gt;" type="WebApp" default="true" selected="false">
       <Host>localhost</Host>
       <Port>5050</Port>
       <created>1363656085541</created>
       <updated>1363656085541</updated>
     </task>
-    <option name="localTasksCounter" value="22" />
+    <task id="LOCAL-00022" summary="Modified the OTHER README files haha.">
+      <created>1363656363442</created>
+      <updated>1363656363442</updated>
+    </task>
+    <option name="localTasksCounter" value="23" />
     <servers />
   </component>
   <component name="TodoView" selected-index="0">
       <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.23987207" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
       <window_info id="JetGradle" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32977587" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
       <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
-      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.081023455" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.34754798" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.36886993" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
       <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.29530916" sideWeight="0.51387405" order="8" side_tool="true" content_ui="tabs" />
       <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.18366013" sideWeight="0.14915694" order="2" side_tool="true" content_ui="tabs" />
       <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.29104477" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
       <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.18366013" sideWeight="0.17250325" order="1" side_tool="true" content_ui="tabs" />
       <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32977587" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
       <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.36819637" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
-      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.19690502" sideWeight="0.64818764" order="0" side_tool="true" content_ui="combo" x="2394" y="136" width="397" height="768" />
-      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.35181236" sideWeight="0.4823906" order="2" side_tool="false" content_ui="tabs" />
+      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.19690502" sideWeight="0.8432836" order="0" side_tool="true" content_ui="combo" x="2394" y="136" width="397" height="768" />
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.15671642" sideWeight="0.4823906" order="2" side_tool="false" content_ui="tabs" />
       <window_info id="Documentation" active="true" anchor="right" auto_hide="false" internal_type="SLIDING" type="FLOATING" visible="true" weight="0.32977587" sideWeight="0.80490404" order="3" side_tool="false" content_ui="combo" x="2005" y="108" width="1736" height="896" />
       <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
       <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
       <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2497332" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
-      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.45628998" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
       <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
       <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39978677" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
     </layout>
     <option name="MAXIMUM_HISTORY_ROWS" value="1000" />
     <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
     <option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="false" />
-    <option name="LAST_COMMIT_MESSAGE" value="Last update to README, I promise." />
+    <option name="LAST_COMMIT_MESSAGE" value="Modified the OTHER README files haha." />
     <option name="MAKE_NEW_CHANGELIST_ACTIVE" value="false" />
     <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="true" />
     <option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
     <MESSAGE value="Fixed README file." />
     <MESSAGE value="Fixed README file further." />
     <MESSAGE value="Last update to README, I promise." />
+    <MESSAGE value="Modified the OTHER README files haha." />
   </component>
   <component name="XDebuggerManager">
     <breakpoint-manager>
     <option name="FILTER_TARGETS" value="false" />
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example2/example14.2.SmoothVertexColors.vert">
+    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/util/img/dds/ImageSet.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="14" column="0" selection-start="243" selection-end="243" vertical-scroll-proportion="0.2297593" />
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example2/example14.2.SmoothVertexColors.frag">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="10" column="0" selection-start="104" selection-end="104" vertical-scroll-proportion="0.16411379" />
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example2/example14.2.RealHallway.xml">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="44" column="0" selection-start="780" selection-end="780" vertical-scroll-proportion="0.7236842">
+        <state line="111" column="4" selection-start="2774" selection-end="2774" vertical-scroll-proportion="0.4901316">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example2/example14.2.FauxHallway.xml">
+    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/util/img/PNGDecoder.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="44" column="0" selection-start="836" selection-end="836" vertical-scroll-proportion="0.7236842">
+        <state line="116" column="8" selection-start="3689" selection-end="3689" vertical-scroll-proportion="0.30716723">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example2/example14.2.NoCorrectVertexColors.frag">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="10" column="0" selection-start="111" selection-end="111" vertical-scroll-proportion="0.25773194" />
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example2/example14.2.NoCorrectVertexColors.vert">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="11" column="24" selection-start="193" selection-end="193" vertical-scroll-proportion="0.28350514" />
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example1/Example14_1.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="194" column="4" selection-start="7677" selection-end="7677" vertical-scroll-proportion="0.6236324">
+        <state line="260" column="8" selection-start="9321" selection-end="9521" vertical-scroll-proportion="0.49342105">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example2/Example14_2.java">
+    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.Unlit.frag">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="60" column="4" selection-start="2057" selection-end="2057" vertical-scroll-proportion="0.11378556">
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/util/img/dds/DdsLoader.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="13" column="0" selection-start="557" selection-end="557" vertical-scroll-proportion="0.016447369">
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/util/img/dds/DdsUtil.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="1" column="0" selection-start="41" selection-end="41" vertical-scroll-proportion="0.016447369">
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/util/img/dds/ImageCreator.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="257" column="0" selection-start="9145" selection-end="9145" vertical-scroll-proportion="0.9013158">
+        <state line="10" column="0" selection-start="108" selection-end="108" vertical-scroll-proportion="0.16447368">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/util/img/dds/ImageFormat.java">
+    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.Infinity.xml">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="29" column="5" selection-start="1803" selection-end="1803" vertical-scroll-proportion="0.016447369">
+        <state line="26" column="35" selection-start="887" selection-end="887" vertical-scroll-proportion="0.4276316">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/util/img/dds/ImageSet.java">
+    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.UnitPlane.xml">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="43" column="5" selection-start="1128" selection-end="1128" vertical-scroll-proportion="0.016447369">
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/superbible/osb5/README.md">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="11" column="0" selection-start="803" selection-end="803" vertical-scroll-proportion="0.18092105">
+        <state line="78" column="0" selection-start="1331" selection-end="1331" vertical-scroll-proportion="0.9177632">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/README.md">
+    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.TextureCompute.frag">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="18" column="68" selection-start="667" selection-end="667" vertical-scroll-proportion="0.29605263">
+        <state line="77" column="0" selection-start="2031" selection-end="2031" vertical-scroll-proportion="0.627451">
           <folding />
         </state>
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/util/UniformBlockArray.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="42" column="4" selection-start="1128" selection-end="1128" vertical-scroll-proportion="0.60784316">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.UnitCube.xml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="29" column="16" selection-start="593" selection-end="593" vertical-scroll-proportion="0.5686275">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="jar://C:/Program Files/Java/jdk7/src.zip!/java/lang/Math.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="255" column="0" selection-start="9388" selection-end="9388" vertical-scroll-proportion="0.6501767">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.TextureShininess.frag">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="81" column="68" selection-start="2098" selection-end="2110" vertical-scroll-proportion="2.1466432">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.PN.vert">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="26" column="0" selection-start="542" selection-end="542" vertical-scroll-proportion="0.50980395">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.PNT.vert">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="30" column="0" selection-start="632" selection-end="632" vertical-scroll-proportion="0.5882353">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.main.dds">
+      <provider selected="true" editor-type-id="images">
+        <state />
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.FixedShininess.frag">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="68" column="4" selection-start="1728" selection-end="1728" vertical-scroll-proportion="0.50980395">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/Example14_3.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="42" column="0" selection-start="1715" selection-end="1715" vertical-scroll-proportion="0.5254902">
+          <folding>
+            <element signature="imports" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
   </component>
   <component name="masterDetails">
     <states>
             <option name="proportions">
               <list>
                 <option value="0.2" />
-                <option value="0.5" />
               </list>
             </option>
           </splitter-proportions>

src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example1/Example14_1.java

 		glSamplerParameteri(gaussSampler, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
 	}
 	
+	private int calcCosAngResolution(int level) {
+		return 64 * (int)Math.pow(2, level);
+	}
+	
 	private int createGaussianTexture(int cosAngleResolution) {
 		ByteBuffer textureData = buildGaussianData(cosAngleResolution);
 		
 		return gaussTexture;
 	}
 	
-	private int calcCosAngResolution(int level) {
-		return 64 * (int)Math.pow(2, level);
-	}
-	
 	private ByteBuffer buildGaussianData(int cosAngleResolution) {
 		ByteBuffer textureData = BufferUtils.createByteBuffer(cosAngleResolution);
 		
 			modelMatrix.getTop().scale(0.25f);
 			
 			unlit.program.begin();
+			
 			glUniformMatrix4(unlit.modelToCameraMatrixUniform, false, modelMatrix.getTop().toBuffer());
 			glUniform4(unlit.objectColorUniform, new Vector4(1).toBuffer());
 			cubeMesh.render("flat");

src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/Example14_3.java

+package com.ra4king.opengl.arcsynthesis.gl33.chapter14.example3;
+
+import static org.lwjgl.opengl.GL11.*;
+import static org.lwjgl.opengl.GL12.*;
+import static org.lwjgl.opengl.GL13.*;
+import static org.lwjgl.opengl.GL15.*;
+import static org.lwjgl.opengl.GL20.*;
+import static org.lwjgl.opengl.GL30.*;
+import static org.lwjgl.opengl.GL31.*;
+import static org.lwjgl.opengl.GL32.*;
+import static org.lwjgl.opengl.GL33.*;
+
+import java.nio.ByteBuffer;
+import java.nio.FloatBuffer;
+
+import org.lwjgl.BufferUtils;
+import org.lwjgl.input.Keyboard;
+
+import com.ra4king.opengl.GLProgram;
+import com.ra4king.opengl.util.Mesh;
+import com.ra4king.opengl.util.MousePoles.MouseButton;
+import com.ra4king.opengl.util.MousePoles.ObjectData;
+import com.ra4king.opengl.util.MousePoles.ObjectPole;
+import com.ra4king.opengl.util.MousePoles.ViewData;
+import com.ra4king.opengl.util.MousePoles.ViewPole;
+import com.ra4king.opengl.util.MousePoles.ViewScale;
+import com.ra4king.opengl.util.ShaderProgram;
+import com.ra4king.opengl.util.Timer;
+import com.ra4king.opengl.util.Timer.Type;
+import com.ra4king.opengl.util.UniformBlockArray;
+import com.ra4king.opengl.util.UniformBlockArray.UniformBlockObject;
+import com.ra4king.opengl.util.Utils;
+import com.ra4king.opengl.util.img.dds.DdsLoader;
+import com.ra4king.opengl.util.img.dds.ImageSet;
+import com.ra4king.opengl.util.img.dds.ImageSet.Dimensions;
+import com.ra4king.opengl.util.img.dds.ImageSet.SingleImage;
+import com.ra4king.opengl.util.math.Matrix3;
+import com.ra4king.opengl.util.math.Matrix4;
+import com.ra4king.opengl.util.math.MatrixStack;
+import com.ra4king.opengl.util.math.Quaternion;
+import com.ra4king.opengl.util.math.Vector3;
+import com.ra4king.opengl.util.math.Vector4;
+
+public class Example14_3 extends GLProgram {
+	public static void main(String[] args) {
+		new Example14_3().run(true);
+	}
+	
+	private ProgramData[] programs = new ProgramData[ShaderMode.values().length];
+	private UnlitProgramData unlit;
+	
+	private ShaderPair[] shaderPairs = {
+			new ShaderPair("PN.vert", "FixedShininess.frag"),
+			new ShaderPair("PNT.vert", "TextureShininess.frag"),
+			new ShaderPair("PNT.vert", "TextureCompute.frag")
+	};
+	
+	private Mesh objectMesh;
+	private Mesh cubeMesh;
+	private Mesh planeMesh;
+	
+	private ViewPole viewPole;
+	private ObjectPole objectPole;
+	
+	private ShaderMode mode = ShaderMode.MODE_FIXED;
+	
+	private Timer lightTimer = new Timer(Type.LOOP, 6);
+	
+	private int materialUniformBuffer;
+	private int lightUniformBuffer;
+	private int projectionUniformBuffer;
+	
+	private int materialOffset;
+	
+	private final int NUM_GAUSS_TEXTURES = 4;
+	private int[] gaussTextures = new int[NUM_GAUSS_TEXTURES];
+	
+	private int textureSampler;
+	
+	private int shineTexture;
+	
+	private int currentTexture = NUM_GAUSS_TEXTURES - 1;
+	private int currentMaterial;
+	
+	private boolean drawCameraPos, drawLights = true, useInfinity = true;
+	
+	private final int materialBlockIndex = 0;
+	private final int lightBlockIndex = 1;
+	private final int projectionBlockIndex = 2;
+	
+	private final int gaussTexUnit = 0;
+	private final int shineTexUnit = 1;
+	
+	private final float lightAttenuation = 1f / (25f * 25f);
+	
+	private static final int NUMBER_OF_MATERIALS = 2;
+	private static final int NUMBER_OF_LIGHTS = 2;
+	
+	public Example14_3() {
+		super("Example 14.3 - Material Texture", 500, 500, true);
+	}
+	
+	@Override
+	public void init() {
+		glClearColor(0.75f, 0.75f, 1, 1);
+		glClearDepth(1);
+		
+		ObjectData objectData = new ObjectData(new Vector3(0, 0.5f, 0), new Quaternion());
+		ViewData viewData = new ViewData(objectData.position, new Quaternion(0.3826834f, 0, 0, 0.92387953f), 10, 0);
+		ViewScale viewScale = new ViewScale(1.5f, 70, 1.5f, 0.5f, 0, 0, 90 / 250f);
+		
+		viewPole = new ViewPole(viewData, viewScale, MouseButton.LEFT_BUTTON, false);
+		objectPole = new ObjectPole(objectData, 90 / 250f, MouseButton.RIGHT_BUTTON, viewPole);
+		
+		for(int a = 0; a < shaderPairs.length; a++)
+			programs[a] = loadStandardProgram("example14.3." + shaderPairs[a].vertexShader, "example14.3." + shaderPairs[a].fragmentShader);
+		
+		unlit = loadUnlitProgram("example14.3.Unlit.vert", "example14.3.Unlit.frag");
+		
+		try {
+			objectMesh = new Mesh(getClass().getResource("example14.3.Infinity.xml"));
+			cubeMesh = new Mesh(getClass().getResource("example14.3.UnitCube.xml"));
+			planeMesh = new Mesh(getClass().getResource("example14.3.UnitPlane.xml"));
+		} catch(Exception exc) {
+			exc.printStackTrace();
+			destroy();
+		}
+		
+		glEnable(GL_CULL_FACE);
+		glCullFace(GL_BACK);
+		glFrontFace(GL_CW);
+		
+		glEnable(GL_DEPTH_TEST);
+		glDepthMask(true);
+		glDepthFunc(GL_LEQUAL);
+		glDepthRange(0, 1);
+		glEnable(GL_DEPTH_CLAMP);
+		
+		setupMaterials();
+		
+		lightUniformBuffer = glGenBuffers();
+		glBindBuffer(GL_UNIFORM_BUFFER, lightUniformBuffer);
+		glBufferData(GL_UNIFORM_BUFFER, LightBlock.SIZE, GL_DYNAMIC_DRAW);
+		
+		projectionUniformBuffer = glGenBuffers();
+		glBindBuffer(GL_UNIFORM_BUFFER, projectionUniformBuffer);
+		glBufferData(GL_UNIFORM_BUFFER, 16 * 4, GL_DYNAMIC_DRAW);
+		glBindBuffer(GL_UNIFORM_BUFFER, 0);
+		
+		glBindBufferRange(GL_UNIFORM_BUFFER, lightBlockIndex, lightUniformBuffer, 0, LightBlock.SIZE);
+		glBindBufferRange(GL_UNIFORM_BUFFER, projectionBlockIndex, projectionUniformBuffer, 0, 16 * 4);
+		glBindBufferRange(GL_UNIFORM_BUFFER, materialBlockIndex, materialUniformBuffer, 0, MaterialBlock.SIZE);
+		
+		createGaussianTextures();
+		createShininessTexture();
+	}
+	
+	private ProgramData loadStandardProgram(String vertexShader, String fragmentShader) {
+		ProgramData data = new ProgramData(new ShaderProgram(readFromFile(vertexShader), readFromFile(fragmentShader)));
+		data.modelToCameraMatrixUniform = glGetUniformLocation(data.program.getProgram(), "modelToCameraMatrix");
+		data.normalModelToCameraMatrixUniform = glGetUniformLocation(data.program.getProgram(), "normalModelToCameraMatrix");
+		
+		int materialBlock = glGetUniformBlockIndex(data.program.getProgram(), "Material");
+		int lightBlock = glGetUniformBlockIndex(data.program.getProgram(), "Light");
+		int projectionBlock = glGetUniformBlockIndex(data.program.getProgram(), "Projection");
+		
+		glUniformBlockBinding(data.program.getProgram(), materialBlock, materialBlockIndex);
+		glUniformBlockBinding(data.program.getProgram(), lightBlock, lightBlockIndex);
+		glUniformBlockBinding(data.program.getProgram(), projectionBlock, projectionBlockIndex);
+		
+		int gaussianTextureUniform = glGetUniformLocation(data.program.getProgram(), "gaussianTexture");
+		int shininessTextureUniform = glGetUniformLocation(data.program.getProgram(), "shininessTexture");
+		
+		data.program.begin();
+		glUniform1i(gaussianTextureUniform, gaussTexUnit);
+		glUniform1i(shininessTextureUniform, shineTexUnit);
+		data.program.end();
+		
+		return data;
+	}
+	
+	private UnlitProgramData loadUnlitProgram(String vertexShader, String fragmentShader) {
+		UnlitProgramData data = new UnlitProgramData(new ShaderProgram(readFromFile(vertexShader), readFromFile(fragmentShader)));
+		data.modelToCameraMatrixUniform = glGetUniformLocation(data.program.getProgram(), "modelToCameraMatrix");
+		data.objectColorUniform = glGetUniformLocation(data.program.getProgram(), "objectColor");
+		
+		int projectionBlock = glGetUniformBlockIndex(data.program.getProgram(), "Projection");
+		glUniformBlockBinding(data.program.getProgram(), projectionBlock, projectionBlockIndex);
+		
+		return data;
+	}
+	
+	private void setupMaterials() {
+		UniformBlockArray<MaterialBlock> materials = new UniformBlockArray<>(MaterialBlock.SIZE, NUMBER_OF_MATERIALS);
+		
+		materials.setBlockMember(0, new MaterialBlock(new Vector4(1, 0.673f, 0.043f, 1), new Vector4(1, 0.673f, 0.043f, 1).mult(0.4f), 0.125f));
+		materials.setBlockMember(1, new MaterialBlock(new Vector4(0.01f, 0.01f, 0.01f, 1), new Vector4(0.99f, 0.99f, 0.99f, 1), 0.125f));
+		
+		materialUniformBuffer = materials.createBufferObject();
+		materialOffset = materials.getArrayOffset();
+	}
+	
+	private void createGaussianTextures() {
+		for(int a = 0; a < NUM_GAUSS_TEXTURES; a++)
+			gaussTextures[a] = createGaussianTexture(calcCosAngResolution(a), 128);
+		
+		textureSampler = glGenSamplers();
+		glSamplerParameteri(textureSampler, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+		glSamplerParameteri(textureSampler, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+		glSamplerParameteri(textureSampler, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+		glSamplerParameteri(textureSampler, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+	}
+	
+	private int calcCosAngResolution(int level) {
+		return 64 * (int)Math.pow(2, level);
+	}
+	
+	private int createGaussianTexture(int cosAngleResolution, int shininessResolution) {
+		ByteBuffer textureData = buildGaussianData(cosAngleResolution, shininessResolution);
+		
+		int gaussTexture = glGenTextures();
+		glBindTexture(GL_TEXTURE_2D, gaussTexture);
+		glTexImage2D(GL_TEXTURE_2D, 0, GL_R8, cosAngleResolution, shininessResolution, 0, GL_RED, GL_UNSIGNED_BYTE, textureData);
+		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
+		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
+		glBindTexture(GL_TEXTURE_2D, 0);
+		
+		return gaussTexture;
+	}
+	
+	private ByteBuffer buildGaussianData(int cosAngleResolution, int shininessResolution) {
+		ByteBuffer textureData = BufferUtils.createByteBuffer(shininessResolution * cosAngleResolution);
+		
+		for(int a = 1; a <= shininessResolution; a++) {
+			float shininess = a / (float)shininessResolution;
+			
+			for(int b = 0; b < cosAngleResolution; b++) {
+				float cosAng = b / (float)(cosAngleResolution - 1);
+				float angle = (float)Math.acos(cosAng);
+				float exponent = angle / shininess;
+				exponent = -(exponent * exponent);
+				float gaussianTerm = (float)Math.exp(exponent);
+				
+				textureData.put((byte)(gaussianTerm * 255f));
+			}
+		}
+		
+		textureData.flip();
+		
+		return textureData;
+	}
+	
+	private void createShininessTexture() {
+		try {
+			ImageSet imageSet = DdsLoader.load(getClass().getResourceAsStream("example14.3.main.dds"));
+			
+			SingleImage image = imageSet.getImage(0, 0, 0);
+			Dimensions dims = image.getDimensions();
+			
+			shineTexture = glGenTextures();
+			glBindTexture(GL_TEXTURE_2D, shineTexture);
+			glTexImage2D(GL_TEXTURE_2D, 0, GL_R8, dims.width, dims.height, 0, GL_RED, GL_UNSIGNED_BYTE, image.getImageData());
+			glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
+			glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
+			glBindTexture(GL_TEXTURE_2D, 0);
+		} catch(Exception exc) {
+			exc.printStackTrace();
+			destroy();
+		}
+	}
+	
+	@Override
+	public void resized() {
+		super.resized();
+		
+		glBindBuffer(GL_UNIFORM_BUFFER, projectionUniformBuffer);
+		glBufferSubData(GL_UNIFORM_BUFFER, 0, new Matrix4().clearToPerspectiveDeg(45, getWidth(), getHeight(), 1, 1000).toBuffer());
+		glBindBuffer(GL_UNIFORM_BUFFER, 0);
+	}
+	
+	@Override
+	public void update(long deltaTime) {
+		lightTimer.update(deltaTime);
+		
+		Utils.updateMousePoles(viewPole, objectPole);
+	}
+	
+	@Override
+	public void keyPressed(int key, char c) {
+		final String[] shaderModeNames = {
+				"Fixed Shininess with Gaussian Texture",
+				"Texture shininess with Gaussian Texture",
+				"Texture Shininess with computed Gaussian"
+		};
+		
+		switch(key) {
+			case Keyboard.KEY_SPACE:
+				mode = ShaderMode.values()[(mode.ordinal() + 1) % ShaderMode.length];
+				System.out.println(shaderModeNames[mode.ordinal()]);
+				break;
+			case Keyboard.KEY_P:
+				lightTimer.togglePause();
+				break;
+			case Keyboard.KEY_MINUS:
+				lightTimer.rewind(0.5f);
+				break;
+			case Keyboard.KEY_EQUALS:
+				lightTimer.fastForward(0.5f);
+				break;
+			case Keyboard.KEY_T:
+				drawCameraPos = !drawCameraPos;
+				break;
+			case Keyboard.KEY_G:
+				drawLights = !drawLights;
+				break;
+			case Keyboard.KEY_Y:
+				useInfinity = !useInfinity;
+				break;
+		}
+		
+		if(c >= '1' && c <= '9') {
+			int number = c - '1';
+			if(number < NUM_GAUSS_TEXTURES) {
+				System.out.println("Angle resolution: " + calcCosAngResolution(number));
+				currentTexture = number;
+			}
+			
+			if(number >= 9 - NUMBER_OF_MATERIALS) {
+				number -= 9 - NUMBER_OF_MATERIALS;
+				System.out.println("Material Number: " + number);
+				currentMaterial = number;
+			}
+		}
+	}
+	
+	@Override
+	public void render() {
+		glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+		
+		MatrixStack modelMatrix = new MatrixStack();
+		modelMatrix.setTop(viewPole.calcMatrix());
+		
+		Matrix4 worldToCameraMatrix = modelMatrix.getTop();
+		
+		LightBlock lightData = new LightBlock(new Vector4(0.2f, 0.2f, 0.2f, 1), lightAttenuation);
+		
+		Vector3 globalLightDirection = new Vector3(0.707f, 0.707f, 0);
+		
+		lightData.lights[0] = new PerLight(worldToCameraMatrix.mult(new Vector4(globalLightDirection, 0)), new Vector4(0.6f, 0.6f, 0.6f, 1));
+		lightData.lights[1] = new PerLight(worldToCameraMatrix.mult(calcLightPosition()), new Vector4(0.4f, 0.4f, 0.4f, 1));
+		
+		glBindBuffer(GL_UNIFORM_BUFFER, lightUniformBuffer);
+		glBufferSubData(GL_UNIFORM_BUFFER, 0, lightData.toBuffer());
+		glBindBuffer(GL_UNIFORM_BUFFER, 0);
+		
+		{
+			Mesh mesh = useInfinity ? objectMesh : planeMesh;
+			
+			glBindBufferRange(GL_UNIFORM_BUFFER, materialBlockIndex, materialUniformBuffer, currentMaterial * materialOffset, MaterialBlock.SIZE);
+			
+			modelMatrix.pushMatrix();
+			modelMatrix.getTop().mult(objectPole.calcMatrix());
+			modelMatrix.getTop().scale(useInfinity ? 2 : 4);
+			
+			ProgramData program = programs[mode.ordinal()];
+			
+			program.program.begin();
+			glUniformMatrix4(program.modelToCameraMatrixUniform, false, modelMatrix.getTop().toBuffer());
+			glUniformMatrix3(program.normalModelToCameraMatrixUniform, false, new Matrix3(modelMatrix.getTop()).inverse().transpose().toBuffer());
+			
+			glActiveTexture(GL_TEXTURE0 + gaussTexUnit);
+			glBindTexture(GL_TEXTURE_2D, gaussTextures[currentTexture]);
+			glBindSampler(gaussTexUnit, textureSampler);
+			
+			glActiveTexture(GL_TEXTURE0 + shineTexUnit);
+			glBindTexture(GL_TEXTURE_2D, shineTexture);
+			glBindSampler(shineTexUnit, textureSampler);
+			
+			if(mode != ShaderMode.MODE_FIXED)
+				mesh.render("lit-tex");
+			else
+				mesh.render("lit");
+			
+			glBindSampler(gaussTexUnit, 0);
+			glBindSampler(shineTexUnit, 0);
+			
+			glBindTexture(GL_TEXTURE_2D, 0);
+			
+			program.program.end();
+			
+			glBindBufferBase(GL_UNIFORM_BUFFER, materialBlockIndex, 0);
+			
+			modelMatrix.popMatrix();
+		}
+		
+		if(drawLights) {
+			modelMatrix.pushMatrix();
+			
+			modelMatrix.getTop().translate(new Vector3(calcLightPosition()));
+			modelMatrix.getTop().scale(0.25f);
+			
+			unlit.program.begin();
+			
+			glUniformMatrix4(unlit.modelToCameraMatrixUniform, false, modelMatrix.getTop().toBuffer());
+			glUniform4f(unlit.objectColorUniform, 1, 1, 1, 1);
+			cubeMesh.render("flat");
+			
+			modelMatrix.popMatrix();
+			modelMatrix.pushMatrix();
+			
+			modelMatrix.getTop().translate(globalLightDirection.copy().mult(100));
+			modelMatrix.getTop().scale(5);
+			
+			glUniformMatrix4(unlit.modelToCameraMatrixUniform, false, modelMatrix.getTop().toBuffer());
+			cubeMesh.render("flat");
+			
+			unlit.program.end();
+			
+			modelMatrix.popMatrix();
+		}
+		
+		if(drawCameraPos) {
+			modelMatrix.pushMatrix();
+			
+			modelMatrix.getTop().clearToIdentity();
+			modelMatrix.getTop().translate(0, 0, -viewPole.getView().radius);
+			
+			unlit.program.begin();
+			
+			glDisable(GL_DEPTH_TEST);
+			glDepthMask(false);
+			glUniformMatrix4(unlit.modelToCameraMatrixUniform, false, modelMatrix.getTop().toBuffer());
+			glUniform4f(unlit.objectColorUniform, 0.25f, 0.25f, 0.25f, 1);
+			cubeMesh.render("flat");
+			
+			glDepthMask(true);
+			glEnable(GL_DEPTH_TEST);
+			glUniform4f(unlit.objectColorUniform, 1, 1, 1, 1);
+			cubeMesh.render("flat");
+			
+			unlit.program.end();
+		}
+	}
+	
+	private Vector4 calcLightPosition() {
+		float currTime = lightTimer.getAlpha();
+		
+		Vector4 ret = new Vector4(0, 1, 0, 1);
+		ret.x((float)Math.cos(currTime * 2 * Math.PI) * 3);
+		ret.z((float)Math.sin(currTime * 2 * Math.PI) * 3);
+		
+		return ret;
+	}
+	
+	private static class ProgramData {
+		private ShaderProgram program;
+		
+		private int modelToCameraMatrixUniform;
+		private int normalModelToCameraMatrixUniform;
+		
+		public ProgramData(ShaderProgram program) {
+			this.program = program;
+		}
+	}
+	
+	private static class UnlitProgramData {
+		private ShaderProgram program;
+		
+		private int objectColorUniform;
+		private int modelToCameraMatrixUniform;
+		
+		public UnlitProgramData(ShaderProgram program) {
+			this.program = program;
+		}
+	}
+	
+	private static enum ShaderMode {
+		MODE_FIXED, MODE_TEXTURED, MODE_TEXTURED_COMPUTE;
+		
+		static {
+			length = values().length;
+		}
+		
+		private static int length;
+		
+		public static int length() {
+			return length;
+		}
+	}
+	
+	private static class ShaderPair {
+		private String vertexShader, fragmentShader;
+		
+		public ShaderPair(String vertexShader, String fragmentShader) {
+			this.vertexShader = vertexShader;
+			this.fragmentShader = fragmentShader;
+		}
+	}
+	
+	private static class PerLight {
+		private Vector4 cameraSpaceLightPos;
+		private Vector4 lightIntensity;
+		
+		public static final int SIZE = 2 * 4 * 4;
+		
+		public PerLight(Vector4 cameraSpaceLightPos, Vector4 lightIntensity) {
+			this.cameraSpaceLightPos = cameraSpaceLightPos;
+			this.lightIntensity = lightIntensity;
+		}
+		
+		private static final FloatBuffer buffer = BufferUtils.createFloatBuffer(SIZE / 4);
+		
+		public FloatBuffer toBuffer() {
+			buffer.clear();
+			buffer.put(cameraSpaceLightPos.toBuffer());
+			buffer.put(lightIntensity.toBuffer());
+			buffer.flip();
+			return buffer;
+		}
+	}
+	
+	private static class LightBlock {
+		private Vector4 ambientIntensity;
+		private float lightAttenuation;
+		private PerLight[] lights = new PerLight[NUMBER_OF_LIGHTS];
+		
+		public static final int SIZE = 2 * 4 * 4 + NUMBER_OF_LIGHTS * PerLight.SIZE;
+		
+		public LightBlock(Vector4 ambientIntensity, float lightAttenuation) {
+			this.ambientIntensity = ambientIntensity;
+			this.lightAttenuation = lightAttenuation;
+		}
+		
+		private static final FloatBuffer buffer = BufferUtils.createFloatBuffer(SIZE / 4);
+		
+		public FloatBuffer toBuffer() {
+			buffer.clear();
+			buffer.put(ambientIntensity.toBuffer());
+			buffer.put(lightAttenuation);
+			buffer.put(new float[3]);
+			
+			for(PerLight light : lights)
+				buffer.put(light.toBuffer());
+			
+			buffer.flip();
+			return buffer;
+		}
+	}
+	
+	private static class MaterialBlock implements UniformBlockObject {
+		private Vector4 diffuseColor;
+		private Vector4 specularColor;
+		private float specularShininess;
+		
+		public static final int SIZE = 3 * 4 * 4;
+		
+		public MaterialBlock(Vector4 diffuseColor, Vector4 specularColor, float specularShininess) {
+			this.diffuseColor = diffuseColor;
+			this.specularColor = specularColor;
+			this.specularShininess = specularShininess;
+		}
+		
+		private static final FloatBuffer buffer = BufferUtils.createFloatBuffer(SIZE / 4);
+		
+		public FloatBuffer toBuffer() {
+			buffer.clear();
+			buffer.put(diffuseColor.toBuffer());
+			buffer.put(specularColor.toBuffer());
+			buffer.put(specularShininess);
+			buffer.put(new float[3]);
+			buffer.flip();
+			return buffer;
+		}
+	}
+}

src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.FixedShininess.frag

+#version 330
+
+in vec3 vertexNormal;
+in vec3 cameraSpacePosition;
+
+out vec4 outputColor;
+
+layout(std140) uniform;
+
+uniform Material
+{
+	vec4 diffuseColor;
+	vec4 specularColor;
+	float specularShininess;
+} Mtl;
+
+struct PerLight
+{
+	vec4 cameraSpaceLightPos;
+	vec4 lightIntensity;
+};
+
+const int numberOfLights = 2;
+
+uniform Light
+{
+	vec4 ambientIntensity;
+	float lightAttenuation;
+	PerLight lights[numberOfLights];
+} Lgt;
+
+uniform sampler2D gaussianTexture;
+
+float calcAttenuation(in vec3 cameraSpacePosition, in vec3 cameraSpaceLightPos, out vec3 lightDirection)
+{
+	vec3 lightDifference =  cameraSpaceLightPos - cameraSpacePosition;
+	float lightDistanceSqr = dot(lightDifference, lightDifference);
+	lightDirection = lightDifference * inversesqrt(lightDistanceSqr);
+	
+	return 1.0 / (1.0 + Lgt.lightAttenuation * lightDistanceSqr);
+}
+
+vec4 computeLighting(in PerLight lightData, in vec3 cameraSpacePosition, in vec3 cameraSpaceNormal)
+{
+	vec3 lightDir;
+	vec4 lightIntensity;
+	if(lightData.cameraSpaceLightPos.w == 0.0)
+	{
+		lightDir = vec3(lightData.cameraSpaceLightPos);
+		lightIntensity = lightData.lightIntensity;
+	}
+	else
+	{
+		float atten = calcAttenuation(cameraSpacePosition, lightData.cameraSpaceLightPos.xyz, lightDir);
+		lightIntensity = atten * lightData.lightIntensity;
+	}
+	
+	vec3 surfaceNormal = normalize(cameraSpaceNormal);
+	float cosAngIncidence = dot(surfaceNormal, lightDir);
+	cosAngIncidence = cosAngIncidence < 0.0001 ? 0.0 : cosAngIncidence;
+	
+	vec3 viewDirection = normalize(-cameraSpacePosition);
+	
+	vec3 halfAngle = normalize(lightDir + viewDirection);
+	vec2 texCoord;
+	texCoord.s = dot(halfAngle, surfaceNormal);
+	texCoord.t = Mtl.specularShininess;
+	float gaussianTerm = texture(gaussianTexture, texCoord).r;
+	
+	gaussianTerm = cosAngIncidence != 0.0 ? gaussianTerm : 0.0;
+	
+	vec4 lighting = Mtl.diffuseColor * lightIntensity * cosAngIncidence;
+	lighting += Mtl.specularColor * lightIntensity * gaussianTerm;
+	
+	return lighting;
+}
+
+void main()
+{
+	vec4 accumLighting = Mtl.diffuseColor * Lgt.ambientIntensity;
+	for(int light = 0; light < numberOfLights; light++)
+	{
+		accumLighting += computeLighting(Lgt.lights[light], cameraSpacePosition, vertexNormal);
+	}
+	
+	outputColor = sqrt(accumLighting); //2.0 gamma correction
+}

src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/example14.3.Infinity.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<mesh xmlns="http://www.arcsynthesis.com/gltut/mesh">
+	<attribute index="0" type="float" size="3">
+		0.167654 -0.234565 -0.0332104
+		0.302162 -0.271324 -0.0468236
+		0.182526 -0.210757 -0.0258002
+		0.293968 -0.298388 -0.0534045
+		0.157943 -0.251324 -0.0336273
+		0.288955 -0.317101 -0.0532489
+		0.148496 -0.268167 -0.0320672
+		0.284227 -0.335768 -0.0511182
+		0.135823 -0.292669 -0.0230133
+		0.278415 -0.362448 -0.0412501
+		0.121263 -0.325107 0.00300836
+		0.272926 -0.396778 -0.0141836
+		0.11357 -0.348496 0.0395473
+		0.27176 -0.420281 0.0230666
+		0.113135 -0.356875 0.0673418
+		0.273652 -0.427666 0.0510813
+		0.115201 -0.35855 0.0865323
+		0.273652 -0.427666 0.0510813
+		0.113135 -0.356875 0.0673418
+		0.276172 -0.428181 0.0702837
+		0.118256 -0.358491 0.105664
+		0.279195 -0.426768 0.0893681
+		0.126052 -0.352434 0.132967
+		0.285272 -0.418094 0.116401
+		0.14331 -0.332063 0.168017
+		0.296793 -0.392915 0.150673
+		0.164538 -0.30173 0.191904
+		0.309501 -0.357416 0.173469
+		0.179411 -0.277921 0.199314
+		0.317694 -0.330351 0.18005
+		0.189122 -0.261162 0.199731
+		0.322708 -0.311638 0.179894
+		0.198569 -0.24432 0.198171
+		0.327435 -0.292971 0.177764
+		0.211241 -0.219817 0.189117
+		0.333248 -0.266291 0.167895
+		0.225802 -0.18738 0.163095
+		0.338737 -0.231961 0.140829
+		0.233494 -0.16399 0.126556
+		0.339903 -0.208458 0.103579
+		0.233929 -0.155611 0.0987616
+		0.338011 -0.201073 0.0755639
+		0.231863 -0.153937 0.0795711
+		0.33549 -0.200558 0.0563615
+		0.228809 -0.153995 0.0604395
+		0.332468 -0.201971 0.0372772
+		0.221012 -0.160052 0.0331361
+		0.326391 -0.210645 0.0102447
+		0.203755 -0.180423 -0.00191396
+		0.31487 -0.235824 -0.0240281
+		0.059575 -0.151312 -0.014235
+		0.0786781 -0.130791 -0.00669098
+		0.046823 -0.165889 -0.0147382
+		0.0342939 -0.180592 -0.0132618
+		0.0170487 -0.202169 -0.00431871
+		-0.00374913 -0.231119 0.0215787
+		-0.0161721 -0.252481 0.0580566
+		-0.0184941 -0.260538 0.0858529
+		-0.016984 -0.262523 0.105066
+		-0.0184941 -0.260538 0.0858529
+		-0.0141697 -0.262997 0.124228
+		-0.00563037 -0.258474 0.151606
+		0.0148709 -0.241704 0.186817
+		0.0413007 -0.215956 0.210897
+		0.0604038 -0.195435 0.218441
+		0.0731559 -0.180859 0.218944
+		0.0856849 -0.166156 0.217468
+		0.10293 -0.144579 0.208524
+		0.123728 -0.115629 0.182627
+		0.136151 -0.0942663 0.146149
+		0.138473 -0.0862093 0.118353
+		0.136963 -0.0842249 0.09914
+		0.134149 -0.0837509 0.0799775
+		0.125609 -0.0882733 0.0525993
+		0.105108 -0.105043 0.0173887
+		-0.0255131 -0.0585817 0.00113058
+		-0.00375342 -0.0410762 0.00906867
+		-0.0403129 -0.071061 0.000371472
+		-0.0549732 -0.0836672 0.00159961
+		-0.0755701 -0.102229 0.010212
+		-0.101325 -0.127261 0.035735
+		-0.11798 -0.145892 0.0720228
+		-0.122363 -0.153048 0.0998171
+		-0.121769 -0.154924 0.119091
+		-0.122363 -0.153048 0.0998171
+		-0.119656 -0.155506 0.13834
+		-0.111382 -0.151885 0.165933
+		-0.0896706 -0.137846 0.20161
+		-0.0603911 -0.116016 0.226257
+		-0.0386313 -0.0985104 0.234195
+		-0.0238314 -0.086031 0.234954
+		-0.00917113 -0.0734248 0.233726
+		0.0114257 -0.0548632 0.225114
+		0.0371804 -0.0298313 0.199591
+		0.0538357 -0.0112002 0.163303
+		0.0582184 -0.00404418 0.135509
+		0.057625 -0.00216794 0.116235
+		0.0555118 -0.00158578 0.0969855
+		0.0472376 -0.00520724 0.0693927
+		0.0255262 -0.0192458 0.0337157
+		-0.090764 0.0354466 0.00979596
+		-0.0677152 0.0508574 0.0184097
+		-0.10675 0.024569 0.00858545
+		-0.122717 0.0136248 0.00936997
+		-0.14561 -0.00233889 0.0173712
+		-0.17522 -0.0235597 0.0421559
+		-0.195687 -0.0389717 0.078001
+		-0.20229 -0.0445847 0.105711
+		-0.202932 -0.0457912 0.125036
+		-0.20229 -0.0445847 0.105711
+		-0.201926 -0.045872 0.144384
+		-0.194801 -0.0421098 0.172277
+		-0.173655 -0.0291026 0.208677
+		-0.143572 -0.00955826 0.234258
+		-0.120523 0.00585246 0.242871
+		-0.104537 0.0167302 0.244082
+		-0.0885693 0.0276743 0.243297
+		-0.0656766 0.0436381 0.235296
+		-0.0360671 0.064859 0.210511
+		-0.0155995 0.0802709 0.174666
+		-0.00899684 0.085884 0.146956
+		-0.00835436 0.0870905 0.127631
+		-0.00936031 0.0871712 0.108283
+		-0.0164857 0.083409 0.0803903
+		-0.0376322 0.0704018 0.0439903
+		-0.14442 0.127735 0.00998527
+		-0.121443 0.142765 0.0194229
+		-0.160681 0.117356 0.00819582
+		-0.177059 0.107009 0.00839895
+		-0.201008 0.0922384 0.0155559
+		-0.232967 0.0732725 0.0392256
+		-0.256332 0.0603407 0.0742706
+		-0.264969 0.0563229 0.101697
+		-0.266941 0.0560905 0.120969
+		-0.264969 0.0563229 0.101697
+		-0.26723 0.0569273 0.140322
+		-0.261844 0.0618141 0.16843
+		-0.242703 0.0758751 0.205541
+		-0.213689 0.0956283 0.232175
+		-0.190711 0.110658 0.241612
+		-0.17445 0.121037 0.243402
+		-0.158073 0.131385 0.243198
+		-0.134123 0.146155 0.236042
+		-0.102165 0.165121 0.212372
+		-0.0787994 0.178052 0.177327
+		-0.0701626 0.18207 0.1499
+		-0.0681902 0.182303 0.130629
+		-0.0679015 0.181466 0.111275
+		-0.0732873 0.176579 0.0831671
+		-0.0924286 0.162518 0.0460562
+		-0.197162 0.217318 0.001935
+		-0.175768 0.234167 0.012001
+		-0.212613 0.205849 -0.000323452
+		-0.228302 0.194486 -0.000602752
+		-0.251679 0.178509 0.00581443
+		-0.28377 0.158505 0.0284268
+		-0.308358 0.145535 0.0626103
+		-0.318365 0.14209 0.089646
+		-0.321476 0.142516 0.108764
+		-0.318365 0.14209 0.089646
+		-0.322981 0.14412 0.128012
+		-0.319609 0.150484 0.156138
+		-0.303643 0.167248 0.193627
+		-0.277563 0.189895 0.22098
+		-0.256168 0.206745 0.231046
+		-0.240718 0.218213 0.233305
+		-0.225028 0.229576 0.233584
+		-0.201651 0.245553 0.227167
+		-0.16956 0.265557 0.204554
+		-0.144972 0.278528 0.170371
+		-0.134965 0.281972 0.143335
+		-0.131854 0.281546 0.124218
+		-0.130349 0.279942 0.104969
+		-0.133721 0.273578 0.0768428
+		-0.149687 0.256815 0.0393543
+		-0.261304 0.301409 -0.0122185
+		-0.24348 0.321933 -0.00201952
+		-0.274463 0.287389 -0.0145966
+		-0.287939 0.273476 -0.0150068
+		-0.308409 0.25384 -0.00881684
+		-0.337299 0.229095 0.0134185
+		-0.360396 0.212836 0.0472338
+		-0.370546 0.208321 0.0740579
+		-0.374313 0.208634 0.0930595
+		-0.370546 0.208321 0.0740579
+		-0.376707 0.210387 0.112205
+		-0.375414 0.217873 0.140227
+		-0.363824 0.237991 0.177674
+		-0.342957 0.265426 0.205118
+		-0.325133 0.285951 0.215317
+		-0.311975 0.29997 0.217695
+		-0.298499 0.313883 0.218105
+		-0.278028 0.333519 0.211915
+		-0.249139 0.358264 0.18968
+		-0.226041 0.374523 0.155865
+		-0.215891 0.379038 0.12904
+		-0.212124 0.378725 0.110039
+		-0.209731 0.376972 0.0908936
+		-0.211024 0.369487 0.0628716
+		-0.222613 0.349368 0.0254249
+		-0.346094 0.371084 -0.0292562
+		-0.334491 0.39582 -0.0194357
+		-0.354976 0.353997 -0.031374
+		-0.364197 0.336959 -0.0315253
+		-0.378622 0.312631 -0.0249671
+		-0.399808 0.281375 -0.00226218
+		-0.417731 0.26004 0.0318689
+		-0.426341 0.253392 0.0587874
+		-0.430092 0.252986 0.0777904
+		-0.426341 0.253392 0.0587874
+		-0.432909 0.254341 0.0969104
+		-0.433742 0.262354 0.124804
+		-0.428088 0.285462 0.16189
+		-0.415455 0.317955 0.188834
+		-0.403852 0.34269 0.198655
+		-0.39497 0.359777 0.200772
+		-0.385749 0.376815 0.200924
+		-0.371324 0.401144 0.194366
+		-0.350138 0.4324 0.171661
+		-0.332215 0.453734 0.137529
+		-0.323605 0.460382 0.110611
+		-0.319854 0.460788 0.0916079
+		-0.317037 0.459433 0.0724878
+		-0.316205 0.45142 0.0445944
+		-0.321858 0.428313 0.00750816
+		-0.45246 0.411689 -0.0466551
+		-0.450177 0.439173 -0.0375779
+		-0.454794 0.392522 -0.0482439
+		-0.457439 0.373334 -0.047861
+		-0.462313 0.34567 -0.0405176
+		-0.470892 0.309572 -0.0167559
+		-0.479768 0.284205 0.0181589
+		-0.485174 0.275665 0.0453761
+		-0.488319 0.274466 0.0644555
+		-0.485174 0.275665 0.0453761
+		-0.491207 0.275246 0.083597
+		-0.494474 0.283184 0.111332
+		-0.496867 0.307769 0.147818
+		-0.496145 0.343322 0.173832
+		-0.493862 0.370806 0.18291
+		-0.491528 0.389973 0.184498
+		-0.488883 0.409161 0.184115
+		-0.484008 0.436825 0.176772
+		-0.47543 0.472923 0.15301
+		-0.466554 0.49829 0.118096
+		-0.461147 0.506831 0.0908782
+		-0.458003 0.508029 0.0717989
+		-0.455115 0.507249 0.0526574
+		-0.451848 0.499311 0.024922
+		-0.449455 0.474726 -0.0115633
+		-0.572168 0.406867 -0.0633485
+		-0.580881 0.433302 -0.0550887
+		-0.566735 0.388298 -0.0643549
+		-0.561564 0.369652 -0.0633838
+		-0.555031 0.34258 -0.0551746
+		-0.548431 0.306854 -0.0302463
+		-0.546267 0.281236 0.00553578
+		-0.547638 0.272176 0.0330853
+		-0.549903 0.270475 0.052251
+		-0.547638 0.272176 0.0330853
+		-0.552714 0.270694 0.0714186
+		-0.558641 0.277622 0.0989832
+		-0.570287 0.30047 0.134811
+		-0.583497 0.334266 0.159806
+		-0.59221 0.3607 0.168065
+		-0.597643 0.379269 0.169072
+		-0.602815 0.397915 0.168101
+		-0.609347 0.424987 0.159892
+		-0.615947 0.460713 0.134963
+		-0.618111 0.486331 0.099181
+		-0.61674 0.495391 0.0716315
+		-0.614476 0.497092 0.0524657
+		-0.611664 0.496873 0.0332982
+		-0.605737 0.489945 0.00573355
+		-0.594091 0.467097 -0.0300944
+		-0.689581 0.348843 -0.0793125
+		-0.707633 0.37024 -0.0716185
+		-0.677539 0.333678 -0.0799166
+		-0.665712 0.318395 -0.0785396
+		-0.649446 0.296016 -0.0697343
+		-0.62986 0.266087 -0.044005
+		-0.618203 0.244125 -0.00763053
+		-0.616065 0.235941 0.0201434
+		-0.61753 0.234013 0.0393654
+		-0.616065 0.235941 0.0201434
+		-0.620225 0.233655 0.0585474
+		-0.628343 0.238552 0.0859894
+		-0.647771 0.256244 0.121357
+		-0.672774 0.283195 0.145643
+		-0.690827 0.304592 0.153337
+		-0.702869 0.319757 0.153941
+		-0.714696 0.33504 0.152564
+		-0.730962 0.357419 0.143759
+		-0.750548 0.387347 0.118029
+		-0.762206 0.409309 0.081655
+		-0.764343 0.417493 0.0538809
+		-0.762878 0.419422 0.034659
+		-0.760183 0.419779 0.0154769
+		-0.752065 0.414882 -0.011965
+		-0.732637 0.397191 -0.0473329
+		-0.785727 0.244981 -0.0950375
+		-0.810212 0.258758 -0.0877172
+		-0.769124 0.235002 -0.0953813
+		-0.752699 0.224858 -0.0937437
+		-0.7297 0.209703 -0.0845631
+		-0.701103 0.188818 -0.0583449
+		-0.682828 0.172719 -0.0216278
+		-0.678219 0.166091 0.00626063
+		-0.679097 0.163969 0.0254979
+		-0.678219 0.166091 0.00626063
+		-0.681678 0.162884 0.0446684
+		-0.691259 0.164901 0.072001
+		-0.715996 0.175009 0.107033
+		-0.749097 0.191716 0.130835
+		-0.773582 0.205493 0.138155
+		-0.790185 0.215472 0.138499
+		-0.80661 0.225617 0.136861
+		-0.829609 0.240772 0.127681
+		-0.858206 0.261656 0.101462
+		-0.876481 0.277755 0.0647453
+		-0.88109 0.284383 0.0368567
+		-0.880212 0.286506 0.0176195
+		-0.877631 0.287591 -0.00155097
+		-0.86805 0.285573 -0.0288836
+		-0.843313 0.275466 -0.0639158
+		-0.839173 0.114133 -0.111312
+		-0.867196 0.117522 -0.104516
+		-0.82002 0.111218 -0.1113
+		-0.801007 0.10807 -0.10931
+		-0.774157 0.102743 -0.0996354
+		-0.740284 0.0941425 -0.0728025
+		-0.71798 0.0859808 -0.0356917
+		-0.711742 0.0814351 -0.00770289
+		-0.712121 0.0790229 0.0115164
+		-0.711742 0.0814351 -0.00770289
+		-0.71447 0.0769234 0.0306324
+		-0.724629 0.0749823 0.057761
+		-0.752029 0.0747159 0.0922643
+		-0.789455 0.0774406 0.115357
+		-0.817477 0.0808296 0.122152
+		-0.836631 0.0837445 0.12214
+		-0.855643 0.0868921 0.12015
+		-0.882494 0.0922194 0.110476
+		-0.916367 0.10082 0.083643
+		-0.938671 0.108982 0.046532
+		-0.944909 0.113527 0.0185432
+		-0.944529 0.115939 -0.000676084
+		-0.942181 0.118039 -0.0197921
+		-0.932021 0.11998 -0.0469206
+		-0.904621 0.120246 -0.0814239
+		-0.834143 -0.0209718 -0.128592
+		-0.867196 0.117522 -0.104516
+		-0.861141 -0.0298105 -0.122598
+		-0.839173 0.114133 -0.111312
+		-0.815552 -0.0155498 -0.128036
+		-0.82002 0.111218 -0.1113
+		-0.797038 -0.0104307 -0.125509
+		-0.801007 0.10807 -0.10931
+		-0.770688 -0.00411385 -0.115082
+		-0.774157 0.102743 -0.0996354
+		-0.737012 0.00190961 -0.087316
+		-0.740284 0.0941425 -0.0728025
+		-0.714259 0.00329077 -0.0496104
+		-0.71798 0.0859808 -0.0356917
+		-0.707372 0.00133526 -0.0214733
+		-0.711742 0.0814351 -0.00770289
+		-0.707169 -0.00132775 -0.00228447
+		-0.711742 0.0814351 -0.00770289
+		-0.707372 0.00133526 -0.0214733
+		-0.712121 0.0790229 0.0115164
+		-0.70888 -0.00453466 0.0167453
+		-0.71447 0.0769234 0.0306324
+		-0.717935 -0.0110189 0.0435578
+		-0.724629 0.0749823 0.057761
+		-0.743505 -0.0233657 0.0772483
+		-0.752029 0.0747159 0.0922643
+		-0.779145 -0.0370339 0.0992554
+		-0.789455 0.0774406 0.115357
+		-0.806143 -0.0458727 0.105249
+		-0.817477 0.0808296 0.122152
+		-0.824734 -0.0512947 0.104693
+		-0.836631 0.0837445 0.12214
+		-0.843248 -0.0564138 0.102166
+		-0.855643 0.0868921 0.12015
+		-0.869598 -0.0627307 0.0917398
+		-0.882494 0.0922194 0.110476
+		-0.903274 -0.0687542 0.0639734
+		-0.916367 0.10082 0.083643
+		-0.926027 -0.0701353 0.0262677
+		-0.938671 0.108982 0.046532
+		-0.932914 -0.0681798 -0.00186926
+		-0.944909 0.113527 0.0185432
+		-0.933117 -0.0655167 -0.0210582
+		-0.944529 0.115939 -0.000676084
+		-0.931406 -0.0623098 -0.040088
+		-0.942181 0.118039 -0.0197921
+		-0.922351 -0.0558256 -0.0669005
+		-0.932021 0.11998 -0.0469206
+		-0.896781 -0.0434787 -0.100591
+		-0.904621 0.120246 -0.0814239
+		-0.771364 -0.139529 -0.146466
+		-0.79258 -0.158651 -0.141255
+		-0.756582 -0.127052 -0.145378
+		-0.741791 -0.114919 -0.142323
+		-0.720489 -0.0986556 -0.131157
+		-0.692738 -0.080001 -0.102465
+		-0.673296 -0.0701908 -0.0641627
+		-0.666801 -0.0696878 -0.0358696
+		-0.665939 -0.0723802 -0.0167031
+		-0.666801 -0.0696878 -0.0358696
+		-0.666603 -0.0763422 0.00224966
+		-0.672813 -0.0864127 0.028763
+		-0.691884 -0.108654 0.0616707
+		-0.719378 -0.135975 0.0826234
+		-0.740594 -0.155097 0.0878339
+		-0.755376 -0.167574 0.0867459
+		-0.770167 -0.179708 0.0836914
+		-0.791469 -0.195971 0.0725248
+		-0.81922 -0.214626 0.0438336