#if UNITY_EDITOR using UnityEditor; #endif namespace UnityEngine.Rendering.UnifiedRayTracing { internal class RayTracingResources { public ComputeShader geometryPoolKernels; public ComputeShader copyBuffer; public Shader hardwareRayTracingMaterial; public ComputeShader copyPositions; public ComputeShader bitHistogram; public ComputeShader blockReducePart; public ComputeShader blockScan; public ComputeShader buildHlbvh; public ComputeShader reorderTriangleIndices; public ComputeShader restructureBvh; public ComputeShader scatter; public ComputeShader topLevelIntersector; public ComputeShader intersector; #if UNITY_EDITOR public void Load() { const string path = "Packages/com.unity.rendering.light-transport/Runtime/"; geometryPoolKernels = AssetDatabase.LoadAssetAtPath(path + "UnifiedRayTracing/Common/GeometryPool/GeometryPoolKernels.compute"); copyBuffer = AssetDatabase.LoadAssetAtPath(path + "UnifiedRayTracing/Common/Utilities/CopyBuffer.compute"); hardwareRayTracingMaterial = AssetDatabase.LoadAssetAtPath(path + "UnifiedRayTracing/Hardware/HWRayTracingMaterial.shader"); copyPositions = AssetDatabase.LoadAssetAtPath(path + "UnifiedRayTracing/Compute/RadeonRays/kernels/copyPositions.compute"); bitHistogram = AssetDatabase.LoadAssetAtPath(path + "UnifiedRayTracing/Compute/RadeonRays/kernels/bit_histogram.compute"); blockReducePart = AssetDatabase.LoadAssetAtPath(path + "UnifiedRayTracing/Compute/RadeonRays/kernels/block_reduce_part.compute"); blockScan = AssetDatabase.LoadAssetAtPath(path + "UnifiedRayTracing/Compute/RadeonRays/kernels/block_scan.compute"); buildHlbvh = AssetDatabase.LoadAssetAtPath(path + "UnifiedRayTracing/Compute/RadeonRays/kernels/build_hlbvh.compute"); reorderTriangleIndices = AssetDatabase.LoadAssetAtPath(path + "UnifiedRayTracing/Compute/RadeonRays/kernels/reorder_triangle_indices.compute"); restructureBvh = AssetDatabase.LoadAssetAtPath(path + "UnifiedRayTracing/Compute/RadeonRays/kernels/restructure_bvh.compute"); scatter = AssetDatabase.LoadAssetAtPath(path + "UnifiedRayTracing/Compute/RadeonRays/kernels/scatter.compute"); topLevelIntersector = AssetDatabase.LoadAssetAtPath(path + "UnifiedRayTracing/Compute/RadeonRays/kernels/top_level_intersector.compute"); intersector = AssetDatabase.LoadAssetAtPath(path + "UnifiedRayTracing/Compute/RadeonRays/kernels/intersector.compute"); } #endif } }