{"id":26322698,"url":"https://github.com/OpenPathGuidingLibrary/openpgl","last_synced_at":"2025-03-15T17:01:54.268Z","repository":{"id":37775323,"uuid":"473512033","full_name":"RenderKit/openpgl","owner":"RenderKit","description":"Intel(R) Open Path Guiding Library","archived":false,"fork":false,"pushed_at":"2024-10-03T10:34:26.000Z","size":13932,"stargazers_count":280,"open_issues_count":6,"forks_count":25,"subscribers_count":16,"default_branch":"main","last_synced_at":"2024-10-14T22:01:57.336Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RenderKit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-24T08:10:12.000Z","updated_at":"2024-10-12T23:28:34.000Z","dependencies_parsed_at":"2024-08-16T10:49:46.723Z","dependency_job_id":"216f060d-9e0b-4397-a208-d60c6f9dab0f","html_url":"https://github.com/RenderKit/openpgl","commit_stats":null,"previous_names":["renderkit/openpgl","openpathguidinglibrary/openpgl"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RenderKit%2Fopenpgl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RenderKit%2Fopenpgl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RenderKit%2Fopenpgl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RenderKit%2Fopenpgl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RenderKit","download_url":"https://codeload.github.com/RenderKit/openpgl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243762264,"owners_count":20343979,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-15T17:01:25.911Z","updated_at":"2025-03-15T17:01:54.237Z","avatar_url":"https://github.com/RenderKit.png","language":"C++","funding_links":[],"categories":["Table of Contents"],"sub_categories":["Data Visualization and Rendering"],"readme":"# Intel® Open Path Guiding Library\n\nThis is release v0.7.0 of Intel® Open PGL. For changes and new features,\nsee the [changelog](CHANGELOG.md). Visit http://www.openpgl.org for more\ninformation.\n\n# Overview\n\nThe Intel® Open Path Guiding Library (Intel® Open PGL) implements a set\nof representations and training algorithms needed to integrate path\nguiding into a renderer. Open PGL offers implementations of current\nstate-of-the-art path guiding methods, which increase the sampling\nquality and, therefore, the efficiency of a renderer. The goal of Open\nPGL is to provide implementations that are well tested and robust enough\nto be used in a production environment.\n\nThe representation of the guiding field is learned during rendering and\nupdated on a per-frame basis using radiance/importance samples generated\nduring rendering. At each vertex of a random path/walk, the guiding\nfield is queried for a local distribution (e.g., incident radiance),\nguiding local sampling decisions (e.g., directions).\n\nCurrently supported path guiding methods include: guiding directional\nsampling decisions on surfaces and inside volumes based on a learned\nincident radiance distribution or its product with BSDF components\n(i.e., cosine lobe) or phase functions (i.e., single lobe HG).\n\nOpen PGL offers a C API and a C++ wrapper API for higher-level\nabstraction. The current implementation is optimized for the latest\nIntel® processors with support for SSE, AVX, AVX2, and AVX-512\ninstructions.\n\u003c!--, and for ARM processors with support for NEON instructions.--\u003e\n\nOpen PGL is part of the [Intel® oneAPI Rendering\nToolkit](https://software.intel.com/en-us/rendering-framework) and has\nbeen released under the permissive [Apache 2.0\nlicense](http://www.apache.org/licenses/LICENSE-2.0).\n\n|                                                                ![Example rendering without and with Open PGL](/doc/images/example.png)                                                                 |\n|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|\n| Path traced image of a variation of the Nishita Sky Demo scene from Blender Studio (CC0) without and with using Open PGL to guide directional samples (i.e., on surfaces and inside the water volume). |\n\n# Disclaimer\n\nThe current version of Open PGL is still in a pre v1.0 stage and should\nbe used with caution in any production related environment. The API\nspecification is still in flux and might change with upcoming releases.\n\n# Latest Updates\n\nThe full version history can be found [here](./CHANGELOG.md)\n\n## Open PGL 0.7.0\n\n- New (**Experimental**) Features:\n\n  - Radiance Caching (RC):\n    - If RC is enabled, the guiding structure (i.e., `Field`) learns an\n      approximation of multiple radiance quantities (in linear RGB),\n      such as outgoing and incoming radiance, irradiance, fluence, and\n      in-scattered radiance. These quantities can be queried using the\n      `SurfaceSamplingDistribution` and `VolumeSamplingDistribution`\n      classes. RC support can be enabled using the\n      `OPENPGL_EF_RADIANCE_CACHES` CMake option. **Note:** Since the RC\n      quantities are Monte-Carlo estimates, zero-value samples\n      (`ZeroValueSampleData`) that are generated during\n      rendering/training have to be passed/stored in the `SampleStorage`\n      as well.\n  - Guided/Adjoint-driven Russian Roulette (GRR):\n    - The information stored in radiance caches can be used to optimize\n      stochastic path termination decisions (a.k.a. Russian roulette) to\n      avoid a significant increase in variance (i.e., noise) caused by\n      early terminations, which can occur when using standard\n      throughput-based RR strategies. We, therefore, added to example\n      implementation for guided\n      (`openpgl::cpp::util::GuidedRussianRoulette(...)`) and standard\n      (`openpgl::cpp::util::StandardThroughputBasedRussianRoulette(...)`)\n      RR, which can be found in the `openpgl/cpp/RussianRoulette.h`\n      header.\n  - Image-space guiding buffer (ISGB):\n    - The ISGB can be used to store and approximate per-pixel guiding\n      information (e.g., a pixel estimate used in guided Russian\n      roulette). The ISGB class\n      (`openpgl::cpp::util::ImageSpaceGuidingBuffer`) is defined in the\n      `openpgl/cpp/ImageSpaceGuidingBuffer.h` header file. The support\n      can be enabled using the `OPENPGL_EF_IMAGE_SPACE_GUIDING_BUFFER`\n      CMake option.\n\n- API changes:\n\n  - `pgl_direction`: A new **wrapper** type for directional data. When\n    using C++ `pgl_direction` can directly be assigned by and to\n    `pgl_vec3f`.\n  - `pgl_spectrum`: A new **wrapper** type for spetral (i.e., linear\n    RGB) data. When using C++ `pgl_spectrum` can directly be assigned by\n    and to `pgl_vec3f`.\n  - `SampleData`:\n    - New enum `EDirectLight` flag that identifies if the radiance\n      stored in this sample comes directly from an emitter (e.g.,\n      emissive surface, volume, or light source).\n    - `direction`: Changes the type `pgl_vec3f` to `pgl_direction`.\n  - `ZeroValueSampleData`: This new structure is a simplified and more\n    compact representation of the `SampleData` struct representing a\n    zero-value sample. It contains the following members:\n    - `position`: The position of the sample (type `pgl_point3f`).\n    - `direction`: The incoming direction of the sample (type\n      `pgl_direction`).\n    - `volume`: If the sample is a volume sample (type `bool`).\n  - `SampleStorage`: To add, query, and get the number of\n    `ZeroValueSampleData`, the following functions were added.\n    - `AddZeroValueSample` and `AddZeroValueSamples`: These functions\n      add one or multiple `ZeroValueSampleData`.\n    - `GetSizeZeroValueSurface` and `GetSizeZeroValueVolume`: These\n      functions return the number of collected/stored surface or volume\n      `Ze1roValueSampleData`.\n    - `GetZeroValueSampleSurface` and `GetZeroValueSampleVolume`: Return\n      a given `ZeroValueSampleData` from either the surface or volume\n      storage.\n\n- API changes (`OPENPGL_EF_RADIANCE_CACHES=ON`): When the RC feature is\n  enabled, additional functions and members are available for the\n  following structures:\n\n  - `SurfaceSamplingDistribution`:\n    - `IncomingRadiance`: The incoming radiance estimate arriving at the\n      current cache position from a specific direction.\n    - `OutgoingRadiance`: The outgoing radiance at the current cache\n      position to a specific direction.\n    - `Irradiance`: The irradiance at the current cache position and for\n      a given surface normal.\n  - `VolumeSamplingDistribution`:\n    - `IncomingRadiance`: The incoming radiance estimate arriving at the\n      current cache position from a specific direction.\n    - `OutgoingRadiance`: The outgoing radiance at the current cache\n      position to a specific direction.\n    - `InscatteredRadiance`: The in-scattered radiance at the current\n      cache position to a specific direction and for a given HG mean\n      cosine.\n    - `Fluence`: The volume fluence at the current cache position.\n  - `SampleData`:\n    - `radianceIn`: The incoming radiance arriving at the sample\n      position from `direction` (type `pgl_spectrum`).\n    - `radianceInMISWeight`: The MIS weight of the `radianceIn` if the\n      source of it is a light source, if not it is `1.0` (type `float`).\n    - `directionOut`: The outgoing direction of the sample (type\n      `pgl_direction`).\n    - `radianceOut`: The outgoing radiance estimate of the sample (type\n      `pgl_direction`).\n\n  `ZeroValueSampleData`: - `directionOut`: The outgoing direction of the\n  sample (type `pgl_direction`).\n\n- API changes (`OPENPGL_EF_IMAGE_SPACE_GUIDING_BUFFER=ON`): When the\n  ISGB feature is enabled, additional functions and members are\n  available for the following structures:\n\n  - `ImageSpaceGuidingBuffer`: This is the main structure for storing\n    image-space, per-pixel guiding information approximated from pixel\n    samples. -`AddSample`: Add a pixel sample of type\n    `ImageSpaceGuidingBuffer::Sample` to the buffer.\n    - `Update`: Updates the image-space guiding\n      information/approximations from the previously collected samples\n      (e.g., denoises the pixel contribution estimates using OIDN). For\n      efficiency reasons, it makes sense not to update the buffer after\n      every rendering progression but in an exponential fashion (e.g.,\n      at progression `2^0`,`2^1`,…,`2^N`).\n    - `IsReady`: If the ISGB is ready (i.e., at least one `Update` step\n      was performed).\n    - `GetPixelContributionEstimate`: Returns the pixel contibution\n      estimate for a given pixel, which can be used, for example, for\n      guided RR.\n    - `Reset`: Resets the ISGB.\n  - `ImageSpaceGuidingBuffer::Sample`: This structure is used to store\n    information about a per-pixel sample that is passed to the ISGB.\n    - `contribution`: The contribution estimate of the pixel value of a\n      given sample (type `pgl_vec3f`).\n    - `albedo`: The albedo of the surface or the volume at the first\n      scattering event (type `pgl_vec3f`).\n    - `normal`: The normal at the first surface scattering event or the\n      ray dairection towards the camers if the first event is a volume\n      event (type `pgl_vec3f`).\n    - `flags`: Bit encoded information about the sample (e.g., if the\n      first scattering event is a volume event `Sample::EVolumeEvent`).\n\n- Optimizations:\n\n  - Compression for spectral and directional: To reduce the size of the\n    `SampleData` and `ZeroValueSampleData` data types it is possible to\n    enable 32-Bit compression, which is mainly adviced when enabling the\n    RC feature via `OPENPGL_EF_RADIANCE_CACHES=ON`.\n    - `OPENPGL_DIRECTION_COMPRESSION`: Enables 32-Bit compression for\n      `pgl_direction`.\n    - `OPENPGL_RADIANCE_COMPRESSION`: Enables 32-Bit compression for\n      `pgl_spectrum`.\n\n- Bugfixes:\n\n  - Numerical accuracy problem during sampling when using parametric\n    mixtures.\n\n- Platform support:\n\n  - Added support for Windows on ARM (by [Anthony\n    Roberts](https://github.com/anthony-linaro)\n    [PR17](https://github.com/RenderKit/openpgl/pull/17)). **Note:**\n    Requires using LLVM and `clang-cl.exe` as C and C++ compiler.\n\n# Support and Contact\n\nOpen PGL is under active development. Though we do our best to guarantee\nstable release versions, a certain number of bugs, as-yet-missing\nfeatures, inconsistencies, or any other issues are still possible.\nShould you find any such issues, please report them immediately via\n[Open PGL’s GitHub Issue\nTracker](https://github.com/OpenPathGuidingLibrary/openpgl/issues) (or,\nif you should happen to have a fix for it, you can also send us a pull\nrequest).\n\n# Reference\n\n``` code\n@misc{openpgl,\n   Author = {Herholz, Sebastian and Dittebrandt, Addis},\n   Year = {2022},\n   Note = {http://www.openpgl.org},\n   Title = {Intel{\\textsuperscript{\\tiny\\textregistered}}\n Open Path Guiding Library}\n}\n```\n\n# Building Open PGL from source\n\nThe latest Open PGL sources are always available at the [Open PGL GitHub\nrepository](https://github.com/RenderKit/openpgl). The default `main`\nbranch should always point to the latest tested bugfix release.\n\n## Prerequisites\n\nOpen PGL currently supports Linux, Windows and MacOS. In addition,\nbefore building Open PGL you need the following prerequisites:\n\n- You can clone the latest Open PGL sources via:\n\n      git clone https://github.com/RenderKit/openpgl.git\n\n- To build Open PGL you need [CMake](http://www.cmake.org), any form of\n  C++11 compiler (we recommend using GCC, but also support Clang and\n  MSVC), and standard Linux development tools.\n\n- Open PGL depends on TBB, which is available at the [TBB GitHub\n  repository](https://github.com/oneapi-src/oneTBB).\n\n- Open PGL depends on OIDN, if the **Image-space Guiding Buffer**\n  feature is enabled, which is available at the [OIDN GitHub\n  repository](https://github.com/RenderKit/oidn).\n\nDepending on your Linux distribution, you can install these dependencies\nusing `yum` or `apt-get`. Some of these packages might already be\ninstalled or might have slightly different names.\n\n## CMake Superbuild\n\nFor convenience, Open PGL provides a CMake Superbuild script which will\npull down Open PGL’s dependencies and build Open PGL itself. The result\nis an install directory including all dependencies.\n\nRun with:\n\n``` bash\n    mkdir build\n    cd build\n    cmake ../superbuild\n    cmake  --build .\n```\n\nThe resulting `install` directory (or the one set with\n`CMAKE_INSTALL_PREFIX`) will have everything in it, with one\nsubdirectory per dependency.\n\nCMake options to note (all have sensible defaults):\n\n- `CMAKE_INSTALL_PREFIX`: The root directory where everything gets\n  installed to.\n- `BUILD_JOBS`: Sets the number given to `make -j` for parallel builds.\n- `BUILD_STATIC`: Builds Open PGL as static library (default `OFF`).\n- `BUILD_TOOLS`: Builds Open PGL’s tools (default `OFF`).\n- `BUILD_DEPENDENCIES_ONLY`: Only builds Open PGL’s dependencies\n  (default `OFF`).\n- `BUILD_TBB`: Builds or downloads TBB (default `ON`).\n- `BUILD_TBB_FROM_SOURCE`: Specifies whether TBB should be built from\n  source or the releases on GitHub should be used. This must be ON when\n  compiling for ARM (default `OFF`).\n- `BUILD_OIDN`: Builds or downloads Intel’s Open Image Denoise (OIDN)\n  (default `ON`).\n- `BUILD_OIDN_FROM_SOURCE`: Builds OIDN from source. This must be ON\n  when compiling for ARM. (default `ON`).\n- `DOWNLOAD_ISPC`: Downloads Intel’s ISPC compiler which is needed to\n  build OIDN (default `ON` when building OIDN from source).\n\nFor the full set of options, run `ccmake [\u003cPGL_ROOT\u003e/superbuild]`.\n\n## Standard CMake build\n\nAssuming the above prerequisites are all fulfilled, building Open PGL\nthrough CMake is easy:\n\nCreate a build directory, and go into it:\n\n``` bash\n    mkdir build\n    cd build\n```\n\nConfigure the Open PGL build using:\n\n``` bash\n    cmake -DCMAKE_INSTALL_PREFIX=[openpgl_install] ..\n```\n\n- CMake options to note (all have sensible defaults):\n\n  - `CMAKE_INSTALL_PREFIX`: The root directory where everything gets\n    installed to.\n\n  - `OPENPGL_BUILD_STATIC`: Builds Open PGL as a static or shared\n    library (default `OFF`).\n\n  - `OPENPGL_ISA_AVX512`: Compiles Open PGL with AVX-512 support\n    (default `OFF`).\n\n  - `OPENPGL_ISA_NEON` and `OPENPGL_ISA_NEON2X`: Compiles Open PGL with\n    NEON or double pumped NEON support (default `OFF`).\n\n  - `OPENPGL_LIBRARY_NAME`: Specifies the name of the Open PGL library\n    file created. By default the name `openpgl` is used.\n\n  - `OPENPGL_BUILD_STATIC`: Builds Open PGL as static library (default\n    `OFF`).\n\n  - `OPENPGL_BUILD_TOOLS`: Builds additional tools such as:\n    `openpgl_bench` and `openpgl_debug` for benchmarking and debuging\n    guiding caches (default `OFF`).\n\n  - `OPENPGL_EF_RADIANCE_CACHES`: Enables the **experimental** radiance\n    caching feature (default `OFF`).\n\n  - `OPENPGL_EF_IMAGE_SPACE_GUIDING_BUFFER`: Enables the\n    **experimental** image-space guiding buffer feature (default `OFF`).\n\n  - `OPENPGL_DIRECTION_COMPRESSION`: Enables the 32Bit compression for\n    directional data stored in `pgl_direction` (default `OFF`).\n\n  - `OPENPGL_RADIANCE_COMPRESSION`: Enables the 32Bit compression for\n    RGB data stored in `pgl_spectrum` (default `OFF`).\n\n  - `OPENPGL_TBB_ROOT`: Location of the TBB installation.\n\n  - `OPENPGL_TBB_COMPONENT`: The name of the TBB component/library\n    (default `tbb`).\n\nBuild and install Open PGL using:\n\n``` bash\n    cmake build\n    cmake install\n```\n\n# Including Open PGL into a project\n\n## Including into CMake build scripts.\n\nTo include Open PGL into a project which is using CMake as a build\nsystem, one can simply use the CMake configuration files provided by\nOpen PGL.\n\nTo make CMake aware of Open PGL’s CMake configuration scripts the\n`openpgl_DIR` has to be set to their location during configuration:\n\n``` bash\ncmake -Dopenpgl_DIR=[openpgl_install]/lib/cmake/openpgl-0.7.0 ..\n```\n\nAfter that, adding OpenPGL to a CMake project/target is done by first\nfinding Open PGL using `find_package()` and then adding the\n`openpgl:openpgl` targets to the project/target:\n\n``` cmake\n# locating Open PGL library and headers \nfind_package(openpgl REQUIRED)\n\n# setting up project/target\n...\nadd_executable(myProject ...)\n...\n\n# adding Open PGL to the project/target\ntarget_include_directories(myProject openpgl::openpgl)\n\ntarget_link_libraries(myProject openpgl::openpgl)\n```\n\n## Including Open PGL API headers\n\nOpen PGL offers two types of APIs.\n\nThe C API is C99 conform and is the basis for interacting with Open PGL.\nTo use the C API of Open PGL, one only needs to include the following\nheader:\n\n``` c\n#include \u003copenpgl/openpgl.h\u003e\n```\n\nThe C++ API is a header-based wrapper of the C API, which offers a more\ncomfortable, object-oriented way of using Open PGL. To use the C++ API\nof Open PGL, one only needs to include the following header:\n\n``` c++\n#include \u003copenpgl/cpp/OpenPGL.h\u003e\n```\n\n# Open PGL API\n\nThe API specification of Open PGL is currently still in a “work in\nprogress” stage and might change with the next releases - depending on\nthe community feedback and library evolution.\n\nWe, therefore, only give here a small overview of the C++ class\nstructures and refer to the individual class header files for detailed\ninformation.\n\n## Device\n\n``` c++\n#include \u003copenpgl/cpp/Device.h\u003e\n```\n\nThe `Device` class is a key component of OpenPGL. It defines the backend\nused by Open PGL. OpenPGL supports different CPU backends using SSE,\nAVX, or AVX-512 optimizations.\n\nNote: support for different GPU backends is planned in future releases.\n\n## Field\n\n``` c++\n#include \u003copenpgl/cpp/Field.h\u003e\n```\n\nThe `Field` class is a key component of Open PGL. An instance of this\nclass holds the spatio-directional guiding information (e.g.,\napproximation of the incoming radiance field) for a scene. The `Field`\nis responsible for storing, learning, and accessing the guiding\ninformation. This information can be the incidence radiance field\nlearned from several training iterations across the whole scene. The\n`Field` holds separate approximations for surface and volumetric\nradiance distributions, which can be accessed separately. The\nrepresentation of a scene’s radiance distribution is usually separated\ninto a positional and directional representation using a spatial\nsubdivision structure. Each spatial leaf node (a.k.a. Region) contains a\ndirectional representation for the local incident radiance distribution.\n\n## SurfaceSamplingDistribution\n\n``` c++\n#include \u003copenpgl/cpp/SurfaceSamplingDistribution.h\u003e\n```\n\nThe `SurfaceSamplingDistribution` class represents the guiding\ndistribution used for sampling directions on surfaces. The sampling\ndistribution is often proportional to the incoming radiance distribution\nor its product with components of a BSDF model (e.g., cosine term). The\nclass supports functions for sampling and PDF evaluations.\n\n## VolumeSamplingDistribution\n\n``` c++\n#include \u003copenpgl/cpp/VolumeSamplingDistribution.h\u003e\n```\n\nThe `VolumeSamplingDistribution` class represents the guiding\ndistribution used for sampling directions inside volumes. The sampling\ndistribution is often proportional to the incoming radiance distribution\nor its product with the phase function (e.g., single lobe HG). The class\nsupports functions for sampling and PDF evaluations.\n\n## SampleData\n\n``` c++\n#include \u003copenpgl/cpp/SampleData.h\u003e\n```\n\nThe `SampleData` struct represents a radiance sample (e.g., position,\ndirection, value). Radiance samples are generated during rendering and\nare used to train/update the guiding field (e.g., after each rendering\nprogression). A `SampleData` object is created at each vertex of a\nrandom walk/path. To collect the data at a specific vertex, the whole\npath (from its endpoint to the current vertex) must be considered, and\ninformation (e.g., radiance) must be backpropagated.\n\n## SampleStorage\n\n``` c++\n#include \u003copenpgl/cpp/SampleStorage.h\u003e\n```\n\nThe `SampleStorage` class is a storage container collecting all\nSampleData generated during rendering. It stores the (radiance/photon)\nsamples generated during rendering. The implementation is thread save\nand supports concurrent adding of samples from multiple threads. As a\nresult, only one instance of this container is needed per rendering\nprocess. The stored samples are later used by the Field class to\ntrain/learn the guiding field (i.e., radiance field) for a scene.\n\n## PathSegmentStorage\n\n``` c++\n#include \u003copenpgl/cpp/PathSegmentStorage.h\u003e\n```\n\nThe `PathSegmentStorage` is a utility class to help generate multiple\n`SampleData` objects during the path/random walk generation process. For\nthe construction of a path/walk, each new `PathSegment` is stored in the\n`PathSegmentStorage`. When the walk is finished or terminated, the\n-radiance- SampleData is generated using a backpropagation process. The\nresulting samples are then be passed to the global `SampleDataStorage`.\n\nNote: The `PathSegmentStorage` is just a utility class meaning its usage\nis not required. It is possible to for the users to use their own method\nfor generating `SampleData` objects during rendering.\n\n## PathSegment\n\n``` c++\n#include \u003copenpgl/cpp/PathSegment.h\u003e\n```\n\nThe `PathSegment` struct stores all required information for a path\nsegment (e.g., position, direction, PDF, BSDF evaluation). A list of\nsucceeding segments (stored in a `PathSegmentStorage`) is used to\ngenerate `SampleData` for training the guiding field.\n\n# Projects that make use of Open PGL\n\nTBA\n\n# Projects that are closely related to Open PGL\n\n- The [Intel® oneAPI Rendering\n  Toolkit](https://software.intel.com/en-us/rendering-framework)\n\n- The [Intel® Embree](http://embree.github.io) Ray Tracing Kernel\n  Framework\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOpenPathGuidingLibrary%2Fopenpgl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOpenPathGuidingLibrary%2Fopenpgl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOpenPathGuidingLibrary%2Fopenpgl/lists"}