Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Lightning and blending effects

This topic is 5984 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi i want to learn how to do the lighning and blending effects like when in a rpg someone casts a spell. Look at this screenshot and see what im talking about http://www.risingphoenix.org/DAoC/gif/cosmo/sshot074.jpg

Share this post

Link to post
Share on other sites
thats an alpha blended texture.

requires the texture to be 4 component, not 3 (ie, tga, dds, etc) where the 4th, the alpha component, sets how transparent the pixel is to be drawn. Hence the combination above:

GL_SRC_ALPHA -> multiply the colour of the incomming texture by the alpha component
GL_ONE_MINUS_SRC_ALPHA -> multiply the existing pixel's colour by 1 minus the alpha value...

eg, if the alpha is 25% (64 in byte form), the incomming pixel is multiplied by .25, while the pixel already on screen is multiplied by .75

[edited by - RipTorn on June 2, 2002 12:53:12 AM]

Share this post

Link to post
Share on other sites
Well if you want to do spell effects you are going to most likely use a partical system for Particals and Use your blending to make them transparent but in this picture if you look at the spell effects in that picture all you will see is blended particals at full brightness. Those Spells are not lit at all if you want something like that then

Disable lighting
use glColor4f(); for Alpha and Colors

then bind your textures
then draw everything.


build off of this simple idea.

good luck

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!