Use separate buffers for R G B A
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
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;
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
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
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).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement