Soil blending operators

We'll detail here the soil blending operators. We have started looking at these operators earlier in that book, here: The atlas layer. There are three clickable blending operator boxes in a soil's bar, for:

The bar itself contains the same operators as those detailed in The atlas layer:

Each blending operator modifies the combination between the value 'under' the soil and the source soil value. Below is an example for the color blending operators with each operator:

The reference soil is on the leftside of the image. On dragging a new soil over it (with a mask applied, which is not shown here), we get the default REPLACE mode. In that case, the output color is the color of the incoming soil that replaces any other previous color, in areas where the mask is valid for that soil. Similarly we have the ADD, SUBTRACT, MIX and OVERLAY operators. Each operator has an 'amount' parameter in 0-100. The blending that occurs is detailed below:

The same formula mechanics go for the reflectance and the density. Elevation mapping is OVERLAY and can't be changed to enforce the first soil influence as the shaping soil layer. Ambient occlusion mapping is OVERLAY too so that we can get a coherent terrain ambient occlusion with many overlapping layers.