Are shaders with two outputs are supported by the EffectComposer (background: i need to pass 5 floats to the second shader).
I create a render target with count set to two:
var renderTarget = new WebGLRenderTarget( w, h, { type: FloatType, count:2 } );
The first shader has two outputs declared like this:
layout(location = 0) out vec4 gxray;
layout(location = 1) out vec4 gmask;
For the ShaderPass I can set only one textureID as input:
shaderPass2 = new ShaderPass(shader2, "tInput", null, material2)
I tried this without success:
shaderPass2.uniforms["tInput"] = renderTarget.textures[ 0 ]
shaderPass2.uniforms["tInput2"] = renderTarget.textures[ 1 ]
Is this possible or should I try implementing this without EffectComposer?
The error/warning I always get:
GL_INVALID_OPERATION: Active draw buffers with missing fragment shader outputs.