[SOLVED] Alpha / transparent mesh without texture

I’ve literally never called this method in any code that I can think of but I have transparent textures all the time.

99.9999999% of the time of “I have transparency but it’s not transparent” it’s because blend mode isn’t set to alpha. I guess some tiny fraction of those times could also be not putting the object in the transparent bucket and it sorts weird and so looks non-transparent.

Both of which seem to be done in the code snippet. Though without a single class test case illustrating the problem it’s hard to tell if it’s really the issue.

Note that the 0.1 alpha will be almost totally transparent.

My suspicion is that what you are really seeing is that your transparent stuff is rendered first and picking up the framebuffer background and filling the z-buffer thus blocking anything else from rendering there.

You could prove that by setting an alpha discard threshold to 0.2… which should make the transparent pixels < 0.2 not even write anything to the framebuffer (not what you want but would prove it’s a sorting problem). Or you could set the viewport background to blue and see if your lines turn blue instead.

Just hard to say with the information provided.

1 Like