work on shader compiler
This commit is contained in:
43
funnyassets/shaders/flat.shader~
Normal file
43
funnyassets/shaders/flat.shader~
Normal file
@@ -0,0 +1,43 @@
|
||||
#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
|
||||
|
||||
COMMON
|
||||
{
|
||||
|
||||
struct PS_INPUT
|
||||
{
|
||||
float4 m_vPosition : SV_Position;
|
||||
}
|
||||
}
|
||||
VS
|
||||
{
|
||||
struct VS_INPUT
|
||||
{
|
||||
float3 m_vPosition: POSITION;
|
||||
}
|
||||
|
||||
PS_INPUT vsMain( VS_INPUT i )
|
||||
{
|
||||
PS_INPUT o;
|
||||
o.m_vPosition = { i.m_vPosition, 1 };
|
||||
return o;
|
||||
}
|
||||
}
|
||||
PS
|
||||
{
|
||||
float4 psMain( PS_INPUT i )
|
||||
{
|
||||
return float4(1);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user