New ImageCombineTypes

Currently Enum.ImageCombineType.Overwrite doesn’t respect Alphas, so if you overlap multiple images with DrawImageTransformed transparent pixels still overwrite the pixels behind it, if you try swapping to AlphaBlend it has ghosting/doesn’t respect opacity and BlendSourceOver constantly overlaps itself.

It’d be nice if we could get a version of overwrite that respects alpha a mix between blendsourceover and overwrite to function similar to how DrawCircle/DrawRectangle works where the alpha doesn’t keep overlapping itself but it respects the RGB values properly.

Overwrite:
RobloxStudioBeta_spGv1KvgPZ

AlphaBlend:
RobloxStudioBeta_PT7qLxwx7k

BlendSourceOver:
RobloxStudioBeta_b7KWyvUul3

4 Likes

AlphaBlend works correctly, but since you draw multiple images it accumulates opacity.

I’d suggest instead of setting opacity to a brush and drawing on the image, draw opaque brush on a separate layer and combine the layer with the image with the brush opacity.

1 Like

I’ve switched to this but it causes slight frame drops unfortunately.

It should be just one new permanent image above your background, call it “drawing layer”.
When player does not draw, it’s empty.
It holds one stroke only during drawing between pressing and releasing mouse.
After releasing mouse you merge it to background and clear it.
Does not look like a lot of overhead.

2 Likes