3 #extension GL_EXT_shader_explicit_arithmetic_types: enable
4 #extension GL_EXT_shader_explicit_arithmetic_types_int8: require
5 #extension GL_EXT_shader_explicit_arithmetic_types_int16: require
6 #extension GL_EXT_shader_explicit_arithmetic_types_int32: require
7 #extension GL_EXT_shader_explicit_arithmetic_types_int64: require
8 #extension GL_EXT_shader_explicit_arithmetic_types_float16: require
9 #extension GL_EXT_shader_explicit_arithmetic_types_float32: require
10 #extension GL_EXT_shader_explicit_arithmetic_types_float64: require
12 layout(binding = 0) uniform Uniforms
17 layout(std140, binding = 1) uniform Block
44 const int64_t i64Const[3] =
46 -0x1111111111111111l, // Hex
51 int64_t i64 = i64Const[index];
53 const uint64_t u64Const[] =
55 0xFFFFFFFFFFFFFFFFul, // Hex
57 077777777777ul, // Oct
60 uint64_t u64 = u64Const[index];
62 const int32_t i32Const[3] =
69 int32_t i32 = i32Const[index];
71 const uint32_t u32Const[] =
78 uint32_t u32 = u32Const[index];
80 const int16_t i16Const[3] =
82 int16_t(-0x1111), // Hex
84 int16_t(040000), // Oct
87 int16_t i16 = i16Const[index];
89 const uint16_t u16Const[] =
91 uint16_t(0xFFFF), // Hex
92 uint16_t(65535), // Dec
93 uint16_t(077777), // Oct
96 uint16_t u16 = u16Const[index];
98 const int8_t i8Const[3] =
100 int8_t(-0x11), // Hex
105 int8_t i8 = i8Const[index];
107 const uint8_t u8Const[] =
109 uint8_t(0xFF), // Hex
111 uint8_t(0177), // Oct
114 uint8_t u8 = u8Const[index];
132 u8v = i8v; // int8_t -> uint8_t
133 i16v = i8v; // int8_t -> int16_t
134 i16v = u8v; // uint8_t -> int16_t
135 i32v = i8v; // int8_t -> int32_t
136 i32v = u8v; // uint8_t -> int32_t
137 u32v = i8v; // int8_t -> uint32_t
138 i64v = i8v; // int8_t -> int64_t
139 u64v = i8v; // int8_t -> uint64_t
140 u32v = u8v; // uint8_t -> uint32_t
141 i64v = u8v; // uint8_t -> int64_t
142 u64v = u8v; // uint8_t -> uint64_t
143 f16v = i8v; // int8_t -> float16_t
144 f32v = i8v; // int8_t -> float32_t
145 f64v = i8v; // int8_t -> float64_t
146 f16v = u8v; // uint8_t -> float16_t
147 f32v = u8v; // uint8_t -> float32_t
148 f64v = u8v; // uint8_t -> float64_t
150 i8v = i8vec2(u8v); // uint8_t -> int8_t
151 i16v = i16vec2(i8v); // int8_t -> int16_t
152 i16v = i16vec2(u8v); // uint8_t -> int16_t
153 i32v = i32vec2(i8v); // int8_t -> int32_t
154 i32v = i32vec2(u8v); // uint8_t -> int32_t
155 i64v = i64vec2(i8v); // int8_t -> int64_t
156 u64v = i64vec2(i8v); // int8_t -> uint64_t
157 u16v = u16vec2(i8v); // int8_t -> uint16_t
158 u16v = u16vec2(u8v); // uint8_t -> uint16_t
159 u32v = u32vec2(u8v); // uint8_t -> uint32_t
160 i64v = i64vec2(u8v); // uint8_t -> int64_t
161 u64v = i64vec2(u8v); // uint8_t -> uint64_t
162 f16v = f16vec2(i8v); // int8_t -> float16_t
163 f32v = f32vec2(i8v); // int8_t -> float32_t
164 f64v = f64vec2(i8v); // int8_t -> float64_t
165 f16v = f16vec2(u8v); // uint8_t -> float16_t
166 f32v = f32vec2(u8v); // uint8_t -> float32_t
167 f64v = f64vec2(u8v); // uint8_t -> float64_t
169 i8v = i8vec2(bv); // bool -> int8
170 u8v = u8vec2(bv); // bool -> uint8
171 bv = bvec2(i8v); // int8 -> bool
172 bv = bvec2(u8v); // uint8 -> bool
190 i32v = i16v; // int16_t -> int32_t
191 i32v = u16v; // uint16_t -> int32_t
192 u16v = i16v; // int16_t -> uint16_t
193 u32v = i16v; // int16_t -> uint32_t
194 i64v = i16v; // int16_t -> int64_t
195 u64v = i16v; // int16_t -> uint64_t
196 u32v = u16v; // uint16_t -> uint32_t
197 i64v = u16v; // uint16_t -> int64_t
198 u64v = u16v; // uint16_t -> uint64_t
199 f16v = i16v; // int16_t -> float16_t
200 f32v = i16v; // int16_t -> float32_t
201 f64v = i16v; // int16_t -> float64_t
202 f16v = u16v; // uint16_t -> float16_t
203 f32v = u16v; // uint16_t -> float32_t
204 f64v = u16v; // uint16_t -> float64_t
206 i32v = i32vec2(i16v); // int16_t -> int32_t
207 i32v = i32vec2(u16v); // uint16_t -> int32_t
208 u16v = u16vec2(i16v); // int16_t -> uint16_t
209 u32v = u32vec2(i16v); // int16_t -> uint32_t
210 i64v = i64vec2(i16v); // int16_t -> int64_t
211 u64v = i64vec2(i16v); // int16_t -> uint64_t
212 u32v = u32vec2(u16v); // uint16_t -> uint32_t
213 i64v = i64vec2(u16v); // uint16_t -> int64_t
214 u64v = i64vec2(u16v); // uint16_t -> uint64_t
215 f16v = f16vec2(i16v); // int16_t -> float16_t
216 f32v = f32vec2(i16v); // int16_t -> float32_t
217 f64v = f64vec2(i16v); // int16_t -> float64_t
218 f16v = f16vec2(u16v); // uint16_t -> float16_t
219 f32v = f32vec2(u16v); // uint16_t -> float32_t
220 f64v = f64vec2(u16v); // uint16_t -> float64_t
222 i8v = i8vec2(i16v); // int16_t -> int8_t
223 i8v = i8vec2(u16v); // uint16_t -> int8_t
224 u8v = u8vec2(i16v); // int16_t -> uint8_t
225 u8v = u8vec2(u16v); // uint16_t -> uint8_t
226 i16v = u8vec2(u16v); // uint16_t -> int16_t
227 i16v = i16vec2(bv); // bool -> int16
228 u16v = u16vec2(bv); // bool -> uint16
229 bv = bvec2(i16v); // int16 -> bool
230 bv = bvec2(u16v); // uint16 -> bool
248 u32v = i32v; // int32_t -> uint32_t
249 i64v = i32v; // int32_t -> int64_t
250 u64v = i32v; // int32_t -> uint64_t
251 i64v = u32v; // uint32_t -> int64_t
252 u64v = u32v; // uint32_t -> uint64_t
253 f32v = i32v; // int32_t -> float32_t
254 f64v = i32v; // int32_t -> float64_t
255 f32v = u32v; // uint32_t -> float32_t
256 f64v = u32v; // uint32_t -> float64_t
258 i8v = i8vec2(i32v); // int32_t -> int8_t
259 i8v = i8vec2(u32v); // uint32_t -> int8_t
260 i16v = i16vec2(i32v); // int32_t -> int16_t
261 i16v = i16vec2(u32v); // uint32_t -> int16_t
262 i32v = i32vec2(i32v); // int32_t -> int32_t
263 i32v = i32vec2(u32v); // uint32_t -> int32_t
264 i64v = i64vec2(i32v); // int32_t -> int64_t
265 i64v = i64vec2(u32v); // uint32_t -> int64_t
266 u8v = u8vec2(i32v); // int32_t -> uint8_t
267 u8v = u8vec2(u32v); // uint32_t -> uint8_t
268 u16v = u16vec2(i32v); // int32_t -> uint16_t
269 u16v = u16vec2(u32v); // uint32_t -> uint16_t
270 u32v = u32vec2(i32v); // int32_t -> uint32_t
271 u32v = u32vec2(u32v); // uint32_t -> uint32_t
272 u64v = u64vec2(i32v); // int32_t -> uint64_t
273 u64v = u64vec2(u32v); // uint32_t -> uint64_t
275 f16v = f16vec2(i32v); // int32_t -> float16_t
276 f32v = f32vec2(i32v); // int32_t -> float32_t
277 f64v = f64vec2(i32v); // int32_t -> float64_t
278 f16v = f16vec2(u32v); // uint32_t -> float16_t
279 f32v = f32vec2(u32v); // uint32_t -> float32_t
280 f64v = f64vec2(u32v); // uint32_t -> float64_t
282 i32v = i32vec2(bv); // bool -> int32
283 u32v = u32vec2(bv); // bool -> uint32
284 bv = bvec2(i32v); // int32 -> bool
285 bv = bvec2(u32v); // uint32 -> bool
303 u64v = i64v; // int64_t -> uint64_t
304 f64v = i64v; // int64_t -> float64_t
305 f64v = u64v; // uint64_t -> float64_t
307 i8v = i8vec2(i64v); // int64_t -> int8_t
308 i8v = i8vec2(u64v); // uint64_t -> int8_t
309 i16v = i16vec2(i64v); // int64_t -> int16_t
310 i16v = i16vec2(u64v); // uint64_t -> int16_t
311 i32v = i32vec2(i64v); // int64_t -> int32_t
312 i32v = i32vec2(u64v); // uint64_t -> int32_t
313 i64v = i64vec2(u64v); // uint64_t -> int64_t
314 u8v = u8vec2(i64v); // int64_t -> uint8_t
315 u8v = u8vec2(u64v); // uint64_t -> uint8_t
316 u16v = u16vec2(i64v); // int64_t -> uint16_t
317 u16v = u16vec2(u64v); // uint64_t -> uint16_t
318 u32v = u32vec2(i64v); // int64_t -> uint32_t
319 u32v = u32vec2(u64v); // uint64_t -> uint32_t
320 u64v = u64vec2(i64v); // int64_t -> uint64_t
321 u64v = u64vec2(u64v); // uint64_t -> uint64_t
323 f16v = f16vec2(i64v); // int64_t -> float16_t
324 f32v = f32vec2(i64v); // int64_t -> float32_t
325 f64v = f64vec2(i64v); // int64_t -> float64_t
326 f16v = f16vec2(u64v); // uint64_t -> float16_t
327 f32v = f32vec2(u64v); // uint64_t -> float32_t
328 f64v = f64vec2(u64v); // uint64_t -> float64_t
330 i64v = i64vec2(bv); // bool -> int64
331 u64v = u64vec2(bv); // bool -> uint64
332 bv = bvec2(i64v); // int64 -> bool
333 bv = bvec2(u64v); // uint64 -> bool