HLSL: how to use *.Fx of FX Composer in DX ?
I use FX Composer to get a *.FX file
But now I want to use it in DX
I try to load it with the BasicHLSL example but it crash...
It doesn't work in EffectEdit, even when I add a Mesh to it
It doesn't do an error, but it doesn't apply the material
How do people at MS use those tools ?
What is the best sample in the SDK to use to make the *.FX file of FX composer to work ?
Any idea what I have to change in the file to make it work ?
It look like the *.FX of FX Composer and RenderMonkey are very close
But the file FX of DX seems to use another set of code...is it the case ?
Some come with a mesh, and some are only materials...
I see that I can test with fxc.exe
I will try that tonight
How come MS doesn't provide a sample that can use simple effect for the major
company in graphic card ?
Etienne2005 wrote: |
| I try to load it with the BasicHLSL example but it crash... |
|
Okay, what sort of error? a message box? what debug output do you get? Any clue as to what line of code crashes?
The BasicHLSL sample is more of an introduction to the world of HLSL programming - it's not a complete, general purpose effect viewer.
Etienne2005 wrote: |
| It doesn't work in EffectEdit, even when I add a Mesh to it It doesn't do an error, but it doesn't apply the material |
|
What version of the DirectX SDK do you use? I forget when, but I seem to remember that EffectEdit is a deprecated/old tool these days. They've moved over to dxops.exe and dxviewer.exe...
As a general point, you want to keep your tools synchronised... use matching tools to avoid unsupported/unexpected errors. If your verison of FX composer is based on a newer version of the SDK (hence newer HLSL/fx compiler) it's possible that it won't work with your older SDK.
Etienne2005 wrote: |
| What is the best sample in the SDK to use to make the *.FX file of FX composer to work ? |
|
Try the dxviewer.exe tool. It's designed to be a DX-SAS compliant FX-based viewer; provided that your FX file complies with DX-SAS then it should "just work".
Etienne2005 wrote: |
| Any idea what I have to change in the file to make it work ? |
|
I've not used FX Composer (not an NV person), but it is possible (I've seen examples) that it introduces FXComposer-specific code/variables/semantics. If you have any of these you might need to remove them before a general purpose tool such as dxviewer.exe can handle them...
Etienne2005 wrote: |
| How come MS doesn't provide a sample that can use simple effect for the major company in graphic card ? |
|
As mentioned, try out the dxviewer.exe program... but remember that RenderMonkey and FXComposer are professional tools intended to go beyond the DirectX SDK and Microsoft offerings - they may well add things that it's just no feasible for the DX SDK to support ...hth
Jack
Thank a great deal for this information :-)
I was totally lost in all the different SDK I currently have
I have the DX9c on my PC now
and I have the newest SDKoctober2005, exept that I still have the .net 7.0
and the new SDK don't compile all in the .net 7.0
(I realise the free 8.0 is out there but I have a slow modem at home...)
I will definitly use the new viewer...
I basicaly crash and reboot all night long yesterday :-)
In part because FX Composer XML as a bug, now I have the fix
I kept reinstalling the FX Composer tool
I appreciate your help a lot, thanks again for this info