Merge branch 'master' of https://github.com/SaschaWillems/Vulkan
This commit is contained in:
commit
e8596963b3
2 changed files with 7 additions and 3 deletions
|
|
@ -273,6 +273,10 @@ void vkglTF::Texture::fromglTfImage(tinygltf::Image &gltfimage, std::string path
|
|||
vkCmdPipelineBarrier(blitCmd, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 0, nullptr, 0, nullptr, 1, &imageMemoryBarrier);
|
||||
}
|
||||
|
||||
if (deleteBuffer) {
|
||||
delete[] buffer;
|
||||
}
|
||||
|
||||
device->flushCommandBuffer(blitCmd, copyQueue, true);
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@ void main()
|
|||
outFragColor = vec4(diffuse, 1.0);
|
||||
|
||||
rayQueryEXT rayQuery;
|
||||
rayQueryInitializeEXT(rayQuery, topLevelAS, gl_RayFlagsTerminateOnFirstHitEXT, 0xFF, inWorldPos, 0.01, L, 1000.0);
|
||||
rayQueryInitializeEXT(rayQuery, topLevelAS, gl_RayFlagsTerminateOnFirstHitEXT | gl_RayFlagsSkipAABBEXT, 0xFF, inWorldPos, 0.01, L, 1000.0);
|
||||
|
||||
// Start the ray traversal, rayQueryProceedEXT returns false if the traversal is complete
|
||||
while (rayQueryProceedEXT(rayQuery)) { }
|
||||
// Traverse the acceleration structure and store information about the first intersection (if any)
|
||||
rayQueryProceedEXT(rayQuery);
|
||||
|
||||
// If the intersection has hit a triangle, the fragment is shadowed
|
||||
if (rayQueryGetIntersectionTypeEXT(rayQuery, true) == gl_RayQueryCommittedIntersectionTriangleEXT ) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue