1
Graphics / Re: Overlaying two textures
« on: April 17, 2021, 04:44:55 am »
I am sorry, I misunderstood your previous message.
Could it be possible to do this using shaders? I know very little about it. Is it possible to achieve the desired effect using shaders?
I think if you render the first texture with BlendMode::None it shouldn't mix with the black but transparent background.BlendNone indeed gives the same effect as BlendMode(BlendMode::One, BlendMode::OneMinusSrcAlpha) for one texture.
What do you mean "save transparency"?When I say "save transparency", I mean that I want to keep transparent the part of the image that is transparent in both images.
The situation is that your "transparent" color that you use to clean the window, isn't just transparent, but it's actually black with an alpha set to 0.Yes, I know about the reasons for the black stroke. And what you talked about really works for one texture. But, as I said, I need to combine two textures into one, overlaying them. Is it really impossible to do this without unwanted artifacts?
So when you alpha blend your textures, it will blend with the black color, thus you get the black strokes.
If you render it with blend none, then it's applied 1:1. This of course doesn't necessarily work for overlaying multiple textures, as you do want to alpha blend then.
Could it be possible to do this using shaders? I know very little about it. Is it possible to achieve the desired effect using shaders?