mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-11 06:15:05 +00:00
28 lines
661 B
Text
28 lines
661 B
Text
|
#include "shared.effect"
|
||
|
|
||
|
uniform texture2D Channel0;
|
||
|
uniform texture2D Channel1;
|
||
|
|
||
|
//------------------------------------------------------------------------------
|
||
|
// Technique: Restore Alpha
|
||
|
//------------------------------------------------------------------------------
|
||
|
// Parameters:
|
||
|
// - Channel0: RGBX Texture
|
||
|
// - Channel1: XXXA Texture
|
||
|
|
||
|
float4 PSRestoreAlpha(VertexData vtx) : TARGET {
|
||
|
float4 rgbx = Channel0.Sample(BlankSampler, vtx.uv);
|
||
|
float4 xxxa = Channel1.Sample(BlankSampler, vtx.uv);
|
||
|
rgbx.a = xxxa.a;
|
||
|
return rgbx;
|
||
|
};
|
||
|
|
||
|
technique RestoreAlpha
|
||
|
{
|
||
|
pass
|
||
|
{
|
||
|
vertex_shader = DefaultVertexShader(vtx);
|
||
|
pixel_shader = PSRestoreAlpha(vtx);
|
||
|
};
|
||
|
};
|