XNA Creators Club Online

detalles de la muestra

Non-Realistic Rendering
Muestra
enviado
28/06/2007

Description:

This sample shows how to implement stylized, non-photorealistic rendering techniques, such as cartoon shading, edge detection, and a pencil sketch effect.

Sample Overview

The sample provides three specialized rendering techniques.

  1. Toon shading displays models using a banded lighting technique. Rather than the usual smooth gradients from light to dark, it uses just three discrete levels of brightness, with sudden transitions where the object goes from light into shadow.
  2. Edge detection adds black lines around the silhouette of the model.
  3. The sketch postprocess adds a pencil stroke pattern over the top of the scene.

Many different graphical effects can be achieved by combining these techniques in various ways. For instance a cartoon effect is created by using the toon shading and edge detection together, or a pencil sketch effect by combining edge detection with the sketch postprocess.

descargas
Estructura

GS 2.0

Versión de Vertex Shader

VS 1.1

Versión de Pixel Shader

PS 2.0

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