Deferred Rendering Test


Overview

The goal is to ship a new, additional rendering mode for not-old graphics cards that greatly improves the quality of the in-world visual experience and immersion. The two main features of this (optional) mode are support for real-time shadows and much-improved lighting.

Expectations:

System requirements:

Deferred rendering prefs UI

Deferred rendering - general

Deferred rendering - shiny

Deferred rendering - bumpiness

Deferred rendering - shadows / ambient occlusion

Shadow preference settings


Casting and receiving shadow

Example content at http://maps.secondlife.com/secondlife/Bug%20Island%202/209/235/23

Set your World -> Environment Editor -> Environment Setting... -> Fixed sky -> A-3PM to approximate the sun position in the following images.

Shadows should be cast in a direction opposite to the location of the sun (or moon) in the sky, i.e. realistically. If there is no sun or moon above the horizon, then effectively the whole world is in shadow and you won't see a clear shadow at all.

Note, it is expected and desired that an object (or twisted prim face, etc) which both casts and receives shadows may cast a shadow on itself. For example, an avatar's arm should cast a shadow on that avatar's leg, where appropriate.

Key to illustrations in this section: A = avatar B = opaque object C = 11% transparency D = 60% transparency E = 96% transparency F = opaque fullbright object G = alpha texture (per-pixel transparency)

Things that can cast solid shadows

Things that can cast partial shadows

Things that cannot cast shadows

Things that can receive shadows

Things that cannot receive shadows

Accepted weaknesses

Deferred rendering - legacy point-lights

[add lighting consistency test, which is built at http://maps.secondlife.com/secondlife/Bug%20Island%202/242/174/23]

Deferred rendering - projector UI

The extra options are:

The effects of these options are explained in the next section. 'FOV', 'Focus', and 'Ambiance' settings have no visible effect unless a texture is selected in the texture-chooser.

Deferred rendering - projectors

A light becomes a 'projector' as long as it has a texture assigned to it (from the texture-picker next to the color-picker in the light editor). The features of projectors are only fully visibly supported when 'Advanced Lighting Model' is enabled (more details below).

Projectors: 'Advanced Lighting Model' enabled

Example of projector at http://maps.secondlife.com/secondlife/Bug%20Island%202/89/148/31

A projector differs from a regular ('point') light in these significant ways:

Accepted Weaknesses

Projectors & Shiny

[ Test built at http://maps.secondlife.com/secondlife/Bug%20Island%202/247/156/23 ]

A projecting prim reflecting in a shiny surface should exhibit a reflection of the projecting prim's projected texture. This should be increasingly sharper and brighter, the more shiny the reflecting surface is.

FOV

This defines the 'field of view' of the projector, in radians. This is the angular width of the cone of light projected. The possible range of values from 0.0 to 3.0 correspond to widths from 0 degrees (you can't see it - we should probably set this lower range to 0.001) to approx 172 degrees (almost a hemisphere of influence). It is accepted that the fidelity of any shadows caused by a projector may degrade as the FOV becomes larger.

[ See the test at http://maps.secondlife.com/secondlife/Bug%20Island%202/242/64/23 ]

Focus

A projected texture appears blurrier the further the projection point is from the projector. The Focus value controls how attenuated this effect is. Positive values keep the projection sharper for further, negative values make the projection start to blur at a closer range.

[ See the test at http://maps.secondlife.com/secondlife/Bug%20Island%202/242/43/23 ]

Ambiance

This adds a very blurred version of the projected image to all faces within the cone of influence, regardless of even whether they are in shadow or facing away from the projector. The goal is to very roughly simulate light influence which is being diffused in all directions by surfaces receiving a projected image. Thus it is acceptable that this be even brighter on faces facing away from the projector. The brightness of this effect should be proportional to the Ambiance value. It is probably a bug that values from 0.5-1.0 seem to have no additional effect above the 0.5 value.

[ See the test at http://maps.secondlife.com/secondlife/Bug%20Island%202/242/24/23 ]

Projectors: 'Advanced Lighting Model' disabled

Deferred rendering and Environment

Atmospheric settings

Atmospheric/Sky (aka WindLight) settings should function pretty much identically regardless of whether 'Advanced Lighting Model' is enabled (they may be slightly better or otherwise more accurate when 'Advanced Lighting Model' is enabled, but the difference is hardly noticeable if things are working right). This can be tested by comparing the Environment Editor's sky presets in both modes (especially the more 'extreme' presets like Gelatto).

Water settings

Although the overall appearance of water is a bit different with 'Advanced Lighting Model' enabled, it should still respond similarly to all tweaks in the Advanced Water Settings section of the Environment Editor. This can be tested by comparing the Environment Editor's water presets in both modes.


Antialiasing

Antialiasing while Deferred rendering is enabled is supported on the following platforms [as of Nov 2011]:

Test:

  1. Enable Advanced Lighting Model and Antialiasing (Preferences > Graphics > Hardware > Antialiasing > 2x or greater) on those platforms.
  2. Restart the viewer
  3. Verify the edges of objects are antialiased.