Transparency in LWJGL

Hello, again!._.

So, I’ve been playing with transparency in my geometry, and what I want is for a face to be transparent at a value of about 0.2 or something. However, if I set multiple faces to 0.2, sometimes they overlap, and create a 0.4 alpha value (or something like that, I’m not sure how they add together).

I need the first face to be 0.2 alpha, and any other non opaque face after that to be completely invisible. Is that possible?

So you want to render one texture transparently as if the other does not exist?

Maybe frame buffer objects, but I am sure there are better built-in solutions out there.

Hm, thanks:) I don’t think I need it after all, actually:P I found a way around it:)

Would you mind sharing your solution so that others can learn from this? :slight_smile:

I didn’t find a solution, I realised that I didn’t actually need an answer in the first place, I could get by without:P (for now)

Well, for the benefit of future peoples, let me share how I would go about solving this issue:

1) Render the top texture to an FBO at said transparency
2) Render other texture to world
3) Render the top texture FBO to the world

An excellent tutorial on FBOs [sub]again[/sub] here by mattdesl, to get you started.

EDIT:
Or you could mess with blending. This is a bit more good a tutorial to get you started on that.

-wes

Oh, I didn’t understand your answer. I wasn’t asking about textures; rather coloured vertices with an alpha value. I do believe in this case, blending is the answer.:slight_smile: