Adding a simple example demonstrating how to use SBT record data
This commit is contained in:
parent
d02a039188
commit
9e58ad5377
14 changed files with 1078 additions and 0 deletions
19
data/shaders/glsl/raytracingsbtdata/closesthit.rchit
Normal file
19
data/shaders/glsl/raytracingsbtdata/closesthit.rchit
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#version 460
|
||||
#extension GL_EXT_ray_tracing : enable
|
||||
#extension GL_EXT_nonuniform_qualifier : enable
|
||||
|
||||
layout(location = 0) rayPayloadInEXT vec3 hitValue;
|
||||
hitAttributeEXT vec2 attribs;
|
||||
|
||||
layout(shaderRecordEXT, std430) buffer SBT {
|
||||
float r;
|
||||
float g;
|
||||
float b;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
// Update the hit value to the hit record SBT data associated with this
|
||||
// geometry ID and ray ID
|
||||
hitValue = vec3(r, g, b);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue