Opengl billboard

Brothers, I have a problem that has been bothering me recently. When I implemented OpenGL billboard, it couldn’t face me all the time. I don’t know why. I think it’s the camera, but I don’t know how to modify it

Without any further information, we cannot help you at all.
can you give any details on how are you implementing your billboarding process?

There are also plenty of good examples out there.

keep in mind that billboardin is done by:

  • in the process of rendering, you object’s modelview matrix has to be the:
    view_matrix x (the inverse view matrix translated to the objects location)

as such:

mat4 inverseViewMat = inverse(viewMat);
inverseViewMat[3].xyz = vec3(0, 0, -1);
mat4 mvMat =  viewMat * inverseViewMat;
gl_Position = projMat * mvMat * (vert);

This is just a simple example made in glsl, for a better performance do it in the application side before each draw call.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.