Sign in to follow this  
Followers 0
DwarvesH

Wrote some simple SharpdDX tutorials, what do you think?

12 posts in this topic

Awesome! You're so right there is a lack of good SharpDX tutorials on the web. These tutorials are great I'd like to see more!

0

Share this post


Link to post
Share on other sites

Thanks!

 

I wrote the 10th one: http://dl.dropboxusercontent.com/u/45638513/sdx/Tut10.zip

 

It should have the sources and a working exe. If you want to compile it you'll need this too: http://dl.dropboxusercontent.com/u/45638513/sdx/Dependencies.zip

 

To take control of my running away back log I'll write up the text of the tutorial before I continue!

 

Now that I remember, I forgot to give the controls for the demo:

  • Mouse buttons: camera control
  • P: Toggle cube rotation
  • Alt-Enter: toggle fullscreen
  • F2: Toggle VSync
  • F3: Cycle MSAA/CSAA
  • F4: Cycle FXAA/SMAA
  • F11: Toggle master post processing override. This way you can force to off the entire post processing framework. Good for debugging.
  • F12: Toggle master AA override. This way you can force to off the entire MSAA/CSAA framework. Good for debugging.
  • T: Toggle debug text.
  • +/-: Adjust bloom threshold
  • O: Toggle bloom debug overlays
  • B: Cycle though bloom modes. Mode 0 is no bloom. Mode 1 is default bloom. The rest of modes are not that useful for realistic rendering.
  • E: Cycle though render modes:
  1. Low
  2. Medium
  3. High: Default
  4. Debug: Ambient spherical harmonics lighting
  5. Debug: Diffuse lighting
  6. Debug: Specular lighting

 

edit: typo

Edited by DwarvesH
4

Share this post


Link to post
Share on other sites

This is why I don't like releasing stuff until it is 100% done :). I found some CSAA 32x and multithreading bugs. I fixed them and back-ported the fixes to each version.

 

I also split up the tutorials, each in its own archive to make it easier to edit one. I edited the first post with links.

 

DirectX 10 is not progressing at all. I'm getting super strange bugs and abysmal fullscreen MSAA performance, so I'll leave it for later.

 

The next tutorial is going to be on GUI. Unless someone can point me to a good lightweight but powerful GUI system for SharpDX. I couldn't find one. If you know of one please let me know.

 

Oh, and I should stop calling these tutorials. They are far too complex for that title. It is more like a DIY step-by-step iterative toy engine and shaders for each common rendering task.

4

Share this post


Link to post
Share on other sites

 

I second ta0soft. Great stuff. Hope to see DX10/11 versions some day:) Thanks!

 

 

 

Thanks! I'll get to that one day.

 

In the meantime tutorial 13 is in a bit of a hiatus. First I wanted to do it about physically based BRDF, but that subject is far too wide to cover in one go. I could dump in the shaders and be done with it, but that does not seem alright.

 

So as a next topic I investigated integrating available SSAO shaders with ease in a forward renderer. But since have never done this before, I'm not sure yet if it looks alright, I'll wait.

 

There are other obstacles too. I started creating a sort of "spiritual coexistor" of Neoforce Controls for XNA (it's too soon to call it a spiritual successor since Neoforce is still around). It is a light weight GUI library for SharpDX that uses roughly the same API and look & feel of Neoforce. It has less features than Neoforce, but the code base is much smaller and maintainable.

 

I tried getting in contact with the maintainer of Neoforce to see what to do with it. Optimally he'll like the idea and I can open-source it. But if he won't, since it is a fresh implementation, not a port, I can drop the API compatibility and create a new original skin and still open-source it.

0

Share this post


Link to post
Share on other sites

Great work!

I signed up here just to reply this.

I'm looking forward to the GUI Tutorials. I just need that!smile.png

 

Why SharpDX don't have some libs like Neoforce?

2

Share this post


Link to post
Share on other sites

Speaking of SharpDX UI libraries, I'm also developing a UI library as part of my game. It uses Direct2D and does not rely on any artist resources. Controls are rendered on the fly thanks to Direct2D's capabilities and can be skinned through XML theme files. I've just finished implementing a very primitive DataBinding system so that it is possible to bind property values to ViewModel instances.

 

If anybody is interested, I could write a short article on how to use the library. Here is the repository. It contains two samples: MiniUI is just a basic UI sample consisting of a panel and a button, while DataBinding shows the databinding features. 

Help is welcome, lots of controls needed still! 
 

0

Share this post


Link to post
Share on other sites

Been busy with other projects in the last few weeks, but I missed 3D so here is another sample that builds upon the previous ones: the first post has been updated with links to Tut13.

 

The main purpose of Tut13 is to bridge the gap between the base of the "tutorials" and the shader research playground I usually use. The first tutorials had a design I moved a bit away from and now things are more in sync, allowing me to share spinets of code easier between tutorials and my code.

 

But this does not mean there aren't any real features. Tut13:

  • add asset import using AssImp. In the future I'll clean up the rather terrible disk serialization code that is still included.
  • this version officially includes for the first time (with permission) my super-lightweight SharpDX GUI based on a re-implementation of NeoForce. I updated my real code base to use this version, so the GUI will become better and more bug free as time goes on. There are now real ports of NeoForce to SharpDX created by other people, but my mini version is 74 KiB of code so I prefer it.

 

With DirectX 12 on the horizon, I should probably give it another go and try to implement DirectX 10 support :). DirectX 9 is getting really old :). So next version will be either DirectX 10 or my take on filmic HDR form Uncharted.

0

Share this post


Link to post
Share on other sites


With DirectX 12 on the horizon, I should probably give it another go and try to implement DirectX 10 support

 

Probably worth just jumping to DX11 first do DX10 later. Btw great work - SharpDX is a great library and we need to keep supporting it out there!

0

Share this post


Link to post
Share on other sites

 


With DirectX 12 on the horizon, I should probably give it another go and try to implement DirectX 10 support

 

Probably worth just jumping to DX11 first do DX10 later. Btw great work - SharpDX is a great library and we need to keep supporting it out there!

 

 

Thank you!

 

I tried DX10 first because it may be a smaller jump form 9 to 10 than form 9 to 11. I am very familiar with 9 and all its quirks, but I have never worked with 10+.

 

The good news is that I like DX10. The design is a lot better than 9 and 11 is probably even better. I don't know how hard this is under C#, but with C++ I could easily abstract away the API.

 

The bad news is that it will probably take a few weeks before my DX10 is stable and stops crashing the display driver.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0