Presentation is loading. Please wait.

Presentation is loading. Please wait.

1. 2 Blending: tells you how to specify a blending function that combines color values from a source and a destination. The final effect is that parts.

Similar presentations


Presentation on theme: "1. 2 Blending: tells you how to specify a blending function that combines color values from a source and a destination. The final effect is that parts."— Presentation transcript:

1 1

2 2 Blending: tells you how to specify a blending function that combines color values from a source and a destination. The final effect is that parts of your scene appear translucent. Antialiasing: explains this relatively subtle technique that alters colors so that the edges of points, lines, and polygons appear smooth rather than angular and jagged.

3  With blending, the foreground color is combined with the background color (translucent)  Without blending, each foreground color overwrites the existing background color (opaque) - Linear soft-fill algorithm 3

4 4

5 5  most things in the real world are continuous  everything in a computer is discrete  the process of mapping a continuous function to a discrete one is called sampling  the process of mapping a discrete function to a continuous one is called reconstruction  the process of mapping a continuous variable to a discrete one is called discretization  rendering an image requires sampling and discretization  displaying an image involves reconstruction

6 6

7 7

8 8

9 9

10 10

11 11

12 12 Line Smoothing glEnable (GL_LINE_SMOOTH); glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPH A); Point Smoothing glEnable (GL_POINT_SMOOTH); (no need for blending)

13 13

14 Review Questions  Explain any two Antialiasing Techniques  How color blending works?  What is aliasing and antialiasing?  Propose some techniques to antialiasing point, line and polygon. 14


Download ppt "1. 2 Blending: tells you how to specify a blending function that combines color values from a source and a destination. The final effect is that parts."

Similar presentations


Ads by Google