Saturday, September 24, 2016

xna - Laser Beam End Points Problems


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




No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...