# Simon's Graphics Blog

Work log for ideas and hobby projects.

## Site Blogged

with one comment

My homegrown php code is ageing badly, so it’s time to ditch the lot and join the WordPress collective.

Hopefully the site survived the transition:

• The squish library has its own page, but this just links to the Google Code project where this is now hosted.
• All other old articles and code should have been converted into posts.
• Found a thoroughly awesome WordPress redirection plugin, so all the old links should still work. Please post a comment if your incoming link didn’t work.
• I have stopped messing around with the site now, permalink structure is final!

Perhaps now I can post more than one item per year!

Written by Simon Brown

September 8th, 2008 at 8:02 pm

Posted in C++,DXT,Random

## Spherical Harmonic Basis Functions

with 4 comments

Spherical harmonic basis functions can be defined in various different ways depending on your derivation or normalisation requirements. This page defines the real-valued set I use, along with algorithms and code snippets for irradiance estimation and run-time evaluation.
Read the rest of this entry »

Written by Simon Brown

October 16th, 2004 at 8:00 pm

## A Lua Syntax Highlighter

with 3 comments

Lua is a very compact, fast scripting language with great platform support. Editing lua scripts is nice and easy in most editors (such as gvim), but Visual Studio doesn’t highlight the syntax by default. So here’s a plug-in for Visual Studio .NET 2003 that highlights Lua 5.0 syntax and provides auto-completion for keywords and identifiers as you type.
Read the rest of this entry »

Written by Simon Brown

June 21st, 2004 at 8:00 pm

Posted in C++,Lua

## Pooled Allocators For The STL

with 4 comments

One of the main complaints about the STL is the perceived lack of memory efficiency. In this article I’ll present a simple pooled allocator for use with the STL containers that allocate single elements at a time, such as list, set or map.

Written by Simon Brown

May 1st, 2004 at 8:00 pm

Posted in C++

## Why You Should Always Use static_cast

with 2 comments

I’m writing this to document my experience with the use of casting in large class hieararchies, specifically those that use multiple inheritance. I’ll be mainly having a go at anyone who likes to use C-style casts to move around their class hierarchy.
Read the rest of this entry »

Written by Simon Brown

May 1st, 2004 at 7:00 pm

Posted in C++

## Why You Should Always Use explicit Constructors

with 3 comments

Part of the overloading rules in C++ allow for types to be freely converted to other types through the use of single-argument constructors. Since no compilers currently inform you when this is going on it can lead to obscure bugs and/or inefficient code.
Read the rest of this entry »

Written by Simon Brown

May 1st, 2004 at 6:00 pm

Posted in C++

## How To Fix The DirectX Rasterisation Rules

with 4 comments

DirectX has always rasterised to render target pixel centres, and has always looked up textures from texel edges. Because of this, it is more difficult than it should be to write a flexible shader system where various portions of your pipeline are image-based. It is much simpler to work in a unified system where you write to render target pixel edges, and this article details a simple way of fixing this.
Read the rest of this entry »

Written by Simon Brown

May 1st, 2003 at 8:00 pm

Posted in C++,DirectX,Rendering

## Really Old Demos – The Buggy Demo

with 4 comments

This demo is just here for posterity – it formed part of my August 2002 coding portfolio when I was first applying for jobs in the games industry. Be warned, there’s some seriously dodgy coding going on here…
Read the rest of this entry »

Written by Simon Brown

August 1st, 2002 at 8:00 pm

## Really Old Demos – Cubic Shadow Mapping

without comments

This demo is just here for posterity – it formed part of my August 2002 coding portfolio when I was first applying for jobs in the games industry. Be warned, there’s some seriously dodgy coding going on here…

Written by Simon Brown

August 1st, 2002 at 7:00 pm

## Really Old Demos – OpenEngine

without comments

This demo is just here for posterity – it formed part of my August 2002 coding portfolio when I was first applying for jobs in the games industry. Be warned, there’s some seriously dodgy coding going on here…

Written by Simon Brown

August 1st, 2002 at 6:00 pm