# SetComputeParamsFromMaterial(ComputeShader, int, Material)

> Sets the parameters for a compute shader kernel from a Material.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Rendering](/engine/6000.5/script-reference/unityengine/rendering.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public void SetComputeParamsFromMaterial(ComputeShader computeShader, int kernelIndex, Material material)
```

### Parameters

**** (\[ComputeShader]\(/engine/6000.5/script-reference/unityengine/computeshader)): The [ComputeShader](/engine/6000.5/script-reference/unityengine/computeshader.md) to set parameters for.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The index of the kernel to set the material parameters. See [ComputeShader.FindKernel](/engine/6000.5/script-reference/unityengine/computeshader/findkernel.md).**** (\[Material]\(/engine/6000.5/script-reference/unityengine/material)): The material to set the compute parameters.

### Remarks

Use this function to copy over the properties of a material into a compute shader kernel.
