Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    234
  • comments
    427
  • views
    115135

Problems with Streaking Glow Effect

Sign in to follow this  
Battagline

174 views

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.1
def c0, 0.4, 0.4, 0.4, 0.4
tex t0
mul 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.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!