# SetRayTracingIntParam

> Adds a command to set an integer parameter on a RayTracingShader.

## Definition

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

## SetRayTracingIntParam(RayTracingShader, string, int)

Adds a command to set an integer parameter on a [RayTracingShader](/engine/6000.6/script-reference/unityengine/rendering/raytracingshader.md).

```csharp
public void SetRayTracingIntParam(RayTracingShader rayTracingShader, string name, int val)
```

### Parameters

**** (\[RayTracingShader]\(/engine/6000.6/script-reference/unityengine/rendering/raytracingshader)): [RayTracingShader](/engine/6000.6/script-reference/unityengine/rendering/raytracingshader.md) to set parameter for.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Name of the variable in shader code.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Value to set.

### Remarks

Only shaders defined in the .raytrace file can access the int value you designate as the argument for this method. To make this int value accessible to all ray tracing shader types (closest hit, any hit, or miss, for example), call the [CommandBuffer.SetGlobalInt](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobalint.md) method instead.

## SetRayTracingIntParam(RayTracingShader, int, int)

Adds a command to set an integer parameter on a [RayTracingShader](/engine/6000.6/script-reference/unityengine/rendering/raytracingshader.md).

```csharp
public void SetRayTracingIntParam(RayTracingShader rayTracingShader, int nameID, int val)
```

### Parameters

**** (\[RayTracingShader]\(/engine/6000.6/script-reference/unityengine/rendering/raytracingshader)): [RayTracingShader](/engine/6000.6/script-reference/unityengine/rendering/raytracingshader.md) to set parameter for.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Property name ID. Use [Shader.PropertyToID](/engine/6000.6/script-reference/unityengine/shader/propertytoid.md) to get this ID.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Value to set.

### Remarks

Only shaders defined in the .raytrace file can access the int value you designate as the argument for this method. To make this int value accessible to all ray tracing shader types (closest hit, any hit, or miss, for example), call the [CommandBuffer.SetGlobalInt](/engine/6000.6/script-reference/unityengine/rendering/commandbuffer/setglobalint.md) method instead.
