2097c30985
Fairly minor differences, so can keep them side by side without too much effort. NV support is effectively deprecated now however. - Add OpConvertUToAccelerationStructureKHR - Ignore/Terminate ray is now a terminator in KHR, but a call in NV. - Fix some bugs with reportIntersection.
18 lines
560 B
Plaintext
18 lines
560 B
Plaintext
#version 460
|
|
#extension GL_EXT_ray_tracing : require
|
|
|
|
layout(set = 0, binding = 0) uniform accelerationStructureEXT as;
|
|
layout(location = 0) rayPayloadEXT vec4 payload;
|
|
layout(location = 1) callableDataEXT float blend;
|
|
layout(set = 0, binding = 1, rgba32f) uniform writeonly image2D image;
|
|
|
|
void main()
|
|
{
|
|
vec3 origin = vec3(0.0);
|
|
vec3 direction = vec3(0.0, 0.0, -1.0);
|
|
traceRayEXT(as, 1u, 255u, 0u, 0u, 0u, origin, 0.0, direction, 100.0, 0);
|
|
executeCallableEXT(0u, 1);
|
|
imageStore(image, ivec2(gl_LaunchIDEXT.xy), payload + vec4(blend));
|
|
}
|
|
|