#version 460
#extension GL_EXT_ray_query : require
#extension GL_EXT_ray_tracing_position_fetch : require

layout(set = 0, binding = 0) uniform accelerationStructureEXT uAS;

layout(location = 0) out vec3 o_color;
rayQueryEXT query;

void main()
{
    float tmin = 0.00999999977648258209228515625;
    float tmax = 1000.0;
    vec3 dir = vec3(1.0, 0.0, 0.0);
    rayQueryInitializeEXT(query, uAS, 4u, 255u, vec3(0.0), tmin, dir, 1.0);
    bool _32 = rayQueryProceedEXT(query);
    uint _36 = rayQueryGetIntersectionTypeEXT(query, bool(1));
    if (_36 != 0u)
    {
        vec3 _45[3];
        rayQueryGetIntersectionTriangleVertexPositionsEXT(query, bool(1), _45);
        vec3 vs[3] = _45;
        o_color = (vs[0] + vs[1]) + vs[2];
    }
}

