0beqz/screen-space-reflections

Black screen with VanillaJS build

Closed this issue · 1 comments

Apart from issue #16, I also tried running the library in VanillaJS (both with r141 and r143). The result is a black screen.

First, I installed both libraries (space-screen-reflections and postprocessing) with npm. Then, I copied the corresponding javascript files into my js folder and linked them with the existing project. After adding the SSR effect pass and running it through the composer, I get a black screen and the following error:
[.WebGL-0x1d8002a0d500] GL_INVALID_OPERATION: Active draw buffers with missing fragment shader outputs.

Not sure if this is my inability of linking the code together or some deeper issue, but I would be grateful if you could give some pointers. Thanks!

UPDATE: if I replace POSTPROCESSING.EffectComposer with regular EffectComposer, I get a red screen instead of a black one. (The error console looks the same as before, though). This looks similar to an issue already mentioned here.

I managed to get it running by following the example from postprocessing:

const composer = new EffectComposer(renderer);
composer.addPass(new RenderPass(scene, camera));
composer.addPass(new EffectPass(camera, new SSREffect(scene, camera)));

Essentially, I was missing the RenderPass before the actual effect.