More pages: 1 2 3 4 5 6
7 8 9 10 11
Framework 3 (Last updated: October 4, 2009)Framework 2 (Last updated: October 8, 2006)Framework (Last updated: October 8, 2006)Libraries (Last updated: September 16, 2004)Really old framework (Last updated: September 16, 2004)
ASCII
Thursday, December 11, 2003 | Permalink


Executable
Source code
ASCII.zip (528 KB)
Required:Pixel shader 2.0
Vertex shader 1.1This demo renders a scene with ASCII characters. It's done by rendering a scene normally to a low-res texture, then looking up the closest corresponding character according to the brightness at each texel. The ASCII characters are packed into a 3D texture with characters placed in slices in the depth direction, sorted by average brightness.
Quite cool, but very useless.
Should run on Radeon 9500+ and GFFX.
Water
Thursday, November 20, 2003 | Permalink


Executable
Source code
Water.zip (697 KB)
Required:Vertex shader 1.1
Pixel shader 2.0
RGBA16 render targetsThis demo generates waves on a water surface purely on the GPU. A number of "drops" every second disturbs the surface and a shader takes care of handling the water physics. It is handled through a spring field that is iterated and bumped between two render targets. The spring field contains height and velocity for each pixel on the render target. The drops are created by occasionally throwing in a tiny circle at some random spot on the render target. Another shader then extracts the water normals from the current spring field by applying a sobel filter on the heights. Using this normal a reflection and refraction vector is computed, which is then used mapped into a cubemap for reflection and refraction on the water surface. While the scene of this demo is simple in its arrangement, I would say that the results are pretty good, and this technique can very well be used in more complex scenes.
It should run on Radeon 9500 and up.
2003-11-28:
Updated to support user created waves. Just right-click and move the mouse pointer across the surface. I also added a menu option to turn auto-dripping off.
2003-12-08:
Updated to use fixed point render targets instead. The advantage of this is that we get filtering, which can be used to evaluate the sobel filter in a quicker way.
Roller coaster
Wednesday, November 5, 2003 | Permalink


Executable
Source code
RollerCoaster.zip (889 KB)
Required:Vertex shader 2.0
Pixel shader 2.0This was my contribution to the
Beyond3D/ATI shader competition. It grabbed a runner up position.
It shows several interesting shaders. It generates the roller coaster track through a vertex shader. It has a lava shader, water shader, wood shader and terrain shader.
It should run on Radeon 9500+ and GFFX.
Sketch
Friday, October 17, 2003 | Permalink


Executable
Source code
Sketch.zip (436 KB)
Required:Vertex shader 1.1
Pixel shader 2.0This is a demo that renders the scene to look as if it would have been sketched. This is done by finding edges in the picture. First the scene is rendered to a texture and the normals and the depth are outputted into it. Then a Sobel filter is applied to all components. This will highlight all edges, not only the silhuette against the background, but also internal edges where there's a difference in depth or when the normal changes a lot over a small distance. To get a smoother image, and to give it a fuzzy pencil drawn feeling, the edge value isn't thresholded, but instead I'm outputting the square of the Sobel filter to allow all kinds of shades of gray. Finally a slight blur filter is applied to smooth it out a little.
Should run on Radeon 9500+ and GFFX.
Transparent shadowmapping
Thursday, October 9, 2003 | Permalink
Normally shadowmapping uses only a single channel of the texture the scene is rendered to. Using that depth you can extract information about whether the current fragment is in shadow or not. However, this only works for opaque occluders. This demo extends the idea to work for transparent surfaces too, and makes transparent surfaces cast a projection of itself over the scene. To do this not only the depth is rendered to the texture, but also a color. Opaque surfaces renders white along with the depth, while transparent surface renders its color and leaves the depth unmodified. Then by simply multiplying the shadow factor contructed in a normal shadowmapping fashion with the color stored in the shadow map you'll get a nice projection of transparent surfaces over the scene.
The demo should works on Radeon 9500 and up and the GeForce FX.
Self shadowing bumpmapping
Saturday, September 27, 2003 | Permalink


Executable
Source code
SelfShadowBump.zip (1112 KB)
Required:Vertex shader version 1.1
Pixel shader version 2.0This demo does self shadowing bumpmapping. Letting the bumps in the bumpmap cast shadows over the surface really adds a lot to the feeling of depth of bumpmaps.

On the bad side of things is that it's not exactly for free, though not horribly expensive either. A horizon map is needed for every texture. The horizon map is a 3D texture of considerable size. For some textures you can get away with a fairly low res horizon map, for others you need a quite large one to get good results.
For the sky I've written a shader that animates some kind of cloudy Quake-looking sky by using a 3D noise.
All shaders are written in HLSL.
The demo should run on Radeon 9500 and up and GeForce FX series.
2003-10-11:
Updated to include a menu item to let you toggle self shadowing on and off.
2004-01-15:
Updated to support
offset mapping too. This further adds to the depth feeling of the bumps. You can turn offset mapping and self shadowing off independently to see in what way they contribute to the final picture.
Note, don't extract this demo over the old version. Instead, remove the old demo first and then extract this demo. Otherwise you will get very odd results since it will use old stored horizon maps that doesn't fit this new build.
2004-01-28:
Updated with shadow mapping for global shadows. The shadow mapping is combined with the offset mapping to get the global shadows to fall realistically over the bumpy surface.
Chess
Saturday, August 9, 2003 | Permalink



Executable
Source code
Chess.zip (1181 KB)
Chess.7z (916 KB)
Required:GL_ARB_vertex_program
GL_ARB_fragment_program
GL_EXT_texture3D
WGL_ARB_render_texture/GLX_ATI_render_textureThis is a cool screensaver that does an autoplaying game of chess. There's a built-in AI that makes all games look different, though it's not particularly advanced, so even a newbie would beat this AI.
From a technology point of view this demo illustrates a few interesting concepts, such as shadow mapping, projected shadows, perpixel lighting and a shader generated wood material.
It should run on Radeon 9500 and up and GeForce FX.
2003-08-10:
Fixed a minor issue with the GFFX. It should work fine with GFFX now.
VolumetricLighting II
Sunday, June 1, 2003 | Permalink
This demo shows a way to create volumetric lighting. Unlike my previous volumetric lighting demo, which did it in the vertex shader, this one does it in the fragment shader. This means better quality and no tesselation needed, but at a performance cost. I'm also using a different method to create the effect, which is less complex and gives better results in general. It computes the smallest distance from the light to the ray between the camera and the fragment and lets the light volume brightness decay according to it.
This demo runs fairly slowly, should run fine in 1024x768 or so though. There are plenty of ways to optimize it though had I cared enough, so it's not really that the technique in itself is very slow (though maybe not very fast either), but rather that I draw a full pass of the whole scene for every light.
Should run on Radeon 9500+ and GeForce FX.
More pages: 1 2 3 4 5 6
7 8 9 10 11