# RayTracingInstanceMaterialConfig

> This structure is used by RayTracingAccelerationStructure.CullInstances function to determine which types of Materials are used by Renderers when populating the acceleration structure with ray tracing instances.

## Definition

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

```csharp
public struct RayTracingInstanceMaterialConfig
```

## Remarks

[RayTracingAccelerationStructure.CullInstances](/engine/6000.6/script-reference/unityengine/rendering/raytracingaccelerationstructure/cullinstances.md) function can ignore Renderers or sub-meshes that use different types of Materials as defined by this configuration. [RayTracingInstanceCullingConfig](/engine/6000.6/script-reference/unityengine/rendering/raytracinginstancecullingconfig.md) parameter contains one Material configuration for alpha tested Materials and one for transparent Materials. If a Material is not classified as transparent or alpha tested then is considered being opaque.

The Material type is defined by testing one of the following properties:

* The render queue value used by the Shader or the one overriden by the Material using the Shader (see [Shader.renderQueue](/engine/6000.6/script-reference/unityengine/shader/renderqueue.md) and [Material.renderQueue](/engine/6000.6/script-reference/unityengine/material/renderqueue.md)). The value of the render queue has to be between renderQueueLowerBound and renderQueueUpperBound interval including these two values.
* An optional [Shader Tag](/engine/6000.6/manual/materials-and-shaders/shaders/reference/sl-reference/sl-sub-shader-object/tags.md)  (e.g. Tags \{ "RenderType"="Transparent" }). The Shader used by a Material has to contain a Shader Tag from optionalShaderTags array.
* An optional [Shader Keyword](/engine/6000.6/manual/materials-and-shaders/shaders/writing-custom/shader-writing/sl-multiple-program-variants/shader-keywords.md) (e.g. #pragma shader\_feature\_local \_ALPHATEST\_ON). A Shader Keyword from optionalShaderKeywords array has to be enabled at the time when [RayTracingAccelerationStructure.CullInstances](/engine/6000.6/script-reference/unityengine/rendering/raytracingaccelerationstructure/cullinstances.md) is called.

Additional Resources: [RayTracingInstanceCullingTest](/engine/6000.6/script-reference/unityengine/rendering/raytracinginstancecullingtest.md), [RayTracingAccelerationStructure](/engine/6000.6/script-reference/unityengine/rendering/raytracingaccelerationstructure.md).

## Fields

| Value                                                                                                                                      | Description                                                           |
| ------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| [optionalShaderKeywords](/engine/6000.6/script-reference/unityengine/rendering/raytracinginstancematerialconfig/optionalshaderkeywords.md) | An array of Shader Keyword names used to determine the Material type. |
| [optionalShaderTags](/engine/6000.6/script-reference/unityengine/rendering/raytracinginstancematerialconfig/optionalshadertags.md)         | An array of Shader Tags used to determine the Material type.          |
| [renderQueueLowerBound](/engine/6000.6/script-reference/unityengine/rendering/raytracinginstancematerialconfig/renderqueuelowerbound.md)   | The lower limit of a render queue interval.                           |
| [renderQueueUpperBound](/engine/6000.6/script-reference/unityengine/rendering/raytracinginstancematerialconfig/renderqueueupperbound.md)   | The upper limit of a render queue interval.                           |
