// than losing a pixel in the common cases of integer shift.
// Thus the 1e-3 fudge factors.
float texcoord_min[2] = {
- (0.5f - 1e-3) / input_width,
- (0.5f - 1e-3) / input_height
+ float((0.5f - 1e-3) / input_width),
+ float((0.5f - 1e-3) / input_height)
};
set_uniform_vec2(glsl_program_num, prefix, "texcoord_min", texcoord_min);
float texcoord_max[2] = {
- 1.0f - (0.5f - 1e-3) / input_width,
- 1.0f - (0.5f - 1e-3) / input_height
+ float(1.0f - (0.5f - 1e-3) / input_width),
+ float(1.0f - (0.5f - 1e-3) / input_height)
};
set_uniform_vec2(glsl_program_num, prefix, "texcoord_max", texcoord_max);
}
if (border_color.r == 0.0 && border_color.g == 0.0 && border_color.b == 0.0) {
return DONT_CARE_ALPHA_TYPE;
}
- return INPUT_AND_OUTPUT_ALPHA_PREMULTIPLIED;
+ return INPUT_AND_OUTPUT_PREMULTIPLIED_ALPHA;
}
-void PaddingEffect::get_output_size(unsigned *width, unsigned *height) const
+void PaddingEffect::get_output_size(unsigned *width, unsigned *height, unsigned *virtual_width, unsigned *virtual_height) const
{
- *width = output_width;
- *height = output_height;
+ *virtual_width = *width = output_width;
+ *virtual_height = *height = output_height;
}
void PaddingEffect::inform_input_size(unsigned input_num, unsigned width, unsigned height)