support SPV_NV_viewport_array2 and SPV_NV_stereo_view_rendering

This commit is contained in:
chaoc
2017-01-13 01:10:53 -08:00
parent 22f25d80c6
commit 771d89fc36
21 changed files with 654 additions and 36 deletions

View File

@@ -0,0 +1,18 @@
#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;
layout (viewport_relative, secondary_view_offset = 1) out highp int gl_Layer;
} gl_out[4];
void main()
{
gl_out[gl_InvocationID].gl_SecondaryViewportMaskNV[0] = 1;
gl_out[gl_InvocationID].gl_SecondaryPositionNV = gl_in[1].gl_Position;
}