diff options
Diffstat (limited to 'tests/modules/hit.slang')
| -rw-r--r-- | tests/modules/hit.slang | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/modules/hit.slang b/tests/modules/hit.slang new file mode 100644 index 000000000..d175275b4 --- /dev/null +++ b/tests/modules/hit.slang @@ -0,0 +1,24 @@ +//TEST:COMPILE: tests/modules/environment.slang -o tests/modules/environment.slang-module +//TEST:COMPILE: tests/modules/hit.slang -stage closesthit -entry closesthit -target dxil -o monolithic.dxil + +import environment; + +StructuredBuffer <Environment_sample_data> environment_sample_buffer; + +float3 sample_lights(inout uint seed) +{ + return environment_sample(environment_sample_buffer, seed); +} + +struct RadianceHitInfo +{ + float3 contribution; +}; + +struct Attributes +{ + float2 bary; +}; + +[shader("closesthit")] +void closesthit(inout RadianceHitInfo payload, Attributes attrib) {} |
