obs-transitions: Add 'Fade to Color' transition
Closes jp9000/obs-studio#521
This commit is contained in:
37
plugins/obs-transitions/data/fade_to_color_transition.effect
Normal file
37
plugins/obs-transitions/data/fade_to_color_transition.effect
Normal file
@@ -0,0 +1,37 @@
|
||||
uniform float4x4 ViewProj;
|
||||
uniform texture2d tex;
|
||||
uniform float swp;
|
||||
uniform float4 color;
|
||||
|
||||
sampler_state textureSampler {
|
||||
Filter = Linear;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
};
|
||||
|
||||
struct VertData {
|
||||
float4 pos : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
VertData VSDefault(VertData v_in)
|
||||
{
|
||||
VertData vert_out;
|
||||
vert_out.pos = mul(float4(v_in.pos.xyz, 1.0), ViewProj);
|
||||
vert_out.uv = v_in.uv;
|
||||
return vert_out;
|
||||
}
|
||||
|
||||
float4 PSFadeToColor(VertData v_in) : TARGET
|
||||
{
|
||||
return lerp(tex.Sample(textureSampler, v_in.uv), color, swp);
|
||||
}
|
||||
|
||||
technique FadeToColor
|
||||
{
|
||||
pass
|
||||
{
|
||||
vertex_shader = VSDefault(v_in);
|
||||
pixel_shader = PSFadeToColor(v_in);
|
||||
}
|
||||
}
|
@@ -2,9 +2,12 @@ FadeTransition="Fade"
|
||||
CutTransition="Cut"
|
||||
SwipeTransition="Swipe"
|
||||
SlideTransition="Slide"
|
||||
FadeToColorTransition="Fade to Color"
|
||||
Direction="Direction"
|
||||
Direction.Left="Left"
|
||||
Direction.Right="Right"
|
||||
Direction.Up="Up"
|
||||
Direction.Down="Down"
|
||||
SwipeIn="Swipe In"
|
||||
Color="Color"
|
||||
SwitchPoint="Peak Color Point (percentage)"
|
||||
|
Reference in New Issue
Block a user