mirror of
https://github.com/RPCS3/glslang.git
synced 2024-11-24 03:39:51 +00:00
39374dadb5
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31212 e7fa87d3-cd2b-0410-9028-fcbf551c1848
44 lines
774 B
GLSL
44 lines
774 B
GLSL
#version 420 core
|
|
|
|
layout(triangles) in;
|
|
|
|
in gl_PerVertex {
|
|
float gl_PointSize;
|
|
} gl_in[];
|
|
|
|
out gl_PerVertex {
|
|
float gl_PointSize;
|
|
};
|
|
|
|
layout(line_strip) out;
|
|
layout(max_vertices = 127) out;
|
|
layout(invocations = 4) in;
|
|
|
|
uniform sampler2D s2D;
|
|
in vec2 coord[];
|
|
uniform vec4 v4;
|
|
uniform int i;
|
|
|
|
void main()
|
|
{
|
|
float p = gl_in[1].gl_PointSize;
|
|
gl_PointSize = p;
|
|
gl_ViewportIndex = 7;
|
|
|
|
EmitStreamVertex(1);
|
|
EndStreamPrimitive(0);
|
|
EmitVertex();
|
|
EndPrimitive();
|
|
int id = gl_InvocationID;
|
|
|
|
const ivec2 offsets[5] =
|
|
{
|
|
ivec2(0,1),
|
|
ivec2(1,-2),
|
|
ivec2(0,3),
|
|
ivec2(-3,0),
|
|
ivec2(2,1)
|
|
};
|
|
vec4 v = textureGatherOffset(s2D, coord[0], offsets[i].xy);
|
|
}
|