BigDebuffs

BigDebuffs

18M Downloads

Portrait icon masking

clicketz opened this issue ยท 0 comments

commented

This is relatively inconsequential, but blizzard's SetPortraitToTexture function downscales/blurs icons. I'm on a 4k monitor and am using upscaled icons, so it's extremely noticeable when every icon on my screen is crisp except those on my player/target/focus portraits.

Instead of using SetPortraitToTexture, you can get a circular icon by creating your own mask. This doesn't downscale icons like SetPortraitToTexture does.

Replace

SetPortraitToTexture(frame.icon, icon)

in BigDebuffs.lua around line 1915 with:

frame.icon:SetTexture(icon)

if not frame.mask then
    frame.mask = frame:CreateMaskTexture()
    frame.mask:SetAllPoints(frame.icon)
    frame.mask:SetTexture("Interface/CHARACTERFRAME/TempPortraitAlphaMask", "CLAMPTOBLACKADDITIVE", "CLAMPTOBLACKADDITIVE")
    frame.icon:AddMaskTexture(frame.mask)
end

This will result in proper circular icons without any downscaling as shown here (you'll probably need to view it in full-size to really see the differences):

Masks