can the alpha in a tex be chaned in game?
I am using TGA images for textures, with an alpha channel.
I was wondering if there is a way to modify the alpha value of the texture once its loaded without having to re-load the image, or load the same image with a different alpha.
thanks
1) keep the image in ram, modify it and upload it agian (glteximage or whatever)
2) use a pixelshader to change it
3) maybe simple blending operations may be enogh to solve your problem
2) use a pixelshader to change it
3) maybe simple blending operations may be enogh to solve your problem
the first solution (keep in ram and upload again)
how system intensive would that be, not that I would be changing the alpha every frame, but if I 'did' require that, how much performance might I loose?
I mean the actual 'uploading' part of it.
how system intensive would that be, not that I would be changing the alpha every frame, but if I 'did' require that, how much performance might I loose?
I mean the actual 'uploading' part of it.
test it + see wouldnt take to long to write a demo
im guessing with a reasonable card u can update a 512x512 RGBA texture at least 100fps (so not to bad, but first test)
im guessing with a reasonable card u can update a 512x512 RGBA texture at least 100fps (so not to bad, but first test)
you could also try this if you want to affect the entire textures alpha: set the texture combining to modulate and use the color 1.0,1.0,1.0,1.0 on the polys it's placed on. now change the polygons color's alpha instead of the textures when you want it to be more transparent.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement