I’ve been fiddling with 3D with the goal of implementing Shadow Mapping for almost a month now.
I spent quite a bit of time around the engine, ironing things, getting it ready to quickly plug-in shaders.. and now I’ve been stuck on the facking Shadow Mapping for several days !
In theory it’s nothing special, in practice 3D graphics sometimes really sucks !
The problem is that there is a general concept, a lot of half-assed implementations, many ambiguous discussions on the net, a million papers and books that focus on different details. But no real complete reference. This is for Shadow Mapping but also for many other things.
The main issue with 3D graphics is that one works with transformation matrices and different 3D spaces. Matrix manipulation is not that difficult, but millions of ambiguities raise with coordinate systems, order of concatenation, inversion of matrices… plus the fact that shaders are hard to impossible to debug.
Doing an actual implementation is a royal pain in the ass, and it’s especially sad that I tend to try solve by trial and error. Flip matrices, swap orders, try to do something like some reference implementation does… but never actually really being sure what details am I missing.
For example I saw some code arbitrarily adding w to (x,y,z) to the light-view homogeneous space vertex after being transformed in a shader. Why ?! Why the fuck ?! ..nobody knows, there is no telling. It’s something that needs to be done because of the specific situation.
I hate feeling stupid and fiddling for hours with parameters. Trying to grow a working implementation out of web-searches.
It doesn’t help that I still don’t have a credit card to buy English books via Internet, and the best library with English books I knew here in Tokyo seems to have given up on carrying the good coding books. Of course one can find a lot of shit on how to use Office and code in Perl and Ruby.. but who the fuck needs those ?! I need my 3D books !!!
…but I also know that to get something to work one needs about 10 books treating the same subject. That has always been the case, but more so now that there are tons of Game Programming Gems, GPU Gems, ShaderX. All written by hundreds of people.
If everyone is so good, why can’t I find a decent explanation on-line ?!
zzzzzzzzzzzzzzzz
Posted by Davide Pasca in Programming, 3D Graphics
