Spherical billboard in nostale

01/21/2024 18:44 Earthnash#1
Hi, I'm trying to make a spherical billboard using shader.
I have done it via shader. I'm using an inverse of view matrix to canceled the rotation and scaling parts.
The vertical rotation works fine. The problem comes when I rotate around the effect that I want to make it billboard. It get twisted and not face the camera.
The vertices of these billboard effect in nostale is in x,z plane, unlike the normal one that usually on x,y plane. Any idea?
[Only registered and activated users can see links. Click Here To Register...]

here is the GLSL.
Code:
vec3 right = vec3(viewMatrix[0][0], viewMatrix[1][0], viewMatrix[2][0]);
vec3 up = -vec3(viewMatrix[0][1], viewMatrix[1][1], viewMatrix[2][1]);
vec3 front = -vec3(viewMatrix[0][2], viewMatrix[1][2], viewMatrix[2][2]);
        
vec3 finalPosition = (right * position.x) + (up * position.y) + (front * position.z);

gl_Position = projectionMatrix * viewMatrix * transformationMatrix * vec4(finalPosition, 1.0);
01/22/2024 10:16 Bejine#2
Are you asking about NosTale client, or shader code?
And are you asking about map objects or VFX's?
01/22/2024 17:46 Earthnash#3
Yes, I’m talking about a shader code. I want to make a spherical billboard for map objects.