glslang/Test/spv.stereoViewRendering.tesc
John Kessenich ba6a3c290e GLSL: Make gl_Layer and gl_ViewportIndex always be outside blocks.
There was some ambiguity/contradiction in this behavior, and
Khronos decided glslang should always have these outside blocks,
rather than have stage/vendor/target variations.
2017-09-13 13:22:50 -06:00

20 lines
519 B
GLSL

#version 450
#extension GL_NV_viewport_array2 :require
#extension GL_NV_stereo_view_rendering : require
layout(vertices = 4) out;
out gl_PerVertex {
int gl_SecondaryViewportMaskNV[2];
vec4 gl_SecondaryPositionNV;
} gl_out[4];
layout (viewport_relative, secondary_view_offset = 1) out highp int gl_Layer;
void main()
{
gl_out[gl_InvocationID].gl_SecondaryViewportMaskNV[0] = 1;
gl_out[gl_InvocationID].gl_SecondaryPositionNV = gl_in[1].gl_Position;
}