Archive for July, 2009
Effect Parameters and Constants
Posted by Eric DeBrosse in Engine Development on July 29, 2009
While working on the sky dome scene object, I realized there was still a lot of work to be done in the effect system. I’ve been spending the last couple of weeks refining how effect parameters and/or effect constants work. Now, it’s much easier for an application to update and manage the effect constant values.
It took me a while, but I also figured out how to render the dome as a single triangle strip. Before, I was rendering the top as a triangle fan, and then the rest as a triangle strip. This meant an extra draw call was needed for every pass in the effect technique. Besides, I had to get rid of the triangle fan, since D3D10 no longer supports that primitive type.
I need to finish fixing a bug that causes searches for a specific effect technique/instance to fail. However, I’m very close to getting the shader effects to work on the sky dome!
Sky Dome
Posted by Eric DeBrosse in Engine Development on July 12, 2009
I started working on a new sky dome scene object today. This scene object will be much better than the current sky box implementation that the engine uses. It’s much easier to animate textures on a dome, as compared to a box and the inherent perspective problems at the corners. The dome can be flattened out some, to help give the illusion that the clouds are rolling off into the horizon. Multiple day and night textures can be blended together, to make smooth and seamless transitions from day to night. Parallax is simulated in the star layers, to create a greater perception of depth.
New Pixel Formats
Posted by Eric DeBrosse in Engine Development on July 1, 2009
I’ve been adding support for some new high dynamic range (HDR) pixel formats to the engine. I added a 32-bit per-pixel integer format (A32B32G32R32) that can be used with OpenEXR images. The image processing library in the engine can be used to copy (blt) an image buffer in this format to another format, such as a floating-point pixel format. I’m also working on some shared-exponent RGBE pixel formats such as E8B8G8R8 and E5B9G9R9. The engine can already load and save HDR images. However, there doesn’t seem to be a standard way of encoding and decoding the pixels. It appears that Microsoft is doing things a little differently than the original implementations of the RGBE format by Greg Ward. I’ll have to do a little more research. Also, I want to add support for the new DX10 block compressed pixel formats, but I’ll probably wait until later to finish them.