ViewportTexture weird behaviour

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By G 1

Recently, I’ve been attempting to make a ViewportTexture, aiming to achieve a similar effect to what Parthfinider: Kingmakers have in their travel sequences.

Seen here:

I’ve been able to get close to the desired effect:

This was easy to do when setting the “Clear Mode” on the Viewport to “Next frame” or “Never”. However, it has limited what the shader can do. I’ve been trying to mix the map and the mask so I can get a more blended effect, but the viewport completely wipes it out if the alpha of the mix is below 0.98.

.98 < mix(Alpha):

.98 > mix(Alpha):

Can someone please explain to me why this happens?