Sign in to follow this  
David Clark

Premultiplied alpha channel - textures

Recommended Posts

David Clark    122
Hey, I have a A8R8G8B8 texture which i load from a file and, using an orthagonal projection and a quad, i render it. However, to speed things up, I want to use a premultiplied alpha channel. How can I multiply my RGB values by the alpha value? Thanks :)

Share this post


Link to post
Share on other sites
ET3D    810
One way is to do it in any art program, like photoshop. That's probably the most efficient if you're only using the texture premultiplied.

Doing it in software, you can alpha-blend it onto an empty render target, or render it without blending into a render target and do the alpha multiplication in texture stages or a pixel shader.

On the other hand, do you really need this optimisation? Premature optimisation is the bane of code writing. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this