1#version 460 2#extension GL_EXT_ray_tracing : enable 3 4hitAttributeEXT vec3 attribs; 5layout(location = 0) rayPayloadInEXT vec3 hitValue; 6layout(set = 0, binding = 0, r32i) uniform iimage3D result; 7 8void main() 9{ 10 float k = 1048576.0f; 11 int ndx = -1; 12 for (int col = 0; col < 3; col++) 13 for (int row = 0; row < 4; row++) 14 { 15 ndx++; 16 ivec3 p = ivec3(gl_LaunchIDEXT.xy, ndx); 17 float r = k * gl_WorldToObject3x4EXT[col][row]; 18 ivec4 c = ivec4(int(r),0,0,1); 19 imageStore(result, p, c); 20 } 21} 22