![]() |
Path Tracing
|
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 |
| uniform float CAM_ANAMORPHIC_SQUEEZE |
Anamorphic squeeze ratio, stretches the aperture (and bokeh) along the camera's local x-axis.
| uniform float CAM_APERTURE |
Lens aperture 0.0 = pinhole (no DOF), normal values up to 0.3
| uniform int CAM_APERTURE_BLADES |
Aperture blade count for bokeh shape.
| uniform float CAM_AXIAL_CA |
Axial (longitudinal) chromatic aberration strength. Perturbs the focal distance per color channel, wavelengths focus at different depths.
| uniform float CAM_BLADE_ROTATION |
Rotates the polygon aperture shape (in radians).
| uniform float CAM_CATEYE_STRENGTH |
Mechanical "cat's-eye" vignette. Biases the aperture sample toward the frame center Like lens barrel
| uniform float CAM_DISTORTION_K1 |
Radial lens distortion coefficients (r², r⁴). Negative k1 = barrel look Positive k1 = pincushion, tele/zoom look
| uniform float CAM_DISTORTION_K2 |
| uniform float CAM_FOCAL_DISTANCE |
Worldspace distance between camera and focal plane.
| uniform float CAM_FOV |
| 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
| uniform int CAM_PROJECTION_MODE |
Camera projection model, see PROJ_* constants.
| uniform float CAM_TILT |
Tilt shift, pivots the focal plane around the camera's local x-axis, in radians
| uniform vec3 camera_lookat |
Camera direction.
| uniform vec3 camera_position |
Camera position in world space.
| uniform vec3 camera_up |
Camera's up vector.
| 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
| const float DISPERSION_JITTER_WIDTH = 1.6 |
How wide a range each channel's per-sample jitter covers its DISPERSION_COEFF
| uniform float FOCAL_BAND_DEBUG |
Thickness of the focal plane line.
| uniform bool FOCAL_DEBUG |
Enables debug focal plane viewer.
| const int PROJ_FISHEYE_EQUIDISTANT = 1 |
| const int PROJ_FISHEYE_EQUISOLID = 3 |
| const int PROJ_FISHEYE_STEREOGRAPHIC = 2 |
| const int PROJ_RECTILINEAR = 0 |