carmack on Cg, P10 and apology to Matrox about DM

DirectX is full of resource limit queries -- # registers, instruction length, # stages, etc.

When you are coding vertex or pixel shaders in Direct X, you must know your target hardware intimately, or, just assume the minimum lowest common denominator.

JC wants a HLL for graphics like Renderman, where you write shaders without worry.

Right now, it's a pipedream. The only hope for the near future is cards that have general purpose pixel shading pipelines (execute very long length programs, have reasonable stack, that for all intents and purposes, makes register limits a non-issue, and can sample enough textures in a pass (16?) that for all intents and purposes, you can program without worrying about limits.
 
As long as the API allows the program to manage the multiple passes, it seems entirely feasible for me to have HLSL's compile into multiple passes.

Still, I think the main problem is that today's hardware just isn't programmable enough, and not all Cg (or other HLSL) commands can possibly be compiled into DX8 code, such as conditional statements.
 
Back
Top