Laser Beam End Points Problems (XNA)

Posted by user36159 on Game Development See other posts from Game Development or by user36159
Published on 2013-10-25T15:59:21Z Indexed on 2013/10/25 16:12 UTC
Read the original article Hit count: 442

I am building a game in XNA that features colored laser beams in 3D space.

The beams are defined as:

  1. Segment start position
  2. Segment end position
  3. Line width

For rendering, I am using 3 quads:

  1. Start point billboard
  2. End point billboard
  3. Middle section quad whose forward vector is the slope of the line and whose normal points to the camera

The problem is that using additive blending, the end points and middle section overlap, which looks quite jarring. However, I need the endpoints in case the laser is pointing towards the camera!

See the blue laser in particular: XNA Laser Demo Screenshot

© Game Development or respective owner

Related posts about XNA

Related posts about blending