hecrj / wgpu_glyph

A fast text renderer for wgpu (https://github.com/gfx-rs/wgpu)
https://docs.rs/wgpu_glyph
MIT License
441 stars 77 forks source link

Slight inconsistency between generated images #66

Open murtyjones opened 3 years ago

murtyjones commented 3 years ago

While setting up a test suite to compare images rendered and captured using wgpu_glyph, I discovdred a very slight difference between the image generated on one run vs. another. The pink areas in the attachment are where the pixels don't match exactly.

As far as I can tell, my code has nothing non-deterministic going on that could cause this behavior, so I wanted to check in here just to see if there are any potential obvious reasons why wgpu_glyph might produce a different result from one run to the next.

The difference is unnoticeable to the human eye, I only spotted it because of my testing work, which can easily be modified to use a more lenient comparison algorithm. Just wanted to deepen my understanding about whether the issue might be on my end or not.

image

hecrj commented 3 years ago

Maybe it has to do with the glyph caching strategy. Are you rendering any other text prior to these paragraphs?