Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSL 859: Advanced Computer Graphics

Similar presentations


Presentation on theme: "CSL 859: Advanced Computer Graphics"— Presentation transcript:

1 CSL 859: Advanced Computer Graphics
Dept of Computer Sc. & Engg. IIT Delhi

2 Graphics Pipeline Transform vertices Light vertices
Clip to Window extremes Setup edges Rasterize Fill and interpolate colors, depth Test against Z-buffer One entry per pixel: closest so far Update Color and Z buffers

3 Light Vertices Color Light Direction normal Point Directional Or Both
View Direction

4 Lighting in which space?
+1 -1 z=1 Near Plane Far Plane Projective? Distances get distorted Clip coordinates Normalized device coordinates Screen? World Camera -1

5 Homogeneous Space Clipping
Clip coordinates = projective coordinates -1 < x/z < +1 (after perspective divide) -1 < x/w < +1 (clip) -w < x < w -w < y < w 0 < z < w

6 Rasterize x0,y0,z0 y = mx + c x = 1/m(y+c) =ay+b x2,y2,z2
x+1 = ay+a + b = x + a zp-zl xp-xl zr-zl xr-xl = x1, y1,z1 zp+1 = zp + k

7 Perspective Distortion
z2 z1

8 Perspective Distortion

9

10 Perspective Correction
Linear interpolation: p(t) = p1 + (p2 – p1) t, 0 <= t <= 1 Screen space interpolation: ys = y1s + t (y2s – y1s) y/z = y1/z1 + t (y2/z2 – y1/z1) But also: y = y1 + u (y2 – y1) z = z1 + u (z2 – z1)

11 Perspective Correction

12 Perspective Correction

13 Perspective Correct Z

14 Perspective Corrected


Download ppt "CSL 859: Advanced Computer Graphics"

Similar presentations


Ads by Google