Hi! I’ve a problem, I can’t for my life make my pixels see-through. I was originally working on a billboard where the colors would set a alpha-value since my texture format .raw doesn’t come with a alpha-channel.
It’s only pictures of explosions and gunfire that’re just white shapes with glowing edges on a black background. I would take 1 minus the sum of the RGB values and devide them on 3 to get a alpha-value, where black is completly see-through and white is completly solid.
However I can’t even make entire models transparent with shaders. It’s silly it doesn’t work, I don’t do anything other in the fragment shader than this:
gl_FragColor = vec4(1.0,1.0,1.0,0.5);
Shouldn’t that give me a half-transparent black model? It just makes my model black and there’s no difference whatever alpha-value I choose. I don’t get any errors and I’ve tried with different colors and textures and my shaders seems to be working perfecly, it just ignores the alpha-value I assign. I’m working with C++ and GLUT and have the glutInitDisplayMode-function take the arguments GLUT_RGBA and GLUT_ALPHA, I thought that would be enough.
glutInitDisplayMode(GLUT_ALPHA | GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH);
I’ve done transparent models before without shaders and I don’t remember there being any problem. I’ve googled for similar problems but there doesn’t seem to be any, I would be very happy if someone have any idea what I’ve missed