O'Reilly logo

Visual Studio 2012 Cookbook by Richard Banks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a shader using DGSL

With Visual Studio 2012, Microsoft has added a new mechanism for building shaders, using a language called DGSL (Directed Graph Shader Language). This language can be used to create very complex shaders that are still easily understandable at a high level and are thus more maintainable than shaders written in pure HLSL.

In this recipe, we’ll create a shader that applies a texture to an object and colors it.

Getting ready

Ensure you are running Windows 8 and start Visual Studio 2012.

How to do it...

Create a shader by following these steps:

  1. Create a new Visual C++ | Windows Store | Direct3D App project and give it the default name.
  2. Right-click on the project, select Add | New Item, and then choose Graphics | Visual Shader ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required