Remaping grayscale image to arbitrary color ramp

Hello,

Is there a way to remap a greyscale image/texture to an arbitrary ramp of colors. Like say I have a linear blend that goes from black to white, and I want black to be green, 50% gray to be blue, and white to be Cyan.

I’ve seen the colorRamp node but I can only seem to get two colors out of it. Do I have to plug in a spread or something. I am still trying to wrap my head around how those work.

Thanks for any help.

Cheers,
Bryan Bentley

float4 src = tex2D(scrSamp, In.TexCd); //srcSamp sampler of greyscale image
float4 lookup = In.TexCd;
lookup.x = src.x;
float4 dst = tex2D(dstSamp, lookup); //dstSamp sampler of 1d reference colors
return dst;

… no text …

ColorRamp (EX9.Texture Filter) help.v4p (12.1 kB)

also tiki-download_file.php?fileId=1986 which uses woei’s method…

in this function possible with an existing dx11 node ?

foundit Colormap