Xbox LIVE Indie Games

development tool details

BasicEffect Shader (ARCHIVED)

Note: This item is no longer supported. This effect code is now provided as part of the Stock Effects Sample for XNA Game Studio 4.0.


The BasicEffect shader represents the source code for the 3D rendering functionality of the BasicEffect object in the XNA Framework. It is provided as HLSL source code in a .fx file, along with an instructional document that describes the workings of the shader and how you can integrate it into your XNA Game Studio project.

Utility Overview

This code is provided for educational purposes. It may be a useful starting point when you create more advanced shaders of your own. Note that although the BasicEffect class is simple and easy to use, the shader code behind it is actually quite complicated! This is because BasicEffect supports many rendering options within a single shader. If you are looking for an easy starting point to learn shader programming, you would probably be better off with the Shader Series samples, which are simpler than BasicEffect because they do not include so many adjustable options.

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



GS 2.0

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