• Advertisement
Sign in to follow this  

how to save 4-channel to 2-channel?

This topic is 3785 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
Sign in to follow this  

  • Advertisement