• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#version 450
2
3flat in ivec4 uiv4;
4in vec4 uv4;
5bool ub;
6bvec4 ub41, ub42;
7in float uf;
8flat in int ui;
9flat in uvec4 uuv4;
10flat in uint uui;
11
12out vec4 FragColor;
13
14void main()
15{
16    vec4 v;
17	float f;
18	bool b;
19	bvec4 bv4;
20	int i;
21	uint u;
22
23	// floating point
24    v = radians(uv4);
25    v += degrees(v);
26    v += (i = ui*ui, sin(v));
27    v += cos(v);
28    v += tan(v);
29    v += asin(v);
30    v += acos(v);
31
32    v += atan(v);
33    v += sinh(v);
34    v += cosh(v);
35    v += tanh(v);
36    v += asinh(v);
37    v += acosh(v);
38    v += atanh(v);
39
40    v += pow(v, v);
41    v += exp(v);
42    v += log(v);
43    v += exp2(v);
44    v += log2(v);
45    v += sqrt(v);
46    v += inversesqrt(v);
47    v += abs(v);
48    v += sign(v);
49    v += floor(v);
50
51    v += trunc(v);
52    v += round(v);
53    v += roundEven(v);
54
55    v += ceil(v);
56    v += fract(v);
57    v += mod(v, v);
58    v += mod(v, v.x);
59
60    v += modf(v, v);
61    v += modf(v, v.yzxw);
62
63    v += min(v, uv4);
64    v += max(v, uv4);
65    v += clamp(v, uv4, uv4);
66    v += mix(v,v,v);
67
68    v += mix(v,v,ub41);
69    v += mix(v,v,f);
70//spv    v += intBitsToFloat(ui);
71//    v += uintBitsToFloat(uui);
72//    i += floatBitsToInt(f);
73//    u += floatBitsToUint(f);
74    v += fma(v, uv4, v);
75
76    v += step(v,v);
77    v += smoothstep(v,v,v);
78    v += step(uf,v);
79    v += smoothstep(uf,uf,v);
80    v += normalize(v);
81    v += faceforward(v, v, v);
82    v += reflect(v, v);
83    v += refract(v, v, uf);
84    v += dFdx(v);
85    v += dFdy(v);
86    v += fwidth(v);
87
88	// signed integer
89	i += abs(ui);
90	i += sign(i);
91	i += min(i, ui);
92	i += max(i, ui);
93	i += clamp(i, ui, ui);
94
95	// unsigned integer
96    u += min(u, uui);
97    u += max(u, uui);
98    u += clamp(u, uui, uui);
99
100    // multiple out operands
101    uvec4 msb;
102    uvec4 lsb;
103    umulExtended(uuv4.xyz, uuv4.xyz, msb.xyz, lsb.xyz);
104    u += msb.x + msb.y + msb.z;
105    u += lsb.x + lsb.y + lsb.z;
106
107	//// bool
108	b = isnan(uf);
109    b = isinf(f);
110	b = any(lessThan(v, uv4));
111	b = (b && any(lessThanEqual(v, uv4)));
112    b = (b && any(greaterThan(v, uv4)));
113    b = (b && any(greaterThanEqual(v, uv4)));
114    b = (b && any(equal(ub41, ub42)));
115    b = (b && any(notEqual(ub41, ub42)));
116    b = (b && any(ub41));
117    b = (b && all(ub41));
118    b = (b && any(not(ub41)));
119
120	i = ((i + ui) * i - ui) / i;
121	i = i % ui;
122	if (i == ui || i != ui && i == ui ^^ i != 2)
123	    ++i;
124
125	f = ((uf + uf) * uf - uf) / uf;
126
127	f += length(v);
128    f += distance(v, v);
129    f += dot(v, v);
130    f += dot(f, uf);
131	f += cross(v.xyz, v.xyz).x;
132
133	if (f == uf || f != uf && f != 2.0)
134	    ++f;
135
136    i &= ui;
137    i |= 0x42;
138    i ^= ui;
139    i %= 17;
140    i >>= 2;
141    i <<= ui;
142    i = ~i;
143    b = !b;
144
145    FragColor = b ? vec4(i) + vec4(f) + v : v;
146
147    mat4 m1 = mat4(1.0), m2 = mat4(0.0);
148    FragColor += (b ? m1 : m2)[1];
149}
150