A framework for analyzing real time advanced shading techniques
Download
1 / 22

A Framework for Analyzing Real-Time Advanced Shading Techniques - PowerPoint PPT Presentation


  • 466 Views
  • Uploaded on

A Framework for Analyzing Real-Time Advanced Shading Techniques. John C. Hart University of Illinois. Peter K. Doenges Evans & Sutherland. Permuting the Graphics Pipeline. Recent advances in real-time shading order operations differently than the classical graphics pipeline

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'A Framework for Analyzing Real-Time Advanced Shading Techniques' - Audrey


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
A framework for analyzing real time advanced shading techniques

A Framework for Analyzing Real-Time Advanced Shading Techniques

John C. Hart

University of Illinois

Peter K. Doenges

Evans & Sutherland


Permuting the graphics pipeline
Permuting the Graphics Pipeline Techniques

  • Recent advances in real-time shading order operations differently than the classical graphics pipeline

    Fragment lighting, texture shading, multipass rendering, multitexturing, environment-mapped bump mapping, normal mapping, …

  • Use a grammar to express, catalog and analyze real-time shadings techniques


Pipeline grammar
Pipeline Grammar Techniques

  • Data types denote formats of data through the graphics pipeline

  • Operators denote transformations of the data types into other data types

  • Operator notation:

    y = F x

    z = F G y

  • Permutation:

    What if z = G F y?


Shader data types
Shader Data Types Techniques

xVertex in model coordinates (x,y,z)

uSurface parameterization (u,v)

s Shading params (s,t,r) or (N,V,L,R,H)

u xTexcoords stores at vertex x

s x Shader params stored at vertex x

xs Vertex in viewport coordinates (xs,ys)

c Color vector (R,G,B)


Shader operators
Shader Operators Techniques

y

p Model-to-viewport:x xs

d Rasterization:xs xs(lerp + sampling)

p Shader: s c

p

ys

x

z

xs

d

p


Image operators
Image Operators Techniques

C Framebuffer: xs c

- Look up a previously stored color in the frame buffer

T Texture map: u  c

- Look up a texture map location

  • Assignment: C(xs,ys)  c, T(u,v)  c

    - Stores a color in a lookup table


Standard pipeline

Gouraud Techniques

C d p xdpsx

Texture map

C d p xT dux

Standard Pipeline

d

p

C

addr

pixel

x

model

d

p

data

pixel

s

T

d

data

addr

u

  • Modulation

  • C d p x (dpsx)  (T dux)


Fragment lighting
Fragment Lighting Techniques

  • Fragment is a rendered sample (e.g. pixel)

  • Applies shader to each pixel as it is rasterized

  • Renderman, hardware Phong, bump mapping

  • What now happens per-pass in modern graphics cards


Fragment lighting1
Fragment Lighting Techniques

C dpxpdsx

  • Commutes Gouraud

    C d p xdpsx

d

p

C

addr

pixel

x

model

p

d

data

pixel

s


Texture shading
Texture Shading Techniques

v = N.H

u = N.L


Texture shading1
Texture Shading Techniques

Precompute shader, store in texture map

Use tex coord to index shader parameters

T dupsdu

C d p x T du sx

d

u

T

addr

pixel

x

model

p

s

d

data

s

u

u


Modern gpu org
Modern GPU Org. Techniques

Geometry(vertex stream)

Vertex Shader

Setup

Rasterization

1

2

3

4

1

2

3

4

1

2

3

4

1

2

3

4

Texture Memory

Pixel Shader

Tex 0

Tex 1

Tex 2

Frame Buffer


Modern gpu pipeline
Modern GPU Pipeline Techniques

C dvxf ((dv s x) (T, T’, T’’, …))

v vertex shader

- input: x (and assoc. attributes)

- output: screen coords vertex color/attrs

f fragment shader

- inputs: interpolated pixel color/attrs

- access to texture data

- output: pixel color


Deferred shading
Deferred Shading Techniques

  • Rasterize first

  • Store shading parameters instead of color in each pixel

  • Second pass shades each pixel

  • Shading depth complexity equals one

  • Fat framebuffer


Deferred shading1
Deferred Shading Techniques

  • Store shading params: Tdp x d s x

  • Shade pixel: C xs p T xs

d

p

T

addr

pixel

x

model

d

data

s

C

xs

screen

p

T

data

s

xs


Texture atlas shading

Model Space Techniques

Texture Map

Texture Atlas Shading

Plot using u,v

Fill using s,t,r

Replace s,t,r

w/proc. RGB

Apply texture map


Texture atlas shading1
Texture Atlas Shading Techniques

  • Store solid texcoord: T duxds x

  • Shade solid texcoord: T du  p T du

  • Map onto surface: C d p x T dux

d

T

addr

u

model

d

data

s

d

T

addr

u

texture

p

T

d

data

s

data

u


Texture coordinate shaders
Texture Coordinate Shaders Techniques

  • Standard Texturing: Cdpx T dux

  • Pass Thru: Cdpxdux

  • Dependent Texture: Cdpx T’ T dux

  • Environment map: T uxpSs x

  • Environment Mapped Bump Mapping

    C dpx T d ((ux) + (T’ du’ x))


Shadow map
Shadow Map Techniques

  • Render from eyepoint shadowed

    C dpxdpsx

  • Render from eyepoint illuminated

    C’ dpxdps’ x

  • Render from light source (unshaded)

    Cl dplxdx

  • Backproject to construct shadow mask

    a C xs (z C xs) > (z Clplp-1xs)

  • Use to blend shadowed and lit images

    C xs (a C xs)*(C xs) + (1 – a C xs)*(C’ xs)


Shadow volume
Shadow Volume Techniques

  • Shadow volume: x’, stencil buffer: s C

  • Render scene

    C dpxdpsx

  • Store shadow vol. visibility in stencil

    sCdpx (sCdpx) OR ((z dp x’) > (z Cdp x’))

  • Use stencil to combine shadow image

    C dpx (s C dpx) ? (dps’ x)


Newer stuff
Newer Stuff Techniques

  • Gouraud: C d p xdpsx

  • Phong/Bump: C d p xpdsx

  • Subdiv/Displace: C d p xpsdx

  • QSplat: C p dxpsdx

    Moral: Push the delta right (!?)


Conclusion
Conclusion Techniques

  • Real-time procedural shading causes us to rethink the graphics pipeline

  • Grammar provides a concise method to describe and compare new pipelines

  • Future work: classification, new pipelines, sampling


ad