Category Archives: Direct3D

Direct3D

Direct3D Rendering Cookbook Reviews

Reviews for Direct3D Rendering Cookbook

Having fallen in love with C# some years ago, and more willing to lose my favorite toe than go back to C++ ever again, this book is exactly what I needed. SharpDX makes it possible to continue with XNA type graphics development in C# and DirectX 11, but it’s not easy to get help or anything besides reference docs at the time of this review. This book serves as a comprehensive manual for SharpDX development that is timely and sorely needed. It’s the only book of it’s kind and fills an important and useful purpose, what else needs to be said? If you’ve been messing with SharpDX, buy this book and read it cover to cover.

5 stars – Richard Marinaccio @ Amazon.com

I am impressed by the writing style. From start to finish, each topic is explained clearly in detailed step-by-step instructions…Good introduction for those new to DirectX 11, and also covers some topics that will be of interest to more experienced coders.

5 stars – S J MCGLINCHEY @ Amazon.co.uk

I loved this book, even if you are not a C# developer, you can port/include these techniques to/in your C++ engine. If you are just starting out, this may not be the book for you, if you have been working with earlier versions of DX and looking for an interesting read, then I don’t think you can go wrong with this book.

  @ http://xboxoneindiedevelopment.blogspot.com.au/2014/02/direct3d-rendering-cookbook-by-justin.html

Direct3D Rendering Cookbook is a great starting point for those looking to jump into 3D rendering, and even remains relevant once the basics have been covered by providing reference information about advanced shaders and techniques that you may want to make use of later…

…I would recommend this book to anyone who is interested in having a solid resource for 3D development that will last them past the basics…

Michael @ http://mquandt.com/blog/2014/02/review-direct3d-rendering-cookbook/

All in all, as you see, a lot of knowledge + interesting topics + good execution.
Final mark: 4/5

Continue reading Direct3D Rendering Cookbook Reviews

Direct3D Rendering Cookbook is published!

After 8 months of hard work, I am now a published author! It has been a challenging but rewarding experience and I’m really excited to finally see it published. I hope people find it as enjoyable to read as I found it to write.

If you’re interested in taking a look, there is a sample chapter available on the book’s page at Packt Publishing or from Amazon (Direct3D Rendering Cookbook) where you can choose to purchase the print and/or e-book editions.

Direct3D Rendering Cookbook (font cover)

Continue reading Direct3D Rendering Cookbook is published!

Visual Studio graphics content pipeline for C# projects

In this post we will look at how to use the graphics content pipeline for C# in both Visual Studio 2012 and Visual Studio 2013 for Desktop and Windows Store apps.

Since Visual Studio 2012 there has been a new graphics content pipeline and graphics debugger – including a DirectX frame debugger and  HLSL debugger. The graphics content pipeline provides a number of build targets for converting common 3D and graphics assets into a usable format for DirectX applications, this includes the compilation of common mesh formats such as Collada (.dae), AutoDesk FBX (.fbx), and Wavefront (.obj) into a compiled mesh object (.cmo) file, and converting regular images into .DDS files.

Unfortunately the graphics content pipeline tasks don’t work out-of-the-box with C# because the MSBuild targets are not compatible.

Continue reading Visual Studio graphics content pipeline for C# projects

Afterglow – an ambient lighting solution

I have long wanted to build an ambient lighting solution (e.g. like Ambilight)  and at last it is starting to take shape with Afterglow, a solution built by myself and Jono.

Afterglow provides a framework to perform image capturing, colour extraction, post processing and colour output – primarily for use with lighting systems such as for ambient lighting.

The Afterglow project is designed to be an input and output agnostic framework, allowing users to create their own plugin’s to read images from the screen or perhaps a camera and to output to their own hardware solution. One idea, unrelated to existing ambilight-type solutions, is to build a sound analysis plugin that provides mood lighting for a room.

The hardware solution we used is a LED pixel string driven by an Arduino Uno. You can see how to build the hardware here, and see images of the output at the Afterglow Gallery. This uses a small Arduino program listening for serial input sent by an output plugin within Afterglow.

The reason I am interested in building an ambient lighting solution is to drive the lighting by images captured while playing a game. Traditionally ambient lighting systems have been designed to work with movies / TV whereas Afterglow is a more flexible environment that can accept any input source. This is beginning to be realised within Afterglow with the recent addition of a DirectX capture plugin.

It is still early days for the project with a long to do list and plenty of issues, but if you are after an easy to build, extensible ambient lighting solution Afterglow is a good start! Anyone interested in participating in the project or building custom plugin’s is welcome!

C# – Screen capture and Overlays for Direct3D 9, 10 and 11 using API Hooks

So it’s been almost a year and I have finally got around to finishing a new version of my screen capture project that supports Direct3D 9, 10, and 11! This solution still uses SlimDX for the Direct3D API wrapper along with EasyHook to perform the remote process hooking and IPC between the host process and target process.

Some of the changes since the previous version:

  1. 100% C# implementation
  2. Added Direct3D 10 and 11 support
  3. Capturing multi-sampled/anti-aliased images (for 10 & 11) is supported
  4. Re-organised code making it easier to support multiple D3D versions
  5. Implemented a new and improved test bed application
  6. Provided example overlays for D3D 9 and 10
  7. Improved debug messaging from Target application to Host (mostly removed when compiled with “Release” configuration)

Update 2012-04-14: code now hosted on Github

Continue reading C# – Screen capture and Overlays for Direct3D 9, 10 and 11 using API Hooks

C# – Screen capture with Direct3D 9 API Hooks

Since investigating screen capture techniques for Direct3D 9 applications a year ago I have wanted to look into hooking the Direct3D 9 API to utilise the much faster GetBackBuffer for my screen captures. Well here it is at last – a mostly managed C# solution providing easy and safe hooking of the Direct3D 9 API thanks to EasyHook, supporting both 32-bit and 64-bit.
Continue reading C# – Screen capture with Direct3D 9 API Hooks

C# – Screen capture with Vista DWM (Shared Direct3D Surface)

When I was researching for this article, I noticed some passing references to the Vista DWM (Desktop Window Manager) and the ability to use it to capture images of windows — DWM is the technology behind Windows Aero and its window switching features like Flip3D. I filed this away as something to look into at a later date.
Continue reading C# – Screen capture with Vista DWM (Shared Direct3D Surface)