Ah pixel shaders. I am by no means an expert on them but what you can do with them is only really limited to your imagination and your math ability. They can do anything from simple things such as adjusting the colours of a scene to complex algorithms for normal mapped refractions through liquids. Once I basically understood how to use this powerful tool, I quickly realised how much I didn’t know about them and what a huge world of weird and wonderful effects pixel shaders hold.
Pixel shaders (and graphics programming in general) are still relatively new to me. I entered into game design from a level editing background where I use to spend countless hours in front of Unreal Tournament’s editor creating arenas for me to fight against bots or for the far too occasional lan set up with a few friends. After numerous attempts at trying to actually finish a full map, it wasn’t until Portal 1 came out before I managed to release my first full map, turned map pack, into the wild.
I loved the simple, clean, pureness that embodies the gameplay in Portal and how you had to think very differently in designing a Portal map than say a Doom, UT or any other game map for that matter. As far back as I can remember I’ve always wanted to make games and I use to naively think that making a game was just about laying the core gameplay, graphics and make a bunch of levels. After creating a short demo platformer and many small prototypes I have come to discover that making a game is a vast undertaking involving so many different areas from other entertainment mediums. Now however, the time is right to undertake that task of fully realising a video game for a proper release on the PC and a console (Xbox 360).
Anyway now to some meat and potatoes 🙂 I’ve slightly changed the blur shader applied to light shadows to achieve a much smoother effect with very little extra computational work. The problem before was that after blurring horizontally I didn’t input the result into the vertical blur pass and this give the shadows a few strange characteristics.
Below shows before and after:
The result is a much smoother and more evenly distributed blur. As you can see on the left examples, shadows whose angles are close to either axis receive very little blur and angles closer to diagonals get a pretty satisfactory blur. This is all fixed now the horizontal pass correctly outputs its result to the vertical pass.
I also consolidated all the post processing effects into a single shader which allows the game to have different post processing effects simultaneously active at a time. This would allow me to mix things up and create more varied levels.
Last but certainly not least is a new render pass for the graphics and that is overlay blended textures for the world tile layers. As I said in my previous post, the world tiles have large and relatively boring coloured gradients and as such I’ve added the ability to display a large detailed texture onto the gradients to give the world a more solid feel and make the levels look a little more interesting. I’ve played around with a few different textures and added the feature into the editor as well as a slider to control how strong the overlay is. Here’s what I got so far in before and after:
I’ve boosted the intensity of the lights a tad to give the sun rays more power but other than that I think the new overlay pass adds some nice detail where before it was a just a gradient.
Hope you like the new change and I promise I’ll have a gameplay video as soon as I can 🙂