From b8cd3678eec57b67c6904380adcf44aa813cb767 Mon Sep 17 00:00:00 2001 From: John Haddon Date: Thu, 8 Feb 2024 14:03:42 +0000 Subject: [PATCH 1/2] Cycles : Match `IOR` default values to Cycles 4.1 Patch taken from https://projects.blender.org/blender/blender/pulls/115770. --- Changes.md | 1 + Cycles/patches/iorDefaults.patch | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 Cycles/patches/iorDefaults.patch diff --git a/Changes.md b/Changes.md index 485bf0a6e2..88cea6da98 100644 --- a/Changes.md +++ b/Changes.md @@ -2,6 +2,7 @@ ------------- - Cortex : Updated to version 10.5.6.0. +- Cycles : Patched shader `IOR` values to default to 1.5. 8.0.0 alpha 4 (relative to 8.0.0 alpha 3) ------------- diff --git a/Cycles/patches/iorDefaults.patch b/Cycles/patches/iorDefaults.patch new file mode 100644 index 0000000000..3923cfcfb2 --- /dev/null +++ b/Cycles/patches/iorDefaults.patch @@ -0,0 +1,28 @@ +--- a/src/scene/shader_nodes.cpp ++++ b/src/scene/shader_nodes.cpp +@@ -2425,7 +2425,7 @@ NODE_DEFINE(GlassBsdfNode) + SOCKET_ENUM( + distribution, "Distribution", distribution_enum, CLOSURE_BSDF_MICROFACET_GGX_GLASS_ID); + SOCKET_IN_FLOAT(roughness, "Roughness", 0.0f); +- SOCKET_IN_FLOAT(IOR, "IOR", 0.3f); ++ SOCKET_IN_FLOAT(IOR, "IOR", 1.5f); + + SOCKET_OUT_CLOSURE(BSDF, "BSDF"); + +@@ -2623,7 +2623,7 @@ NODE_DEFINE(PrincipledBsdfNode) + SOCKET_IN_COLOR(base_color, "Base Color", make_float3(0.8f, 0.8f, 0.8f)) + SOCKET_IN_FLOAT(metallic, "Metallic", 0.0f); + SOCKET_IN_FLOAT(roughness, "Roughness", 0.5f); +- SOCKET_IN_FLOAT(ior, "IOR", 0.0f); ++ SOCKET_IN_FLOAT(ior, "IOR", 1.5f); + SOCKET_IN_FLOAT(alpha, "Alpha", 1.0f); + SOCKET_IN_NORMAL(normal, "Normal", zero_float3(), SocketType::LINK_NORMAL); + +@@ -5781,7 +5781,7 @@ NODE_DEFINE(FresnelNode) + + SOCKET_IN_NORMAL( + normal, "Normal", zero_float3(), SocketType::LINK_NORMAL | SocketType::OSL_INTERNAL); +- SOCKET_IN_FLOAT(IOR, "IOR", 1.45f); ++ SOCKET_IN_FLOAT(IOR, "IOR", 1.5f); + + SOCKET_OUT_FLOAT(fac, "Fac"); From 82621d2e66e10bdcfe23e642812a8a3e5b6a0226 Mon Sep 17 00:00:00 2001 From: John Haddon Date: Thu, 8 Feb 2024 16:39:25 +0000 Subject: [PATCH 2/2] Cycles : Enable CUDA and Optix builds The latter requires the `OPTIX_ROOT_DIR` environment variable to have been set in the build environment, but that is not our responsibility here. We want `GafferHQ/dependencies` to be as build-environment-agnostic as it can be, so other folks can use it to make their own builds in their own environments. --- Changes.md | 4 +++- Cycles/config.py | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Changes.md b/Changes.md index 88cea6da98..6e4e11f4af 100644 --- a/Changes.md +++ b/Changes.md @@ -2,7 +2,9 @@ ------------- - Cortex : Updated to version 10.5.6.0. -- Cycles : Patched shader `IOR` values to default to 1.5. +- Cycles : + - Patched shader `IOR` values to default to 1.5. + - Enabled CUDA and Optix devices. 8.0.0 alpha 4 (relative to 8.0.0 alpha 3) ------------- diff --git a/Cycles/config.py b/Cycles/config.py index 9ac39b51f4..989815f09a 100644 --- a/Cycles/config.py +++ b/Cycles/config.py @@ -22,9 +22,10 @@ " -D CMAKE_BUILD_TYPE=Release" " -D WITH_CYCLES_OPENIMAGEDENOISE=OFF" " -D WITH_CYCLES_PATH_GUIDING=ON" - " -D WITH_CYCLES_DEVICE_CUDA=OFF" + " -D WITH_CYCLES_CUDA_BINARIES=ON" + " -D WITH_CYCLES_DEVICE_CUDA=ON" " -D WITH_CYCLES_DEVICE_HIP=OFF" - " -D WITH_CYCLES_DEVICE_OPTIX=OFF" + " -D WITH_CYCLES_DEVICE_OPTIX=ON" " -D WITH_CYCLES_HYDRA_RENDER_DELEGATE=OFF" " -D CMAKE_POSITION_INDEPENDENT_CODE=ON" " -D WITH_CYCLES_USD=OFF"