<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Real-Time Rendering &#187; deferred lighting</title>
	<atom:link href="http://www.realtimerendering.com/blog/tag/deferred-lighting/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.realtimerendering.com/blog</link>
	<description>Tracking the latest developments in interactive rendering techniques</description>
	<lastBuildDate>Sun, 12 May 2013 00:21:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
		<item>
		<title>Seven Things for May 4th, 2011</title>
		<link>http://www.realtimerendering.com/blog/seven-things-for-may-4th-2011/</link>
		<comments>http://www.realtimerendering.com/blog/seven-things-for-may-4th-2011/#comments</comments>
		<pubDate>Wed, 04 May 2011 13:24:21 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[collision detection]]></category>
		<category><![CDATA[deferred lighting]]></category>
		<category><![CDATA[deferred shading]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[languages]]></category>
		<category><![CDATA[lines]]></category>
		<category><![CDATA[Lua]]></category>
		<category><![CDATA[physics engine]]></category>
		<category><![CDATA[printing]]></category>
		<category><![CDATA[ray tracing]]></category>

		<guid isPermaLink="false">http://www.realtimerendering.com/blog/?p=2142</guid>
		<description><![CDATA[Seven things: There&#8217;s a post on speculative contacts by Paul Firth, a way of simplifying and stabilizing collision detection that has been used in Little Big Planet. Particularly nice is that demos are built into the page, so you can try the various methods out and see the problems and performance for yourself. This author [...]]]></description>
			<content:encoded><![CDATA[<p>Seven things:</p>
<ul>
<li>There&#8217;s<a href="http://www.wildbunny.co.uk/blog/2011/03/25/speculative-contacts-an-continuous-collision-engine-approach-part-1/"> a post on speculative contacts</a> by Paul Firth, a way of simplifying and stabilizing collision detection that has been used in Little Big Planet. Particularly nice is that demos are built into the page, so you can try the various methods out and see the problems and performance for yourself. This author has followed up with &#8220;<a href="http://www.wildbunny.co.uk/blog/2011/04/20/collision-detection-for-dummies/">Collision Detection for Dummies</a>&#8220;, a great overview, and &#8220;<a href="http://www.wildbunny.co.uk/blog/2011/04/06/physics-engines-for-dummies/">Physics Engines for Dummies</a>&#8220;, again with interactive demos.</li>
<li><a href="http://gamedevcoder.wordpress.com/2011/04/11/light-pre-pass-vs-deferred-renderer-part-1/">The Gamedev Coder Diary</a> has a worthwhile summary of the current state of deferred shading vs. deferred lighting (aka &#8220;light pre-pass&#8221;) techniques, discussing problems and strengths of each.</li>
<li>The CODE517E blog has had a number of good posts lately, including an article on <a href="http://c0de517e.blogspot.com/2011/01/mythbuster-deferred-rendering.html">deferred rendering myths</a>, another on <a href="http://c0de517e.blogspot.com/2011/03/stable-cascaded-shadow-maps-ideas.html">stable cascaded shadow maps</a>, an accumulation-buffer-like way of <a href="http://c0de517e.blogspot.com/2011/04/different-way-of-generating-high-res.html">making super-high resolution images for printing</a> (with some worthwhile analysis of problems it engenders with mipmap sampling and with view shifting &#8211; fun to think about), an extensive rundown of <a href="http://c0de517e.blogspot.com/2011/04/2011-current-and-future-programming.html">programming languages for videogames</a>, and a <a href="http://c0de517e.blogspot.com/2011/04/2011-tools-that-i-use.html">summary of tools he uses</a> (quite the long list &#8211; I&#8217;m still working through those I hadn&#8217;t seen before).</li>
<li>On the topic of languages, <a href="http://www.havok.com/index.php?page=gdc-lua-tutorial&amp;hl=en_US">Havok put together a page</a> collecting the Lua tutorial talks at GDC 2011.</li>
<li>The Boeing 777 model (almost 400 million polygons) <a href="http://www.youtube.com/watch?v=mxx9dyPO0js">ray traced at interactive rates on a consumer-level PC</a>, using CUDA. CentiLeo is an out-of-core GPU ray tracer, see <a href="http://raytracey.blogspot.com/2011/04/centileo-brand-new-interactive-out-of.html">this page</a> for some of the slides from the (rather long) video. That said, don&#8217;t be fooled by the start of the video: those sequences are generated at 15 seconds a frame and played back at 60 FPS (so 500-1000x from being real-time). Still, the preview mode is indeed interactive, and the Boeing is a huge model. On the other end of things, here&#8217;s a fun <a href="http://www.geeks3d.com/20110309/demoscene-sierra-leone-100-prodecural-raytraced-demo">demoscene ray trace</a>. By the way, <a href="http://raytracey.blogspot.com/">Ray Tracey&#8217;s blog</a> is good for keeping up on new ray tracing videos and demos and other related topics.</li>
<li>A <a href="http://blogs.agi.com/agi/?p=2456">poster accepted to SIGGRAPH 2011 by Ohlarik and Cozzi</a> gives a clever little method of properly drawing lines on surfaces for GIS applications. It converts lines to &#8220;walls&#8221;, then marks those pixels where there is a visibility change of the wall (i.e., one pixel of the wall is visible, a neighboring pixel is not), with a correction for terrain silhouette edges. One more trick for the bag.</li>
<li>More about the look and feel of games than the technical nerdy stuff I cover here, <a href="http://pixelcounterrr.net/">Topi Kauppinen&#8217;s blog</a> pointed me to <a href="http://susyoliveira.ca/site.htm">Susy Oliveira&#8217;s sculptures</a>, which are pretty amusing (finally, perfect models for 3D web browsers). There have been similar works by other artists (e.g. <a href="http://graphics.cs.williams.edu/realartifacts/">Eric Testroete&#8217;s head</a>), but the more the merrier.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.realtimerendering.com/blog/seven-things-for-may-4th-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deferred lighting approaches</title>
		<link>http://www.realtimerendering.com/blog/deferred-lighting-approaches/</link>
		<comments>http://www.realtimerendering.com/blog/deferred-lighting-approaches/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 16:37:51 +0000</pubDate>
		<dc:creator>Naty</dc:creator>
				<category><![CDATA[Reports]]></category>
		<category><![CDATA[deferred lighting]]></category>
		<category><![CDATA[deferred shading]]></category>
		<category><![CDATA[light pre-pass]]></category>

		<guid isPermaLink="false">http://www.realtimerendering.com/blog/?p=94</guid>
		<description><![CDATA[In Section 7.9.2 of Real-Time Rendering, we discussed deferred rendering approaches, including &#8220;partially-deferred&#8221; methods where some subset of shader properties are written to buffers.  Since publication, a particular type of partially-deferred method has gained some popularity.  There are a few different variants of this approach that are worth discussing; more details &#8220;under the fold&#8221;. First, [...]]]></description>
			<content:encoded><![CDATA[<p>In Section 7.9.2 of Real-Time Rendering, we discussed deferred rendering approaches, including &#8220;partially-deferred&#8221; methods where some subset of shader properties are written to buffers.  Since publication, a particular type of partially-deferred method has gained some popularity.  There are a few different variants of this approach that are worth discussing; more details &#8220;under the fold&#8221;.</p>
<p><span id="more-94"></span></p>
<p>First, I&#8217;ll briefly discuss the &#8220;classic&#8221; or &#8220;full&#8221; deferred shading approach.  For this discussion, I will assume a shading equation which looks like this:</p>
<p><img class="alignnone" src="http://www.realtimerendering.com/blog/wp-content/uploads/2009/05/deferredlighteqn01.png" alt="Deferred Lighting Equation 1" /></p>
<p>The equation uses the notation from our book.  It means that the output radiance from a surface point in the view direction (in other words, the pixel color) is equal to a sum over <span style="font-family: serif;"><em>n</em></span> point/directional light sources.  For each light source, the summed quantity is the result of a shading function which depends on (in order of appearance) the light intensity/color at that surface point, the light direction vector, the view vector, the normal vector, the diffuse surface color, the specular surface color, and a specular spread factor such as a Blinn-Phong cosine power.  This equation does not include any ambient or environmental lighting terms &#8211; those are handled separately in deferred shading systems.</p>
<p>The two quantities that vary per light are the direction vector <span style="font-family: serif;"><strong>l</strong></span> and the intensity/color <span style="font-family: serif;"><em>B<sub>L</sub></em></span>.  In game engine terms, <span style="font-family: serif;"><em>B<sub>L</sub></em></span> is equal to the light color times its intensity times the distance attenuation factor at the shaded point (in the book, we use <span style="font-family: serif;"><em>E</em></span><span style="font-family: serif;"><em><sub>L</sub></em></span>; the two are related thus: <span style="font-family: serif;"><em>B<sub>L</sub></em></span>=<span style="font-family: serif;"><em>E</em></span><span style="font-family: serif;"><em><sub>L</sub></em></span>/<span style="font-family: serif;"><strong><em>π</em></strong></span>).  <span style="font-family: serif;"><em>B<sub>L</sub></em></span> is an RGB-valued, HDR quantity (as opposed to RGB-valued quantities like <span style="font-family: serif;"><strong>c</strong><sub>diff</sub></span> or <span style="font-family: serif;"><strong>c</strong><sub>spec</sub></span> whose values are restricted to lie between 0 and 1).</p>
<p>Given this shading equation, deferred shading is typically applied in the following phases:</p>
<ol>
<li>Render opaque scene geometry, writing normal vector, diffuse color, specular color, and specular spread factor into a deep frame buffer or <em>G-Buffer</em>.  Since these will not fit into a single render target, this requires multi-render-target (MRT) support.  Write ambient or environment lighting results into an additional accumulation buffer.</li>
<li>Apply the effects of light sources by rendering 2D or 3D shapes covering each light&#8217;s area of effect (this relies on lights having a finite area of effect &#8211; true for most lights used in real-time applications, although not strictly physically correct).  Non-local light sources such as the Sun are applied in full-screen passes.  When rendering each &#8220;light shape&#8221;, evaluate the shading equation for that light, reading the G-Buffer channels as textures.  Accumulate the results of the shading equation into the accumulation buffer, using additive blending.  The depth-buffer from phase #1 is typically used to find the world- or view-space position of each shaded point.  This position is used to compute light distance attenuation and to lookup any shadow maps.</li>
<li>Render any semitransparent geometry using non-deferred shading.</li>
</ol>
<p>The results are in principle equivalent to the traditional, non-deferred shading approach (in practice buffer range and precision issues may cause artifacts).  Notably, full deferred shading is used in <a href="http://www.guerrilla-games.com/publications/dr_kz2_rsx_dev07.pdf">Killzone 2</a> as well as the upcoming <a href="http://ati.amd.com/developer/SIGGRAPH08/Chapter05-Filion-StarCraftII.pdf">Starcraft II</a>.</p>
<p>There are several downsides to this approach &#8211; the G-Buffer consumes a lot of storage and bandwidth, and the application is restricted to the same shading equation everywhere on the screen.  Handling multi-sample anti-aliasing (MSAA) can also be difficult.  However, deferred shading also has significant advantages; it  solves the light combinatorial problem, and most importantly, it reduces light computation to the absolute minimum (each light is only computed for those pixels that it actually affects).</p>
<p>By generalizing the idea of deferred rendering, storage and bandwidth usage can be considerably reduced.  Any sub-expression of a shading equation can be rendered into a buffer and used in a later pass.  One of the most common approaches utilizes the fact that many shading equations have separate diffuse and specular terms, each modulated by a color:</p>
<p><img class="alignnone" src="http://www.realtimerendering.com/blog/wp-content/uploads/2009/05/deferredlighteqn02.png" alt="Deferred lighting equation 2" /></p>
<p>The symbol that looks like an &#8220;x&#8221; inside a circle is another bit of notation from our book; it denotes a piecewise vector (in this case, RGB) multiplication.</p>
<p>This structure is utilized by a partial deferred shading approach which is most commonly called <em>deferred lighting</em>.  Deferred lighting is applied in the following phases:</p>
<ol>
<li>Render opaque scene geometry, writing normal vector <strong><span style="font-family: serif;">n </span></strong>and specular spread factor <span style="font-family: serif;"><em>m</em></span><strong><span style="font-family: serif;"> </span></strong>into a buffer.  This &#8220;<span style="font-family: serif;"><strong>n</strong>/<em>m</em></span> buffer&#8221; is similar to a G-Buffer but contains less information.  The values fit into a single output color buffer, so MRT support is not needed.</li>
<li>Render &#8220;light shapes&#8221;, evaluating diffuse and specular shading equations and writing the results into separate specular and diffuse accumulation buffers.  This can be done in a single pass (using MRT), or in two separate passes.  Environment and ambient lighting can be accumulated in this phase with a full-screen pass.</li>
<li>Render opaque scene geometry a second time, reading the diffuse and specular accumulation buffers from textures, modulating them with the diffuse and specular colors and writing the end result into the final color buffer.  If not accumulated in the previous phase, environment and ambient lighting are applied in this phase.</li>
<li>Render any semitransparent geometry using non-deferred shading.</li>
</ol>
<p>This is equivalent to refactoring the shading equation thus:</p>
<p><img class="alignnone" src="http://www.realtimerendering.com/blog/wp-content/uploads/2009/05/deferredlighteqn03.png" alt="Deferred lighting equation 3" /></p>
<p>Or, looking separately at the accumulation phase:</p>
<p><img class="alignnone" src="http://www.realtimerendering.com/blog/wp-content/uploads/2009/05/deferredlighteqn03a.png" alt="Deferred lighting equation 3A" /></p>
<p><img class="alignnone" src="http://www.realtimerendering.com/blog/wp-content/uploads/2009/05/deferredlighteqn03b.png" alt="Deferred lighting equation 3B" /></p>
<p>and the reconstruction phase:</p>
<p><img class="alignnone" src="http://www.realtimerendering.com/blog/wp-content/uploads/2009/05/deferredlighteqn03c.png" alt="Deferred lighting equation 3C" /></p>
<p>This technique was first described in <a href="http://archive.gdconf.com/gdc_2004/pritchard_matt.ppt">a GDC 2004 presentation by Rich Geldreich, Matt Pritchard, and John Brooks</a>.  It was used in <a href="http://www.naughtydog.com/">Naughty Dog</a>&#8216;s <a href="http://www.us.playstation.com/uncharted/">Uncharted: Drake&#8217;s Fortune</a>, and <a href="http://www.insomniacgames.com/">Insomniac</a>&#8216;s <a href="http://www.us.playstation.com/PS3/Games/Resistance_2">Resistance 2</a>.  Insomniac detailed their development in <a href="http://www.insomniacgames.com/tech/articles/0209/prelighting.php">an internal presentation</a>, and described the final system in <a href="http://www.insomniacgames.com/tech/articles/0409/files/GDC09_Lee_Prelighting.pdf">a recent GDC talk</a>.  <a href="http://www.crytek.com/">Crytek</a> also <a href="http://www.crytek.com/fileadmin/user_upload/inside/presentations/2009/A_bit_more_deferred_-_CryEngine3.ppt">adopted this approach in CryEngine 3</a>.  Compared to a full deferred shading approach, this has some advantages.  It can be used on older hardware that does not support MRT, the processing for each light is cheaper, and bandwidth and storage requirements are much reduced.  Some variation in shading equations is also possible, by replacing <span style="font-family: serif;"><strong>c</strong><sub>diff</sub></span> or <span style="font-family: serif;"><strong>c</strong><sub>spec</sub></span> with various expressions.</p>
<p>A variant on this technique renders a full G-Buffer in phase #1, and then applies the specular and diffuse colors to the accumulation buffers in a full-screen pass in phase #3 instead of rendering the opaque geometry a second time.  I believe <a href="http://developer.amd.com/gpu_assets/01GDC09AD3DDStalkerClearSky210309.ppt">S.T.A.L.K.E.R.: Clear Sky uses this variant</a>.</p>
<p>Storage and bandwidth requirements can be further reduced by compacting the separate diffuse and specular RGB accumulation buffers into a single RGBA buffer (reducing the number of distinct color channels used from 6 to 4).  <a href="http://www.crytek.com/fileadmin/user_upload/inside/presentations/2009/A_bit_more_deferred_-_CryEngine3.ppt">The CryEngine 3 presentation</a> also discusses this approach.  They accumulate the full RGB diffuse term, but only the luminance of the specular term (into the alpha channel).  The specular chromaticity information is discarded, and the chromaticity of the diffuse term is used to approximate that of the specular term.  This is plausible, but not 100% correct &#8211; imagine a red light source and a green light source shining onto a surface from different directions.  The diffuse term will be yellow, but the specular term should have two separate highlights &#8211; one red and one green.  With this approximation, both highlights will be yellow.</p>
<p>This can be seen in one of the images from <a href="http://www.crytek.com/fileadmin/user_upload/inside/presentations/2009/A_bit_more_deferred_-_CryEngine3.ppt">the CryEngine 3 presentation</a>, used here with <a href="http://www.crytek.com/">Crytek</a>&#8216;s kind permission:</p>
<p><img class="alignnone" style="vertical-align: middle;" src="http://www.realtimerendering.com/blog/wp-content/uploads/2009/05/crytek_teapot_small.png" alt="Crytek teapot image" /></p>
<p>In an appendix at the end of this post, I give some details on a possible implementation of 4-channel deferred lighting.</p>
<p>Deferred lighting (especially the 4-channel variant) is somewhat like the <em>light pre-pass</em> approach developed by Wolfgang Engel (<a href="http://diaryofagraphicsprogrammer.blogspot.com/2008/03/light-pre-pass-renderer.html">described</a> on <a href="http://diaryofagraphicsprogrammer.blogspot.com/">his blog</a> and in two chapters of <a href="http://www.shaderx7.com/">the recently released ShaderX<sup>7</sup> book</a>).  The idea of a light pre-pass has helped inspire much of the recent work on deferred lighting, and the two techniques are broadly similar.  However, the details show some significant differences.  The basic &#8220;G-Buffer&#8221; given in ShaderX7 contains only the surface normal <span style="font-family: serif;"><strong>n</strong></span>.  Since the specular spread <span style="font-family: serif;"><em>m</em></span> is not available during the accumulation phase, some other specular spread value (either fixed or derived from the light source) is used, and the value of <span style="font-family: serif;"><em>m</em></span> is applied in the reconstruction phase.  Since there is no way to do this correctly (specular terms have nonlinear dependence on <span style="font-family: serif;"><em>m</em></span>), a number of variant shading models are given to approximate the desired result.  These are ad hoc and each has drawbacks; for example, at least one (equation 8.5.6) has lights affecting each other&#8217;s attenuated intensity contribution, instead of each light having its own independent, additive effect.</p>
<div class="im">In my opinion, the deferred lighting approach that also stores the specular spread in the initial pass is vastly preferable, especially since <span style="font-family: serif;"><em>m</em></span> adds only a byte to each pixel in the G-Buffer.  The shading controls have a physical basis, control is straightforward, and the algorithm is efficient and compact.</div>
<h2>Appendix A &#8211; Four-Channel Deferred Lighting Implementation</h2>
<p>The Crytek presentation does not explain exactly how the specular is reconstructed.  The most correct method would probably be to transform the accumulated diffuse lighting into a space like <a href="http://en.wikipedia.org/wiki/CIELUV_color_space">CIELUV</a>, apply the diffuse chromaticity to the accumulated specular luminance, and transform the result into RGB.  That would be quite expensive; a cheaper method would be to divide the accumulated RGB diffuse term by its luminance and multiply by the accumulated specular luminance.  Again looking separately at the accumulation phase:</p>
<p><img class="alignnone" src="http://www.realtimerendering.com/blog/wp-content/uploads/2009/05/deferredlighteqn05.png" alt="Deferred lighting equation 5" /></p>
<p><img class="alignnone" src="http://www.realtimerendering.com/blog/wp-content/uploads/2009/05/deferredlighteqn05a.png" alt="Deferred lighting equation 5A" /></p>
<p>and the reconstruction phase:</p>
<p><img class="alignnone" src="http://www.realtimerendering.com/blog/wp-content/uploads/2009/05/deferredlighteqn06.png" alt="Deferred lighting equation 6" /></p>
<p>The epsilon in the denominator is a very small value put there to avoid divides by zero.  The function <span style="font-family: serif;">lum()</span> converts an RGB value into its luminance; it computes a simple weighted average of the R, G and B channels.  If the RGB quantity is in linear space, and the RGB primaries are those used in standard monitors and televisions, then the equation is:</p>
<p><img class="alignnone" src="http://www.realtimerendering.com/blog/wp-content/uploads/2009/05/deferredlighteqn04.png" alt="Deferred lighting equation 4" /></p>
<p>This method of reconstructing specular should produce the correct result with one light, and will preserve the correct specular luminance with multiple lights.</p>
<h2>Appendix B &#8211; Deferred Lighting with Example Shading Model</h2>
<p>It is interesting to see how this discussion applies to a specific shading model.  I will use a physically based model from Chapter 7 of our book:</p>
<p><img class="alignnone" src="http://www.realtimerendering.com/blog/wp-content/uploads/2009/05/deferredlighteqn07.png" alt="Deferred lighting equation 7" /></p>
<p>The half-vector <strong><span style="font-family: serif;">h</span></strong> is a vector halfway between the light vector <strong><span style="font-family: serif;">l</span></strong> and the view vector <strong><span style="font-family: serif;">v</span></strong>; to compute it, just add the two and normalize the result.  The underlined dot notation is not from RTR3, it&#8217;s something I just made up to concisely express the commonly-used &#8220;clamped dot product&#8221;, which is a dot product with negative values clamped to 0.  <em><span style="font-family: serif;">R<sub>F</sub></span></em> is the Fresnel reflectance function; it modifies the material&#8217;s characteristic specular color <span style="font-family: serif;"><strong>c</strong><sub>spec</sub></span> towards white as the dot product of <strong><span style="font-family: serif;">l</span></strong> and <strong><span style="font-family: serif;">h</span></strong> goes from 1 to 0.</p>
<p>Unfortunately, this shading equation is not in the right form for deferred lighting, due to the Fresnel function modifying the specular color for each light.  A solution to this is to use a different dot product in the Fresnel function; the dot product of <strong><span style="font-family: serif;">v</span></strong> and <strong><span style="font-family: serif;">n</span></strong> instead of that of <strong><span style="font-family: serif;">l</span></strong> and <strong><span style="font-family: serif;">h</span></strong>.  This is not strictly correct, but it is a reasonable approximation (the two dot products are equal in the middle of the specular highlight) and it makes the specular color invariant over light sources, which lets us refactor this equation into the form needed for deferred lighting:</p>
<p><img class="alignnone" src="http://www.realtimerendering.com/blog/wp-content/uploads/2009/05/deferredlighteqn08.png" alt="Deferred lighting equation 8" /></p>
<p>(here I&#8217;ve used the Schlick approximation to <em><span style="font-family: serif;">R<sub>F</sub></span></em> to compute a modified specular color)</p>
<p><img class="alignnone" src="http://www.realtimerendering.com/blog/wp-content/uploads/2009/05/deferredlighteqn09.png" alt="Deferred lighting equation 9" /></p>
<p><img class="alignnone" src="http://www.realtimerendering.com/blog/wp-content/uploads/2009/05/deferredlighteqn10.png" alt="Deferred lighting equation 10" /></p>
<p>Although a Fresnel term results in more realistic shading than a constant specular color, it does have one downside for deferred lighting.  It requires accessing the <span style="font-family: serif;"><strong>n</strong>/<em>m</em></span> buffer in phase #3, slightly increasing bandwidth usage and restricting opportunities for reusing the buffer.  If this is a concern, the Fresnel function can be replaced with a constant specular color.</p>
<p>The <span style="font-family: serif;">(<em>m</em>+8)/8</span> term in <span style="font-family: serif;"><em>f</em><sub>spec</sub></span> can take large values for materials with high specular powers, possibly preventing the use of a low-precision buffer for specular accumulation.  One solution is to move that term from <span style="font-family: serif;"><em>f</em><sub>spec</sub></span> to <span style="font-family: serif;"><strong>c</strong><sub>spec</sub></span> &#8211; applying it in phase #3 instead of phase #2.  If you are using a Fresnel function, the value of <span style="font-family: serif;"><em>m</em></span> is readily available after reading the <span style="font-family: serif;"><strong>n</strong>/<em>m</em></span> buffer (see above).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.realtimerendering.com/blog/deferred-lighting-approaches/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>CryEngine3 presentation</title>
		<link>http://www.realtimerendering.com/blog/cryengine3-presentation/</link>
		<comments>http://www.realtimerendering.com/blog/cryengine3-presentation/#comments</comments>
		<pubDate>Sat, 09 May 2009 15:55:06 +0000</pubDate>
		<dc:creator>Naty</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[CryEngine 3]]></category>
		<category><![CDATA[Cytek]]></category>
		<category><![CDATA[deferred lighting]]></category>
		<category><![CDATA[Triangle Game Conference]]></category>

		<guid isPermaLink="false">http://www.realtimerendering.com/blog/?p=98</guid>
		<description><![CDATA[This detailed presentation on Crytek&#8217;s latest engine at the regional Triangle Game Conference slipped completely under my radar, but Wolfgang Engel just pointed it out to me.  It&#8217;s on Crytek&#8217;s presentations page, which has a bunch of other good stuff on it as well. The presentation includes lots of great information on their new deferred [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.crytek.com/fileadmin/user_upload/inside/presentations/2009/A_bit_more_deferred_-_CryEngine3.ppt">This detailed presentation on Crytek&#8217;s latest engine</a> at the regional <a href="http://www.trianglegameconference.com/content/conference">Triangle Game Conference</a> slipped completely under my radar,  but <a href="http://diaryofagraphicsprogrammer.blogspot.com/">Wolfgang Engel</a> just pointed it out to me.  It&#8217;s on <a href="http://www.crytek.com/technology/presentations/">Crytek&#8217;s presentations page</a>, which has a bunch of other good stuff on it as well.</p>
<p>The presentation includes lots of great information on their new deferred lighting system, which is timely since I am just working on a lengthy blog post on this very subject (hopefully to be finished soon).  They also tease about their new dynamic global illumination system, to be presented at <a href="http://www.siggraph.org/s2009/">SIGGRAPH 2009</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.realtimerendering.com/blog/cryengine3-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>