# OSL component names for points, colors? (x, y, z, r, g, b)

The Open Shading Language spec says

Color variables may also have their components referenced using “named components” that look like accessing structure fields named r, g, and b, as synonyms for [0], [1], and [2], respectively:

float green = C.g; // get the green component
C.r = 0.5;         // set the red component


It says the same thing about points and x, y, z components. This is not working for me in Blender 2.8. I get errors like:

error: type 'point' does not have a member 'x'

Is this not implemented in Blender?

• I'm not trying to use another OSL shader; I'm learning the language so I can write my own. It's not a show-stopper to write p[0], p[1], etc. I just find p.x, p.y to be clearer to read. Maybe I should just report it in the Blender bug tracker and see what they say. – Rob N May 10 '20 at 16:57