glslang/Test/spv.nv.dmm-allops.rgen

25 lines
903 B
Plaintext
Raw Permalink Normal View History

#version 460
#extension GL_NV_displacement_micromap : enable
#extension GL_EXT_ray_query : enable
layout(binding = 1) uniform accelerationStructureEXT as;
layout(binding = 0) buffer block {
vec3 op_pos;
vec2 op_bary;
uint op_hitmask;
};
void main()
{
op_pos = fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(0,0));
op_pos += fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(0,1));
op_pos += fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(1,0));
op_bary = fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(0,0));
op_bary += fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(0,1));
op_bary += fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(1,0));
op_hitmask = gl_HitKindFrontFacingTriangleEXT |
gl_HitKindBackFacingTriangleEXT |
gl_HitKindFrontFacingMicroTriangleNV |
gl_HitKindBackFacingMicroTriangleNV;
}