I tried to do it but I’m not expert with shaders, does anyone know how to make it so object always faces to camera or how can I make it so the 3D model displays like 2D object on screen?
I was going to use particle billboard function but couldn’t understand how it works tbh.
vec3 viewUp = matrix_viewInverse[1].xyz;
vec3 viewFor = matrix_viewInverse[2].xyz;
vec3 viewRight = matrix_viewInverse[0].xyz;
vec3 posCam = matrix_viewInverse[3].xyz;
mat3 billMat;
billMat[2] = -viewFor;
billMat[0] = -viewRight;
billMat[1] = -viewUp;
vec3 pos = billMat * vec3(quadXY, 0);
localMat = billMat;
return pos;
}