Game Development Community

TGB Alpha Layer Transparency - FIXED.

by Peterjohn Griffiths · in Artist Corner · 05/14/2011 (2:05 pm) · 1 replies

I'm not an artist so not sure if all the terms are correct.

Problem:
A PNG file with a transparent section leaves a jagged line instead of a more gradient sort of blend. I noticed this more when you have a dark colour on one image with a transparency and a light colour behind it, or the other way around aswell.

Fix?.
I think this can be solved by using an Alpha layer transparency so instead of a ending up with a solid line it would end up with the last few pixels leading upto the line being semi transparent so they blend well with whats behind it in the 2D scene.
Does TGB support this as it doesn't seem to be on by default.


#1
05/15/2011 (3:22 am)
After investigation, this seems to work as default.
I however had changed some blending settings when trying to get my lightmaps working and didn't change them back.
To fix,
On your image or tilemap, Under Blending;
Source Factor = SRC_ALPHA
Destination Factor = ONE_MINUS_SRC_ALPHA
This then fixes the problem.