Platform SDK: DirectX

Flare Sample

[Visual Basic]

This topic pertains only to application development in C++. See Direct3D Immediate Mode Visual Basic Samples.

[C++]

Description

The Flare sample shows how to create a lens flare effect, using alpha blending.

Path

Source: (SDK root)\Samples\Multimedia\D3dim\Src\Flare

Executable: (SDK root)\Samples\Multimedia\D3dim\Bin\Flare.exe

User's Guide

Press F1 to see available commands, or choose from the menu.

Programming Notes

In this sample, lens flare is simulated with mathematical functions that govern the position of each flare. The flares are rendered using additive alpha blending and animated to give a sparkle effect.