Fix ray tracing related validation errors
This commit is contained in:
parent
359a3b07ad
commit
2873439ec8
3 changed files with 3 additions and 5 deletions
|
|
@ -12,7 +12,6 @@
|
||||||
#extension GL_EXT_scalar_block_layout : require
|
#extension GL_EXT_scalar_block_layout : require
|
||||||
#extension GL_EXT_shader_explicit_arithmetic_types_int64 : require
|
#extension GL_EXT_shader_explicit_arithmetic_types_int64 : require
|
||||||
|
|
||||||
layout(location = 0) rayPayloadInEXT vec3 hitValue;
|
|
||||||
layout(location = 3) rayPayloadInEXT uint payloadSeed;
|
layout(location = 3) rayPayloadInEXT uint payloadSeed;
|
||||||
|
|
||||||
hitAttributeEXT vec2 attribs;
|
hitAttributeEXT vec2 attribs;
|
||||||
|
|
@ -40,10 +39,9 @@ void main()
|
||||||
vec4 color = texture(textures[nonuniformEXT(geometryNode.textureIndexBaseColor)], tri.uv);
|
vec4 color = texture(textures[nonuniformEXT(geometryNode.textureIndexBaseColor)], tri.uv);
|
||||||
// If the alpha value of the texture at the current UV coordinates is below a given threshold, we'll ignore this intersection
|
// If the alpha value of the texture at the current UV coordinates is below a given threshold, we'll ignore this intersection
|
||||||
// That way ray traversal will be stopped and the miss shader will be invoked
|
// That way ray traversal will be stopped and the miss shader will be invoked
|
||||||
// if (color.a < 0.9) {
|
if (color.a < 0.9) {
|
||||||
//if (((gl_LaunchIDEXT.y * gl_LaunchSizeEXT.x + gl_LaunchIDEXT.x) % 4) == 0) {
|
|
||||||
if(rnd(payloadSeed) > color.a) {
|
if(rnd(payloadSeed) > color.a) {
|
||||||
ignoreIntersectionEXT;
|
ignoreIntersectionEXT;
|
||||||
}
|
}
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue