Giter Club home page Giter Club logo

Comments (5)

pha3z avatar pha3z commented on August 17, 2024

I'm curious to know why the plane bound construct exists.

I looked at this thread:
#47

I notice your suggested solution is to simply add planeBound (*size) to the atlasBound for each glyph to get quad placement. If I understand this math correctly, doesn't this mean calculation could be done for every single glyph once to reduce it to a single atlasBound rectangle??

The fact that there are two separate structures makes me wonder if there is a case where they would need to be handled independently at runtime. ???

from msdf-atlas-gen.

Chlumsky avatar Chlumsky commented on August 17, 2024

Where did I suggest to add plane bounds to atlas bounds? Plane bounds = world coordinates, atlas bounds = texture coordinates.

from msdf-atlas-gen.

pha3z avatar pha3z commented on August 17, 2024

I'm an idiot. I totally misread the code from the other thread, which colored my question poorly.

Ok now I see. The planeBounds is used to offset the quad in worldspace. I was previously only thinking about locating atlas position of the glyph.

Thank you!

from msdf-atlas-gen.

Chlumsky avatar Chlumsky commented on August 17, 2024

A fix for this issue is now available in the branch pixel-alignment. Before merging, I need to add the choice between the old and new method so that users can choose between more consistent pixel alignment and slightly more compact atlases. I'd like to also add a way to only lock alignment for just one axis as it makes much more sense to pixel-align the baseline since the glyph advances (and therefore all horizontal positions) will almost always be fractional.

from msdf-atlas-gen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.