2018-09-19 21:42:24 +03:00
|
|
|
#version 460
|
2018-10-23 02:41:44 +03:00
|
|
|
#extension GL_NV_ray_tracing : enable
|
|
|
|
layout(binding = 0, set = 0) uniform accelerationStructureNV accNV;
|
|
|
|
layout(location = 0) rayPayloadNV vec4 payload;
|
2018-09-19 21:42:24 +03:00
|
|
|
void main()
|
|
|
|
{
|
2018-10-23 02:41:44 +03:00
|
|
|
const uint rayFlags = gl_RayFlagsNoneNV | gl_RayFlagsOpaqueNV |
|
|
|
|
gl_RayFlagsNoOpaqueNV | gl_RayFlagsTerminateOnFirstHitNV |
|
|
|
|
gl_RayFlagsSkipClosestHitShaderNV | gl_RayFlagsCullBackFacingTrianglesNV |
|
|
|
|
gl_RayFlagsCullFrontFacingTrianglesNV | gl_RayFlagsCullOpaqueNV |
|
|
|
|
gl_RayFlagsCullNoOpaqueNV;
|
2018-09-19 21:42:24 +03:00
|
|
|
|
|
|
|
const int payloadId = 1;
|
2018-10-23 02:41:44 +03:00
|
|
|
traceNV(accNV, rayFlags, 0, 1, 1, 0, vec3(0.0f), 0.5f, vec3(1.0f), 0.75f, payloadId);
|
2018-09-19 21:42:24 +03:00
|
|
|
}
|