App Hub

code sample details

Color Replacement

Code Sample

Description:

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

Sample Overview

When it's 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 by using an artist-defined alpha map that acts like a spray paint stencil. The stencil enables you to have soldiers with any color armor you choose, without tinting their faces the same color.



All content and source code downloaded from this page are bound to the Microsoft Permissive License (Ms-PL).

downloads

Framework

GS 4.0

Framework

GS 3.1

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