# Xui.GPU.Backends

Assembly: **Xui.Core** · [C# declarations](index.cs) · [Assembly overview](../index.md)

## Types

- [`interface IShaderBackend`](#api-854224ac2d58c33e)

<a id="api-854224ac2d58c33e"></a>

## `interface IShaderBackend`

Base interface for shader backend code generators.

```csharp
public interface IShaderBackend
{
    string Name { get; }

    string GenerateCode(IR.IrShaderModule module);
}
```

<a id="api-3921b1dd688a523e"></a>

### [`string IShaderBackend.GenerateCode(IrShaderModule module)`](#api-3921b1dd688a523e)


```csharp
string GenerateCode(IR.IrShaderModule module);
```

Generates shader code from the IR module.

- **`module`** — The IR module to generate code from.

**Returns:** The generated shader code as a string.

<a id="api-cfa07d61c4224586"></a>

### [`string IShaderBackend.Name`](#api-cfa07d61c4224586)


```csharp
string Name { get; }
```

Gets the name of this backend (e.g., &quot;HLSL&quot;, &quot;MSL&quot;, &quot;GLSL&quot;).

