I've spent quite a lot of time perfecting how to draw particles in OpenGL. This is pretty easy, but if you want particles to correspond to world space then things get more difficult. I have found on GitHub other students doing a project with very similar goals to my own project, altough they have executed their project using mainly GPU and Cuda technology. I am doing my code so far a lot on the CPU side so our code will be very different. I did check their shader code for particles, and copied their way of diffusing a particle to get a 3D effect. The clipping needed to make particles appear round did I already discover on other parts of the internet. If interested, this project can be found here . The main issue is that you have to use the shader code "gl_PointSize". This parameter only specifies how many pixels to draw, and don't care about where the pixel is in world space. Luckily someone already asked a question on how to solve this on StackOverflow here . If I ...
Kommentarer
Skicka en kommentar