I am new to HLSL and is trying to compile a simple test with HLSL Helpers However, it doesn't compile. I want to compile shader for my Win2D UWP app.
The code:
#define D2D_INPUT_COUNT 1
#define D2D_INPUT0_SIMPLE
#include "d2d1effecthelpers.hlsli"
D2D_PS_ENTRY(main)
{
float4 color1 = D2DGetInput(0);
return color1;
}
When compile this with command-line :
fxc /T ps_4_0 /E main_Impl /Fo testShader.ps testShader.hlsl
It give me this compile error
error X3503: 'main_Impl': function return value missing semantics
What did I do wrong here?