• Advertisement
Sign in to follow this  

Visual 2013 problem with debugging shader

This topic is 1330 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello guys, I try to use brakepoint in my shader file but visual tell me that he didnt see file with flags to debuging. I comppile shader with:

D3DCompile(buffer.data(), buffer.size(), NULL, NULL, NULL, mainFucName, "ps_5_0", D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION, NULL, &PS_Buffer, &errorPS);

In hlsl proporties in both shaders is enable debugging information and shader verision is 5_0.

Project: http://www.dropbox.com/s/0wgbjqdxgvi2g1o/DirectXTest.rar

 

Share this post


Link to post
Share on other sites
Advertisement

VS can't work out which file your shader belongs to.

 

In your ShaderEngine.cpp

 

Change line 13 from:

hr = D3DCompile(buffer.data(), buffer.size(), NULL, NULL, NULL, mainFucName, "vs_5_0", D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION, NULL, &VS_Buffer, &errorVS);

to

hr = D3DCompile(buffer.data(), buffer.size(), name, NULL, NULL, mainFucName, "vs_5_0", D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION, NULL, &VS_Buffer, &errorVS);

then do the same for your pixel shader compiler function.

 

That worked for me with your sample (passing name into the pSourceName parameter). Not very intuitive smile.png

Edited by spazzarama

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement