docs.unity3d.com
    Show / Hide Table of Contents

    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.

    Inheritance
    Object
    SceneSampler
    PathtraceSampler
    Inherited Members
    SceneSampler._camera
    SceneSampler._outputTexture
    SceneSampler._customPassesDesc
    SceneSampler._samplingRequestCallback
    SceneSampler._isSamplingRequested
    SceneSampler._sensorDesc
    SceneSampler._samplerDesc
    SceneSampler.Release()
    SceneSampler.AsyncSampleScene(Action<CustomPassContext, RenderTexture>)
    SceneSampler.SubscribeEventHandlers()
    SceneSampler.UnsubscribeEventHandlers()
    SceneSampler.OnExposureTimeChanged(Single, Single)
    SceneSampler.OnGainChanged(Single, Single)
    SceneSampler.InternalRelease()
    SceneSampler.CreateCustomPass(CustomPassInjectionPoint, CustomPassCallback.ExecuteCustomPassAction<CustomPassContext>)
    SceneSampler.OnCameraSamplingCompleted(CustomPassContext)
    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.

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023