Skip to content

Scaling billboard text with a transform? #985

Answered by robertosfield
gwaldron asked this question in Q&A
Discussion options

You must be logged in to vote

vsg::Text is able to do this out of the box, you should just need to set the vsg::StandardLayout with billboard set to true, set the screen size via the horizontal and vertical parameters, and set the billboardAutoScaleDistance to the maximum distance that you want the text to be scaled until it is simply scaled as if object coordinates.

I implemented this combination to enable one to control the screensize when close enough but then have it shrink as other object space objects do when you are far enough away that text labels would otherwise overlap.

This scaling is done entirely by the vertex shader in the code I linked to above, so it's very lightweight and scales nicely for large numbe…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@gwaldron
Comment options

@robertosfield
Comment options

@gwaldron
Comment options

@robertosfield
Comment options

Answer selected by robertosfield
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants