2
\$\begingroup\$

I'm trying to make my own space-sim in Godot and I'm stuck trying to get the visuals of the "starfield"-effect that is a staple of the genre. I'm using a Particle system with billboards that would be parallel to the camera's view (creating something like a cylinder).

I'm struggling with the math involved in the Vertex shader to transform those billboards. Can anyone help me?

\$\endgroup\$
2
\$\begingroup\$

You can just set the top 3x3 part of the model matrix to an identity matrix, since that part stores the rotation. One caveat is that it will override any scaling you do, so make sure to store that matrix separately and apply later.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.