Partial transparent parts and "needs work" note's


Re: Partial transparent parts and "needs work" note's
#8
Here's my mapping code (transA is hard-coded to be 110, and both alpha and transA are integers):
Code:
// This is a little odd, but we want 128 to map to our standard // transparent alpha (transA), anything below transA to smoothly map // from 0 to transA, and anything above transA to smoothly map from // transA to 255. if (alpha == 128) { alpha = transA; } else if (alpha < 128) { alpha = alpha * transA / 128; } else { alpha = transA + (alpha - 127) * (255 - transA) / 128; }
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Re: Partial transparent parts and "needs work" note's - by Travis Cobbs - 2012-07-03, 4:14

Forum Jump:


Users browsing this thread: 1 Guest(s)