shader: weird stripe Why this is happening!?





osl script:

shader TestNoise(
    vector vec = (0,0,0),

    output vector outV = (0,0,0)
){
    outV = (vec[0],vec[1],vec[2]);

}


In this case, it should not modify anything. It just passing the same value. Why is this happening?

I mean, if the public input vec is receiving the texture coordinate object vec = (x,y,z) and the outV = (vec[0],vec[ 1 ],vec[ 2 ]) is should vec = outV = (x,y,z) = (vec[ 0 ],vec[ 1 ],vec[ 2 ]), right?
In this image, instead of a black and white stripe is should not be a default checker?
I don't know, can someone explain to me?
You seem to have a mismatch in types in the assignment of the output variable - you need to include the 'vector' type in the assignment.

ie, instead of :

outV = (vec[0],vec[1],vec[2]);


Change it to :

outV = vector(vec[0],vec[1],vec[2]);


So the final script should be :

shader TestNoise(
    vector vec = (0,0,0),

    output vector outV = (0,0,0)
){
    outV = vector(vec[0],vec[1],vec[2]);

}