Skip to content

It seems that dispatch need to take two arguments. May I know What should I write in the 2nd argument? #19

@john012343210

Description

@john012343210

// Dispatches this shader. Can be called from any thread
static void Dispatch(
FnameOfTheShader9DispatchParams Params,
TFunction<void(int OutputVal)> AsyncCallback
)
{
if (IsInRenderingThread()) {
DispatchRenderThread(GetImmediateCommandList_ForRenderCommand(), Params, AsyncCallback);
}else{
DispatchGameThread(Params, AsyncCallback);
}
}

// Params struct used to pass args to our compute shader
FnameOfTheShader9DispatchParams Params(1, 1, 1);

// Fill in your input parameters here
Params.X = 123;

// Executes the compute shader and blocks until complete. You can place outputs in the params struct
FnameOfTheShader9Interface::Dispatch(Params);

It seems that dispatch need to take two arguments. May I know What should I write in the 2nd argument?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions