Porting GL4 geometry shaders. Likely not working.

This commit is contained in:
Ben Vanik
2016-02-20 16:35:21 -08:00
parent 769c58a9b2
commit b5a0c4715b
19 changed files with 2079 additions and 15 deletions

View File

@@ -0,0 +1,37 @@
// NOTE: This file is compiled and embedded into the exe.
// Use `xenia-build genspirv` and check in any changes under bin/.
#version 450
#extension all : warn
in gl_PerVertex {
vec4 gl_Position;
float gl_PointSize;
float gl_ClipDistance[];
} gl_in[];
out gl_PerVertex {
vec4 gl_Position;
float gl_PointSize;
float gl_ClipDistance[];
};
struct VertexData {
vec4 o[16];
};
layout(location = 1) in VertexData in_vtx[];
layout(location = 1) out VertexData out_vtx;
layout(lines_adjacency) in;
layout(triangle_strip, max_vertices = 4) out;
void main() {
const int order[4] = { 0, 1, 3, 2 };
for (int i = 0; i < 4; ++i) {
int input_index = order[i];
gl_Position = gl_in[input_index].gl_Position;
gl_PointSize = gl_in[input_index].gl_PointSize;
out_vtx = in_vtx[input_index];
EmitVertex();
}
EndPrimitive();
}