inferred lighting

Post on 24-May-2015

5.384 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Inferred lighting

TRANSCRIPT

inferred lighting :Handling Transparency

in Deferred Render system

OZhttp://ozlael.egloos.com

Deferred Render System

normal depthresult

Deferred Render System

● Transparency is usually solved by splitting the Rendering pipeline in two parts - Render opaque - Render transparent objects

● Lighting inconsistency problem● Split pipelines● Need same pipeline between opaque an

d transparence

Deferred Rendering Transparencyin ShaderX7

alpha

G-buffer :Transparent only every odd horizontal line is rendered.

Deferred Rendering Transparencyin ShaderX7

C0 = CsA + Cd(1-A) orC0 = Cd + (Cs-Cd)A

Inferred lighting

● Extension of Light Pre-pass● Mixed resolution rendering :

G-Buffers and Lighting are done at a lower resolution that the final output pass.

● Use DSF filter● Same lit approach

Inferred lighting

Geometry Pass: 800x450

Light Pass: 800x450Material Pass: 1280x720, 8x MSAA

N D DSF

Discontinuity Sensitive Filtering(DSF)

Bilinear

DSF

DSF Buffer

In 16bit -> Object/Instance ID & Normal Group ID

DSF Buffer

Object/Instance ID

DSF Buffer

Normal Group ID

Up-Sample

Low Res.

High Res.

Up-Sample

Low Res.

High Res.

Up-Sample

Low Res.

High Res.X

a,b,c :same DSF ID

d : other DSF ID

Handling Alpha Objects in Geometry Pass

G-Buffer into 2×2 quads

1 transparent3 opaques

transparencytransparency

opaque

Handling Alpha Objects in Geometry Pass

G-Buffer into 2×2 quads

3 transparents1 opaque

Handling Alpha Objects in Geometry Pass

Write stipple pattern

Handling Alpha Objects in Geometry Pass

Alpha samples are lit same as opaque samples

Handling Alpha Objects in Geometry Pass

DSF on opaque objects automatically ignores alpha samples: different DSF ID

Handling Alpha Objects in Geometry Pass

Alpha object shader knows stipple pattern :Looks up proper sample locations in L-buffer

Inferred lighting is the perfect one?

● Never!!!

Dark side

● Transparents being lit at 1/4 resolution

Forward Render Inferred Render

Dark side

● DSF filtering is not cheap● Incur higher base cost● Assign stipple patterns for 3 alpha lightin

g layers● Complex G-buffer reading at Post image

process● In the H/W early-Z between G-pass and

M-pass is impossible (back buffer size differ)

Dark side

● Assign the appropriate normal ID

Different normal ID each faces

Same normal ID each faces

Question?

top related