XNA Creators Club Online

sample details

Color Replacement
Sample
submitted
5/24/2007

Description:

This sample demonstrates how to render parts of an object with a user-defined color.

Sample Overview

When it is the Red Team versus the Blue Team or when you want to drive a car painted with your favorite color, you either need to create a texture for each color or perform color replacement programmatically. This sample implements color replacement using an artist-defined alpha map that acts similar to a spray paint stencil. The stencil enables you to have soldiers with any color armor you choose without tinting their faces the same color.

The content and technique are based on the Racing Game starter kit.
downloads
Framework

GS 2.0

Vertex Shader Version

VS 1.1

Pixel Shader Version

PS 1.1

var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG