- Home /
Remove white edges on texture help
Hello,
I just made 20+ textures in photoshop with some transparent parts. Fool me, I saved them as JPEG, which does not support alpha channel. Is there any shader that removes the white corners on a texture?
Here's what a texture looks like:
Why don't you use a format that handles alpha channel ? Can you precise what do you want ? White color replaced by transparent ?
Yes, white rounded corners must be transparent not white. I already saved them in JPEG, I can't save them again unfortunatelly
Answer by tanoshimi · Nov 28, 2013 at 02:44 PM
You could write a fragment shader that tested the RGB value of each pixel, and, if equal to (1.0, 1.0, 1.0), i.e. white, set the alpha value to 0.0, i.e. transparent.
But that would be a horrible solution to the problem, and you'd likely get nasty jagged edges because you'd lose the smooth anti-aliasing that Photoshop has applied as you blend to white. Just re-save them as TIF or PNG with transparency instead.
Answer by MaT227 · Nov 28, 2013 at 02:43 PM
I suggest you to use a free painting software like Gimp and modify your image. This is very easy. You just need to change the border in the alpha channel. There are plenty of tutorials about that.
But if you really want to replace white by alpha just grab an alpha shader and instead of using the alpha channel of your main texture, just replace white color by transparent.