Jason McKesson avatar Jason McKesson committed daeeebf

Editing and rearrangement.

Comments (0)

Files changed (3)

Documents/Building the Tutorials.xml

             build.</para>
         <para>If you look at any of the tutorial source files, you will not find the
                 <function>main</function> function defined anywhere. This function is defined in
-                <filename>framwork/framework.cpp</filename>; it is shared by every tutorial. It does
-            the basic boilerplate work: creating a FreeGLUT window, etc. This allows the tutorial
-            source files to contain the useful OpenGL-specific code.</para>
+                <filename>framwork/framework.cpp</filename>; it and all of the other source files in
+            the <filename>framework</filename> directory is shared by every tutorial. It does the
+            basic boilerplate work: creating a FreeGLUT window, etc. This allows the tutorial source
+            files to contain the useful OpenGL-specific code.</para>
     </simplesect>
 </article>

Documents/Illumination/Tutorial 08.xml

                 doesn't require using trigonometry to compute the angle between the two vectors.
                 Simple multiplications and additions; most graphics hardware can do billions of
                 these a second.</para>
+            <para>Obviously, the GLSL function <function>dot</function> computes the vector dot
+                product of its arguments.</para>
         </section>
     </section>
     <section>
             it is almost a necessity to some at least basic global illumination modelling in order
             to achieve a decent degree of photorealism. Incidentally, this is a good part of the
             reason why most games tend to avoid outdoor scenes or light outdoor scenes as though the
-            sky were cloudy or overcast. This neatly avoids needing to do difficult global
-            illumination modelling, by damping down the brightness of the sun to levels when
+            sky were cloudy or overcast. This neatly avoids needing to do complex global
+            illumination modelling by damping down the brightness of the sun to levels when
             interreflection would be difficult to notice.</para>
         <para>Having this completely black area in our rendering looks incredibly fake. Since doing
             actual global illumination modelling is hard, we will instead do a time-tested
                 <quote>model</quote>: <glossterm>ambient lighting.</glossterm></para>
         <para>The ambient lighting <quote>model</quote><footnote>
-                <para>I put model in quotations because it is so divorced from anything in reality
-                    that it doesn't really deserve to be called a model.</para>
-            </footnote> is quite simple. We assume that, on every object in the scene, there is a
+                <para>I put model in quotations because ambient lighting is so divorced from
+                    anything in reality that it doesn't really deserve to be called a model.</para>
+            </footnote> is quite simple. It assumes that, on every object in the scene, there is a
             light of a certain intensity that emanates from everywhere. It comes from all directions
             equally, so there is no angle of incidence in our diffuse calculation. It is simply the
             ambient light intensity * the diffuse surface color.</para>
             controls are the same as the last tutorial, except that the space bar swaps between the
             two cylinders (red and white), and that the <keycap>T</keycap> key toggles ambient
             lighting on and off (defaults to off).</para>
-        <!--TODO: Show a picture of the ambient lighting.-->
+        <!--TODO: Show a picture of the ambient lighting tutorial.-->
         <para>The rendering code now uses four of vertex shaders instead of two. Two of them are
             used for non-ambient lighting, and use the same shaders we have seen before, and the
             other two use ambient lighting.</para>
         <para>There are many, many things wrong with the primitive lighting model introduced here.
             But one of the most important is the treatment of the lighting intensity.</para>
         <para>Thus far, we have used light intensity like a color. We clamp it to the range [0, 1].
-            We even make sure that combined intensities from different lighting models always are on
-            that range.</para>
+            We even make sure that combined intensities from different lighting models always are
+            within that range.</para>
         <para>What this effectively means is that the light doesn't brighten the scene. The scene
             without the light is fully lit; our lights simply <emphasis>darken</emphasis> parts of
             the scene. They take the diffuse color and make it smaller.</para>
-        <para>This is of course not conversant with reality. In real life, there is no such thing as
-            a <quote>maximum</quote> illumination. There is no such thing as a (1, 1, 1) light
-            intensity. The actual range of light intensity is [0, ∞). This also means that the range
-            of intensity for reflected light is [0, ∞); after all, if you shine a really bright
-            light on a surface, it will reflect a lot of it. Of course, in the real world, things
-            tend to catch on fire if you shine <emphasis>too much</emphasis> light at them, but
-            that's not something we need to model.</para>
-        <para>The concept of lighting darkening a scene was common for a long time. It is another
-            part of the reason why, for so many years, 3D games tended to avoid the bright outdoors,
-            preferring corridors with darker lighting. The sun is a powerful light source; binding
-            lighting intensity to the [0, 1] range doesn't lead to a realistic model of
-            sunlight.</para>
+        <para>This is of course not realistic. In reality, there is no such thing as a
+                <quote>maximum</quote> illumination. There is no such thing as a (1, 1, 1) light
+            intensity. The actual range of light intensity per wavelength is [0, ∞). This also means
+            that the range of intensity for reflected light is [0, ∞); after all, if you shine a
+            really bright light on a surface, it will reflect a lot of it. Of course, in the real
+            world, things tend to catch on fire if you shine <emphasis>too much</emphasis> light at
+            them, but that's not something we need to model.</para>
+        <para>The concept of lighting darkening a scene was common for a long time in real-time
+            applications. It is another part of the reason why, for so many years, 3D games tended
+            to avoid the bright outdoors, preferring corridors with darker lighting. The sun is a
+            powerful light source; binding lighting intensity to the [0, 1] range doesn't lead to a
+            realistic vision of the outdoors.</para>
         <para>It is certainly possible on modern hardware to model light intensity correctly. And we
             will eventually do that. But these more primitive lighting models do still have their
             uses in some cases. And it is illustrative to see what an improvement having proper

Documents/Outline.xml

                         incidental reflectance.</para>
                 </listitem>
                 <listitem>
-                    <para>Directional lights vs. point lights.</para>
+                    <para>Directional lights.</para>
                 </listitem>
                 <listitem>
                     <para>Implementing lighting in a vertex shader for both directional and point
                         lights. Combining results from both kinds of lighting into a single
                         value.</para>
                 </listitem>
-                <listitem>
-                    <para>Perspective-correct interpolation of vertex attributes.</para>
-                </listitem>
             </itemizedlist>
         </section>
         <section>
             <para>Concepts:</para>
             <itemizedlist>
                 <listitem>
-                    <para>Limitations of per-vertex lighting.</para>
+                    <para>Perspective-correct interpolation of vertex attributes.</para>
                 </listitem>
                 <listitem>
-                    <para>Scaling and normal transformation.</para>
+                    <para>Point lights.</para>
+                </listitem>
+                <listitem>
+                    <para>Limitations of point lights and vertex-based lighting.</para>
                 </listitem>
                 <listitem>
                     <para>Implementing per-fragment lighting.</para>
                 </listitem>
                 <listitem>
-                    <para>Different transforms for lighting. Use different transforms to optimize
-                        fragment lighting by doing some of the computations in the vertex
-                        shader.</para>
+                    <para>Tangent-space transform for per-fragment lighting.</para>
                 </listitem>
             </itemizedlist>
         </section>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.