I did not find some proper SharpDX tutorials so I started writing a few. I know that SharpDX is basically DirectX, but porting your knowledge from one to the other is not as straightforward and I did have to spend quite a while searching for things in the documentation. I finished tutorial 9 back in December and wanted to write another one, but then I got into physically based BRDF and that is a huge topic so I couldn't finish the 10th one. Sorry that I did not post them before but I needed to clean them up badly and I've been super busy in 2014.
So a few words about the tutorials: they are built on the idea that you take a very simple sample and keep adding small features to it until you have a basic but rich renderer. The code is written for people who like DirectX (i.e. having full control, manually setting device states, sampler states, shader variables, etc.) but at the same time would like to have a full set of features pretty much out of the box. So you will manually fill in buffers and set variables to achieve simple things like rendering a cube, but that cube will be rendered using normal mapping, bloom, AA. etc.
The code is for DirectX 9.
I have the scripts written for the first 10 tutorials, but I did not have time to write the articles for them yet.
The tutorials do a lot of seemingly random shit, but all of them are there to fix some strange behaviors or instabilities. The written articles would contain explanations for those sections.
What is implemented:
- master control for post processing and MSAA
- MSAA and CSAA
- FXAA and SMAA
- directional light normal mapping with optional spherical harmonics hack ambient lighting
- good window control and input (screen capture friendly)
What I would like to add in the future:
- DirectX 10 mode
- physically based BRDF
- HDR rendering
- custom resolve for HDR with MSAA (only DirectX 10)
- flexible light composition scheme (almost done)
- depth of field
I hope I'll have time to write the articles and the rest of the tutorials, but until then I'm dropping a link here for anybody who might be interested:
Dependencies (needed only for compiling): http://dl.dropboxusercontent.com/u/45638513/sdx/Dependencies.zip
Media (needed for Tut11+): http://dl.dropboxusercontent.com/u/45638513/sdx/Media.zip
Important note: Tut11 though Tut13 need the contents of Media.zip. All Zip achieves should be unarchived. If you unarchive in foo, you should have foo/Media and foo/TutXX. If you also want to compile, you should have foo/Dependencies.
A few notes:
- you need .Net 4.0 or compatible
- you can find ready to run binaries for each tutorial in the TutXX/TutXX/bin folders (this is why the download is so big)
- the code should be ready to be compiled and run, but running will only work in release mode. For debug mode you need to copy the contents from bin/Release to /bin/Debug. I did not copy it for you in order to keep the download size smaller.
- there may be bugs. Some coding bug or some resulting from my lacking understanding of the topic. In particular bloom may seem kind of blocky in some samples.
If you find any bugs or have any feedback please let me know .
I'm learning DirectX 10 now for future tutorials. Did not manage to make any meaningful progress here because DXGI is just not cooperating and even without it rendering fullscreen with MSAA is 3-4 time slower than with DirectX 9.
Edited by DwarvesH, 04 September 2014 - 08:45 AM.