![]() |
Path Tracing
|

Go to the source code of this file.
Classes | |
| struct | Ray |
| struct | Hit |
| ior = index of refraction (only used with MAT_GLASS) More... | |
| struct | GPUVertex |
| struct | GPUTriangle |
| struct | GPUMaterial |
| struct | GPULight |
| struct | BVHNode |
| A single node of the BVH, structured following the std430. More... | |
Functions | |
| layout (std430, binding=3) buffer MaterialBuffer | |
| Material Buffer. | |
Variables | |
| const float | PI = 3.14159265359 |
| const float | TWO_PI = 2.0 * PI |
| const float | INV_PI = 1.0 / PI |
| const float | INF = 1e30 |
| const float | EPS = 1e-5 |
| const float | EPS_TRI = 1e-10 |
| const float | EPS_SHADOW = 1e-4 |
| 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 |
| const int | BG_BLACK = 0 |
| const int | BG_WHITE = 1 |
| const int | BG_GRADIENT = 2 |
| uniform int | BACKGROUND |
| Color result if the ray doesn't reach the light. | |
| uniform sampler2D | env_map |
| uniform int | USE_ENV_MAP |
| uniform int | USE_GROUND_PLANE |
| Enable the ground. | |
| uniform float | GROUND_ELEVATION |
| uniform float | GROUND_ALBEDO |
| uniform float | GROUND_RADIUS |
| uniform int | GROUND_SHADOW_CATCHER |
| uniform float | GROUND_SHADOW_OPACITY |
| const int | TM_NONE = 0 |
| const int | TM_REINHARD = 1 |
| const int | TM_ACES = 2 |
| const int | TM_FILMIC = 3 |
| uniform int | TONE_MAPPING |
| uniform float | VIGNETTE_STRENGTH |
| uniform float | EXPOSURE |
| uniform int | DEPTH |
| uniform int | SAMPLES_PER_PIXEL |
| uniform int | RR_MIN_BOUNCES |
| Russian Roulette, minimum bounces before enabling. Changing to more or less gives minimal performance changes Avoids ending paths too early. Adds noise to the image if turned on. | |
| uniform float | RR_MAX_SURVIVAL |
| uniform int | USE_NEE |
| Enables NEE. | |
| uniform float | FIREFLY_CLAMP |
| const int | MAT_DIFFUSE = 0 |
| const int | MAT_MIRROR = 1 |
| const int | MAT_GLASS = 2 |
| const int | MAT_TINTED_GLASS = 3 |
| const int | MAT_SHADOW_CATCHER = 4 |
| uniform int | FORCE_MATERIAL |
| uniform float | GLASS_DISPERSION |
| Glass dispersion strength (prism effect). | |
| const int | LIGHT_POINT = 0 |
| const int | LIGHT_DIRECTIONAL = 1 |
| const int | LIGHT_SPOT = 2 |
| uniform sampler2DArray | tex_albedo |
| uniform sampler2DArray | tex_normal |
| uniform int | USE_TEXTURES |
| uniform int | light_count |
| uniform int | analytic_light_count |
| uniform vec3 | mesh_aabb_min |
| Bounding box of the loaded mesh to skip the triangle loop for rays that don't interact with the model. Improves performance. | |
| uniform vec3 | mesh_aabb_max |
| uniform int | triangle_count |
| uniform int | bvh_root |
| uniform int | USE_BVH_HEATMAP |
| enables the BVH's heatmap view | |
| uniform int | BVH_HEATMAP_SCALE |
| uniform int | DEBUG_VIEW |
| const int | DEBUG_VIEW_OFF = 0 |
| const int | DEBUG_VIEW_SHADING_NORMALS = 1 |
| smoothed + normal mapped (h.normal) | |
| const int | DEBUG_VIEW_GEOM_NORMALS = 2 |
| flat face normal (h.geom_normal) | |
| const float EPS = 1e-5 |
| const float EPS_SHADOW = 1e-4 |
| const float EPS_TRI = 1e-10 |
| const float INF = 1e30 |
| const float INV_PI = 1.0 / PI |
| const float PI = 3.14159265359 |
| const float TWO_PI = 2.0 * PI |