Using final KHR ray tracing extension: VK_KHR_acceleration_structure, VK_KHR_ray_tracing_pipeline and VK_KHR_ray_query

This commit is contained in:
mklefrancois 2020-11-23 11:33:51 +01:00
parent 7179569ec3
commit b26ff92473
80 changed files with 2446 additions and 2351 deletions

View file

@ -3,7 +3,7 @@
#extension GL_GOOGLE_include_directive : enable
#include "raycommon.glsl"
layout(location = 0) callableDataInEXT rayLight cLight;
layout(location = 3) callableDataInEXT rayLight cLight;
layout(push_constant) uniform Constants
{

View file

@ -3,7 +3,7 @@
#extension GL_GOOGLE_include_directive : enable
#include "raycommon.glsl"
layout(location = 0) callableDataInEXT rayLight cLight;
layout(location = 3) callableDataInEXT rayLight cLight;
layout(push_constant) uniform Constants
{

View file

@ -3,7 +3,7 @@
#extension GL_GOOGLE_include_directive : enable
#include "raycommon.glsl"
layout(location = 0) callableDataInEXT rayLight cLight;
layout(location = 3) callableDataInEXT rayLight cLight;
layout(push_constant) uniform Constants
{

View file

@ -30,7 +30,7 @@ void main()
uint seed = prd.seed; // We don't want to modify the PRD
if(mat.dissolve == 0.0)
ignoreIntersectionEXT();
ignoreIntersectionEXT;
else if(rnd(seed) > mat.dissolve)
ignoreIntersectionEXT();
ignoreIntersectionEXT;
}

View file

@ -36,7 +36,7 @@ layout(push_constant) uniform Constants
}
pushC;
layout(location = 0) callableDataEXT rayLight cLight;
layout(location = 3) callableDataEXT rayLight cLight;
void main()
@ -97,7 +97,7 @@ void main()
cLight.outLightDistance = 10000000;
}
#else
executeCallableEXT(pushC.lightType, 0);
executeCallableEXT(pushC.lightType, 3);
#endif
// Material of the object

View file

@ -26,7 +26,7 @@ void main()
uint seed = prd.seed; // We don't want to modify the PRD
if(mat.dissolve == 0.0)
ignoreIntersectionEXT();
ignoreIntersectionEXT;
else if(rnd(seed) > mat.dissolve)
ignoreIntersectionEXT();
ignoreIntersectionEXT;
}

View file

@ -37,7 +37,7 @@ layout(push_constant) uniform Constants
}
pushC;
layout(location = 0) callableDataEXT rayLight cLight;
layout(location = 3) callableDataEXT rayLight cLight;
void main()
@ -71,7 +71,7 @@ void main()
}
cLight.inHitPosition = worldPos;
executeCallableEXT(pushC.lightType, 0);
executeCallableEXT(pushC.lightType, 3);
// Material of the object
WaveFrontMaterial mat = materials[nonuniformEXT(gl_InstanceCustomIndexEXT)].m[impl.matId];