• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#version 460
2#extension GL_EXT_ray_tracing : enable
3#extension GL_ARB_gpu_shader_int64 : enable
4#extension GL_EXT_scalar_block_layout : enable
5layout(location = 1) rayPayloadEXT vec4 payload;
6layout(shaderRecordEXT, scalar) buffer block
7{
8    vec3 dir;
9    vec3 origin;
10    int i;
11    uvec2 aHandle32;
12    uint64_t aHandle64;
13    vec2 arr[2];
14    float a;
15    vec3 arr3[2];
16    float packme;
17    vec2 b;
18    float c;
19};
20void main()
21{
22    uint lx = gl_LaunchIDEXT.x;
23    uint ly = gl_LaunchIDEXT.y;
24    uint sx = gl_LaunchSizeEXT.x;
25    uint sy = gl_LaunchSizeEXT.y;
26    traceRayEXT(accelerationStructureEXT(aHandle32), lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1);
27    traceRayEXT(accelerationStructureEXT(aHandle64), lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1);
28}
29