-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vsg::Text - rendering issues / questions #1311
Comments
vsgtext has text that has outlines as well as without outlines, zooming into the text on the top left that doesn't have outlines: Is this not what you see? I'm using Kunbuntu 24.04 with Geforce 1650 on this system. When you say ruminant could you provide an example of what you mean. As for bounding boxes, vsg::Text was not written to be a drop in replacement for osg::Text, the public API and back-end implementations are very different. I can't comment on what you believe to be bounding padding, it's just written to render text and provide enough of bound for culling purposes. Without knowing specifically what you having an issue with and track it back to associated code I can't provide guidance on whether it's a bug that can be fixed or just a different behavior that will require you to work a little bit different with. |
This is the vsgtext example with a white clear color and magenta text color. And in my application, where I was able to draw the bounding box computed on my vsg::Text, it was very clear the glyph remnants were part of it. |
I would say my "glyph remnants" are your "bleed from neighbouring glyphs in the SDF texture atlas". |
You were using the glyph remnants in the context of the bounding box, which doesn't change whether you're zoomed in or zoomed out. Could you be you're mixing terms? The bounding box encompasses the quads that are used to render each glyph, the quad size is larger than the glyph so that any additional outline and blending can be rendered. Could this be why you aren't see exactly the bounding box you are expecting? The bounding box can be used for culling so needs to encompass the whole quads not inner glyph part that I'm guessing you are assuming is the bounds of the text. The texture edges you seeing is seeing when the glyph is being minimized is a filter issue, which should be solvable by increasing the margin between the glyphs when the vsgXchange::freetype loader generates the SDF for a font. You can list the controls that you can pass in via vsg::Options when loading fonts by using vsgconv --features:
|
Robert, I am sure I am mixing terms! |
Robert, |
Unfountantely I'm too stretch with DIY work rebuilding my office and other development to look into refining the vsg::Text at this point. On the bounding box front it may be appropriate to compute a tight bound box around just the core glyph geometry as well as the one that encompasses the whole quad used for rendering. The filtering issues will require work on shaders to better clip out samples from adjacent glphs during minificiation. You are welcome to tinker to come up with changes that work for you and post them as PR and I can review and amend or advice how to get them in a ready for merging with VSG master. The whole VSG codebase is under this type of refinement, big chunks of functionality do get added/amended but most of the work is refinements/improvements of existing codebase to better fit for how users are utilizing the VSG in their applications. As the VSG user base grows so does the envelope that developers require from it. |
I'm having 2 issues with vsg::Text, both of which can be seen with the vsgtext
example:
1. Can't turn off outlines?
2. Glyph "remnant" and inaccurate bounding box
Thank you
The text was updated successfully, but these errors were encountered: