mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-08 19:40:06 +00:00
22 lines
505 B
Plaintext
22 lines
505 B
Plaintext
#version 460
|
|
#extension GL_EXT_ray_tracing : enable
|
|
|
|
hitAttributeEXT vec3 attribs;
|
|
layout(location = 0) rayPayloadInEXT vec3 hitValue;
|
|
layout(set = 0, binding = 0, r32i) uniform iimage3D result;
|
|
|
|
void main()
|
|
{
|
|
float k = 1048576.0f;
|
|
int ndx = -1;
|
|
for (int col = 0; col < 3; col++)
|
|
for (int row = 0; row < 4; row++)
|
|
{
|
|
ndx++;
|
|
ivec3 p = ivec3(gl_LaunchIDEXT.xy, ndx);
|
|
float r = k * gl_WorldToObject3x4EXT[col][row];
|
|
ivec4 c = ivec4(int(r),0,0,1);
|
|
imageStore(result, p, c);
|
|
}
|
|
}
|