Version: 2020.1
Experimental: this API is experimental and might be changed or removed in the future.

RayTracingShader.Dispatch

切换到手册
public void Dispatch (string rayGenFunctionName, int width, int height, int depth, Camera camera);

参数

rayGenFunctionName RayTracingShader 的射线生成着色器的函数名称。
width 分发的每行投射的射线数。
height 分发的每高度投射的射线数。
depth 投射的层数,其中每一层均由宽度 * 高度给定的大量射线组成。
camera An optional parameter used to setup camera related shader parameters (e.g. unity_WorldToCamera, unity_CameraToWorld, unity_CameraProjection, etc.). These values are visible globally in all ray tracing shader types.

描述

分发 RayTracingShader

Calls the raygeneration shader for the given dimensions, and recurse as necessary up to the specified RayTracingShader.maxRecursionDepth.