I've been playing around with Brush Shader Language and made a basic texture brush. However I've run into an issue, might be a bug. The brush works well, but when the last primitive is drawn it does not use the user selected color, instead it uses the color of the texture. You can see the code below and I've added an image where you can see the issue. The user selected color is orange and the texture itself is black and white ( used as alpha channel).