tgjones / HlslTools

A Visual Studio extension that provides enhanced support for editing High Level Shading Language (HLSL) files
http://timjones.io/blog/archive/2016/04/25/hlsl-tools-for-visual-studio-v1.0-released
Other
561 stars 97 forks source link

Add new DXR intrinsics and types #194

Closed jkunstwald closed 3 years ago

jkunstwald commented 3 years ago

This PR adds HLSL Raytracing intrinsics and types to resolve #133. Most are straightforward additions to IntrinsicFunctions.SM6.cs. However, three new functions have templated parameters, like CallShader, which are not currently supported from what i've seen (it's different from IntrinsicTypes.AllTypes since user defined structs are legal as well) - these remain commented out.

New builtin types are two structs with simple field members as well as a fully opaque new resource type. The last thing missing is the RAY_FLAG enum, i didn't find a feature for that yet either.

tgjones commented 3 years ago

This is amazing, thank you!

Indeed, templated parameters aren't supported - I sort of hacked template support for the texture types, but to support CallShader etc. I'd need to do this "properly". Once I do then we can uncomment what you added.

And yes, enum isn't supported yet either, but should be.

jkunstwald commented 3 years ago

Glad this worked out!