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-postprocessingplugin. - 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)
Omg, my bad, for some reason, Hyper just refers to global
node_modulesfolder. That’s why dependencies weren’t updated as expected.Fixed in 198f427
How about setting things up from scratch, so do a fresh install of
hyper-postprocessing:Avoid modifying any files in
.hyper_plugins/node_modules. Then cd outside of.hyper_plugins, I think the parent directoryHypershould be OK, and freshly git clone this repo:And change the
hyperPostprocessing.entryto reflect this change:Open a Hyper terminal and you should see an error about not loading
threeorpostprocessingdependencies which is good AKAhyper-postprocessingis working correctly. The error comes from your entry point insidemyjs, the glitch effect here, which correctly doesn’t load dependencies from thehyper-postprocessingplugin. It needs to load dependencies frommyjswhich currently doesn’t have any:Consider the dependencies for
hyper-postprocessingandmyjsas separate even though they’re the same versions of the same dependencies.hyper-postprocessingdependency versions are correct so avoid changing them. The render error you were seeing and theGL_INVALID_VALUE: Offset overflows texture dimensionswarning wasn’t due tohyper-postprocessingdependency versions, it was due to the dependency versions you were loading from your entry point (hyper-postprocessing-clonned).