Jump to content
  • Advertisement
Sign in to follow this  
Deathscythe

Can I use GLSL to achieve billboarded particles?

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

Hi, I'm trying to write a particle engine for my game project. I've been having trouble achieving good spherical billboarding for the particles. I've been calculating a billboarding matrix and then using that as one of the transformations. The results have not been very accurate. My game also makes use of GLSL shaders. I was wondering if there was a why to leverage the vertex shaders to achieve spherical billboarding. I was thinking something along the lines of: gl_Position = gl_ProjectionMatrix * gl_ModelMatirx * gl_Vertex; The theory is to remove the View Matrix for the transformations. Would this work? Is there something else anyone could suggest? Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
I have done something like that in the past where I for every particle quad in my emitter, I assigned 3 texture coordinates uvw instead of uv where w holds the index of some constant coefficitents that multiplied the right and up vector of the current view matrix to achieve billboarding.
Didn't offer any performance boosts sadly :/

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!