This is probably a dumb question, but is there a way to turn a color transparent on a texture. For example if you create a blue background with a red circle in the middle.
Can you turn that blue transparent so you only see the circle?
I know you can have transparent textures. If you load a image that already has alpha on it, but I'm not sure if you can turn a texture color transparent after its been created or loaded.
I do this with sprites all the time, but I've never seen it done with textures.
Texture Transparency
Re: Texture Transparency
First, I have no idea about what's possible with PB's engine, I never used it and I will never use it.
However if I wanted to do what you describe, I'd use a pixel shader to change the colors.
However if I wanted to do what you describe, I'd use a pixel shader to change the colors.
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
Re: Texture Transparency
Look at CreateTexture2.pb in your folder Examples\3D. It does exactly what you are looking for.
or here if you need to play with shaders.
or here if you need to play with shaders.
Please correct my english
http://purebasic.developpez.com/
http://purebasic.developpez.com/
Re: Texture Transparency
Thank you, Comtois. That example was exactly what I was looking for.
I thought I looked through all the examples, but I guess I'm blind because I don't remember seeing that one.
I thought I looked through all the examples, but I guess I'm blind because I don't remember seeing that one.

