Hi marcusestes! The panoramic shader currently produces an opaque result. It will use the incoming alpha for affecting the color level if the HDR controls say so, but this is not what you’re asking.
Skybox shaders, by definition, produce an opaque output so I’m not sure how to fix this at the shader level.
However, in 2017.3, we have introduced a number of new playables that allow you to play video content through a graph where you can control how multiple streams are mixed. The output of such a graph is a RenderTexture, that you can then feed to the material which is using the panoramic shader.
The following example shows how to use the texture mixer and video clip playables to perform a simple mix of 2 images. You can instead use the MaterialEffectPlayable to take full control of the compositing operation if you prefer:
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Experimental.Video;
using UnityEngine.Experimental.Playables;
public class Compositor : MonoBehaviour {
public UnityEngine.Video.VideoClip clipA;
public UnityEngine.Video.VideoClip clipB;
public RenderTexture output;
private PlayableGraph graph;
void Start () {
graph = PlayableGraph.Create ();
var playOut = TexturePlayableOutput.Create (graph, "out", output);
var inA = VideoClipPlayable.Create (graph, clipA, true);
var inB = VideoClipPlayable.Create (graph, clipB, true);
var mix = TextureMixerPlayable.Create (graph);
mix.ConnectInput (0, inA, 0);
mix.SetInputWeight (0, 1.0f);
mix.ConnectInput (1, inB, 0);
mix.SetInputWeight (1, 1.0f);
playOut.SetSourcePlayable (mix);
graph.Play ();
}
void Disable()
{
graph.Destroy ();
}
}
So, not sure if this answers your question in the way you expected, but maybe you can workaround the opaque skybox limitation with this.
But I’ll definitely have a look at the possibility of having the alpha be preserved in the panoramic shader, in case we can provide a more direct solution for the workflow you describe.
Hope this helps,
Dominique
A/V developer at Unity.