• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1layout(location=1) noperspective out float2 vcoord_Stage0;
2void main()
3{
4	int x = sk_InstanceID % 200;
5	int y = sk_InstanceID / 200;
6	int ileft = (sk_InstanceID*929) % 17;
7	int iright = ileft + 1 + ((sk_InstanceID*1637) % (17 - ileft));
8	int itop = (sk_InstanceID*313) % 17;
9	int ibot = itop + 1 + ((sk_InstanceID*1901) % (17 - itop));
10	float outset = 1/32.0;
11	outset = (0 == (x + y) % 2) ? -outset : +outset;
12	float l = float(ileft)/16.0 - outset;
13	float r = float(iright)/16.0 + outset;
14	float t = float(itop)/16.0 - outset;
15	float b = float(ibot)/16.0 + outset;
16	float2 vertexpos;
17	vertexpos.x = float(x) + ((0 == (sk_VertexID % 2)) ? l : r);
18	vertexpos.y = float(y) + ((0 == (sk_VertexID / 2)) ? t : b);
19	vcoord_Stage0.x = (0 == (sk_VertexID % 2)) ? -1 : +1;
20	vcoord_Stage0.y = (0 == (sk_VertexID / 2)) ? -1 : +1;
21	sk_Position = float4(vertexpos.x , vertexpos.y, 0, 1);
22}
23