Commit graph

106 commits

Author SHA1 Message Date
Matt Pharr
90c73ac71a Update to latest zlib released version 2025-10-22 11:41:43 -07:00
Matt Pharr
d5c8fce493 Update double-conversion to use more modern cmake to make github runners happy 2025-10-22 11:18:51 -07:00
Matt Pharr
9fbf3f0eec Redo cmake/OpenEXR integration
Use the "modern" cmake way of naming/passing along targets; as a bonus,
this lets us bump the version of openexr we ship as a submodule to be
the most recent release.

Fixes #478, which was due to pbrt not handling having a modern version of
openexr installed locally.
2025-01-30 11:40:30 -08:00
he-yulong
f5767b3c72 Fix CMake build error on Windows 10 by exporting zlibstatic alongside Ptex_static.
* Adds a post-configuration step that explicitly installs `zlibstatic` into the `Ptex` export set.
* Prevents "target not in any export set" errors during the installation stage.
* Leaves the existing Ptex submodule files unmodified, preserving upstream compatibility.
* Verified on Windows 10 with Visual Studio 2022.
2024-12-29 15:16:28 +11:00
Matt Pharr
3976fd70a6 Finally fix all github actions builds 2024-11-25 11:25:13 -08:00
Matt Pharr
c223f7daca ptex, try 2 2024-11-24 08:19:42 -08:00
Matt Pharr
c9b2d99c73 Update ptex version to pick up build fix 2024-11-24 08:11:02 -08:00
Matt Pharr
e9e1180f47 Update glfw to 3.4 2024-11-24 08:07:44 -08:00
Matt Pharr
ebd7bfa1a7 Bump OpenEXR version to get <cstdint> fix 2024-11-24 07:47:16 -08:00
Aaryaman Vasishta
5a28e28a53 Add PBRT_CPU_GPU in some signatures;Move OptiX
Co-Authored-By: Daniel Meister <daniel.meister@amd.com>
2024-08-24 17:55:36 +01:00
Tomas Berger
48d43bbb6c Add defined keyword 2023-11-25 19:36:21 +01:00
Tomas Berger
934eb69ec5 Add optional source code location 2023-11-25 19:32:33 +01:00
Matt Pharr
323da4d0e9 Disable unwantd FMAs with clang 14
Fixes #375
2023-09-18 07:19:48 +01:00
Matt Pharr
d250ece5d5 Add nanovdb2pbrt utility.
Basic converter from nanovdb to pbrt's text format for volumes,
including support for downsampling.
2023-05-12 05:30:54 -07:00
pbrt4bounty
4a668cc137
Silent warning in VDB dependecies
Silence a MSVC warning 4146 caused by NanoVDB code when a unary minus operator is applied to an unsigned type.
2023-04-15 20:03:54 +02:00
pbrt4bounty
5e69feb538
Silent build warnings about deprecated 'snprintf'
This directive silences many annoying and perhaps unused warning messages under MacOS arm64 about that a few of printf's are now deprecated
2023-03-20 13:11:00 +01:00
AwesomeKuma
b251ba1b31 Add a simple VisualStudio debugger visualizer(.natvis) for TaggedPointer 2022-12-30 22:09:59 +08:00
pbrt4bounty
e6894bee49
Silent MSVC warnings 2022-05-30 10:06:11 +02:00
Andreas Wendleder
932aba808c Read Optix path from environment.
This way it doesn't has to be set in CMakeCache.txt every time the
repository is checked out.
2022-05-23 12:47:00 +02:00
Matt Pharr
0eb8526777 Update expected glfw revision 2022-04-26 06:42:09 -07:00
Matt Pharr
e4e6ad3274 Add --interactive option
Currently only works with the --gpu / --wavefront integrator.
WASD-style controls; could use refinement.
Control-R to record frames.
2022-04-26 06:28:19 -07:00
Matt Pharr
fc86eb47c1 Add GLAD and GLFW dependencies 2022-04-25 17:55:55 -07:00
Matt Pharr
a4f48c69aa cmd/imgtool: refactor OptiX denoiser use into gpu/denoiser.* 2022-04-25 17:53:15 -07:00
Matt Pharr
cacd50aa42 Add support for qoi format images
https://qoiformat.org
2022-04-25 17:45:23 -07:00
Matt Pharr
c7e3879c78
Unicode normalization (#225)
Normalize unicode strings for user-supplied names (objects, materials,
media, etc.)  Note that there is no need to normalize strings for things
like the name of the selected sampler, light source types, or the
parameters provided to pbrt objects, as all of the valid ones are plain old
ASCII text. We also intentionally do not normalize pathnames, as doing so
can cause all sorts of trouble.
2022-02-02 07:10:03 -08:00
Matt Pharr
79bc178329 Windows improvements
- #undefine interface, which somehow gets #defined in debug builds, thwarting
  the layered BxDF code
- Move a CHECK out of (possibly) GPU code
- And some cmake tidying
2022-01-27 13:45:10 -08:00
Matt Pharr
06cdbecb7d Update to released version of NanoVDB 2021-11-02 15:55:13 -07:00
Matt Pharr
83d4ae1667 ext/ updates
Update filesystem/ and stb/ to latest versions.
Start using git submodules for lodepng (and update to latest.)
2021-10-28 14:23:23 -07:00
Matt Pharr
4fd2a481cc
Add PBRT_FLOAT_AS_DOUBLE and PBRT_DBG_LOGGING to the CI build matrix (#173) 2021-08-19 16:52:35 -07:00
Matt Pharr
43ce733ea0 Improve error message on missing submodule 2021-08-07 08:45:41 -07:00
Matt Pharr
6f685a2f78 Add libdeflate as a submodule 2021-08-07 07:59:18 -07:00
Matt Pharr
edf32b0344 Rename parsedscene.{h,cpp} to scene.{h,cpp} 2021-07-30 09:59:25 -07:00
Matt Pharr
f4ce14117d Attempt to fix pre-11.2 CUDA builds 2021-07-28 16:24:08 -07:00
Matt Pharr
7b5c05c68e Clean up assorted Linux/CUDA build warnings 2021-07-28 16:05:08 -07:00
Matt Pharr
24df23986d Attempt to fix Windows build 2021-07-28 13:45:06 -07:00
Matt Pharr
6e48cc048a Add --log-utilization option to pbrt.
Every 100ms, logs CPU (and GPU, if PBRT_NVML is enabled at cmake configure
time) utilization and memory use to the verbose log.

This is currently only useful on Linux; OSX and Windows need their
system-specific calls wired up to get current CPU utilization.
2021-07-23 08:59:55 -07:00
jim price
bfcf5287d8 Add plytool to the install list 2021-07-22 19:01:24 -07:00
Matt Pharr
995d9e0c2c CMakeLists.txt: build without CUDA support if an old CUDA version is found.
Previously the build errored out with a pre-version 11 version of CUDA.
Now it, more helpfully, issues a warning and builds a non-GPU version
of pbrt.
2021-07-15 16:22:31 -07:00
Matt Pharr
713cb61893 Rename splitply -> plytool.
Add "info" and "cat" sub-commands.
2021-07-08 10:54:40 -07:00
Matt Pharr
cbed14ce45 Add cmd/splitply 2021-07-04 07:40:12 -07:00
Matt Pharr
84083aca55 Add GetCommandLineArguments() function (and use it).
Beyond the convenience of having them as a vector of strings, this
is where UTF16 -> UTF8 conversion of args happens on Windows.

This led to some adjustments to ParseArg()...

With this (and a number of preceeding commits), #136 should now be fixed.
2021-06-02 15:32:59 -07:00
Matt Pharr
75d6ac4723 CMakeLists.txt improvements
Put cpu/ source files in their own subfolder for MSVC
Add the cpu/*.h files, which weren't included in PBRT_SOURCE_HEADERS before.
2021-06-02 14:00:45 -07:00
Matt Pharr
3a18750112 cmake: refine test to disallow CUDA 11.3.0 but allow subsequent 11.3.x.
Fortunately, the compiler error was fixed in 11.3.1...

(Issue #124.)
2021-06-01 14:35:28 -07:00
Matt Pharr
06000be589 Re-enable Windows+GPU builds
Relates to issue #100, #96, #89, and #48...
2021-05-03 17:12:11 -07:00
Matt Pharr
e90458fb9d
Generalize GPU rendering path to run on both CPU and GPU (#125)
* Generalize GPU rendering path to run on both CPU and GPU

Now we have a WavefrontIntegrator that can both run on the CPU (backed by
ParallelFor() for parallelization and pbrt's aggregates for ray
intersection acceleration) and on the GPU (backed by GPUParallelFor() for
parallelization and OptiX for ray intersection on NVIDIA GPUs.)

Beyond generalizing the code, this refactor allows CPU-side debugging and
testing of the wavefront integrator.  Doing so allows further isolation of
the GPU-specific code into a few source files, now just ~2.5k lines of code.

This includes a bug fix in the wavefront medium code to resolve MixMaterials
to one of their constituent materials before enqueuing material evaluation
and shading work.

Note that on the CPU, the wavefront integrator runs 5-10x more slowly than
pbrt's regular CPU integrators, so it is not recommended for regular use...

Co-authored-by: Wenzel Jakob <wenzel.jakob@epfl.ch>
2021-05-02 14:36:59 -07:00
Matt Pharr
4aa8f83527 Disallow CUDA 11.3.0 due to internal compiler error.
Issue #124.
2021-05-01 08:06:44 -07:00
Matt Pharr
51d23be172 Fix some MSVC warnings 2021-04-17 12:50:22 -07:00
Matt Pharr
09ea972a7a Update from book source.
- Minor changes to how hash values are computed for scrambling in the
ZSobolSampler.
- Folded util/bits.h into util/math.h.
2021-02-20 06:59:59 -08:00
Matt Pharr
3839c9040d CMakeLists.txt: Use NO_DEFAULT_PATH when looking for bin2c
Issue #105.
2021-02-17 13:53:11 -08:00
Matt Pharr
9149213527 CMakeLists.txt: find bin2c in the CUDA compiler binary directory.
Apparently Manjaro Linux ships with an unrelated /usr/bin/bin2c.

Issue #105.
2021-02-17 13:51:07 -08:00