Recommended Resources

Blog Stats

Archive for October, 2010

Since using high level shader languages like DirectX HLSL, I’ve become quite the fan of vector swizzling, and wanted to use it with my maths libray. My solution was to write a quick console app to write the code for me, and then just include those files in my vector classes. Probably not the most ingenious solution there is, but it worked well for me. Using this technique does produce a fair number of new member functions though :

I chose not to add MACROS to enable the “.xxxx” syntax, as opposed to the “.xxxx()” as I don’t think the fewer keystrokes justify polluting the global namepspace, specially as I like to use names like “xy” and “xx” for local variables.

One of the chapters in my ASM book I found really interesting was the one on how floating point numbers are stored and how they’re processing in calculations. Here are some C# apps to create and decompose a 32-bit floating point number.

This is an approximate Radiosity effect I was trying out. Approximate in that it instead renders from the vertices point of view as opposed to the patches point of view. It also doesnt render the half sized bits either, which seems to cause artifacts in the corners, not a bad result though. The app runs in real time (125fps in debug mode), and works by first rendering the view from each vertex to a render target, and then using that target in a seond stage to light the vertex itself, and this process continues. The viewport rendered from each vertices point of view is actually very small (only 32×32 pixels in the images below, which you’ll need to zoom in quite far), where I use a 1024×1024 render target to store them all in a grid. I also included some debug functionality that allows you to view the scene from each vertex (shown in the last few images) which was handy. The scene used here is very low poly, you can see the wireframe in the last few images.

This first image shows the end effect.

This second image shows the views from the vertices from one iteration.

These final images show the view from several vertices, which made debugging easier.

So apparently theres yet another Gems series being published, this time on Game Engine Design, Game Engine Gems. The first edition is being authored by Eric Lengyel, who wrote the very popular book Mathematics for 3D Game Programming and Computer Graphics. I assume it will follow the structure of all the other Gems series, that being lots of tips and tricks chucked in by knowledgable people, generally from the Games Industry. Im not sure how this series will differ from Game Programming Gems, as that can be considered “Game Engine” related too. But I’m all for new books, so I’m not going to to complain. 🙂

“Game Engine Gems brings together in a single volume dozens of new articles from leading professionals in the game development industry. Each “gem” presents a previously unpublished technique related to game engines and real-time virtual simulations. Specific topics include rendering techniques, shaders, scene organization, visibility determination, collision detection, audio, user interface, input devices, memory management, artificial intelligence, resource organization, and cross-platform considerations. A CD-ROM containing all the source codes and demos accompanies the book.”