New upstream version 23.2.1+dfsg1

This commit is contained in:
Simon Chopin 2019-07-27 14:47:10 +02:00
parent cdc9a9fc87
commit b14f9eae6d
1017 changed files with 37232 additions and 11111 deletions

View file

@ -7,8 +7,6 @@
uniform float4x4 ViewProj;
uniform texture2d image;
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 float2 base_dimension_i;
uniform float undistort_factor = 1.0;
@ -140,13 +138,19 @@ float4 PSDrawLanczosRGBA(FragData v_in, bool undistort) : TARGET
return DrawLanczos(v_in, undistort);
}
float4 PSDrawLanczosMatrix(FragData v_in) : TARGET
float4 PSDrawLanczosRGBADivide(FragData v_in) : TARGET
{
float4 rgba = DrawLanczos(v_in, false);
float4 yuv;
float alpha = rgba.a;
float multiplier = (alpha > 0.0) ? (1.0 / alpha) : 0.0;
return float4(rgba.rgb * multiplier, alpha);
}
yuv.xyz = clamp(rgba.xyz, color_range_min, color_range_max);
return saturate(mul(float4(yuv.xyz, 1.0), color_matrix));
float4 PSDrawLanczosMatrix(FragData v_in) : TARGET
{
float3 rgb = DrawLanczos(v_in, false).rgb;
float3 yuv = mul(float4(saturate(rgb), 1.0), color_matrix).xyz;
return float4(yuv, 1.0);
}
technique Draw
@ -158,6 +162,15 @@ technique Draw
}
}
technique DrawAlphaDivide
{
pass
{
vertex_shader = VSDefault(v_in);
pixel_shader = PSDrawLanczosRGBADivide(v_in);
}
}
technique DrawUndistort
{
pass