For that example, you could just have added the plane as child to the camera, with the appropriate offset. If you need a moving plane, but still want the plane to face the camera, you can do like I did for each sphere in my spheres example. The principle is to add the vertex position in view space. For just a single object, you could just add in a uniform position that you apply the modelViewMatrix to, and then add the vertex position before applying the projectionMatrix. (Or even projecting first and adding in the projected space.)
EliasHasle
21
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Plane's UV always facing camera | 3 | 103 | January 18, 2025 | |
| Texture perspective projection | 18 | 5801 | February 27, 2024 | |
| Mesh points to the camera on only 2 axis with shaders | 9 | 2750 | September 8, 2021 | |
| Convert camera frustrum to UV coordinate on texture? | 7 | 1625 | April 10, 2023 | |
| Background following perspective | 2 | 648 | June 7, 2023 |