Tag Info

Hot answers tagged


I would do this by rendering textured quads. A single laser beam would be two rectangles intersecting each other at the center by a perpendicular angle, each sharing the same texture of the laser beam. Not very much to it, you can use instancing for them, with a very simple pixel shader which just samples the texture, oh and additive blending.


Indeed, the values stored in the z-buffer are not linear to the actual z coordinates of your objects, but to their reciprocal, in order to give more resolution to what's near the eye than to what's closer to the back plane. What you do is that you map your zNear to 0 and your zFar to 1. For zNear=1 and zFar=2, it should look like this The way to ...


You can also assume that "laser beam" is cylinder, and create a billboard for that: http://www.opengl-tutorial.org/intermediate-tutorials/billboards-particles/billboards/

Only top voted, non community-wiki answers of a minimum length are eligible