imageworks/OpenShadingLanguage — pull request #260 by brechtvl (2013-06-11 12:24:55+00:00)
Title: Fix inconsistent behavior of normal and point return from noise and texture functions

This code
```
shader test()
{
printf("point %f\n", (point)noise(P));
printf("normal %f\n", (normal)noise(P));
printf("color %f\n", (color)noise(P));
printf("vector %f\n", (vector)noise(P));
}
```

prints this, which seems inconsistent:
```
point 0.500000 0.500000 0.500000
normal 0.500000 0.500000 0.500000
color 0.500000 0.193125 0.377250
vector 0.500000 0.193125 0.377250
```

With this patch, noise, texture, texture3d and environment functions now return a triple when casting with (point) and (normal), the same as (vector) and (color) already did, so that the output is the same for all types in this example.

Perhaps this behavior is intentional, but then the OSL specification should be fixed.