# 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 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

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.

 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

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

7

8

9

10

11

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

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