Hi,

Does anyone know what the Negate algorithm is doing in the Composite TOP? I’m trying to implement it inside of a pixel shader, and not quite sure what math it’s using.

Thanks

Hi,

Does anyone know what the Negate algorithm is doing in the Composite TOP? I’m trying to implement it inside of a pixel shader, and not quite sure what math it’s using.

Thanks

I don’t know if this is how the Negate mode works in Composite TOP, but I think the general equation for negation is as follows:

```
Pseudocode based on Jitter negation shader:
texture a = input[0];
texture b = input[1];
output = 1 - abs(1 - a - b);
```

Cool, thanks. I’ll try it out.