cameni

GLSL: out interface block in fragment shader

Discussion created by cameni on Feb 7, 2010
Latest reply on Mar 23, 2010 by tlittle

Hi,

I have the following shader that outputs to multiple render targets, and the glsl compiler tells me that

ERROR: 0:7: error(#328) interface block should not apply in 'FS out'.
ERROR: error(#273) 1 compilation errors.  No code generated

What's the problem? AFAIK the specification does not forbid putting the output variables in an interface block, or am I mistaken?


#version 150

precision highp float;
precision highp int;

in vec2 coord;
out stx {
    out ivec4 a;
    out vec4 b;
} OUT;

uniform isampler2D elev;
uniform sampler2D frcc;
void main()
{
    OUT.a = texture(elev, coord);
    OUT.b = texture(frcc, coord);
}

Outcomes