Skip to content

Commit

Permalink
Add silhouette_sampling_weight documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
njroussel committed Dec 8, 2023
1 parent adf3005 commit b5207a2
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/shapes/bsplinecurve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ B-spline curve (:monosp:`bsplinecurve`)
-------------------------------------------------
.. pluginparameters::
:extra-rows: 2
:extra-rows: 3
* - filename
- |string|
Expand All @@ -39,6 +39,11 @@ B-spline curve (:monosp:`bsplinecurve`)
- Specifies a linear object-to-world transformation. Note that the control
points' raddii are invariant to this transformation!
* - silhouette_sampling_weight
- |float|
- Weight associated with this shape when sampling silhoeuttes in the scene. (Default: 1)
- |exposed|
* - control_point_count
- |int|
- Total number of control points
Expand Down
5 changes: 5 additions & 0 deletions src/shapes/cylinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ Cylinder (:monosp:`cylinder`)
not permitted! (Default: none, i.e. object space = world space)
- |exposed|, |differentiable|, |discontinuous|
* - silhouette_sampling_weight
- |float|
- Weight associated with this shape when sampling silhoeuttes in the scene. (Default: 1)
- |exposed|
.. subfigstart::
.. subfigure:: ../../resources/data/docs/images/render/shape_cylinder_onesided.jpg
:caption: Cylinder with the default one-sided shading
Expand Down
5 changes: 5 additions & 0 deletions src/shapes/disk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ Disk (:monosp:`disk`)
permitted! (Default: none, i.e. object space = world space)
- |exposed|, |differentiable|, |discontinuous|
* - silhouette_sampling_weight
- |float|
- Weight associated with this shape when sampling silhoeuttes in the scene. (Default: 1)
- |exposed|
.. subfigstart::
.. subfigure:: ../../resources/data/docs/images/render/shape_disk.jpg
:caption: Basic example
Expand Down
5 changes: 5 additions & 0 deletions src/shapes/rectangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ Rectangle (:monosp:`rectangle`)
- Specifies a linear object-to-world transformation. (Default: none (i.e. object space = world space))
- |exposed|, |differentiable|, |discontinuous|
* - silhouette_sampling_weight
- |float|
- Weight associated with this shape when sampling silhoeuttes in the scene. (Default: 1)
- |exposed|
.. subfigstart::
.. subfigure:: ../../resources/data/docs/images/render/shape_rectangle.jpg
:caption: Basic example
Expand Down
4 changes: 2 additions & 2 deletions src/shapes/sdfgrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ class SDFGrid final : public Shape<Float, Spectrum> {

void traverse(TraversalCallback *callback) override {
Base::traverse(callback);
callback->put_parameter("to_world", *m_to_world.ptr(), ParamFlags::Differentiable | ParamFlags::Discontinuous);
callback->put_parameter("grid", m_grid_texture.tensor(), ParamFlags::Differentiable | ParamFlags::Discontinuous);
callback->put_parameter("to_world", *m_to_world.ptr(), +ParamFlags::NonDifferentiable);
callback->put_parameter("grid", m_grid_texture.tensor(), +ParamFlags::NonDifferentiable);
callback->put_parameter("watertight", m_watertight, +ParamFlags::NonDifferentiable);
}

Expand Down
5 changes: 5 additions & 0 deletions src/shapes/sphere.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ Sphere (:monosp:`sphere`)
(Default: none, i.e. object space = world space)
- |exposed|, |differentiable|, |discontinuous|
* - silhouette_sampling_weight
- |float|
- Weight associated with this shape when sampling silhoeuttes in the scene. (Default: 1)
- |exposed|
.. subfigstart::
.. subfigure:: ../../resources/data/docs/images/render/shape_sphere_basic.jpg
:caption: Basic example
Expand Down

0 comments on commit b5207a2

Please sign in to comment.