So I want to make render path quad command that will output to several rendertargets.
<command type="quad" tag="myquad" vs="myquad" ps="myquad">
<output index="0" name="viewport" />
<output index="1" name="albedo" />
<output index="2" name="normal" />
<output index="3" name="depth" />
</command>
And in pixel shader:
gl_FragData[0] = vec4(ambient , 1.0);
gl_FragData[1] = vec4(diffColor.rgb, 1.7 );
gl_FragData[2] = vec4(normal * 0.5 + 0.5, 1.0);
gl_FragData[3] = vec4(vec3(0.5), 0.0);
This way it says “ERROR: Array index out of bounds”. If I remove everything but gl_FragData[0], it says nothing, but also renders nothing.