obs-StreamFX/data/effects/standard.effect
Michael Fabian 'Xaymar' Dirks e7206b398f effects: Add standard effect file
There are a number of duplicate shader routines we should combine into a single shader to save disk space, and remove unexpected errors in one copy but not the other.
2021-10-06 03:08:55 +02:00

27 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);
};
};