---
title: "SD0108: an error code of the TypeShade compiler"
description: "SD0108, an error code of the TypeShade compiler. smoothstep with constant edge0 >= edge1 (undefined in GLSL ES)"
url: https://typeshade.dev/reference/errors/sd0108/
language: en
---

# `SD0108`

Core code

smoothstep with constant edge0 >= edge1 (undefined in GLSL ES)

The registry text and every compiler message on these pages are the compiler's own English.

## Example

example.shade.ts

```ts
"use typeshade"

@fragment
export function main(uv: location<0, vec2>): vec4 {
  const g = smoothstep(0.8, 0.2, uv.x)
  return vec4(g, g, g, 1.)
}
```

`compile()` does not run the lint rules. `diagnose()` from `typeshade/dev` does, on the module `compile()` returns, and reports:

**SD0108** warning: `smoothstep(0.8, 0.2, …)` in fn 'main' — edge0 >= edge1 is undefined in GLSL ES

## How to fix it

The registry's hint: write 1 − `smoothstep(lo, hi, x)` instead of reversing the edges

The same program, corrected. It compiles with no diagnostic, and `diagnose()` no longer reports the code.

example.shade.ts

```ts
"use typeshade"

@fragment
export function main(uv: location<0, vec2>): vec4 {
  const g = 1. - smoothstep(0.2, 0.8, uv.x)
  return vec4(g, g, g, 1.)
}
```

## See also

- [Diagnostics](https://typeshade.dev/guide/internals/diagnostics/)
- [`TypeShadeError`](https://typeshade.dev/api/typeshadeerror/)
- [Error codes](https://typeshade.dev/reference/errors/)

## Source

Where the compiler raises this code at commit af54ddad5, one line per file:

- [`src/core/passes/lint/rules/smoothstep-edge-order.ts:35`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/passes/lint/rules/smoothstep-edge-order.ts#L35)
