hyper-postprocessing: Freezes when switching to fullscreen mode

Issue: Application Stops Rendering in Full-Screen Mode

Behavior

When switching to full-screen mode with the terminal, the application stops rendering, but terminal control is not blocked. Commands can be written and executed from memory.

Plugin Code (from example)

const { readFileSync } = require('fs');
const { resolve } = require('path');
const three = require('three');
const postprocessing = require('postprocessing');

module.exports = ({ hyperTerm, xTerm }) => {
    const effects = [];

    effects.push(new postprocessing.BloomEffect({
        kernelSize: 3,
        distinction: 1,
        blendFunction: postprocessing.BlendFunction.ADD
    }));

    effects.push(new postprocessing.ScanlineEffect({ density: 1.3 }));
    effects.push(new postprocessing.SepiaEffect({ intensity: 0.5 }));
    effects.push(new postprocessing.VignetteEffect({
        darkness: 0.6,
        offset: 0
    }));

    effects.push(new postprocessing.Effect(
        'sampling',
        readFileSync(resolve(__dirname, './glsl/sampling.glsl')).toString(),
        { blendFunction: postprocessing.BlendFunction.NORMAL }
    ));

    return {
        passes: [new postprocessing.EffectPass(null, ...effects)],
        three,
        postprocessing
    };
};

Hyper.js Configuration

module.exports = {
    config: {
        // ...
        hyperPostprocessing: {
            entry: 'plugin.js'
        }
    },
    plugins: [
        'hyper-postprocessing'
    ],
    localPlugins: [],
};

Context

  • Observed only with the hyper-postprocessing plugin.
  • Disabling the plugin resolves the issue.
  • Reproducibility on other machines is unknown.

Environment

  • OS: Windows 11
  • Hyper Version: 3.4.1

Hyper logs

bundle.js:1 (re)loading renderer plugins
bundle.js:1 Plugin hyper-postprocessing (4.0.0) loaded.
index.html:36 total init time 94.5
C:\Users\divin\node_modules\three\build\three.cjs:53036 WARNING: Multiple instances of Three.js being imported.
(anonymous) @ C:\Users\divin\node_modules\three\build\three.cjs:53036
DevTools failed to load source map: Could not parse content for file:///C:/Users/divin/AppData/Local/Programs/Hyper/resources/app.asar/utility.js.map: Unexpected end of JSON input
[.WebGL-0000021C00B3E300] GL_INVALID_VALUE: Offset overflows texture dimensions.
[.WebGL-0000021C00B3E300] GL_INVALID_VALUE: Offset overflows texture dimensions.
[.WebGL-0000021C00B3E300] GL_INVALID_VALUE: Offset overflows texture dimensions.
[.WebGL-0000021C00B3E300] GL_INVALID_VALUE: Offset overflows texture dimensions.
...
[.WebGL-0000021C00B3E300] GL_INVALID_VALUE: Offset overflows texture dimensions.
index.html:1 WebGL: too many errors, no more errors will be reported to the console for this context. 
(I've deleted about 100 of them)
  • Error [.WebGL-0000021C00B3E300] GL_INVALID_VALUE: Offset overflows texture dimensions. happens when window resized

About this issue

  • Original URL
  • State: closed
  • Created 6 months ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

Omg, my bad, for some reason, Hyper just refers to global node_modules folder. That’s why dependencies weren’t updated as expected.

image

After putting things in order and repeating the steps indicated in the message above, everything worked, thank you very much! I am very grateful for your help!

Fixed in 198f427

How about setting things up from scratch, so do a fresh install of hyper-postprocessing:

$ cd .hyper_plugins
$ npm uninstall hyper-postprocessing
$ npm install hyper-postprocessing

Avoid modifying any files in .hyper_plugins/node_modules. Then cd outside of .hyper_plugins, I think the parent directory Hyper should be OK, and freshly git clone this repo:

$ cd Hyper
$ rm -rf hyper-postprocessing-clonned
$ git clone https://github.com/slammayjammay/hyper-postprocessing
$ mv hyper-postprocessing myjs

And change the hyperPostprocessing.entry to reflect this change:

module.exports = {
    config: {
        hyperPostprocessing: {
            entry: 'C:\\Users\\username\\AppData\\Roaming\\Hyper\\myjs\\examples\\effects\\glitch\\index.js'
        }
    }
};

Open a Hyper terminal and you should see an error about not loading three or postprocessing dependencies which is good AKA hyper-postprocessing is working correctly. The error comes from your entry point inside myjs, the glitch effect here, which correctly doesn’t load dependencies from the hyper-postprocessing plugin. It needs to load dependencies from myjs which currently doesn’t have any:

$ cd myjs
$ npm install

Consider the dependencies for hyper-postprocessing and myjs as separate even though they’re the same versions of the same dependencies. hyper-postprocessing dependency versions are correct so avoid changing them. The render error you were seeing and the GL_INVALID_VALUE: Offset overflows texture dimensions warning wasn’t due to hyper-postprocessing dependency versions, it was due to the dependency versions you were loading from your entry point (hyper-postprocessing-clonned).