Advertisement Jump to content
Sign in to follow this  
Majestik666

Use separate buffers for R G B A

This topic is 4924 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, again another question about texturing, after getting the R,G or B display as luminance, I came up with some more trouble for some other features of my app... so my new question is , is there a way to use separate buffers for R G B and A and display is as a normal texture ? or maybe a simpler way to do it , have a bug buffer with all the components inside, but stored as RRRRRRGGGGGGBBBBBBAAAAA ? Thanks a lot ! Francois

Share this post


Link to post
Share on other sites
Advertisement
Why can't you store the values in the "correct" RGBA positions? Even if you get all the green ones first, something like buffer[idx] |= green & 0x00ff0000;

Share this post


Link to post
Share on other sites
the thing is I may need to invert R and G for example
so using separate buffer I could just swap pointers
instead of swapping all the values ...

Actually just think it the way Shake does it,
in its Reorder node, swapping channels instantly,
if you see what I mean ?

Cheers
Francois

Share this post


Link to post
Share on other sites
You can just do that in your pixel shader, using swizzling (for simple channel switching) or a color transformation matrix (for arbitrary linear blending of channels).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!