View Single Post
10-10-17, 05:27 PM   #12
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
When I made pixel perfect nameplates some years ago, rather than anchor my frame to the existing nameplates I manually calculated their offset relative to the WorldFrame and moved them OnUpdate (later I realized I could do this in response to the nameplate movement instead).



The forum resizing this image is a perfect example of what the game is doing when it blurs your texture by scaling it for the client's window.

There are 2 factors that come into play if you want to prevent the game from blurring your textures:

1) The size/scale of your image on the screen needs to exactly counter any scaling the client is doing to draw it in the window.

2) The offset of the edge of the texture on screen needs to fall on what I generally refer to as a pixel boundary. In other words, the top left (or any edge) of the texture should be aligned with the grid of pixels on screen; if it falls between them the game will round it in either direction and skew your texture.

You need a function to calculate what size your texture should be, but you also need one to calculate the proper offset for your anchors.

Last edited by semlar : 10-10-17 at 11:25 PM.
  Reply With Quote