State Shaders
- State_animation_frame
- Current frame number
- State_animation_time
- Time of the current sample, in seconds, including the time within the shutter interval
- State_aperture
- Camera's aperture
- State_aspect_ratio
- Pixel aspect ratio of width to height
- State_backside
- True when the ray hits the geometry from behind, in which case the normal and geometry normal are inverted, and false otherwise
- State_camera_offset
- Camera plane offset, measured in pixels
- State_direction
- Unit length vector showing the ray direction (dependent on origin and position)
- State_dof_focus
- Distance from the camera position to the focal plane
- State_dof_radius
- Depth of field radius
- State_dot_nd
- Dot product of normal and ray direction (dependent on origin and position)
- State_far_clip
- Distance to the far clipping plane
- State_focal_length
- Camera's focal length
- State_geometry_normal
- Unit length vector which is the true surface normal for the current geometry
- State_image_x_resolution
- Width of the image, measured in pixels
- State_image_y_resolution
- Height of the image, measured in pixels
- State_importance
- Effect, ranging from 0 to 1, of the current shader on the final pixel color
- State_incident_ior
- Index of refraction (valued greater than -1) of the medium that contains the incident ray
- State_inside
- Set to true when the current ray is intersecting the surface from inside the volume defined by the surface. The value of inside can be different from backside when the surface normals are oriented such that the front side of the surface faces the interior of the volume.
- State_motion
- Tangential motion vector
- State_near_clip
- Distance to the near clipping plane
- State_normal
- Unit length vector which is the surface normal for shading
- State_origin
- Origin of the ray
- State_orthographic
- True if all eye rays are parallel
- State_parametric_uv
- Parametric uv-coordinates for the surface
- State_position
- Intersection point on the surface
- State_raster
- Raster coordinates for the fragment being rendered
- State_ray_length
- Length of the current ray (dependent on origin and position)
- State_refracted_ior
- Index of refraction (valued greater than -1) of the medium that contains the refracted ray
- State_shutter_close
- Time, measured in seconds, of the end of the shutter interval
- State_shutter_duration
- Length of the shutter interval, measured in seconds (dependent on shutter open and shutter close)
- State_shutter_open
- Time, measured in seconds, of the beginning of the shutter interval
- State_shutter_position
- Normalized position within the shutter interval which will have the value of 0.0 at the beginning of the shutter interval and 1.0 at the end (dependent on animation, shutter open, and shutter close)
- State_shutter_time
- Point in time, measured in seconds, within the shutter interval which will have the value of 0.0 at the beginning of the shutter interval (dependent on animation time and shutter open)
- State_texture_coordinate_1d
- Returns texture coordinates of a specified one-dimensional texture space
- State_texture_coordinate_2d
- Returns texture coordinates of a specified two-dimensional texture space
- State_texture_coordinate_3d
- Returns texture coordinates of a specified three-dimensional texture space
- State_texture_coordinate_4d
- Returns texture coordinates of a specified four-dimensional texture space
- State_window_bottom
- Size of the bottom margin, measured in pixels, when rendering a cropped region
- State_window_left
- Size of the left margin, measured in pixels, when rendering a cropped region
- State_window_right
- Size of the right margin, measured in pixels, when rendering a cropped region
- State_window_top
- Size of the top margin, measured in pixels, when rendering a cropped region