Sign in to follow this  

HLSL fxc.exe

This topic is 3312 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

I ran FXC.EXE with valid code, and it gives me nothing in return. I thought it was supposed to output an ASM version of the code for use in the SDK. If it doesn't then what is the purpose of FXC.EXE? How can I use the code in my program that isn't in ASM?

Share this post


Link to post
Share on other sites
Let's say I do this in my lines of code.

if (FAILED (hr = D3DXCompileShaderFromFile (g_strVHLFile, NULL, NULL, "main", "vs_1_1", NULL, &pCode, NULL, &m_VS_ConstantTable)))
{
return hr;
}

if (FAILED (hr = m_pd3dDevice->CreateVertexShader ((DWORD*)pCode->GetBufferPointer(), &m_HLSLVertexShader)))
{
return hr;
}

If I already compiled the file prior (using FCX.EXE), then I could use that object file for the CreateVertexShader function after using D3DXAssembleShaderFromFile?

When I type:
fxc -nologo -T ps_2_0 -Fc -Vd NPRMetallic.txt

I get:


I didn't forget to put anything there. It just shows up blank with no assembly file. Like it didn't do anything at all.

Share this post


Link to post
Share on other sites
The /Fc switch to fxc takes a parameter. The name of the file you want to output the resulting assembly to. You're just passing another switch immediately after it. If you want the shader to go to stdout, don't pass /Fc. If you want the shader to go to a file, say "fxc /Fc<output.txt> input.fx".

Share this post


Link to post
Share on other sites

This topic is 3312 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this