the university of north carolina at chapel hill practical logarithmic rasterization for low error...

58
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon Lloyd UNC-CH Naga Govindaraju Microsoft Steve Molnar NVIDIA Dinesh Manocha UNC-CH

Upload: camilla-mitchell

Post on 16-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Practical logarithmic rasterization for low error shadow maps

Brandon LloydUNC-CHNaga GovindarajuMicrosoftSteve Molnar NVIDIADinesh Manocha UNC-CH

Page 2: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

2

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Shadows

Shadows are important aid spatial reasoningenhance realismcan be used for dramatic effect

High quality shadows for real-time applicationsremains a challenge

Page 3: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

3

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Shadow approaches

Raytracing [Whitted 1980] not yet real-time for complex, dynamic scenes at high resolutions

Shadow volumes [Crow 1977] can exhibit poor performance on complex scenes

Page 4: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

4

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

LightEye

Shadow maps [Williams 1978]

Page 5: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

5

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Logarithmic perspective shadow maps (LogPSMs) [Lloyd et al. 2007]

Standard shadow map LogPSM

Page 6: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

6

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Logarithmic perspective shadow maps (LogPSMs) [Lloyd et al. 2007]

Standard shadow map LogPSM

Page 7: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

7

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Goal

linear rasterization logarithmic rasterization

Perform logarithmic rasterization at rates comparableto linear rasterization

Page 8: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

8

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Outline

BackgroundHandling aliasing errorLogPSMs

Hardware enhancementsConclusion and Future work

Page 9: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

9

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

High resolution shadow maps

Requires more bandwidth

Decreases shadow map rendering performance

Requires more storage

Increased contention for limited GPU memory

Decreased cache coherence

Decreases image rendering performance

Poor shadowmap querylocality

Page 10: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

10

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Sample at shadow map query positions

No aliasing

Uses irregular data structures

requires fundamental changes to graphics hardware [Johnson et al. 2005]

Irregular z-buffer[Aila and Laine 2004;Johnson et al. 2004]

Page 11: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

11

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Adaptive partitioning

Adaptive shadow maps [Fernando et al. 2001]

Queried virtual shadow maps[Geigl and Wimmer 2007]

Fitted virtual shadow maps [Geigl and Wimmer 2007]

Resolution matched shadow maps [Lefohn et al. 2007]

Multiple shadow frusta [Forsyth 2006]

Page 12: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

12

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Adaptive partitioning

Requires scene analysisUses many rendering passes

Page 13: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

13

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Scene-independent schemes

Match spacing between eye samplesFaster than adaptive partitioning

no scene analysis few render passes eye sample spacing

Page 14: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

14

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Cascaded shadow maps [Engel 2007] Parallel split shadow maps [Zhang et al. 2006]

Cascade shadow maps

Page 15: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

15

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Projective warping

Perspective shadow maps (PSMs) [Stamminger and Drettakis 2002]

Light-space perspective shadow maps (LiSPSMs) [Wimmer et al. 2004]

Trapezoidal shadow maps (TSMs)[Martin and Tan 2004]

Lixel for every pixel [Chong and Gortler 2004]

Page 16: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

16

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Projective warping

Not necessarily the best spacing distribution

PSM LiSPSM

hig

h e

rror

low error

mod

era

te e

rror

moderate error

y

x

Page 17: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

17

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Logarithmic+perspective parameterization

Perspectiveprojection

Logarithmictransform

Resolutionredistribution

Page 18: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

18

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Size of the shadow map* required to remove aliasing

error(ignoring surface orientation)

Uniform

Perspective

Logarithmic + perspective

Bandwidth/storage savings

- near and far plane distances of view frustum

*shadow map texels / image pixels

Page 19: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

19

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Single shadow map LogPSM

LogPSMs havelower maximum errormore uniform error

Image resolution: 5122

Shadow map resolution: 10242

f/n = 300Grid lines for every 10 shadow map texels Color coding for maximum texel extent in image

LiSPSM

LogPSMLiSPSM

LogPSM

>107.753.2511113.257.7510< >107.753.2511113.257.7510<

Page 20: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

20

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Comparisons

Page 21: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

21

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

More details

Logarithmic perspectiveshadow maps

UNC TR07-005

http://gamma.cs.unc.edu/logpsm

Page 22: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

22

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Outline

BackgroundHardware enhancements

rasterization to nonuniform gridgeneralized polygon offsetdepth compression

Conclusion and Future work

Page 23: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

23

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Graphics pipeline

fragment processor

vertex processor

rasterizer

alpha, stencil, & depth tests

blending

clipping

memoryinterface

depthcompression

colorcompression

setup

Page 24: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

24

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Rasterization

Coverage determinationcoarse stage – compute covered tiles fine stage – compute covered pixels

Attribute interpolationinterpolate from verticesdepth, color, texture coordinates, etc.

Page 25: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

25

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Signs used to compute coverageWater-tight rasterization

Use fixed-point fixed-point “snaps” sample locations to an underlying uniform grid

Edge equations

+++ -+++-+

++-

Page 26: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

26

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Attribute interpolation

Same form as edge equations:

Page 27: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

27

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Logarithmic rasterization

light space linear shadow mapspace

warped shadow mapspace

Linear rasterization with nonuniform grid locations.

y

x

y'

x

Page 28: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

28

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Edge and interpolation equations

Monotonicexisting tile traversal algorithms still workoptimizations like z-min/z-max culling still work

Page 29: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

29

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Coverage determinationfor a tile

Full parallel implementation

Full evaluation

Page 30: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

30

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Per-triangle constants

Coverage determination for a tile

Incremental in x

Full evaluationIncremental x

1 2

Page 31: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

31

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Generalized polygon offset

texelwidth

- depth slope

- smallest representable depth difference

constant

light

Page 32: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

32

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Generalized polygon offset

texelwidth

- depth slope

- smallest representable depth difference

constant

not constant

light

Page 33: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

33

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Generalized polygon offset

Do max per pixelSplit polygonInterpolate max at end points

Page 34: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

34

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Depth compression

Important for reducing memory bandwidth requirementsExploits planarity of depth valuesDepth compression survey [Hasselgren and Möller 2006]

depthcompressor

tile

tile table

store compressed

yes

store uncompressedno

fits in bitbudget?

Page 35: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

35

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Depth compression - Standard

compresseduntouchedclamped

Linear depth compressionOur depth compression

Resolution:512x512

Page 36: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

36

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Depth compression - LiSPSM

compresseduntouchedclamped

Linear depth compressionOur depth compression

Resolution:512x512

Page 37: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

37

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Depth compression - LogPSM

compresseduntouchedclamped

Linear depth compressionOur depth compression

Resolution:512x512

Page 38: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

38

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Depth compression – LogPSM Higher resolution

compresseduntouchedclamped

Linear depth compressionOur depth compression

low curvature

Resolution:1024x1024

Page 39: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

39

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

ΔxΔxΔx

ΔxΔxΔx

ΔxΔxΔx

ΔxΔxΔx

Δy

Δy

Δy

z0

dd

dda0

a1dd

ddz0

Δy Δy

Δy

Δy

Δx

24 3 6 3

10 3 16 3

18 3 10 3

10 3 9 3

Differentialencoding

Anchor encoding 128-bit allocationtable

Our compression scheme

Page 40: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

40

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Test scenes

Town model• 58K triangles

Robots model• 95K triangles

Power plant• 13M triangles • 2M rendered

Page 41: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

41

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Compression methods tested

Anchor encoding[Van Dyke and Margeson 2005]

Differential differential pulse code modulation (DDPCM)[DeRoo et al. 2002]

Plane and offset[Ornstein et al. 2005]

Hasselgren and Möller [2006]

Page 42: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

42

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Compression results

256 512 1024 20480

20

40

60

80

100

Com

pres

sed

size

(%

)

Resolution

Linear Rasterization

Our algorithm

Anchor [VM05]

DDPCM [DMFW02]

Plane & depth offset [OPS*05]

Hasselgren and Möller [HA06]

256 512 1024 20480

20

40

60

80

100 Logarithmic Rasterization

Com

pres

sed

size

(%

)

Resolution

Our algorithm

Anchor [VM05]

DDPCM [DMFW02]

Plane & depth offset [OPS*05]

Hasselgren and Möller [HA06]

Average compression over paths through all modelsVarying light and view direction

Page 43: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

43

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

256 512 1024 20480

20

40

60

80

100

Com

pres

sed

size

(%

)

Resolution

Linear Rasterization

Our algorithm

Anchor [VM05]

DDPCM [DMFW02]

Plane & depth offset [OPS*05]

Hasselgren and Möller [HA06]

256 512 1024 20480

20

40

60

80

100 Logarithmic Rasterization

Com

pres

sed

size

(%

)

Resolution

Our algorithm

Anchor [VM05]

DDPCM [DMFW02]

Plane & depth offset [OPS*05]

Hasselgren and Möller [HA06]

Compression results

Anchor encoding best linear method

higher tolerance for curvature

Page 44: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

44

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Summary of hardware enhancements

Apply F(y) to vertices in setuplog and multiply-add operations

Evaluators for G(y’)exponential and multiply-add operations

Possible increase in bit width for rasterizer Generalized polygon offsetNew depth compression unit

can be used for both linear and logarithmic rasterization

Page 45: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

45

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Feasibility

Leverages existing designsTrades computation for bandwidthAligns well with current hardware trends

computation cheapbandwidth expensive

Page 46: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

46

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Conclusion

Shadow mapsHandling errors requires high resolution

Logarithmic rasterization significant savings in bandwidth and storage

Incremental hardware enhancements

Rasterization to nonuniform gridGeneralized polygon offsetDepth compression

Feasibleleverages existing designsaligns well with hardware trends

Page 47: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

47

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Future work

Prototype and more detailed analysis Greater generalization for the rasterizer

reflections, refraction, caustics,multi-perspective rendering [Hou et al. 2006; Liu et al. 2007]

paraboloid shadow maps for omnidirectional light sources [Brabec et al. 2002]

programmable rasterizer?

Page 48: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

48

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Acknowledgements

Jon Hasselgren and Thomas Akenine-Möller for depth compression codeCorey Quammen for help with videoBen Cloward for robots modelAaron Lefohn and Taylor Halliday for town model

Page 49: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

49

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Acknowledgements

Funding agenciesNVIDIA University FellowshipNSF Graduate FellowshipARO Contracts DAAD19-02-1-0390 and W911NF-04-1-0088NSF awards 0400134, 0429583 and 0404088DARPA/RDECOM Contract N61339-04-C-0043Disruptive Technology Office.

Page 50: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

50

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Questions

Page 51: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

51

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Precisiondepends on resolution in y and

Inputs limited to 24 bits of precision(floating point mantissa)

Page 52: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

52

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Generalized polygon offset

fFor flythroughs in our test scenes:

Split situation occured for 1% of polygonsAverage was .001

Page 53: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

53

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Coverage determinationfor a tile

Incremental in y

Full evaluationIncremental xIncremental y

1

32Per-frame constants

Page 54: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

54

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Coverage determinationfor a tile

Look up table

Full evaluationIncremental xIncremental yLUT

21Per-frameconstants

Page 55: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

55

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Coverage determinationfor a tile

Look up table

Full evaluationIncremental xIncremental yLUT

32

1

Per-frameconstants

Page 56: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

56

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Comparisons

Standard FP+Perspective ZP5+Perspective FP+Log+Perspective

Page 57: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

57

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Equal error

29002 (4096x2053) 5122 (210x1248)

LiSPSM LogSPSM

Page 58: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft

58

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Simulating logarithmic rasterization

Apply F(y) in vertex programrequires fine tesselation to avoid errorincreases vertex transformation load

Brute-force rasterization with a fragment program

disables optimizations due to depth writes