XNA Creators Club Online

dettagli esempio

Color Replacement
Esempio
inviato
24/05/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.
download
Struttura

GS 2.0

Versione Vertex Shader

VS 1.1

Versione di Pixel Shader

PS 1.1

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