You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
505 B
22 lines
505 B
4 months ago
|
#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);
|
||
|
}
|
||
|
}
|