libobs: Remove need for DrawMatrix technique in effects
(Note: This commit also modifies obs-filters and text-freetype2) This simplifies writing of effects. DrawMatrix is no longer necessary because there are no sources that require drawing with a color matrix other than async sources, and async sources are automatically processed and don't defer their initial render stage to filters.
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
uniform float4x4 ViewProj;
|
||||
uniform float4x4 color_matrix;
|
||||
uniform float3 color_range_min = {0.0, 0.0, 0.0};
|
||||
uniform float3 color_range_max = {1.0, 1.0, 1.0};
|
||||
uniform texture_rect image;
|
||||
|
||||
sampler_state def_sampler {
|
||||
@@ -28,13 +25,6 @@ float4 PSDrawBare(VertInOut vert_in) : TARGET
|
||||
return image.Sample(def_sampler, vert_in.uv);
|
||||
}
|
||||
|
||||
float4 PSDrawMatrix(VertInOut vert_in) : TARGET
|
||||
{
|
||||
float4 yuv = image.Sample(def_sampler, vert_in.uv);
|
||||
yuv.xyz = clamp(yuv.xyz, color_range_min, color_range_max);
|
||||
return saturate(mul(float4(yuv.xyz, 1.0), color_matrix));
|
||||
}
|
||||
|
||||
technique Draw
|
||||
{
|
||||
pass
|
||||
@@ -43,13 +33,3 @@ technique Draw
|
||||
pixel_shader = PSDrawBare(vert_in);
|
||||
}
|
||||
}
|
||||
|
||||
technique DrawMatrix
|
||||
{
|
||||
pass
|
||||
{
|
||||
vertex_shader = VSDefault(vert_in);
|
||||
pixel_shader = PSDrawMatrix(vert_in);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user