So after doing some research on cubemap projections in HLSL, all that I found waffled on at great length about reflection vectors, tangents, half-angles and so forth. Nice stuff for certain but it only serves to confuse the matter when all you want is to project a cubemap onto skybox surfaces.
My normal reaction in these cases is to say "this is a load of crap, I'll do it myself". So I bashed out a quick shader, made some mistakes, learned a few things about the differences between cubemap texture lookups and normal texture lookups in HLSL, and got to the stage where I was just doing a standard texture lookup with none of the fancy projection stuff. Just to see what happened so I could make a decision on where to go next.
It worked. That was all that was needed.
This normally does not happen. Normally I need to wade through layers of obfuscated so-called documentation that stops just short of giving me the hint I need to get to what I need to know. Normally I need to swear blind at Microsoft's technical writers and say things like "if the person responsible for this had their head on a pike in front of my house I'd be quite happy right now". Stuff like that.
So I was expecting literally hours of sweating and swearing to get this, and instead it took maybe 5 minutes? And when I did find something relevant it confirmed that what I had done was right? Guess I got lucky with this one.
Sunday, July 4, 2010
A funny thing happened on the way to my cubemap...
Posted by
mhquake
at
11:28 PM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment