Get started building DirectX games in Visual Studio by using the built-in DirectX project templates. Whether you’re building a DirectX 12 or DirectX 11 game for Windows or Windows Phone, you’ll find a template that suits you.
Capture frames local or remote
Rendering problems can be tricky to troubleshoot. Visual Studio Graphics Diagnostics provides an easy way to capture and analyze frames from your DirectX 10, 11, or 12 games locally or remotely. You can inspect each DirectX event, graphics object, pixel history, and look into the graphics pipeline to understand exactly what occurred during the frame. This tool also captures call stacks for each graphics event, making it easy to navigate back to your application code in Visual Studio.
Debug shader code
The same world-class debugger now works for your shader code
Debugging shader code from a captured frame is another great way to pinpoint the source of rendering problems. Simply set a breakpoint in your shader code and press F5 to debug it. You can inspect variables and expressions in Locals and Autos. If you’ve used the Visual Studio debugger for other languages before, you’ll find yourself right at home.
Increase frame rate
Find expensive draw calls
Looking for ways to increase the frame rate for your game? Visual Studio Frame Analysis can come in handy. It analyzes captured frames to look for expensive draw calls and performs experiments on them to explore performance optimization opportunities – all in a nice report.
Analyze GPU usage
Understand how your game is performing on the CPU and the GPU
Use Visual Studio GPU Usage to understand how your game performs on the CPU and the GPU. GPU Usage collects data in real time and it complements Frame Analysis, which is performed on captured frames in an offline fashion. The GPU Usage report will clearly show where the bottleneck is, whether it’s on the CPU or the GPU.
Shader code editor
Shader syntax colorization
Whether your shader code is in HLSL files or FX files, the Visual Studio shader editor recognizes them. The shader editor provides syntax highlighting and braces auto-completion, making it easy to read and write shader code in Visual Studio. You can also configure the editor to use your favorite fonts and theme.
Compile shader code
Shader files are part of your project
Just like they should be, shader files can be managed and built as part of your Visual Studio projects. Simply set the shader file properties to specify the shader type, shader model, and optimization settings you want. Visual Studio takes care of shader compilation for you.
Design pixel shaders
…in Visual Studio Shader Designer
If you don’t know HLSL or prefer a more visual way to create shaders, the Visual Studio Shader designer has you covered. Instead of writing shader code in an editor, you add and connect shader nodes using a graphical interface. You can apply different textures, lights, and even add and view animations in real time. Making shaders has never been easier.
View 3D models
…in Visual Studio Model Viewer
No need to leave the IDE you’re already working in just to view the latest 3D model that your artist sent you. You can view OBJ, FBX 3D models inside Visual Studio. Pan, zoom, change camera positions, view the objects with time-based animations – there’s so much to explore in the 3D world. You can also make simple edits to the models in the Model Viewer.
…in Visual Studio Image Editor
The Visual Studio Image Editor not only works great with image files, but also understands DirectDraw Surface (DDS) texture files. Besides the basic viewing and drawing functionality, you can also toggle RGBA channels, generate mip-maps, and apply filters. This image editor is capable of accomplishing many texture editing tasks.
Asset content pipeline
Manage content pipelines
Dealing with assets in various formats can be overwhelming. Visual Studio provides content pipeline management for images, models, and shaders. Simply set the file properties to use the content pipeline and configure the settings. Visual Studio will perform the format conversions for you at build time.