> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# D3D12_RAYTRACING_INSTANCE_FLAGS (XBOX Series consoles)

> Flags for a raytracing acceleration structure instance. These flags can be used to override D3D12_RAYTRACING_GEOMETRY_FLAGS for individual instances.

Flags for a raytracing acceleration structure instance. These flags can be used to override [D3D12\_RAYTRACING\_GEOMETRY\_FLAGS](/reference/graphics/d3d12/enums/d3d12_raytracing_geometry_flags_public) for individual instances.

## Syntax

```cpp theme={null}
typedef enum D3D12_RAYTRACING_INSTANCE_FLAGS
{
    D3D12_RAYTRACING_INSTANCE_FLAG_NONE = 0,
    D3D12_RAYTRACING_INSTANCE_FLAG_TRIANGLE_CULL_DISABLE = 1,
    D3D12_RAYTRACING_INSTANCE_FLAG_TRIANGLE_FRONT_COUNTERCLOCKWISE = 2,
    D3D12_RAYTRACING_INSTANCE_FLAG_FORCE_OPAQUE = 4,
    D3D12_RAYTRACING_INSTANCE_FLAG_FORCE_NON_OPAQUE = 8
} D3D12_RAYTRACING_INSTANCE_FLAGS
```

## Constants

| Constant                                                             | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| D3D12\_RAYTRACING\_INSTANCE\_FLAG\_NONE                              | No options specified.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| D3D12\_RAYTRACING\_INSTANCE\_FLAG\_TRIANGLE\_CULL\_DISABLE           | Disables front/back face culling for this instance.  The Ray flags **RAY\_FLAG\_CULL\_BACK\_FACING\_TRIANGLES** and **RAY\_FLAG\_CULL\_FRONT\_FACING\_TRIANGLES** will have no effect on this instance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| D3D12\_RAYTRACING\_INSTANCE\_FLAG\_TRIANGLE\_FRONT\_COUNTERCLOCKWISE | This flag reverses front and back facings, which is useful if the application's natural winding order differs from the default. By default, a triangle is front facing if its vertices appear clockwise from the ray origin and back facing if its vertices appear counter-clockwise from the ray origin, in object space in a left-handed coordinate system.  Since these winding direction rules are defined in object space, they are unaffected by instance transforms.  For example, an instance transform matrix with negative determinant (e.g. mirroring some geometry) does not change the facing of the triangles within the instance.  Per-geometry transforms defined in [D3D12\_RAYTRACING\_GEOMETRY\_TRIANGLES\_DESC](/reference/graphics/d3d12/structs/d3d12_raytracing_geometry_triangles_desc_public) ,  by contrast,  get combined with the associated vertex data in object space, so a negative determinant matrix there does flip triangle winding. |
| D3D12\_RAYTRACING\_INSTANCE\_FLAG\_FORCE\_OPAQUE                     | The instance will act as if   [D3D12\_RAYTRACING\_GEOMETRY\_FLAG\_OPAQUE](/reference/graphics/d3d12/enums/d3d12_raytracing_geometry_flags_public) had been specified for all the geometries in the bottom-level acceleration structure referenced by the instance.  Note that this behavior can be overridden by the ray flag **RAY\_FLAG\_FORCE\_NON\_OPAQUE**.  This flag is mutually exclusive to the **D3D12\_RAYTRACING\_INSTANCE\_FLAG\_FORCE\_NON\_OPAQUE** flag.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| D3D12\_RAYTRACING\_INSTANCE\_FLAG\_FORCE\_NON\_OPAQUE                | The instance will act as if [D3D12\_RAYTRACING\_GEOMETRY\_FLAG\_OPAQUE](/reference/graphics/d3d12/enums/d3d12_raytracing_geometry_flags_public) had not been specified for any of the geometries in the bottom-level acceleration structure referenced by the instance. Note that this behavior can be overridden by the ray flag **RAY\_FLAG\_FORCE\_OPAQUE**.  This flag is mutually exclusive to the **D3D12\_RAYTRACING\_INSTANCE\_FLAG\_FORCE\_OPAQUE** flag.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |

## Requirements

**Header:** d3d12\_xs.h\
**Library:** d3d12\_xs.lib\
**Supported Platforms**: XBOX Series consoles


## Related topics

- [D3D12_RAYTRACING_GEOMETRY_FLAGS (XBOX Series consoles)](/reference/graphics/d3d12/enums/d3d12_raytracing_geometry_flags_public.md)
- [D3D12_RAYTRACING_INSTANCE_DESC (XBOX Series consoles)](/reference/graphics/d3d12/structs/d3d12_raytracing_instance_desc_public.md)
- [D3D12_RAYTRACING_PIPELINE_FLAGS (XBOX Series consoles)](/reference/graphics/d3d12/enums/d3d12_raytracing_pipeline_flags_public.md)
- [D3D12_RAYTRACING_GEOMETRY_DESC (XBOX Series consoles)](/reference/graphics/d3d12/structs/d3d12_raytracing_geometry_desc_public.md)
- [D3D12_RAYTRACING_PIPELINE_CONFIG1 (XBOX Series consoles)](/reference/graphics/d3d12/structs/d3d12_raytracing_pipeline_config1_public.md)
