Path Tracing
Loading...
Searching...
No Matches
Camera Settings

Variables

uniform float CAM_APERTURE
uniform float CAM_FOCAL_DISTANCE
 Worldspace distance between camera and focal plane.
uniform bool FOCAL_DEBUG
 Enables debug focal plane viewer.
uniform float FOCAL_BAND_DEBUG
 Thickness of the focal plane line.
uniform float CAM_FOV
uniform vec3 camera_position
 Camera position in world space.
uniform vec3 camera_lookat
 Camera direction.
uniform vec3 camera_up
 Camera's up vector.
uniform float CAM_LATERAL_CA
uniform float CAM_AXIAL_CA
const float DISPERSION_COEFF [3] = float[3](-0.7, 0.0, 1.4)
const float DISPERSION_JITTER_WIDTH = 1.6
uniform int CAM_APERTURE_BLADES
uniform float CAM_BLADE_ROTATION
 Rotates the polygon aperture shape (in radians).
uniform float CAM_ANAMORPHIC_SQUEEZE
uniform float CAM_CATEYE_STRENGTH
uniform float CAM_DISTORTION_K1
uniform float CAM_DISTORTION_K2
const int PROJ_RECTILINEAR = 0
const int PROJ_FISHEYE_EQUIDISTANT = 1
const int PROJ_FISHEYE_STEREOGRAPHIC = 2
const int PROJ_FISHEYE_EQUISOLID = 3
uniform int CAM_PROJECTION_MODE
 Camera projection model, see PROJ_* constants.
uniform float CAM_TILT

Detailed Description

Variable Documentation

◆ CAM_ANAMORPHIC_SQUEEZE

uniform float CAM_ANAMORPHIC_SQUEEZE

Anamorphic squeeze ratio, stretches the aperture (and bokeh) along the camera's local x-axis.

Note
1.0 = off,circular, ~1.3-2.0 for an anamorphic look

◆ CAM_APERTURE

uniform float CAM_APERTURE

Lens aperture 0.0 = pinhole (no DOF), normal values up to 0.3

◆ CAM_APERTURE_BLADES

uniform int CAM_APERTURE_BLADES

Aperture blade count for bokeh shape.

Note
<3 = perfectly circular (default)

◆ CAM_AXIAL_CA

uniform float CAM_AXIAL_CA

Axial (longitudinal) chromatic aberration strength. Perturbs the focal distance per color channel, wavelengths focus at different depths.

See also
cameraRayDOFChannel
Note
Needs CAM_APERTURE > 0 to actually be visible
0.0 = off (default)

◆ CAM_BLADE_ROTATION

uniform float CAM_BLADE_ROTATION

Rotates the polygon aperture shape (in radians).

◆ CAM_CATEYE_STRENGTH

uniform float CAM_CATEYE_STRENGTH

Mechanical "cat's-eye" vignette. Biases the aperture sample toward the frame center Like lens barrel

Note
0.0 = off (default)

◆ CAM_DISTORTION_K1

uniform float CAM_DISTORTION_K1

Radial lens distortion coefficients (r², r⁴). Negative k1 = barrel look Positive k1 = pincushion, tele/zoom look

◆ CAM_DISTORTION_K2

uniform float CAM_DISTORTION_K2

◆ CAM_FOCAL_DISTANCE

uniform float CAM_FOCAL_DISTANCE

Worldspace distance between camera and focal plane.

◆ CAM_FOV

uniform float CAM_FOV

◆ CAM_LATERAL_CA

uniform float CAM_LATERAL_CA

Lateral (transverse) chromatic aberration strength. Perturbs the effective FOV per color channel, differing by wavelength. Zero at the frame center, and increasing toward the edges

See also
cameraRay, cameraRayDOFChannel
Note
0.0 = off (default)

◆ CAM_PROJECTION_MODE

uniform int CAM_PROJECTION_MODE

Camera projection model, see PROJ_* constants.

◆ CAM_TILT

uniform float CAM_TILT

Tilt shift, pivots the focal plane around the camera's local x-axis, in radians

Note
0.0 = off, plane stays perpendicular to the view direction

◆ camera_lookat

uniform vec3 camera_lookat

Camera direction.

◆ camera_position

uniform vec3 camera_position

Camera position in world space.

◆ camera_up

uniform vec3 camera_up

Camera's up vector.

◆ DISPERSION_COEFF

const float DISPERSION_COEFF[3] = float[3](-0.7, 0.0, 1.4)

Hero-wavelength dispersion approx. for RGB Asymmetric on purpose, as real optical glass disperses blue twice as much as red relative to green. Cauchy's equation, grows toward short wavelengths n(λ) = A + B/λ^2

See also
CAM_LATERAL_CA, CAM_AXIAL_CA, GLASS_DISPERSION

◆ DISPERSION_JITTER_WIDTH

const float DISPERSION_JITTER_WIDTH = 1.6

How wide a range each channel's per-sample jitter covers its DISPERSION_COEFF

Note
1.3 gives a bit of overlap, so there's no visible seam between channels.
1.6 widens to keep the R-G and G-B ranges overlapping

◆ FOCAL_BAND_DEBUG

uniform float FOCAL_BAND_DEBUG

Thickness of the focal plane line.

◆ FOCAL_DEBUG

uniform bool FOCAL_DEBUG

Enables debug focal plane viewer.

◆ PROJ_FISHEYE_EQUIDISTANT

const int PROJ_FISHEYE_EQUIDISTANT = 1

◆ PROJ_FISHEYE_EQUISOLID

const int PROJ_FISHEYE_EQUISOLID = 3

◆ PROJ_FISHEYE_STEREOGRAPHIC

const int PROJ_FISHEYE_STEREOGRAPHIC = 2

◆ PROJ_RECTILINEAR

const int PROJ_RECTILINEAR = 0