| 1 |
#version 450 |
| 2 |
#if defined(GL_AMD_gpu_shader_half_float) |
| 3 |
#extension GL_AMD_gpu_shader_half_float : require |
| 4 |
#elif defined(GL_NV_gpu_shader5) |
| 5 |
#extension GL_NV_gpu_shader5 : require |
| 6 |
#else |
| 7 |
#error No extension available for FP16. |
| 8 |
#endif |
| 9 |
#if defined(GL_AMD_gpu_shader_int16) |
| 10 |
#extension GL_AMD_gpu_shader_int16 : require |
| 11 |
#else |
| 12 |
#error No extension available for Int16. |
| 13 |
#endif |
| 14 |
|
| 15 |
layout(location = 0) out float16_t foo; |
| 16 |
layout(location = 1) out int16_t bar; |
| 17 |
layout(location = 2) out uint16_t baz; |
| 18 |
|
| 19 |
void main() |
| 20 |
{ |
| 21 |
foo = float16_t(1.0); |
| 22 |
bar = 2s; |
| 23 |
baz = 3us; |
| 24 |
} |
| 25 |
|