View Full Version : problem with shader writing

08 August 2007, 09:56 AM

I try to write a shader, but i don't get it to work. I do exactly the same as it is describet XSI SDK documentation. My shader compiles, i copy the dll to Application\bin\nt-x86 and installed is it anyway since i'm creating it in the user folder (but i already tried to uninstall and reinstall it).
Always when I try to render an object with the material i get the error:

' ERROR : PHEN 0.3 error 051011: shader "test_shader" not found

sometimes it's also PHEN 0.4
I also tried to use exactly the same sample code as in the xsi sdk doc, but it's still the same error.

I've installed the microsoft SDK v6.0 and the .net framework 2.0 is also installed and i'm using microsoft Visual Studio 2005 to program.

Can somebody tell me what i'm doing wrong?


08 August 2007, 03:17 PM
This looks like the classic missing dlls error. I don't know if the .NET install would take care of this, but check for the files in your system32 directory:



08 August 2007, 04:34 PM
thanks for the answer. All the dll's are there - is there anything else that could cause this error?

08 August 2007, 01:52 AM
thanks for the answer. All the dll's are there - is there anything else that could cause this error?

Did you use the shader wizard to generate the code? If not, make sure your function definitions (and/or declarations) have the requisite prefixes. E.g.:

extern "C" DLLEXPORT miBoolean test_shader( miColor *r, miState *s, void *p )

Failing that, get a hold of depends.exe ( and open your DLL with it. It'll tell you how your symbols are exported (ie. what your exported functions look like to XSI and mental ray) and whether there are any missing DLL dependencies.

08 August 2007, 02:04 AM
I tried to play around with the same thing a few months ago and had the same problem.

Unfortunately I can't remember exactly how I solved the problem but I vaguely remember that I had to restart the app, uninstall and delete the files I created everytime I made a change.

CGTalk Moderation
08 August 2007, 02:04 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.