Lights

Lighting is a concept that is unique to 3D. In 2D, the colors that appear from the screen usually come directly from the Brush used. In 3D, there is an extra lighting step, which dynamically calculates the shading of the 3D objects, depending on their proximity to light sources in the scene. Dynamic lighting makes it far easier to create and animate realistic-looking scenes.

There are three components to lighting: Light objects, which emit light into the scene; Materials, which reflect the light back to the Camera; and the Geometry of the model, which determines the angles involved. This section introduces the various Light types supported by WPF:

DirectionalLight—Casts parallel rays into the scene from an origin at infinity. DirectionalLight ...

Get XAML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.