Hello Guest

Blending, alpha and clear color

  • 3 Replies
  • 5848 Views
Blending, alpha and clear color
« on: August 24, 2006, 12:21:43 »
I've partially written a 3d engine and come across a bit of a problem:

- I load my obj file pngs with alpha channel
- I map the material information to my object with blending enabled (func = GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
- run the test app (with my poorly drawn model) and I see edges on my textures - in the colour of my clear colour call.
- Decided to make sure the alpha was set - Alpha func enabled, edges disappear

Now using the alpha test to remove edges is all well and good, but I still have the issue with partially visible pixel data.

Any ideas on how to fix this?  I've tried moving objects in and out of display lists, etc, the alpha information is definately available...
----
DJL

Blending, alpha and clear color
« Reply #1 on: August 24, 2006, 14:18:11 »
ignore, working around it
----
DJL

Blending, alpha and clear color
« Reply #2 on: August 26, 2006, 03:18:48 »
so, let's share your Xperience...  :wink: how do you fix that?

Blending, alpha and clear color
« Reply #3 on: September 26, 2006, 11:01:06 »
Material alpha and :
Code: [Select]

GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1f);


Not the ideal solution to my problem, but for the current project it works and near enough is good enough as far as I am concerned right now  :P
----
DJL