Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

So i'm not quite sure exactly what "glow textures" are. For my implementation of a "lightning" effect, according to the comments on the article; http://drilian.com/2009/02/25/lightning-bolts/

They guy uses "glow textures". To achieve the really cool effects on his beams. I'm trying to-do the same thing, except that i'm not 100% sure what a glow texture is, currently the texture i'm using produces this output *I'm also using a simple shader to adjust the color value the lightning is rendered at; http://www.youtube.com/watch?v=dQNRYD8bJJo

Which isn't very good, it has the shape of the lightning but it doesn't have the sorta "flare" of it. This is a screenshot of my current texture that i'm using: http://dl.dropbox.com/u/13874083/screenshots/screen120417-105326.png

So essentially what i'd like to ask is mainly what is a glow texture? And perhaps to see an example of one would be really appreicated.

Edit: Taking the advice of kaoD, i'm now rendering the using Additive Blending, I've also got the Max Blending working, yet, still the bolt's do not produce the required effect that i'd like. Here's another video of them in action with the current code; http://www.youtube.com/watch?v=T0OEBobHqks

And here's specifically how i'm rendering them;

        spriteBatch.Begin(SpriteSortMode.Immediate, new BlendState
            {
                ColorSourceBlend = Blend.One,
                ColorDestinationBlend = Blend.One,
                ColorBlendFunction = BlendFunction.Max        
            }, null, null, null, effect);


        //Set Brightness of The First Bolt
        effect.Parameters["brightness"].SetValue(firstBoltBrightness);

        spriteBatch.Draw(firstBoltTarget, Vector2.Zero, Color.White);

        //Set Brightness of the Seconded Bolt
        effect.Parameters["brightness"].SetValue(secondBoltBrightness);

        spriteBatch.Draw(secondBoltTarget, Vector2.Zero, Color.White);
share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

Glow textures are nothing special. He's just using a glow-like texture (in fact, look at the comments, the author describes it as a gradient.)

The magic behind the actual glow is not the texture but the blending of it into the scene. In this case, additive blending should do the trick (check for examples here at GDSE) although he describes he uses max blending (which, tbh, I'm not aware of.)

share|improve this answer
    
GDSE? And from what i've read, MaxBlend is a blendFunction, in the spriteBatch you can define a new BlendState then in that you can define how all the colours are blended. Thats as much as i know about it :P. I don't know how to use it correctly however. –  dan369 Apr 17 '12 at 11:09
    
GDSE = GameDev StackExchange. Forget about maxblend and stick to additive blending, it'd do the trick. –  kaoD Apr 17 '12 at 11:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.