Upsampling/downsampling for resizing window without performance drop.

I have a sketch that runs very slowly at higher resolution. How can I change the window resolution without the processing power dropping? As in, how can I run all my sketchy stuff at a native resolution and then upsample or downsample to the current window dimensions without losing a lot of performance?


  • Please keep related questions in the same posts. No need to create multiple questions asking the same thing. You should provide an mcve so to be able to reproduce your problem. You also talked about 120 fps? Can your display handle this rate? In a concept, displays update at 30 or 60fps if you are using some modest operations. However, if you do heavy pixel computation (masking,blending,copying,etc) or work with larger image sizes, the fps drops. Now I have seen that if you use OpenGL (PD3) it works better than the default, but that is not always the case.

    upsample or downsample to the current window dimensions

    How are you doing this?


  • edited February 28

    How are you doing this?

    I'm not, but I need to if I want to rewrite it for mobile. Currently the resolution is very small. 340px in height and I struggle to get 50fps. If I go higher than that the performance drops off a cliff. At mobile phone HD resolution it would be only a couple fps and because some calculations depend on fps, it becomes unusable at low frame rates (not that you would want to use it at 5-10fps anyway.

    Some monitors can display at 120hz, but more importantly the rendering seems to interpolate the motion? There is a big difference in smoothness and responsiveness from 60fps to 120fps I've found.

  • edited February 28
    finale = get(0,0,containerW,containerH);

    I was able to rewrite my draws for everything into containers of absolute size, but when I try to cast this to a PImage and resize it, my FPS goes from 60 to 8.... Is there any way to do this resize operation so I can support resizable windows?

  • Nevermind, by nesting inside a pgraphics element I was able to get it up to 35-40fps at 1200x 680. Getting a bit fuzzy though. Any way to make it a bit sharper or not to interpolate at all?

Sign In or Register to comment.