27 coordinates.xy *= texture_size;
30 float2 texel_center =
floor(coordinates.xy - 0.5f) + 0.5f;
37 float2 f0 = w1 / (w0 + w1);
38 float2 f1 = w3 / (w2 + w3);
40 float4 sampling_coordinates;
41 sampling_coordinates.xy = texel_center - 1.0f + f0;
42 sampling_coordinates.zw = texel_center + 1.0f + f1;
44 sampling_coordinates /= texture_size.xyxy;
46 float4 sampled_color =
textureLod(sampler_2d, sampling_coordinates.xy, 0.0f) * s0.
x * s0.
y;
47 sampled_color +=
textureLod(sampler_2d, sampling_coordinates.zy, 0.0f) * s1.
x * s0.
y;
48 sampled_color +=
textureLod(sampler_2d, sampling_coordinates.xw, 0.0f) * s0.
x * s1.
y;
49 sampled_color +=
textureLod(sampler_2d, sampling_coordinates.zw, 0.0f) * s1.
x * s1.
y;