I'm working on a shader that would use the Alpha to distinguish which RGB channel of a texture to display. My thoughts on how this would work are; A:1.0 = R, A:0.5 = G, A:0.0 = B, Is it possible to build this using Linear Interpolation nodes? If not what would be the correct approach? I'm working with the Strumpy Shader…
@Farfarer Thanks that worked perfectly, I did some research after I posted and realized the Step Node is A<=B, which was exactly what I needed. Also I corrected the original post.
Thanks for the continued help guys! I am unfamiliar with what Saturate does, I looked through both the UDK and Shaderforge Node guides and can only seem to find Desaturate. Would this work the same way if I inverted the product?
I'm guessing you meant that last bit to be "A:0.0 = B"? If not, replace color.b in this code with 0. Something like this should work... float a = color.a * 2; float r = lerp (color.b, color.g, a); a -= 1; r = lerp (r, color.r, a); You could branch it... but I suspect lerping is easier on the shader. They still don't really…