0

I am having a really hard time trying to compile some shaders for a Direct X 11 tutorial I am working my way through.

For some reason, even when I explicitly change the "Entrypoint name" I am still getting this message. X3501 'main entrypoint not found'

I want to be able to compile the shaders during build time as opposed to run time.

Here is a screenshot of the hlsl properties for my Vertex Shader:

enter image description here

and here is the Vertex Shader code:

 cbuffer cbPerObject : register(b0)
 {
     float4x4 gWorldViewProj; 
 };

 struct VertexIn
 {
     float3 PosL  : SV_POSITION;
     float4 Color : COLOR;
 };

 struct VertexOut
 {
     float4 PosH  : SV_POSITION;
     float4 Color : COLOR;
 };

 VertexOut VS(VertexIn vin)
 {
     VertexOut vout;

     // Transform to homogeneous clip space.
     vout.PosH = mul(float4(vin.PosL, 1.0f), gWorldViewProj);

     // Just pass vertex color into the pixel shader.
     vout.Color = vin.Color;

     return vout;
 }

Any help would be greatly appreciated. Thanks!

Edit:

I also have the similar setup for my pixel shader as well

user121615
  • 199
  • 1
  • 7

2 Answers2

1

You should select "All Configurations" and "All Platforms". Otherwise you are only setting it up correctly for Debug/x64.

Chuck Walbourn
  • 38,259
  • 2
  • 58
  • 81
  • This still didn't work. I updated my Visual studio to 2017 version and now the shaders seem to be working. Thanks for the help Chuck. – user121615 Nov 01 '17 at 03:38
1

Just remove the hlsl file from your project but not delete.The visual studio should not compile the hlsl file.It doesn`t matter main entry point,so edit the name of entry point is useless.

Genius Hat
  • 11
  • 1