53 lines
948 B
HLSL
53 lines
948 B
HLSL
#ifndef MACROS_H
|
|
#define MACROS_H
|
|
|
|
#define COMMON using namespace Common; namespace Common
|
|
|
|
#ifdef VS_SHADER
|
|
#define VS using namespace VertexShader; namespace VertexShader
|
|
#else
|
|
#define VS namespace VertexShader_DO_NOT_USE
|
|
#endif
|
|
|
|
#ifdef PS_SHADER
|
|
#define PS using namespace PixelShader; namespace PixelShader
|
|
#else
|
|
#define PS namespace PixelShader_DO_NOT_USE
|
|
#endif
|
|
|
|
#ifdef RAY_SHADER
|
|
#define RAY using namespace RayShader; namespace RayShader
|
|
#else
|
|
#define RAY namespace RayShader_DO_NOT_USE
|
|
#endif
|
|
|
|
#ifdef CALLABLE_SHADER
|
|
#define CALLABLE using namespace CallableShader; namespace CallableShader
|
|
#else
|
|
#define CALLABLE namespace CallableShader_DO_NOT_USE
|
|
#endif
|
|
|
|
float4 Test()
|
|
{
|
|
return float4(1,0.5,1,1);
|
|
}
|
|
|
|
#ifndef USE_CALLABLE_SHADERS
|
|
#define USE_CALLABLE_SHADERS
|
|
#endif
|
|
|
|
struct RunShaderResult_t<A>
|
|
{
|
|
A val;
|
|
|
|
};
|
|
|
|
[noinline]
|
|
[builtin]
|
|
RunShaderResult_t<A> RunShader<A, B>( uint32_t id, B data ) where optional B
|
|
{
|
|
return {};
|
|
}
|
|
|
|
#endif
|