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