For those who, like myself, wish to make shaders that work in both DS3 and DS4, it seems the DS4 IF-brick causes problems in DS3. But an IF brick can be simulated, or even surpassed, by stacking MIX-bricks. For a two-option IF, use one MIX brick and plug in the values as follows:

```
If == Alpha
```

Value == Layer

Else == Base

For each added variable, stack another MIX on board, plugging in the previous output into the next base, as follows:

```
If == Alpha (MIX 1)
```

Value == Layer (MIX 1)

...

Else If {n} == Alpha (MIX n+1)

*Plug Mixed Result n into Base (MIX n+1)*

Value {n+1} == Layer (MIX n+1)

...

Else == Base (MIX 1)

I’ll follow up sometime with the recipe for a looping multi-value blend switch.

Click thumbnail to see full-size image