Tips on abstracting rendering interfaces for multiple renderers?

Started by
10 comments, last by _the_phantom_ 11 years, 8 months ago

With dx9 you can run at most pixel shader model 3.0. If you are fine with that, there is no strong reason for you to migrate.

Except the part of about being left behind and becoming obsolete.

The difference between DirectX 11 and DirectX 9 is far more than “shader model 3”.
DirectX 11 is better designed and provides vastly superior performance even without taking advantage of its extra features such as multi-threaded rendering. My engine functions equally in DirectX 9 and in DirectX 11, not taking advantage of any special feature of DirectX 11 to gain performance, and just with this it is literally twice as fast as DirectX 9.

Then of course you get more texture slots/stages/units in DirectX 11, you can read the depth buffer directly (without hacks), 8 simultaneous render targets instead of 4 and a more efficient pipeline allowing to actually use that extra transfer bandwidth.

Then of course geometry shaders to allow faster environment mapping (and a few other things), compute shaders to open up a world of who-knows-what to you, etc.
But I guess you don’t need that if you are fine with shader model 3.0.

Then there are features levels and guaranteed feature sets, instead of each individual feature being potentially unsupported causing you to have to write fall-back code everywhere.



Did I mention obsolete?
The future is DirectX 11. PC games are already heading there and the next generation of consoles will have same (Xbox 720 uses 64-bit DirectX 11) or similar-level custom API’s.



As for the original topic, I posted an article on the subject and explained a clean way to do this. Similar to what MJP proposed.
Organization for Multi-platform Support


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

Advertisement

since I moved onto deffered rendring, I can do miracles without long shaders.


And with regards to the state of the art you are behind the curve.

Most people are now refocusing to hybrid solutions such as those presented in AMD's Leo demo where deferred and forward lighting combine to give you the best of both worlds; many lights and complicated BRDFs with good performance.

Which uses DX11 features including higher Shader models and compute shaders.

This topic is closed to new replies.

Advertisement