Surprise! We've been running on hardware provided by BuyVM for a few months and wanted to show them a little appreciation.
Running a paste site comes with unique challenges, ones that aren't always obvious and hard to control. As such, BuyVM offered us a home where we could worry less about the hosting side of things and focus on maintaining a clean and useful service! Go check them out and show them some love!
Submitted on May 6, 2015 at 02:40 AM

Section 1 (Text)

#version 150

#extension GL_ARB_shader_image_load_store : enable
#extension GL_ARB_shading_language_420pack : enable

#extension GL_ARB_sample_shading : enable
#define SAMPLER_BINDING(x) layout(binding = x)
#extension GL_ARB_shader_storage_buffer_object : enable
#extension GL_ARB_gpu_shader5 : enable





#define float2 vec2
#define float3 vec3
#define float4 vec4
#define uint2 uvec2
#define uint3 uvec3
#define uint4 uvec4
#define int2 ivec2
#define int3 ivec3
#define int4 ivec4
#define frac fract
#define lerp mix


layout(lines, invocations = 1) in;
layout(triangle_strip, max_vertices = 4) out;
struct Light {
	int4 color;
	float4 cosatt;
	float4 distatt;
	float4 pos;
	float4 dir;
};
layout(std140, binding = 3) uniform GSBlock {
	float4 cstereo;
	float4 clinept;
	int4 ctexoffset;
};
struct VS_OUTPUT {
	float4 pos;
	float4 colors_0;
	float4 colors_1;
	float3 tex0;
	float4 clipPos;
};
#define InstanceID gl_InvocationID
in VertexData {
	centroid float4 pos;
	centroid float4 colors_0;
	centroid float4 colors_1;
	centroid float3 tex0;
	centroid float4 clipPos;
} vs[2];
out VertexData {
	centroid float4 pos;
	centroid float4 colors_0;
	centroid float4 colors_1;
	centroid float3 tex0;
	centroid float4 clipPos;
} ps;
void main()
{
	VS_OUTPUT start, end;
	start.pos = vs[0].pos;
	start.colors_0 = vs[0].colors_0;
	start.colors_1 = vs[0].colors_1;
	start.tex0 = vs[0].tex0;
	start.clipPos = vs[0].clipPos;
	end.pos = vs[1].pos;
	end.colors_0 = vs[1].colors_0;
	end.colors_1 = vs[1].colors_1;
	end.tex0 = vs[1].tex0;
	end.clipPos = vs[1].clipPos;
	float2 offset;
	float2 to = abs(end.pos.xy / end.pos.w - start.pos.xy / start.pos.w);
	if (clinept.y * to.y > clinept.x * to.x) {
		offset = float2(clinept.z / clinept.x, 0);
	} else {
		offset = float2(0, -clinept.z / clinept.y);
	}
	for (int i = 0; i < 2; ++i) {
	VS_OUTPUT f;
	f.pos = vs[i].pos;
	f.colors_0 = vs[i].colors_0;
	f.colors_1 = vs[i].colors_1;
	f.tex0 = vs[i].tex0;
	f.clipPos = vs[i].clipPos;
	VS_OUTPUT l = f;
	VS_OUTPUT r = f;
	l.pos.xy -= offset * l.pos.w;
	r.pos.xy += offset * r.pos.w;
	if (ctexoffset[2] != 0) {
	float texOffset = 1.0 / float(ctexoffset[2]);
	if (((ctexoffset[0] >> 0) & 0x1) != 0)
		r.tex0.x += texOffset;
	if (((ctexoffset[0] >> 1) & 0x1) != 0)
		r.tex1.x += texOffset;
	if (((ctexoffset[0] >> 2) & 0x1) != 0)
		r.tex2.x += texOffset;
	if (((ctexoffset[0] >> 3) & 0x1) != 0)
		r.tex3.x += texOffset;
	if (((ctexoffset[0] >> 4) & 0x1) != 0)
		r.tex4.x += texOffset;
	if (((ctexoffset[0] >> 5) & 0x1) != 0)
		r.tex5.x += texOffset;
	}
	gl_Position = l.pos;
	ps.pos = l.pos;
	ps.colors_0 = l.colors_0;
	ps.colors_1 = l.colors_1;
	ps.tex0 = l.tex0;
	ps.clipPos = l.clipPos;
	EmitVertex();
	gl_Position = r.pos;
	ps.pos = r.pos;
	ps.colors_0 = r.colors_0;
	ps.colors_1 = r.colors_1;
	ps.tex0 = r.tex0;
	ps.clipPos = r.clipPos;
	EmitVertex();
	}
	EndPrimitive();
}
0(100) : error C1009: "tex1" is not member of struct "VS_OUTPUT"
0(102) : error C1009: "tex2" is not member of struct "VS_OUTPUT"
0(104) : error C1009: "tex3" is not member of struct "VS_OUTPUT"
0(106) : error C1009: "tex4" is not member of struct "VS_OUTPUT"
0(108) : error C1009: "tex5" is not member of struct "VS_OUTPUT"