Version: 2019.4
LanguageEnglish
  • C#
Experimental: this API is experimental and might be changed or removed in the future.

RayTracingShader.Dispatch

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public void Dispatch(string rayGenFunctionName, int width, int height, int depth, Camera camera);

Parameters

rayGenFunctionName The function name of this RayTracingShader's raygeneration shader.
width The number of rays cast per row of dispatch.
height The number of rays cast per height of dispatch.
depth The number of layers cast, where each layer consists of a number of rays given by width * height.
camera The camera from which the rays should be cast.

Description

Dispatches this RayTracingShader.

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