11.11.2014 Views

Clipping and Hidden Surfaces Clipping Basic Line Clipping Cohen ...

Clipping and Hidden Surfaces Clipping Basic Line Clipping Cohen ...

Clipping and Hidden Surfaces Clipping Basic Line Clipping Cohen ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Inside/Outside in Screen Space<br />

Finding Intersection Points<br />

19<br />

20<br />

Backface Culling<br />

Z-Buffer ( a.k.a. Depth Buffer )<br />

• Use additional buffer to store a Z value at each pixel<br />

• When filling pixel write Z value to buffer also<br />

• Don’t fill if new Z value is larger than old<br />

• Quantization <strong>and</strong> aliasing problems sometimes occur<br />

• Very commonly used<br />

• St<strong>and</strong>ard feature in hardware<br />

• Interpolating Z values over polygons<br />

21<br />

22<br />

Z-Buffer <strong>and</strong> Transparency<br />

A-Buffer<br />

• Must render in order back to front<br />

Partially<br />

transparent<br />

3rd<br />

Front<br />

Partially<br />

transparent<br />

1st<br />

• Store list of polygons at each pixel (fragments)<br />

• Draw opaque stuff first,only keep closest frag<br />

• Second pass for transparent stuff<br />

Opaque<br />

Opaque<br />

2nd<br />

1st<br />

Opaque<br />

Opaque<br />

3rd<br />

2nd<br />

• Allows antialiasing…<br />

Good<br />

Not Good<br />

• Not good for hardware implementation<br />

Talk about compositing later…<br />

23<br />

24<br />

4

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!