Jump to Start Page: 1 2 3 4

Welcome to Pixel Tangent featuring quality yet simplistic implementations of common graphic concepts. Primarily this site acts as an online portfolio of my graphics journey, as well as a place where others may learn. And the best part: all source code is provided.

9 August, 2008 - Show Reel

No triangle was harmed in the making of this reel

I've been meaning to post this video for a while, so without further delay, please enjoy. Hit me back with comments - good, sucks, boring? Let me know.

YouTube Video Link

Render to texture

22 July, 2008 - Render To Texture

Made easy using OpenGL

A reoccurring question cogging my inbox over the last few months is "how do I render to a texture", frame buffer or something in between. Not to disappoint fans, even I was in awe at just how simple this sample turned out. This sample both illustrates the technique and provides a simple reference implementation.

Without further ado, here is the dowload zip file Clicky.

Tokyo

10 June, 2008 - In Tokyo

I've been living, or should I say working, amongst of vibrant lights of Tokyo - the museum of the future. Anyway an end is in sight, so stay tuned for more simple samples.

shatter

10 February, 2008 - It's the way it shatters that matters

Requiring DirectX 9

With a little imagination shaders can do almost anything. This sample demonstrates two simple shaders that shatter, or explode, a pre-processed model.

The first shader uses the flat surface normal of each triangle in a model to independently transverse each triangle in an outward direction. Furthermore, each triangle in the model is independently and randomly rotated around it's centroid. This simple pair of effects creates the appearance of the model shattering outwards into fragmented pieces. Very cool, and very easy. However, normally when an object "explodes", all fragments explode in an outward direction from the center.

To remedy this technically incorrect artifact, a second shader has been provided. And guess what? The second shader shatters every triangle in the model outwards from the center of the model. This cheap effect is processed entirely within the shaders and would make a great addition to any shoot 'em up game.

Enjoy the simplicity of this dowload zip file Clicky.

Cube Mapping

29 December, 2007 - Cube Mapping

Yes, you guessed correctly, GLSL

This been a while since my previous sample, working in Japan has been keeping me busy. Alas, no excuses. Down to the business of the latest graphical delight - Cube mapping. After performing a few "back of the envelope" calculations, it was great to discover how easy it was to setup and allow OpenGL to auto generate the required texture co-ordinates. This combined with a pinch of GLSL and voila - Cube mapping made easy.

In other news, the site will soon celebrate its first birthday, new hosting was secured and the hit counter has gone crazy over the last few as the 50k hit approaches. Celebrations all round. Happy New Year everyone!

Enjoy the simplicity of this dowload zip file Clicky.

High Dynamic Range Rendering

14 October, 2007 - High Dynamic Range Rendering

HDR made easy

The concept of High Dynamic Range rendering, or HDR for short, represents one of the many reasons why real-time renderings are more impressive than ever before. Thanks to video hardware evolution, implementing HDR, and post-processing effects in general, has never been easier.

This little gem implements HDR by rendering the scene to a master Frame Buffer Object (FBO). This master FBO is then processed through a high pass shader filter that only captures the highlights of the scene. The output of the high pass filter is saved to its own FBO. Next, three downsampled FBOs are created. These four (the original high pass FBO plus the three downsampled FBOs) are then blurred together before presenting the HDR scene to the final frame buffer.

Obviously for this sample to work with your setup, your video hardware must support FBOs and support Non-power of Two (NPOT) texturing.

As always, have fun with the ease and simplicity this simple sample. dowload zip file Clicky.

Oily Film Effect

28 September, 2007 - Oily Film Effect

More OpenGL and GLSL

Recently I've been intrigued with NVIDIA's FX Composer, and while it's a great tool it lacks native GLSL support. Anyway, I was really impressed with the new shader library, however many of them have visual artifacts that are easy to remedy. For example, the Film effect is both a quick and easy shader to implement, but the original shader suffers from texture wrapping artifacts because the texture coordinates are not clamped.

After converting the original shader into pure GLSL and simply clamping the texture input into the fragment shader the artifacts disappeared. How easy was that?

Yet again, this example also shows the usefulness and effectiveness of one - dimensional textures (or texture lookups). This is truly an easy shader to implement into any scene with no additional requirements, so what are you waiting for? Give it a try.

Hope you enjoy the ease and simplicity of the Visual Studio Project (.NET 2005) windows and GLUT build dowload zip file Clicky.

Anti-Alias

12 August, 2007 - Projection Hacks

Just pour and stir GLSL

It's been over a month since my last graphical delight, and while this treat may seem a little dull, the concept of sampling and anti-aliasing is an important concept in the industry for that winning edge (no pun indented). In three-dimensional rendering, anti-aliasing is a technique to minimise the distortion artifacts known as aliasing when representing a high-resolution signal at a lower resolution (our computer screen).

This sample attempts to demonstrate the very subtle visual enhancements that anti-aliasing a scene offers. While the visual enhancements are not jaw dropping, every visual improvement helps. And although modern video hardware would easy support an anti-aliased pixel format, this sample demonstrates use of the accumulation buffer and manually jittering the projection matrix to implement anti-aliasing in the off chance that an anti-aliased pixel format mode is not supported.

You can interact with the samples by moving the anti-aliased window. Have fun with both a Visual Studio Project (.NET 2005) windows and GLUT build are available dowload zip file Clicky.

Stockholm Old Town

21 July, 2007 - Stockholm

There hasn't been a post or a new sample in a while, but there is a good reason. Early this month work commitments have taken me to the other side of the world - from Melbourne, Australia to Stockholm, Sweden for around six months. It's summer time now and the weather is perfect. There's also time to squeeze in some sightseeing, this is if you're early enough to avoid the armies of tourists. Hopefully I'll find time to code some new samples so stay tuned.

Twist

28 May, 2007 - Twist

The mighty power of GLSL

Hoary! I am pleased to release my first sample free from the stranglehold of the fixed function (FF) pipeline. This sample demonstrates using the GPU to preform simple vertex animation by using a vertex shader with simple trigonometry.

The sample also illustrates how to easily implement a simple fly path that the eye or camera may follow. The fly path is determined by a series of control points which are used to form a spline. The spline chosen is known as a Catmull-Rom Spline which guarantees that each control point will lie on the spline (or the fly path). Although the Catmull-Rom Spline can not be optimised, it is extremely easy to understand and implement. Please forgive my attempt to symbolise a camera to mark the control points.

Get it while it's still hot, both a Visual Studio Project (.NET 2005) windows and GLUT build are available dowload zip file Clicky.

Jump to Start Page: 1 2 3 4