Thread Tools Display Modes
10-09-10, 05:44 PM   #61
Carighan
Guest
Posts: n/a
Game's height was 819,2 for me. :O

Anyways, worked amazingly awesome. Big thanks.
  Reply With Quote
10-13-10, 05:31 PM   #62
Gnarfoz
A Deviate Faerie Dragon
 
Gnarfoz's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2006
Posts: 18
4.0.1 makes this unnecessary, it seems?

Turning UIScale off seems to give the desired effect now.

(GetScreenHeight returns 1050 for me, which is my actual Y-resolution.)
__________________
Be nice to nerds, chances are you might end up working for one. -- Charles J. Sykes
  Reply With Quote
10-13-10, 09:49 PM   #63
Barjack
A Black Drake
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 89
Originally Posted by Gnarfoz View Post
4.0.1 makes this unnecessary, it seems?

Turning UIScale off seems to give the desired effect now.

(GetScreenHeight returns 1050 for me, which is my actual Y-resolution.)
The general technique is still useful if you want to be able to scale frames without scaling certain elements (e.g. 1-pixel border on a scalable map). Or for people who use uiscale but want a certain element to render at pixel scale. That said I'm still not entirely sure what needs to be changed in order for that to work in 4.0.1.
  Reply With Quote
10-17-10, 11:34 PM   #64
kbc8090
A Murloc Raider
Join Date: Mar 2010
Posts: 6
Has anyone considered the prospect that in 4.0.1 any element needing a pixel perfect border needs to be placed on the screen with whole numbers for x and y values? I'm not very proficient in LUA or how the interface works, but I can find my way around, but I assume for anything dragable the values are typically never whole numbers, as evidence from looking at various SavedVariable files over the years.

Edit 1: Also height/width need to be whole numbers as well.

Edit 2: Also it looks like the height/width values need to be divisible by 2, but x/y values do not.

Back in 3.3.5 I used 0.7 for my uiScale, I ended up getting my Stuf frames to be pixel perfect simply by adjusting the x and y values of the frame... just placing them at a certain location on the screen. If I moved them 1 px, usually one edge would become blurry.

Well I'm trying to adjust my LitePanels on beta at the moment, going for a 0.64 uiScale on 1920x1200, and I noticed whenever I put the x value to a number with a decimal the borders become fuzzy.

x = 370, y = 0 the panels are pixel perfect
x = 370.5, y = 0 the panels are fuzzy.

Maybe this is old news, maybe not, just thought I'd post. It could be that the old UI automatically rounded up or down when elements were dragged on the screen?

Last edited by kbc8090 : 10-18-10 at 12:01 AM.
  Reply With Quote
10-18-10, 02:15 PM   #65
Gnarfoz
A Deviate Faerie Dragon
 
Gnarfoz's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2006
Posts: 18
In 4.0, with UIScale turned off, you can simply use whole numbers and it will be pixel perfect, see my post above.

For UIScale turned on, the actual values will probably vary, and you're forced to exactly one particular UIScale value, cf. first post of this thread.

For UIScale turned on and some other value, well, good luck. You'll have to play with the settings of most of your addons and hope they support fractional sizes (i.e. width=200.4, height=50.5, etc.).
__________________
Be nice to nerds, chances are you might end up working for one. -- Charles J. Sykes
  Reply With Quote
10-18-10, 02:35 PM   #66
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
The pixel perfect script and turning UI scale off deliver the same results, with the exception that if you turn UI scale off, the game still looks fine in windowed mode.

There's still a slight difference, though. There is one pixel line in my UI, and a lot of font shadows, that look off compared to pre 4.0.1.
  Reply With Quote
10-18-10, 02:52 PM   #67
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
Weird, tried to run various "perfect uiscale" macros but none made the anti-aliasing addon written some posts ago, show poor rendered lines where the black and white borders smear together.

I guess we can't get it perfect when running window mode maximized, the resolution is something like 1920.00019234 and the height is 1060.111052 or similar, point is I got a 1920x1080 screen and apparently the decimals somehow mess it up when it's not exactly 16:9 scaled.

Anyone got a suggestion?
  Reply With Quote
10-18-10, 07:04 PM   #68
Gnarfoz
A Deviate Faerie Dragon
 
Gnarfoz's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2006
Posts: 18
If it doesn't show smeared lines, it's perfect - what more do you want?

Also, WoW can't represent integers, it only does floats internally, so all numbers will look like that.
__________________
Be nice to nerds, chances are you might end up working for one. -- Charles J. Sykes
  Reply With Quote
10-22-10, 10:04 AM   #69
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
Originally Posted by Gnarfoz View Post
If it doesn't show smeared lines, it's perfect - what more do you want?
Typo, I meant that the anti-aliasing addon showed lines in the square that were smeared. In fact none looked proper, no mater what macro I used. It also is like this even when disabling the uiscale and letting the game handle it by itself. I guess that resolution simply can't have a perfect uiscale as it's not perfectly scaled to 16:9 or other acceptable ratios sized.
  Reply With Quote
12-08-10, 11:39 PM   #70
Toran
A Nerdscale Dorkin
 
Toran's Avatar
Premium Member
Join Date: May 2006
Posts: 143
I'm a bit puzzled why it's preferable to use no uiscale. Wouldn't all of the screen elements be huge? I know I would have to go into each addon and resize/rescale them - seems like in the end you would be in the same place as just using uiscale via the calculations from earlier in the thread.

Not doubting anything anyone is saying, just trying to understand which is the right way to go.
  Reply With Quote
12-09-10, 02:07 PM   #71
Petrah
A Pyroguard Emberseer
 
Petrah's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2008
Posts: 2,988
Originally Posted by Toran View Post
I'm a bit puzzled why it's preferable to use no uiscale. Wouldn't all of the screen elements be huge? I know I would have to go into each addon and resize/rescale them - seems like in the end you would be in the same place as just using uiscale via the calculations from earlier in the thread.

Not doubting anything anyone is saying, just trying to understand which is the right way to go.
Without the ui scale, UI elements in game will be proportionate to your monitors screen resolution. A lot of UI's were already turning off the ui scale feature in game (Tukui and nUI just to name a few) long before Blizz made their recent change.
__________________
♪~ ( ) I My Sonos!
AddOn Authors: If your addon spams the chat box with "Addon v8.3.4.5.3 now loaded!", please add an option to disable it!
  Reply With Quote
12-09-10, 05:13 PM   #72
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
I used to turn my UI Scale down. With the recent change, I have to turn it up.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
01-20-11, 04:09 AM   #73
Alternator
A Fallenroot Satyr
 
Alternator's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 20
Just some notes I've found that may be useful

My interest in this topic was to provide pixel perfection without altering how the users ui works (so the user can set "Use UI Scale", "Windowed" mode etc as they wish).


I've found the following:

Use UI Scale: Off

Then UIParent will always match the pixel size of your window client area... I say client area, because this also holds true when you go windowed mode and resize the window.. In this mode things are easy as you are always working in the desired size.


Use UI Scale: On

Not so easy.
While it is possible to get the resolution and then do conversions along the following lines (psuedo code)
Code:
xPixel, yPixel = the pixels you're interested in;
xRes, yRes = string.match(({GetScreenResolutions()})[GetCurrentResolution()], "(%d+)x(%d+)");
uiscale = UIParent:GetScale();
Width_Or_XCoord = xPixel * (768.0 / xRes) * GetMonitorAspectRatio() / uiscale;
Height_Or_YCoord = yPixel * (768.0 / yRes) / uiscale;
It won't work for windowed mode unfortunately, as none of those numbers will adjust when the size of the window changes nor am I aware of any attribute that provide the the new scale/dimensions of the window.


This can be a bit tricky, because it does mean if the user does go windowed and UI Scale is on, that you may start to have details drop out (although I chose not to use the technique so far, I would have had single pixel lines that sometimes don't show up)
  Reply With Quote
03-11-11, 02:14 PM   #74
sp00n
A Murloc Raider
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 8
I can't get this to work correctly.
I'm using a windowed setup on a 1920x1080 resolution. My available screen size for WoW, due to the task and header bar, is 1018 pixels in height.

According to the formulae I should be using a UIScale of 768/1018 = 0.75442.
However that doesn't work, I do not get clean borders, they're still blurred. Using 768/1080 = 0.71111... doesn't work either, nor does disabling UI scale altogether.

Switching to fullscreen mode makes 768/1080 work, I get clean and sharp edges, at least for kgpanels (but not for Shadowed Unitframes?).
However I do want to keep the game in windowed mode.
Does anybody have any ideas?
  Reply With Quote
03-11-11, 02:56 PM   #75
Aprikot
A Frostmaul Preserver
 
Aprikot's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 284
Originally Posted by sp00n View Post
I can't get this to work correctly.
I'm using a windowed setup on a 1920x1080 resolution. My available screen size for WoW, due to the task and header bar, is 1018 pixels in height.

According to the formulae I should be using a UIScale of 768/1018 = 0.75442.
However that doesn't work, I do not get clean borders, they're still blurred. Using 768/1080 = 0.71111... doesn't work either, nor does disabling UI scale altogether.

Switching to fullscreen mode makes 768/1080 work, I get clean and sharp edges, at least for kgpanels (but not for Shadowed Unitframes?).
However I do want to keep the game in windowed mode.
Does anybody have any ideas?
I believe you need a resolution less than your maximum for pixel perfection in windowed mode. The game is still running at 1080 vertical even though your viewable is being reduced. Custom values in config.wtf work for this e.g. SET gxResolution "1920x1018" before you load the game.
  Reply With Quote

WoWInterface » Developer Discussions » Tutorials & Other Helpful Info. » Pixel Perfection for Specific Resolution

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off