diff options
author | Hans-Kristian Arntzen <post@arntzen-software.no> | 2020-05-20 15:51:45 +0300 |
---|---|---|
committer | Hans-Kristian Arntzen <post@arntzen-software.no> | 2020-05-20 16:07:47 +0300 |
commit | 66ec3e3e5416f98c3e60de8b9c8cd5bbc9d48958 (patch) | |
tree | 5c0db3b114ff592a6c55dcc4dfd81963690fe9b0 /shaders | |
parent | 271ad33380cb8d2a146ed3f3ba2082b265bfabd9 (diff) |
GLSL: Support ray payloads and hit attributes declared as Block.
Diffstat (limited to 'shaders')
-rw-r--r-- | shaders/vulkan/rgen/payloads.nocompat.vk.rgen | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/shaders/vulkan/rgen/payloads.nocompat.vk.rgen b/shaders/vulkan/rgen/payloads.nocompat.vk.rgen index 333ccd1e..11c12d44 100644 --- a/shaders/vulkan/rgen/payloads.nocompat.vk.rgen +++ b/shaders/vulkan/rgen/payloads.nocompat.vk.rgen @@ -14,14 +14,12 @@ layout(location = 0) rayPayloadNV float payload1; // Struct payload layout(location = 1) rayPayloadNV Payload payload2; -#if 0 -// Not sure how this actually works yet. Do we get 4 different locations, or just 1 with 4 members? +// This is syntactic sugar with the struct formulation (pretty sure), spec is kinda vague. layout(location = 2) rayPayloadNV Block { float a, b; Payload c, d; }; -#endif vec4 trace_in_function() { @@ -44,8 +42,8 @@ void main() result += trace_in_function(); -#if 0 traceNV(as, 0u, 255u, 0u, 1u, 0u, origin, 0.0, direction, 1000.0, 2); result += a + b + c.a + c.b + d.a + d.b; -#endif + + imageStore(image, ivec2(gl_LaunchIDNV.xy), result); } |