Thanks for using Compiler Explorer
HLSL
CMake
hlsl source #1
Output
Compile to binary object
Link to binary
Execute the code
Intel asm syntax
Demangle identifiers
Verbose demangling
Filters
Unused labels
Library functions
Directives
Comments
Horizontal whitespace
Debug intrinsics
Compiler
NSC (release)
Options
Source code
#include <nbl/builtin/hlsl/type_traits.hlsl> #include <nbl/builtin/hlsl/bxdf/common.hlsl> #undef static_assert // can you stuff `dxc ignore -Wmissing-declarations` pragmas in macros? #define static_assert(...) ::nbl::hlsl::enable_if<__VA_ARGS__> namespace nbl { namespace hlsl { namespace bxdf { template<bool _Isotropic> struct Stuff { // apparently we can do this https://en.cppreference.com/w/cpp/language/variable_template.html template<class Interaction> NBL_CONSTEXPR_STATIC_INLINE bool RequiredInteraction = _Isotropic ? surface_interactions::Isotropic<Interaction>:surface_interactions::Anisotropic<Interaction>; static_assert(RequiredInteraction<float3> == false); }; } } } [numthreads(1,1,1)] [shader("compute")] void main() { }
Become a Patron
Sponsor on GitHub
Donate via PayPal
Source on GitHub
Mailing list
Installed libraries
Wiki
Report an issue
How it works
Contact the author
CE on Mastodon
CE on Bluesky
About the author
Statistics
Changelog
Version tree