yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
54d3c5f66
master
1//TEST_IGNORE_FILE: 2 3// Here we are going to test that we can correctly generating bindings when we 4// are presented with a program spanning multiple input files (and multiple entry points) 5 6// This file provides the fragment shader, and is only meant to be tested in combination with `multi-file.hlsl` 7 8#include "multi-file-defines.h" 9 10#ifdef __SLANG__ 11import multi_file_shared ; 12#else 13#include "multi-file-shared.slang" 14#endif 15 16Texture2D fragmentT R ( :register ( t1 )); 17SamplerState fragmentS R ( :register ( s1 )); 18 19BEGIN_CBUFFER ( fragmentC ) 20{ 21float3 fragmentCA ; 22float fragmentCB ; 23float3 fragmentCC ; 24float2 fragmentCD ; 25} 26END_CBUFFER ( fragmentC , register ( b1 )) 27 28float4 main () : SV_TARGET 29{ 30// Go ahead and use everything here, just to make sure things got placed correctly 31return use ( sharedT , sharedS ) 32+ use ( CBUFFER_REF ( sharedC , sharedCD )) 33+ use ( fragmentT , fragmentS ) 34+ use ( CBUFFER_REF ( fragmentC , fragmentCD )) 35+ use ( sharedTF , sharedS ) 36; 37}