Skip to content

Color Replacement

Simon (darkside) Jackson edited this page Aug 21, 2020 · 6 revisions

Color Replacement

Area Submitted Type
Games: Content Pipeline, Games: Graphics, Games: Shaders 5/24/2007 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).

Download Size Description
ColorReplacementSample_4_0 1.86MB Source code and assets for the Color Replacement Sample (XNA Game Studio 4.0)
ColorReplacementSample_4_0.zip 1.86MB Source code and assets for the Color Replacement Sample (XNA Game Studio 4.0)
Clone this wiki locally