When i rotated an image there a very thin white edge around it. Clamp wrap should be on be default so i don't really understand.
Here's a screenshot of how it looks ingame: http://gyazo.com/275b7da19b8d736d49f52d9281df514f
Anyone got a clue? Thank you
White edge around rotated object
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: White edge around rotated object
Please post the code you use to rotate the image.
- DaedalusYoung
- Party member
- Posts: 413
- Joined: Sun Jul 14, 2013 8:04 pm
Re: White edge around rotated object
This is caused by the underlying colour of the transparent areas of your image. Try filling the background with black, and alpha at 0, or even the colours of the neighbouring pixels with alpha at 0, in your favourite image editor.
Re: White edge around rotated object
if alpha is 0, does it matter if the color is black or white?DaedalusYoung wrote:This is caused by the underlying colour of the transparent areas of your image. Try filling the background with black, and alpha at 0, or even the colours of the neighbouring pixels with alpha at 0, in your favourite image editor.
Re: White edge around rotated object
It does, in this case
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
- slime
- Solid Snayke
- Posts: 3161
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: White edge around rotated object
It does if he's using linear filtering and isn't using premultiplied alpha plus the premultiplied blend mode.nuno wrote:if alpha is 0, does it matter if the color is black or white?
Some technical info:
http://blogs.msdn.com/b/shawnhar/archiv ... alpha.aspx
https://developer.nvidia.com/content/al ... or-not-pre
Re: White edge around rotated object
Thanks alot, i'll try it when i get home:)
Re: White edge around rotated object
I tried it now and it didn't work :/ I probably did something wrong, i opened the .png and made a second layer and filled it with black and set transparancy to 0. Maybe photoshop does something?
Re: White edge around rotated object
In most drawing programs you can set the background color. Somewhere in the document settings. It is important that you set the background color to transparent black, instead of having a layer that is fully transparent. At least from what I know.
Check out my blog on gamedev
-
- Party member
- Posts: 712
- Joined: Fri Jun 22, 2012 4:54 pm
- Contact:
Re: White edge around rotated object
As the others said, the background colour is the issue. Here's a tutorial for how to change that in gimp:
http://love2d.org/forums/viewtopic.php? ... mp#p131621
http://love2d.org/forums/viewtopic.php? ... mp#p131621
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
Who is online
Users browsing this forum: Bing [Bot] and 4 guests