14 #ifndef hifi_render_ResampleTask_h
15 #define hifi_render_ResampleTask_h
21 class HalfDownsample {
23 using Config = JobConfig;
24 using JobModel = Job::ModelIO<HalfDownsample, gpu::FramebufferPointer, gpu::FramebufferPointer, Config>;
28 void configure(
const Config& config);
29 void run(
const RenderContextPointer& renderContext,
const gpu::FramebufferPointer& sourceFramebuffer, gpu::FramebufferPointer& resampledFrameBuffer);
33 static gpu::PipelinePointer _pipeline;
35 gpu::FramebufferPointer _destinationFrameBuffer;
37 gpu::FramebufferPointer getResampledFrameBuffer(
const gpu::FramebufferPointer& sourceFramebuffer);
40 class UpsampleConfig :
public render::Job::Config {
42 Q_PROPERTY(
float factor MEMBER factor NOTIFY dirty)
53 using Config = UpsampleConfig;
54 using JobModel = Job::ModelIO<Upsample, gpu::FramebufferPointer, gpu::FramebufferPointer, Config>;
56 Upsample(
float factor = 2.0f) : _factor{ factor } {}
58 void configure(
const Config& config);
59 void run(
const RenderContextPointer& renderContext,
const gpu::FramebufferPointer& sourceFramebuffer, gpu::FramebufferPointer& resampledFrameBuffer);
63 static gpu::PipelinePointer _pipeline;
65 gpu::FramebufferPointer _destinationFrameBuffer;
66 float _factor{ 2.0f };
68 gpu::FramebufferPointer getResampledFrameBuffer(
const gpu::FramebufferPointer& sourceFramebuffer);
71 class UpsampleToBlitFramebuffer {
73 using Input = gpu::FramebufferPointer;
74 using JobModel = Job::ModelIO<UpsampleToBlitFramebuffer, Input, gpu::FramebufferPointer>;
76 UpsampleToBlitFramebuffer() {}
78 void run(
const RenderContextPointer& renderContext,
const Input& input, gpu::FramebufferPointer& resampledFrameBuffer);
82 static gpu::PipelinePointer _pipeline;
83 static gpu::PipelinePointer _mirrorPipeline;