Real Time Shaders - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

Real Time Shaders

Description:

... model as combination of colors. C = ka Ca kd (N L) Cd ks ... Radiance Map. Spheremap is reflection of scene on sphere. Render phong highlight on sphere ... – PowerPoint PPT presentation

Number of Views:58
Avg rating:3.0/5.0
Slides: 15
Provided by: csAri
Category:
Tags: california | map | of | real | shaders | time

less

Transcript and Presenter's Notes

Title: Real Time Shaders


1
Real Time Shaders
  • CS 319
  • Advanced Topics in Computer Graphics
  • John C. Hart

2
Real Time Shaders
  • Moores law CPU power doubles every 18 months
  • Advances in materials
  • Advances in methods
  • Advances in marketing
  • Graphics version GPU power doubles every 6
    months
  • Supports more sophisticated shading, though in
    unexpected ways (e.g. strange uses of the texture
    maps)

3
AvailableTechnology
  • Texture Shading
  • Render shading expressionsusing texture mapping
  • Multipass
  • Combine shading components using image processing
    combinations
  • E.g. Render texture diffuse then render highlight
  • Multitexturing
  • Store multiple texture coordinates at each vertex
  • Textures are combined on the fly
  • Fragment lighting
  • Compute complex shading per pixel

Slide 22 from Hanrahans Real-Time Shading
Languages
4
Texture Shading
  • Heidrich Seidel, SIGGRAPH 99
  • Implements shading models using texture maps
  • Disables hardware lighting
  • Evaluate shading expressions, store in texture
    coordinates
  • Precompute remaining expression in texture map

5
Example PhongTexture Shader
  • Express model as combination of colors
  • C ka Ca kd (N?L) Cd ks (V?R)n Cs
  • Plot vertices using texture coordinates
  • s N?L
  • t V?R
  • Precompute texture by evaluating
  • C(s,t) ka Ca kd s Cd ks tn Cs
  • for 0 ? s,t ? 1

t V?R
s N?L
6
ExampleCook-Torrance
c V?H and g2h2c2-1
7
Example Skin
8
Hair
9
Sampling
  • Problem
  • Gouraud interpolation of highlights
  • Interpolation of N?L and V?R which are
    proportional or power-proportional to intensity
  • Solution
  • Interpolate vectors instead
  • How?

10
EnvironmentMaps
  • Spheremap
  • reflection into hemisphere
  • Singular at silhouette
  • Biased samples
  • Cubemap
  • projection onto cube faces
  • Awkward to store

11
Radiance v. Irradiance Maps
  • Environment map
  • Panoramic picture of surroundings
  • Radiance map
  • Reflectance equation
  • Environment map is an irradiance map Li(wi)
  • Radiance map Lr(wr) computed by integrating BRDF
    with irradiance

12
PhongRadiance Map
  • Spheremap is reflection of scene on sphere
  • Render phong highlight on sphere
  • Use rendered sphere as an environment map
  • Texture coordinate interpolation interpolates wr

13
MeasuredRadiance Maps
Peercy, Olano, Airey , Ungar, "Interactive
Multi-Pass Programmable Shading", SIGGRAPH 2000
14
Real-Time Bump Mapping
B
B
B
  • Embossing
  • Multipass difference betweentexture and shifted
    copy
  • Environment-mapped bump mapping
  • Perturb environment map index with bump map (map
    of height field differentials)
  • Register combiners
  • Store vectors in texture map
  • Compute per-pixel dot product
Write a Comment
User Comments (0)
About PowerShow.com