Problems with Streaking Glow Effect

Published May 14, 2005
Advertisement
My glow seems to be working now, but I want to give it a streaky kind of look.

Here's my current glow effect:
Epoch Star - Sci-Fi Space Adventure

If I don't clear my glow surface every frame, I get a streaking effect like this:
Epoch Star - Sci-Fi Space Adventure

This creates an interesting streaking effect. The only problem with it, is that eventually the glowing takes up the entire screen and you have a completely white screen. What I would like to do is every frame cut the brightness of each pixel in half. That way, there is a streak effect that doesn't eventually fill the entire screen with white.

I created a pixel shader and rendered the glow texture to itself in an attempt to do this.

Here is the pixel shader code:
ps.1.1def c0, 0.4, 0.4, 0.4, 0.4tex t0mul r0, t0, c0


I then render a screen size quad back to the same glow texture, having set both the render target and the texture to the glow texture.

Here's the code:
	g_pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, FALSE );	g_pDevice->SetRenderTarget( g_pGlowSurface, NULL ); 	g_pDevice->SetTexture( 0, g_pGlowSurfaceTexture );	g_pDevice->SetPixelShader( g_ResourceManager->m_dwReduceShaderPS );	g_pDevice->DrawPrimitive(D3DPT_TRIANGLEFAN,0,2);


Howevever, I don't get the reduced color that I was looking for.

Here's a few screen shots to show you what happens:

Epoch Star - Sci-Fi Space RPG

Epoch Star - Sci-Fi Space RPG

As you can see, the screen still fills with a white color... however, the color is at least somewhat transparent.

I've created threads on GameDev, IGDA, and Indie Gamer in the hopes that someone will be able to help me out on this.
Previous Entry More Glow Progress
Next Entry Z Problems
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement