I have a very simple setup (see picture). I would expect that when I do
shader myshader(output color Cout = color(0.0, 0.0, 0.0)) {
Cout = color(u, 0.0, 0.0);
}
in my script, the red color gets stronger from left to right (i.e. black on the left and all red on the right). Furthermore, I would expect the color gradient to move only from left to right and not also from bottom to top as it can be seen in the image because I am only setting the u coordinate for the red channel.
If I do
shader myshader(output color Cout = color(0.0, 0.0, 0.0)) {
Cout = color(v, 0.0, 0.0);
}
(replace u by v), then the behavior becomes even stranger: I would now expect the color gradient to go only from bottom to top, starting with black at the bottom and ending with red at the top. Just according to the value range of the UV coordinates. In my setup, I simply added a plane that by default has a UV map whose coordinates range from (0,0) to (1,1). Can anyone explain this behavior to me?