With regards to this answer,
Transparent images being generated are darker in shade as in this issue
The given solution to that issue is to add this shader:
shader_type canvas_item; render_mode blend_premul_alpha;
So I took the dark image created from viewport and added it into a TextureRect
as a texture and applied the above shader
but how do I generate an image from this applied shader?
because the only way I found to save images with shaders are by using viewports
(which are causing the problem in the first place, like a recursive problem)
What am I trying to achieve?
I simply want the viewport.get_texture().get_data().save_png("res://img.png")
image to not be dark in shade
Edit
This is what the MergedImg
is suppose to look like:
This is how it actually ends up looking like :