cinput VEX function

cinput returns point sampled input.

Context: cop

See also: binput, finput, ninput

  1. vector cinput(int , int )

  2. vector4 cinput(int , int )

  3. vector cinput(float , float )

  4. vector4 cinput(float , float )

  5. float cinput(int , int , int )

  6. float cinput(int , float , float )

  7. vector cinput(int input_number, int planeindex, int u, int v)

  8. vector4 cinput(int input_number, int planeindex, int u, int v)

  9. vector cinput(int input_number, int planeindex, float u, float v)

  10. vector4 cinput(int input_number, int planeindex, float u, float v)

  11. float cinput(int input_number, int planeindex, int component, int u, int v)

  12. float cinput(int input_number, int planeindex, int component, float u, float v)

  13. vector cinput(int input_number, int planeindex, int arrayindex, int u, int v, int frame)

  14. vector4 cinput(int input_number, int planeindex, int arrayindex, int u, int v, int frame)

  15. vector cinput(int input_number, int planeindex, int arrayindex, float u, float v, int frame)

  16. vector4 cinput(int input_number, int planeindex, int arrayindex, float u, float v, int frame)

  17. float cinput(int input_number, int planeindex, int arrayindex, int component, int u, int v, int frame)

  18. float cinput(int input_number, int planeindex, int arrayindex, int component, float u, float v, int frame)

cinput returns point sampled input.

Point sampled input functions should be used whenever discrete pixel values are being modified, since these functions are much faster. Filtered functions should be used whenever UV coordinates are being manipulated. If multiple subsamples are being read and combined, bilinear lookups can produce a similar result to finput but much faster.

Each function may take either floating point or integer UV coordinates. If floating point UVs are used, the values are interpreted as 0-1 UV values; that is, (0.5, 0.5) is the center of the image. If integer UVs are used, the values are considered to be in pixel units, ranging from (0,0) to (XRES-1, YRES-1).

Each input function can return a float, vector or vector4 value. If the channel does not exist, the value returned for it will be 0. Whenever possible, use the vector versions rather that multiple float versions.

There are three different complexity levels for each input function.

If not specified in the function, the input number is always 0, the plane index is the current cooked plane, the array index is the currently cooked array index, and the frame is the current frame. So, cinput(u, v) is the same as cinput(0, PL, u,v) is the same as cinput(0, PL, AI, u,v, F).