Forum

RGB (Color Split) doesn't show (obviously) negative color data

Hi guys,

i´m trying to analize via pipet+RGBA (split) some textures with negative RG data, but it shows only black color,
is there any way to convert this kind of negative rgba information into numbers?

Thanks in advance.

ari.

never heard of that before… but…
put a texture on your quad, add another quad with a white texture 255,255,255 and analyze the blended texture from that could be a start…

Thanks vjc4,

obviously this is not the normal way to use the colors and it sounds weird, but using textures as data container is very useful for big spreads (Dotore´s Particles on GPU).

Anyway I´ll try your tip.

I think a sort of color analysis plugin could do that, if anyone knows how to do it.

Thanks.
Ari.

note that only floating point textures can carry negative values…

Thanks Joreg, i´m using floating point textures and it seems that Pipet can carry it, i think the filter is in the RGBA split node.

any idea?

thanks

not sure what you mean with this but probably the RGBA split module doesn’t handle floating point textures through yet?

Thanks again Joreg, you are right

Would it be possible to write a RGBA (Split) floating point plug-in or something like that?
or is there any way to access floating point color data?

Ari.

Or a shader who converts the negative RG data into positive BA data for example, i´m only use the RG (positive and negative) data of the incoming floating point texture.
using this way in theory i could split the color data into something understandable for the RGBA (split) node.
any tip?

Ari.

i think the pixel shader approach would be better to do that, at least easier for me,

Incoming floating point texture RG (positive and negative), BA (irrelevant)
Out floating point texture RG (positive), BA (-1*Negative RG)

my code should be like that:

float4 col = tex2D(Samp, In.TexCd);
col.rg =  col.rg
col.ba = -1*col.rg 
return col.rgba

Is it right this way to recombine the positive RG and the new BA data into the output texture?

Thanks

ari.

Hi
I don´t know if it´s the right way to do that but it works for me, i only need to know if the colors are changing, nothing very precise.
I also noticed that there is some data in the alpha of my incoming texture, without this it doesn´t work (¿?)

my pixel shader looks now like that:

float4 PS(vs2ps In): COLOR
{
float4 col = tex2D(Samp, In.TexCd);
col.rg =  abs(col.rg + col.aa) ;
col.ba =  abs(col.bb + col.aa) ;

return col;
}

… no text …

ai lasal,

in the RGBA (Split) module try connecting the Info (EX9.Texture) Format output to the DX9Texture (EX9.Texture) hidden Format input. that should do.

Hi Joreg,
I mean RGB (color Split) instead of RGBA (Split) (Vux stuff), sorry for the mistake.
Thanks anyway.

Ari.

gotscha!
you’re not using beta26 then. zzzz…
Pipet (EX9.Texture) can only decode floating point textures since b26.

Yeah,
i´m using b26 and i know that about pipet, i think the “problem” is in the rgb (color split) it only show positive color values.
maybe is there a simple way to access to the negative data without using any shader and other renderpass?

thanks and sorry again for the mistake.

Ari.

for me it shows negative values.
please show a simple patch that doesn’t work for you.

Thanks Joreg,
i was making a simple patch to explain it and i´ve noticed that (of course) you are right, pipet and rgb color split work also with negative values using floating point textures.

Finally i´ve found the bug (in my brain)
i´m using the unc´s average texture effext to compound the incoming texture in 1 color,
and when i have the same weight of negative and positive values it shows black color.

I´ve made a simple shader to compound the texture into positive values and it works (for me) as expected.

Thanks again.

Ari.