@Override
    public void resize(int newWidth, int newHeight) {
        ProjectRedCore.LOGGER.debug("Resizing FixedScalePostChain from {}x{} to {}x{}", screenWidth, screenHeight, newWidth, newHeight);
        super.resize(newWidth, newHeight);

        // Resize targets with fixed scales
        for (var entry : fixedRenderTargetScales.entrySet()) {
            String name = entry.getKey();
            Double scale = entry.getValue();

            RenderTarget target = customRenderTargets.get(name);

            int newTargetWidth = (int) Math.ceil(newWidth * scale);
            int newTargetHeight = (int) Math.ceil(newHeight * scale);

            // Resize the target
            ProjectRedCore.LOGGER.debug("Resizing target {} from {}x{} to {}x{}", entry.getKey(), target.width, target.height, newTargetWidth, newTargetHeight);
            target.resize(newTargetWidth, newTargetHeight, Minecraft.ON_OSX);
        }

        // Re-compute projection matrices scaled to each pass's input
        for (PostPass pass : this.passes) {
            Matrix4f orthoMatrix = new Matrix4f().setOrtho(0.0F, (float) pass.inTarget.width,  0.0F, (float) pass.inTarget.height, 0.1F, 1000.0F);
            pass.setOrthoMatrix(orthoMatrix);
        }
    }
Utility to check and resize targets if screen is resized. Useful since as far as I know, there is no Forge "onScreenResized" event.
Call this from the render thread before drawing into inputs
core/src/main/java/mrtjp/projectred/core/client/FixedScalePostChain.java