diff options
author | Patrick Mours <pmours@nvidia.com> | 2022-03-23 18:07:43 +0300 |
---|---|---|
committer | Patrick Mours <pmours@nvidia.com> | 2022-03-23 18:39:05 +0300 |
commit | d350976ba06d4ef93aa53fc4cd9da57be46ae924 (patch) | |
tree | 808f38e6b0c663c7a50f1d98619c96ca0bd82018 /intern/cycles/scene | |
parent | 827e9ccb29dd50d155972444d608c35cf4698d6a (diff) |
Cycles: Add Hydra render delegate
This patch adds a Hydra render delegate to Cycles, allowing Cycles to be used for rendering
in applications that provide a Hydra viewport. The implementation was written from scratch
against Cycles X, for integration into the Blender repository to make it possible to continue
developing it in step with the rest of Cycles. For this purpose it follows the style of the rest of
the Cycles code and can be built with a CMake option
(`WITH_CYCLES_HYDRA_RENDER_DELEGATE=1`) similar to the existing standalone version
of Cycles.
Since Hydra render delegates need to be built against the exact USD version and other
dependencies as the target application is using, this is intended to be built separate from
Blender (`WITH_BLENDER=0` CMake option) and with support for library versions different
from what Blender is using. As such the CMake build scripts for Windows had to be modified
slightly, so that the Cycles Hydra render delegate can e.g. be built with MSVC 2017 again
even though Blender requires MSVC 2019 now, and it's possible to specify custom paths to
the USD SDK etc. The codebase supports building against the latest USD release 22.03 and all
the way back to USD 20.08 (with some limitations).
Reviewed By: brecht, LazyDodo
Differential Revision: https://developer.blender.org/D14398
Diffstat (limited to 'intern/cycles/scene')
-rw-r--r-- | intern/cycles/scene/integrator.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/scene/mesh.cpp | 8 | ||||
-rw-r--r-- | intern/cycles/scene/mesh.h | 2 |
3 files changed, 5 insertions, 7 deletions
diff --git a/intern/cycles/scene/integrator.cpp b/intern/cycles/scene/integrator.cpp index 64c95538f82..755fbb9542b 100644 --- a/intern/cycles/scene/integrator.cpp +++ b/intern/cycles/scene/integrator.cpp @@ -110,7 +110,7 @@ NODE_DEFINE(Integrator) SOCKET_BOOLEAN(use_denoise_pass_albedo, "Use Albedo Pass for Denoiser", true); SOCKET_BOOLEAN(use_denoise_pass_normal, "Use Normal Pass for Denoiser", true); SOCKET_ENUM( - denoiser_prefilter, "Denoiser Type", denoiser_prefilter_enum, DENOISER_PREFILTER_ACCURATE); + denoiser_prefilter, "Denoiser Prefilter", denoiser_prefilter_enum, DENOISER_PREFILTER_ACCURATE); return type; } diff --git a/intern/cycles/scene/mesh.cpp b/intern/cycles/scene/mesh.cpp index a459195efee..05024a7790e 100644 --- a/intern/cycles/scene/mesh.cpp +++ b/intern/cycles/scene/mesh.cpp @@ -142,8 +142,8 @@ NODE_DEFINE(Mesh) SOCKET_INT(num_ngons, "NGons Number", 0); /* Subdivisions parameters */ - SOCKET_FLOAT(subd_dicing_rate, "Subdivision Dicing Rate", 0.0f) - SOCKET_INT(subd_max_level, "Subdivision Dicing Rate", 0); + SOCKET_FLOAT(subd_dicing_rate, "Subdivision Dicing Rate", 1.0f) + SOCKET_INT(subd_max_level, "Max Subdivision Level", 1); SOCKET_TRANSFORM(subd_objecttoworld, "Subdivision Object Transform", transform_identity()); return type; @@ -357,7 +357,7 @@ void Mesh::add_triangle(int v0, int v1, int v2, int shader_, bool smooth_) } } -void Mesh::add_subd_face(int *corners, int num_corners, int shader_, bool smooth_) +void Mesh::add_subd_face(const int *corners, int num_corners, int shader_, bool smooth_) { int start_corner = subd_face_corners.size(); @@ -411,8 +411,6 @@ void Mesh::add_edge_crease(int v0, int v1, float weight) void Mesh::add_vertex_crease(int v, float weight) { - assert(v < verts.size()); - subd_vert_creases.push_back_slow(v); subd_vert_creases_weight.push_back_slow(weight); diff --git a/intern/cycles/scene/mesh.h b/intern/cycles/scene/mesh.h index 4e6991a3960..a09f192d969 100644 --- a/intern/cycles/scene/mesh.h +++ b/intern/cycles/scene/mesh.h @@ -199,7 +199,7 @@ class Mesh : public Geometry { void add_vertex(float3 P); void add_vertex_slow(float3 P); void add_triangle(int v0, int v1, int v2, int shader, bool smooth); - void add_subd_face(int *corners, int num_corners, int shader_, bool smooth_); + void add_subd_face(const int *corners, int num_corners, int shader_, bool smooth_); void add_edge_crease(int v0, int v1, float weight); void add_vertex_crease(int v, float weight); |