docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class RayTracingResources

    Utility shaders needed by a RayTracingContext to operate.

    Inheritance
    object
    RayTracingResources
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering.UnifiedRayTracing
    Assembly: Unity.UnifiedRayTracing.Runtime.dll
    Syntax
    public class RayTracingResources
    Remarks

    This class holds compute shaders required for unified ray tracing operations, including geometry pool management and BVH construction kernels.

    Properties

    bitHistogram

    Compute shader for radix sort operations.

    Declaration
    public ComputeShader bitHistogram { get; set; }
    Property Value
    Type Description
    ComputeShader

    blockReducePart

    Compute shader for prefix sum operations.

    Declaration
    public ComputeShader blockReducePart { get; set; }
    Property Value
    Type Description
    ComputeShader

    blockScan

    Compute shader for prefix sum operations.

    Declaration
    public ComputeShader blockScan { get; set; }
    Property Value
    Type Description
    ComputeShader

    buildHlbvh

    Compute shader for building a BVH.

    Declaration
    public ComputeShader buildHlbvh { get; set; }
    Property Value
    Type Description
    ComputeShader

    copyBuffer

    Compute shader for buffer copy operations.

    Declaration
    public ComputeShader copyBuffer { get; set; }
    Property Value
    Type Description
    ComputeShader

    copyPositions

    Compute shader for copying vertex position data.

    Declaration
    public ComputeShader copyPositions { get; set; }
    Property Value
    Type Description
    ComputeShader

    geometryPoolKernels

    Compute shader for geometry pool operations.

    Declaration
    public ComputeShader geometryPoolKernels { get; set; }
    Property Value
    Type Description
    ComputeShader

    restructureBvh

    Compute shader for BVH restructuring.

    Declaration
    public ComputeShader restructureBvh { get; set; }
    Property Value
    Type Description
    ComputeShader
    Remarks

    Used to optimize the BVH structure after initial construction.

    scatter

    Compute shader for radix sort operations.

    Declaration
    public ComputeShader scatter { get; set; }
    Property Value
    Type Description
    ComputeShader

    Methods

    Load()

    Intializes the RayTracingResources.

    Declaration
    public void Load()
    Remarks

    This API works only in the Unity Editor, not at runtime.

    LoadFromAssetBundle(AssetBundle)

    Intializes the RayTracingResources by loading its utility shaders from an AssetBundle.

    Declaration
    public void LoadFromAssetBundle(AssetBundle assetBundle)
    Parameters
    Type Name Description
    AssetBundle assetBundle

    The AssetBundle to load the shaders from.

    Remarks

    The necessary shaders are configured to belong to the unifiedraytracing AssetBundle which can be built by calling BuildAssetBundles(string, BuildAssetBundleOptions, BuildTarget)

    LoadFromRenderPipelineResources()

    Intializes the RayTracingResources by loading its utility shaders via GraphicsSettings.

    Declaration
    public bool LoadFromRenderPipelineResources()
    Returns
    Type Description
    bool

    Whether the resources were successfully loaded.

    Remarks

    This method only works in projects that use Scriptable Render Pipeline.

    Extension Methods

    ReflectionUtils.GetField(object, string)
    ReflectionUtils.GetFields(object)
    ReflectionUtils.Invoke(object, string, params object[])
    ReflectionUtils.SetField(object, string, object)
    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, T)
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)