Jump to content
  • Advertisement
Sign in to follow this  
JPulham

How does the textured beam demo work?

This topic is 4638 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

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!