Constructor MeshToSDFBaker
MeshToSDFBaker(Vector3, Vector3, int, Mesh, int, float, float, CommandBuffer)
Constructor of the class MeshToSDFBaker.
Declaration
public MeshToSDFBaker(Vector3 sizeBox, Vector3 center, int maxRes, Mesh mesh, int signPassesCount = 1, float threshold = 0.5, float sdfOffset = 0, CommandBuffer cmd = null)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | sizeBox | The desired size of the baking box. |
Vector3 | center | The center of the baking box. |
int | maxRes | The resolution along the largest dimension. |
Mesh | mesh | The Mesh to be baked into an SDF. |
int | signPassesCount | The number of refinement passes on the sign of the SDF. This should stay below 20. |
float | threshold | The threshold controlling which voxels will be considered inside or outside of the surface. |
float | sdfOffset | The Offset to add to the SDF. It can be used to make the SDF more bulky or skinny. |
Command |
cmd | The CommandBuffer on which the baking process will be added. |
MeshToSDFBaker(Vector3, Vector3, int, List<Mesh>, List<Matrix4x4>, int, float, float, CommandBuffer)
Constructor of the class MeshToSDFBaker.
Declaration
public MeshToSDFBaker(Vector3 sizeBox, Vector3 center, int maxRes, List<Mesh> meshes, List<Matrix4x4> transforms, int signPassesCount = 1, float threshold = 0.5, float sdfOffset = 0, CommandBuffer cmd = null)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | sizeBox | The desired size of the baking box |
Vector3 | center | The center of the baking box. |
int | maxRes | The resolution along the largest dimension. |
List<Mesh> | meshes | The list of meshes to be baked into an SDF. |
List<Matrix4x4> | transforms | The list of transforms of the meshes. |
int | signPassesCount | The number of refinement passes on the sign of the SDF. This should stay below 20. |
float | threshold | The threshold controlling which voxels will be considered inside or outside of the surface. |
float | sdfOffset | The Offset to add to the SDF. It can be used to make the SDF more bulky or skinny. |
Command |
cmd | The CommandBuffer on which the baking process will be added. |