View Full Version : Not drawing fully transparent
kelvin
2003.03.18, 10:22 PM
when I draw a textured poly that has fully transparent parts I get dithering. Am I doing something wrong or is there no way to get fully transparent textures?
http://www.variableaspect.com/gallery/polkadotproblem.jpg :(
ghettotek
2003.03.18, 10:31 PM
can we see what code youre using?
OneSadCookie
2003.03.18, 10:38 PM
Make sure the color channels of the transparent parts match the color channels of the surrounding opaque parts.
What's causing those dots? They must be in your texture...
kelvin
2003.03.18, 10:50 PM
as far as I know, the dots are dithering.
for generating the texture here's my code:[debugImage lockFocus];
[[[[NSColor whiteColor] colorWithAlphaComponent:0.0] colorUsingColorSpaceName:NSDeviceRGBColorSpace] set];
NSRectFill(NSMakeRect(0,0,size.width,size.height)) ;
[debugImage unlockFocus];
...
[debugImage lockFocus];
[[text_view layoutManager] drawGlyphsForGlyphRange:NSMakeRange(0,1)
atPoint:NSMakePoint(image_offset.x,
image_offset.y +
[aFont boundingRectForFont].origin.y)];
[debugImage unlockFocus];
OneSadCookie
2003.03.18, 10:54 PM
Are you drawing to a 32-bit texture and rendering to a 16-bit screen on a Rage 128?
kelvin
2003.03.18, 11:14 PM
yes.
OneSadCookie
2003.03.18, 11:30 PM
LOL :D I didn't expect to be right :rolleyes:
The Rage 128's dithering is appalling. Try matching your texture depth to your screen depth.
Tycho
2003.03.19, 12:06 AM
I don't have my Rage 128 anymore, but it always seemed that dithering looked WAY better in OS 9 than it did in OS X. In OS 9 it seemed to be using a sort of random diffuse dither while OS X used a sort of pattern based dithering if you know what I mean.
Skorche
2003.03.19, 12:32 AM
Yuck, I guess I never noticed that on my family's G4, but then again I haven't really ever played openGL games under OSX.
kelvin
2003.03.19, 12:32 AM
My issue is: should ALL pixels with 0.0 alpha be transparent? guh... I need a new mac.
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.