By garyriches
on Wed, 06/20/2012 - 17:07
Hi,
I m trying to get parts of my model appearing transparent.
I have the texture as a 1024 x 1024 24 bit PNG with some transparency on it.
I have added the following lines to my renderFrameQCAR method:
[PHP] glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);[/PHP]
This does make the model transparent where it should be but it also makes the view that shows the camera appear black.
Any ideas?
Re: Transparent textures
Re: Transparent textures
Transparent textures
Hello gary and everyone, maybe this is the old post but i have a same problem in here. :D
i was put the code like this post. i was enable that code :
Transparent textures
Hi, things are a little bit more complex whn it comes to using OpenGL ES 2.0;
the samples use GLSL shaders for rendering (see for instance the file CubeShaders.h in the Image Targets sample);
Transparent textures
Hi AlessandroB, thanks for a quick replies. :D
Transparent textures
Hi,
in the shader code you can see a line starting with "gl_FragColor = .."
Transparent textures
thanks AlessandroB, sorry i could just reply this post now. :D
Transparent textures
Hi AlessandroB, i'm happy now XD
I have combined the texture of the object with alpha value succesfully, by add this code in CubeShaders.h :
Transparent textures
Hi, yes, it is possible to make both the cube and the sphere transparent, essentially you can use the same shader (with your custom alpha) for both the cube and the sphere rendering.
Transparent textures
hemm AlessandroB ,
Transparent textures
Hi, I cannot see the attached image...
EDIT:
now I can see the image.
But this is a genuine problem of OpenGL programming (nothing really about Vuforia per se).
I would recommend to read about handling transparency in OpenGL (as I said before)
Transparent textures
Hi AlessandroB, i think i have found where's my fault :D
Transparent textures
Hi Denmas,
I need to do just as you did with the cube, for Java. Please, I would like to help me how could you do?
Please, thank you!
Mafda
Transparent textures
Glad to hear this is solved!
Transparent textures
Hi AlessandroB,