# sm.render.setFog

Sets the fog override settings.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
sm.render.setFog(
    startDistance,
    endDistance,
    falloffFactor,
    startColor,
    endColor,
    verticalOpacity,
    verticalFadeDistance,
    verticalFalloff,
    verticalStart,
    verticalEnd,
    verticalStartColor,
    verticalEndColor,
    fadeDistance
)
```

[Open the full Game reference](../Game-Script-Environment/Static-Functions/sm.render.md#setfog)

**Availability:** Client only

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `startDistance` | number | Fog start distance. |
| `endDistance` | number | Fog end distance. |
| `falloffFactor` | number | Fog falloff. |
| `startColor` | [Color](../Game-Script-Environment/Userdata/Color.md) | Fog start color. |
| `endColor` | [Color](../Game-Script-Environment/Userdata/Color.md) | Fog end color. |
| `verticalOpacity` | number | Vertical fog opacity. (Optional) |
| `verticalFadeDistance` | number | Vertical fog fade distance. (Optional) |
| `verticalFalloff` | number | Vertical fog falloff. (Optional) |
| `verticalStart` | number | Vertical fog start distance. (Optional) |
| `verticalEnd` | number | Vertical fog end distance. (Optional) |
| `verticalStartColor` | [Color](../Game-Script-Environment/Userdata/Color.md) | Vertical fog start color. (Optional) |
| `verticalEndColor` | [Color](../Game-Script-Environment/Userdata/Color.md) | Vertical fog end color. (Optional) |
| `fadeDistance` | number | Fog fade distance. (Optional) |
