Can I use GLSL to achieve billboarded particles?
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
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 :/
Didn't offer any performance boosts sadly :/
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement