@yikescloud said:
@Megalomaniak said:
@SIsilicon28 said:
It would be more like all the sprite's combined.
Ah, so @yikescloud is after batching?
Sorry, I don't understand, the image is make in the Adobe XD
If I understand correctly, batching is where you draw a bunch of similar items together in a single pass. It saves performance because the shader/GPU doesn't have to load different textures, uniforms, etc, and instead can just render everything in a single pass. This gives, among other things, performance boosts due to the lower overhead and data transfer needed.
Additionally, with batching, everything has to be drawn the same, one on top of the other in a single pass. This would, in theory at least, give you what you are looking for when it comes to transparency.
However, to do this, you'd need to use the _draw
function so all of the pixels being drawn is done in a single pass. Using a Viewport allows you to use multiple draw passes in that viewport, which then you can use the result of in a single pass in the scene viewport (using a TextureRect with the scale of the viewport).
The gist of it is: You can view Viewports like layers in photoshop. You can have multiple things on the layer, but they ultimately get combined into a single texture, a single layer. You can this use this layer to draw on top of the layers below it. You can change the opacity of the entire layer, which will make the entire thing become transparent evenly, rather than have each metaball be transparent and have the metaballs mix where they overlap.
That said, that is assuming I understand everything correctly. It can get confusing depending on what you are looking to do, which technique you use, and how you it is implemented. For that reason, it can be hard to explain :sweat_smile: