Saturday, February 14, 2009

Damage Shader

The shader that tells the player "you're almost dead, moron". Finished.
Basically it takes whatever pixels are the on left and right side of the screen, blurs them based on X position, then over-exposes the red value of the pixel, resulting in this fully-conceived version of the "death haze" shader I posted earlier. Next on the shader to-do list is bump-mapping. At some point I'll be adding displacement (warping) effects as well. If it's possible I'd really like to have a full HDR lighting pipeline for the game too... but that might be pushing it. Totally possible if we end up adding 1 or 2 other programmers to the team. At this point it's just me, about 3 artists, and a writer/co-designer :)

Saturday, February 7, 2009

Fullscreen shader fun

Well it was a bit of a bitch to get working right, but after about a day of f**king with it, I finally got a Frame Buffer Object implemented in the engine. This coupled with my custom shaders yields some interesting results.


Next on the agenda will be finishing up the stencil shadow system, and hooking up a parallax bump-mapping shader to our buildings. The shader-side of it shouldn't be too hard as I already have a shader to perform parallax mapping, but I have to re-code the function that loads in our 3d models, which is kind of pissing me off because I thought I had a good function that worked. It was pretty n00b by most standards (it simply grabbed vertex and triangle arrays from .h files then drew them using openGL's glDrawElements() function), but it worked well for some stuff. But I finally realized I need to do things the right way and load from actual model files. We'll be using md2's, with each frame of the model file being a different variation of the building (so we don't have 30 identical grocery stores in the damn game world)

Ultimately I'll need to build a system for handling different materials on the different parts and pieces of each building. Hell maybe it will end up being a bit like Lego...


Enjoy some prototypical shader screengrabs:




Satanic hazy red filter (I'm thinking this will be great for when one of your host bodies is just about kaput)








Outside a host body, the ghost's connection to our physical realm is iffy at best, this is reflected with this bitchin shader that creates a blur+overexposure effect, for vaguely metaphysical goodness.


This final screenshot illustrates how things look when "all is well" (ie. when you have a host body and are not taking severe damage). No shader no cry...

Thursday, February 5, 2009

Status update

Finally got shaders working in the engine!
I'm on cloud 9 right now. It's taken a long time but we finally have a basic blur+over-exposure shader working in the engine. I'll be implementing a frame-buffer object soon, so we can displace, blur, and in general F up the game world accordingly using our lovely shaders, next.

After that I plan on finishing up a simple stencil-buffer shadow system. And then after that I've decided I'm going to discipline myself here, and suspend all work on the renderer, and just concentrate on gameplay programming and design for the rest of the time leading up to GDC.
(to clarify we are not showing the game at GDC, we will be attending though and talking to publishers)