rikky's picture

GL.Accum blending issues

Hey guys,

So I've tried every API call I can think of in getting this to work (Blend, BlendFunc, DepthTest, AlphaTest) and still no dice.

I'm making a 3D application with two 'layers'.
The first is a tilted orthographic layer (game world) and the second is a flat orthographic layer (UI).
Both are saved using GL.Accum(AccumOp.Accum, 1f) and retrieved using GL.Accum(AccumOp.Return, 1f).

For the second layer I wrote small methods for binding and drawing textures, as well as drawing basic rectangles (always handy) and they worked great.
The only issue is that when they're not over a plain black surface, they seem to additively blend into the layer behind them instead of opaque/alpha-blending.
When I try GL.Accum(AccumOp.Load, 1f) on the second layer it just paints black over the layer beneath it, so that doesn't help.

http://users.tpg.com.au/bjcohn/voxel/accum0.png - No blending
http://users.tpg.com.au/bjcohn/voxel/accum1.png - Partial
http://users.tpg.com.au/bjcohn/voxel/accum2.png - Full

Can anyone help me out?
I know it must only be a matter of putting the right line in the right place.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rikky's picture

Resolved, I'm an idiot.