+// An effect that does nothing except changing its output sizes.
+class VirtualResizeEffect : public Effect {
+public:
+ VirtualResizeEffect(int width, int height, int virtual_width, int virtual_height)
+ : width(width),
+ height(height),
+ virtual_width(virtual_width),
+ virtual_height(virtual_height) {}
+ string effect_type_id() const override { return "VirtualResizeEffect"; }
+ string output_fragment_shader() override { return read_file("identity.frag"); }
+
+ bool changes_output_size() const override { return true; }
+
+ void get_output_size(unsigned *width, unsigned *height,
+ unsigned *virtual_width, unsigned *virtual_height) const override {
+ *width = this->width;
+ *height = this->height;
+ *virtual_width = this->virtual_width;
+ *virtual_height = this->virtual_height;
+ }
+
+private:
+ int width, height, virtual_width, virtual_height;
+};
+