Class PathtraceSampler
Implements a way to sample the scene using the Unity path tracing camera. This is not realtime sampling, so a frame is produced over several frames of simulation.
Inherited Members
Namespace: Mechatronics.SensorSDK
Syntax
public class PathtraceSampler : SceneSampler
Constructors
PathtraceSampler(GameObject, IPhotosensorArrayDescription, SceneSamplerDesc)
Constructs a sampler that uses the path tracing camera.
Declaration
public PathtraceSampler(GameObject parent, IPhotosensorArrayDescription sensorDesc, SceneSamplerDesc samplerDesc)
Parameters
Type | Name | Description |
---|---|---|
GameObject | parent | The GameObject that corresponds to the utilized component. Instantiates a Unity camera to execute the sampling. |
IPhotosensorArrayDescription | sensorDesc | Information defined on the photosensor array node. |
SceneSamplerDesc | samplerDesc | Extra parameters for the sampler. |
Methods
OverrideRayGenerationShader(RayTracingShader, HDCamera.PrepareDispatchRaysAction<CommandBuffer>)
Use to override the unity camera shader that generate the rays to sample the scene.
Declaration
public void OverrideRayGenerationShader(RayTracingShader shader, HDCamera.PrepareDispatchRaysAction<CommandBuffer> prepareDispatchRaysCallback)
Parameters
Type | Name | Description |
---|---|---|
RayTracingShader | shader | Shader to use when dispatching ray to render the simulation. |
UnityEngine.Rendering.HighDefinition.HDCamera.PrepareDispatchRaysAction<CommandBuffer> | prepareDispatchRaysCallback | Callback function to invoke just before dispatching rays. |
SetPathtracingParameters(UInt32, UInt32, UInt32, Single)
Defines the number of rays, bounces, and intensity cap when defining the color of a pixel.
Declaration
public void SetPathtracingParameters(uint maximumSamples, uint minimumDepth, uint maximumDepth, float maximumIntensity)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | maximumSamples | The number of rays that should be cast. |
UInt32 | minimumDepth | Minimal amount of bounces a ray should do before stopping. |
UInt32 | maximumDepth | Maximal amount of bounces a ray should do before stopping. |
Single | maximumIntensity | Maximal intensity of a pixel. |