Hello there!
I was tickling here and there with GUI's and stuff for a long time and never met a problem happened to me last month. I uploaded some 64x64 icons to server and it displays correctly...
https://i.imgur.com/oMFyV0A.png
But only for first time I join server during game session. Like when I reconnect server, some icons display incorrect. It's like in the middle (approx 32x32) it's normal, but the rest of it (around) just a little bit zoomed and low quality:
https://i.imgur.com/YFZUEkV.png
I think some optimization things are here to do this stuff, like mipmapping or something. Don't know if it's related but it is loaded through workshop and has some animation with changing icon size:
https://i.imgur.com/WfpYvo8.gifv
I only initialize material once during panel init:
{
text = 'Персонаж',
icon = Material('octoteam/icons/man_medit.png', ''),
anim = 0,
action = function()
-- some stuff
end,
}
And later use it in draw hook like so:
surface.SetMaterial(buts[i].icon)
surface.SetDrawColor(wcol.r, wcol.g, wcol.b, wcol.a)
surface.DrawTexturedRect(
cx + c * 198 * st - iconSize/2,
cy + s * 198 * st - iconSize/2,
iconSize,
iconSize
)
Is there any way to correct it or maybe "clear cache" or something for it to remove that artifacts.
Many thanks for answering, trying to solve that for around a week.
Hello anybody? At least suggestions?
Try using vtf files than png if you're going to resize those
That's really not convenient for my setup sadly. I know it will fix some AA issues, but it never happens to any textures except these ones. Maybe there's some PNG flags that could do it?
Thank you for critics, hope I'll release International version of this gamemode so you guys could test it ;)
Sorry, you need to Log In to post a reply to this thread.