Fix text position
This commit is contained in:
@@ -20,7 +20,7 @@ layout(set = 1, binding = 0) uniform CameraData
|
||||
} cam;
|
||||
|
||||
void main() {
|
||||
gl_Position = cam.viewProjection * node.world * vec4(position[gl_VertexIndex], 1.0, 1.0);
|
||||
gl_Position = cam.viewProjection * node.world * vec4(position[gl_VertexIndex], 0.0, 1.0);
|
||||
fragTextureCoordinates = textureCoordinates[gl_VertexIndex];
|
||||
outColor = color;
|
||||
outBgColor = bgColor;
|
||||
|
||||
@@ -53,7 +53,7 @@ void main()
|
||||
}
|
||||
else
|
||||
{
|
||||
vec4 billboardPos = vec4(0.5, 0.5, 0.5, 1);
|
||||
vec4 billboardPos = vec4(0.5, 0.5, 0, 1);
|
||||
vec4 viewPos = cam.view * node.world * billboardPos;
|
||||
float dist = -viewPos.z;
|
||||
gl_Position = cam.projection * (viewPos + vec4(pos.xy * dist * 0.2, 0, 0));
|
||||
|
||||
Reference in New Issue
Block a user