127 points · by mwilcox · 13y ago · 34 comments
"Direct3D was not an alternative to OpenGL [...] it was a designed to create a competitive market for 3D hardware"—and how it ultimately failed, with Direct3D becoming like OpenGL, more confusing, and paving way for the alluring simplicity of developing for a single hardware specimen—the Xbox.
Not a new idea, but one I'm glad to be reminded of.
I'm totally going to put some time into playing with this. Anyone here already doing something cool in the custom GPU renderer space?
You see, on PS3 GPU there are no pixel shader constant registers. This means you need to patch shader code if you want any alterations in your pixel shader. A naive approach, with patching on CPU when submitting every primitive, is horrendously slow because the CPU sucks at moving large amounts of data. A slightly faster approach, using the GPU DMA, is still unbelievably slow, because even though the GPU moves large amounts of data very quickly it takes a lot of time to switch between pushing triangles to copying mem ranges and back. Luckily, on the PS3 there are also SPUs, pretty good at moving large amounts of data and having no penalty for doing so. Patching shaders on SPUs is so fast you forget about it. Also very easy to write.
So the mind boggles when you see people using GPU patching and, to somehow save peformance, do some complicated scheme with occlusion culling via SPU.
OpenGL was elegant and very simple to use, quickly becoming close to invisible. DirectX, in comparison, was layers upon layers of COM book-keeping code.
Of course OpenGL has become like DirectX in more recent iterations, as in the end immediate satisfaction is less important than flexibility.
COM really wasn't that much of a hassle in comparison. A couple smart pointer templates and you're off to the races. I can see how a C developer would really resent it though - nothing but a pain compared to GL's regular C, 'everything is void*' api.
When one works for corporations of similar sizes, gets to learn that there are many factors at play, than just good or evil deeds.
Dear author, you being the one who chose the coordinate system of D3D: thanks a lot. >:-(
At least with endian issues, for example, there was once maybe a compelling reason to do it from a hardware standpoint.
>> I personally never imagined that my early work on Direct3D, would, within a couple decades,
>> contribute to the evolution of a new kind of ubiquitous processor that enabled
>> the kind of incredibly realistic and general modeling of light and physics that
>> I had learned in the 1980′s but never believed
>> I would see computers powerful enough to model in real-time during my active career.
I concur.
I'm much older than Alex St John.
Coding for 3D has never ever been as fun as it is now...
And Wild Tangent is one of the most annoying/useless pre-loaded crapware vendors -- I've never seen their software installed except on a brand new PC.
[1] http://www.maximumpc.com/article/features/old_school_monday_...