🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

How does the textured beam demo work?

Started by
2 comments, last by lc_overlord 18 years, 3 months ago
I like the demo...but where can I get the code? Will some one tell me how to do the effect found here (http://nehe.gamedev.net/data/projects/project.asp?project=textured_beam) or am I aloud to decompile it? regards JPulham.
pushpork
Advertisement
it's simple enough to figure out.
Basicly after the base quad is drawn you draw lots of GL_ONE,GL_ONE blend triangles in a circle from the center and out to the edge and then top center, the top vertic is allways black and you conroll the effect by changing the color of the other two.
The uv coordinates are set as the same coordinates as the texture below.
(note: depthwriting is tuned off during this stage )

the effect can allso be acheved by doing the same with a grid of quads or lot's of cones
so every edge is the bottom edge of a triangle going to the top point which is black...got it.
Don't know why I didn't think of it!!!
(maybe cuz ur mental?)
bit noobish really :P

so should i have like 5 cones getting smaller and smaller? more or less?
or not cones and a mess of triangles?
pushpork
test and see, if the effect is not good enough then just add more or change the geometry.

This topic is closed to new replies.

Advertisement