mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-10 04:20:06 +00:00
db32b243ff
and SPV_KHR_ray_tracing
16 lines
721 B
Plaintext
16 lines
721 B
Plaintext
#version 460
|
|
#extension GL_EXT_ray_tracing : enable
|
|
layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT;
|
|
layout(location = 0) rayPayloadEXT vec4 payload;
|
|
void main()
|
|
{
|
|
const uint rayFlags = gl_RayFlagsNoneEXT | gl_RayFlagsOpaqueEXT |
|
|
gl_RayFlagsNoOpaqueEXT | gl_RayFlagsTerminateOnFirstHitEXT |
|
|
gl_RayFlagsSkipClosestHitShaderEXT | gl_RayFlagsCullBackFacingTrianglesEXT |
|
|
gl_RayFlagsCullFrontFacingTrianglesEXT | gl_RayFlagsCullOpaqueEXT |
|
|
gl_RayFlagsCullNoOpaqueEXT;
|
|
|
|
const int payloadId = 1;
|
|
traceRayEXT(accEXT, rayFlags, 0, 1, 1, 0, vec3(0.0f), 0.5f, vec3(1.0f), 0.75f, payloadId);
|
|
}
|