---
title: Difference
framework: shadergraph
role: symbol
role_heading: ShaderGraph Node
path: shadergraph/compositing/difference
---

# Difference

Outputs the distance between foreground and background values.

## Overview

Overview abs(B - F) Parameter Types Parameter descriptions Discussion The Difference node subtracts two inputs and takes the absolute value of the result, represented by the equation abs(B - F). It uses the Mix input to determine the weight of the foreground in the blend. Higher values closer to 1 output a more intense difference, while lower values closer to 0 dim the effect. Below is an example of a node graph that uses the difference node to blend two images together into a single material:

Below are two images and the resulting blended texture applied to a cube.

## See Also

### Nodes

- [Premultiply](shadergraph/compositing/premultiply.md)
- [Unpremultiply](shadergraph/compositing/unpremultiply.md)
- [Additive Mix](shadergraph/compositing/additive-mix.md)
- [Subtractive Mix](shadergraph/compositing/subtractive-mix.md)
- [Burn](shadergraph/compositing/burn.md)
- [Dodge](shadergraph/compositing/dodge.md)
- [Screen](shadergraph/compositing/screen.md)
- [Overlay](shadergraph/compositing/overlay.md)
- [Disjoint Over](shadergraph/compositing/disjoint-over.md)
- [In](shadergraph/compositing/in.md)
- [Mask](shadergraph/compositing/mask.md)
- [Matte](shadergraph/compositing/matte.md)
- [Out](shadergraph/compositing/out.md)
- [Over](shadergraph/compositing/over.md)
- [Inside](shadergraph/compositing/inside.md)
