Sign in to follow this  
yk_cadcg

how to save 4-channel to 2-channel?

Recommended Posts

yk_cadcg    100
hi, [dx10, vs2005, geforce8800] i'm doing blending and render to texture. I only need 2 channels for blending, one channel is color(any of r/g/b, blendOp = Min), the other is Alpha(blendOp = Add. Actually Inc, since I let ps.outColor = (x,x,x,1)). But the hardware only supports full 4-channel textures (2-channel formats don't have Alpha), thus wasting copyback time. how to save 4-channel to 2-channel? Thanks!

Share this post


Link to post
Share on other sites
Zipster    2359
If you want to use alpha blending you're stuck with four channels, so there's not much you can do in terms of saving bandwidth. Disabling color writes on the channels you don't need should speed up rendering though.

If it's that much of an issue, try triple buffering your algorithm and doing the alpha blending manually. You'll only need two-channel textures then, at the cost of an extra texture and the manual blending ops.

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