0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00

Make PSPacked422_Reverse sample in texel center

This commit is contained in:
Palana 2014-06-02 16:39:08 +02:00
parent 7d0a1502bd
commit 03346d7e96

View File

@ -208,6 +208,9 @@ float4 PSPacked422_Reverse(VertInOut vert_in, int u_pos, int v_pos,
float odd = floor(fmod(width * vert_in.uv.x + PRECISION_OFFSET, 2.0));
float x = floor(width_d2 * vert_in.uv.x + PRECISION_OFFSET) *
width_d2_i;
x += input_width_i_d2;
float4 texel = image.Sample(def_sampler, float2(x, y));
return float4(odd > 0.5 ? texel[y1_pos] : texel[y0_pos],
texel[u_pos], texel[v_pos], 1.0);