Hi,
I'm currently working on my first GLua menu and I've been trying to put some animation on my logo and there's something weird that I've noticed.
[url]https://www.dl.dropboxusercontent.com/s/pq0w904f0wjk70k/2017-10-24_13-09-16.mp4?dl=0[/url]
The logo looks fine when the angle is set to 0 but as soon as it changes, it gets pixaleted which looks awful.
I'm using a .png file and surface.SetMaterial(Material(path)) for it.
Is there a way to get rid of this ugly pixelated logo?
Firstly, please don't do this:
[CODE]
surface.SetMaterial( Material( path ) )
[/CODE]
[URL="https://wiki.garrysmod.com/page/surface/SetMaterial"]The wiki warns that Material is an expensive function to call every frame[/URL]. Please do this:
[CODE]
local mat = Material( path )
-- Later in a HUDPaint hook:
surface.SetMaterial( mat )
[/CODE]
Anyway, the actual problem may be that you need a [URL="https://wiki.garrysmod.com/page/Material_Parameters"]smooth parameter[/URL]:
[CODE]
local mat = Material( path, "smooth" )
[/CODE]
Sorry, you need to Log In to post a reply to this thread.