ix

The pixel coordinate on the x axis.

iy

The pixel coordinate on the y axis.

seed

A seed value which is specific to the current pixel.

sampleindex

The number of times this pixel has been processed (sometimes known as pass index).

datawindow

The data window as a rectangle (in pixel coordinates, not NDC).

viewport

The camera window, as {xmin, xmax, ymin, ymax} in NDC (normalized device coordinates).

xres

The pixel width of the display window.

yres

The pixel height of the display window.

filter_style

The type of pixel filter. The default type is gauss.

filter_width

The amount of filtering for the filter_style input.

focal

The focal length of the camera.

focus

The focus distance of the camera.

fstop

The f-stop of the camera (the N in f/N).

aspect

The aspect ratio of display window (width divided by height).

aperture

The aperture width of the camera.

Time

Unit time (from 0.0 to 1.0) specifying what point in the shutter time the ray was sent.

Outputting a different value than what was passed in is how you achieve rolling shutter and other kinds of motion blur effect.

clippingrange

The values passed to your function represent the near and far clipping distances (taken from the camera to which the lens shader is assigned).

Your function can change these values, to change the near/far limits for the ray (the minimum and maximum distances the ray can travel).

With a perspective transform, you should adjust the clipping distances by the Z of the ray direction to ensure consistent distances. For other projections, the interpretation of the clipping range may be different.

isRHS

Whether you should interpret the values passed to your function given in RHS (right-hand space). If your shader does not take this argument, Houdini always passes values in left-hand space.

This argument is for better compatibility with Karma, which works in RHS, and better portability.

lambda

Selected wavelength from chromatic aberration. For internal use only.

x

The x coordinate of the current pixel (jittered), fit between the NDC values of the camera’s viewport.

y

The y coordinate of the current pixel (jittered), fit between the NDC values of the camera’s viewport.

u

The x coordinate of the current pixel (jittered), fit to 0, 1.

v

The y coordinate of the current pixel (jittered), fit to 0, 1.

jitter

Set this to any relative jitter (horizontal and vertical) you applied to the pixel. You must output this variable if generating your own x and y.

P

Set this to the origin of the sent ray in 3D.

I

Set this to the direction of the ray sent ray as a vector.

tint

Set this to the color/contribution of the sent ray.

valid

After the function is run, set this to 1 or 0 to indicate whether the ray was valid or not. Setting this to 0 is the same as setting the contribution to {0, 0, 0}.

VOP nodes