Tuesday, February 26, 2013

Glow me baby

You know what sucks when participating in OGAM? Having room redecoration in the same time. But now it's over and I finally have some time to finish my game. Unfortunately I'll had to close the project in beta stage just to fit in February.

I had some hard time with post-processing, after hours of wondering if I'm that stupid or something I found a solution for my problem and it was in adding that line:
SetGeometryShader(NULL);
DirectX is a state machine, one rendering technique turns geo shader on and it's on until you disable it. Jesus, I know that but it's really hard to debug that kind of stuff on my knowledge level...

Anyway, finally I've added some music-dependent glow:


Of course it looks better in game (it's a music-like game at last). FMOD is really fantastic sound engine, you write something like
float* spectrum = new float[64];
channel->getSpectrum(spectrum, 64, 0, FMOD_DSP_FFT_WINDOW_RECT);
and in spectrum array you have 64 0.0f to 1.0f values describing sound intensity by pitch. Right now I only take bass spectrum to describe wireframe width and glow size but it's really easy to make some fancy effects with it.

Now I have only 3 days left and the next big thing to do is instancing and frustum culling (yes, I still haven't done it).

No comments: