About Store Forum Documentation Contact



Post Reply 
Shader tutorials problems
Author Message
mystara Offline
Member

Post: #1
Shader tutorials problems
Hi,

I seem to have a problem in compiling the shaders in the tutorials.
I've learned my lesson and the Main.h file points to the right place. Being as it's the tutorial file, the engine.pak file should also be up-to-date.

Here's the error:

Error compiling shader
"Shader/Shader.cpp"
to file
"/Applications/EsenthelEngineSDK/data\Shader/GL/User/Custom Shader".

Compilation Messages:
CG ERROR : "The compile returned an error."
/Applications/EsenthelEngineSDK/data/Shader/Shader.cpp(41) : error C0501: type name expected at token ")"
/Applications/EsenthelEngineSDK/data/Shader/Shader.cpp(9) : error C0000: syntax error, unexpected ',' at token ","
/Applications/EsenthelEngineSDK/data/Shader/Shader.cpp(9) : error C0501: type name expected at token ","
/Applications/EsenthelEngineSDK/data/Shader/Shader.cpp(9) : warning C7022: unrecognized profile specifier "vtx"
/Applications/EsenthelEngineSDK/data/Shader/Shader.cpp(9) : warning C7022: unrecognized profile specifier "VtxInput"
/Applications/EsenthelEngineSDK/data/Shader/Shader.cpp(13) : error C0000: syntax error, unexpected identifier at token "Vec4"
/Applications/EsenthelEngineSDK/data/Shader/Shader.cpp(13) : error C0501: type name expected at token "Vec4"
/Applications/EsenthelEngineSDK/data/Shader/Sh.......
(This post was last modified: 07-25-2011 07:59 PM by mystara.)
07-25-2011 07:59 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Shader tutorials problems
I think it's possible you've set incorrect path.

Where did you extract the EsenthelEngineShader.rar ?
Try "/EsenthelEngineShader"
so you have:
"/EsenthelEngineShader/Main.h"

then edit "..\EsenthelEngineSDK\Data\Shader\main.h"
to have:
Code:
#include "/EsenthelEngineShader/Main.h"
07-27-2011 01:24 PM
Find all posts by this user Quote this message in a reply
mystara Offline
Member

Post: #3
RE: Shader tutorials problems
I guess it must have been the wrong path, because the error message has changed. However, I was sure that it was right. I even copied the path directly from terminal to avoid making any mistakes.

In any case, the error I now get is:
Shader Param "_Material._ambient_specular" not found

I seem to recall that those kind of errors occur when the engine.pak is out of date. However, I've run autoupdate and this hasn't helped. I've also tried ensuring that I'm using the latest version of the shader headers, which I figured might be out of date.

I've also placed the files in the location you recommended.
(This post was last modified: 07-28-2011 09:45 PM by mystara.)
07-28-2011 09:44 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Shader tutorials problems
When are you having this error? (doing what)
There is no "_Material._ambient_specular"
there is only "Material._ambient_specular" which is accessed by shader funcs MaterialSpecular and MaterialAmbient

Are you using CG from this link - http://www.esenthel.com/download/Librari...ry2010.dmg ?
If not, then uninstall previous version, and install that one.
07-31-2011 11:48 AM
Find all posts by this user Quote this message in a reply
mystara Offline
Member

Post: #5
RE: Shader tutorials problems
The error occurs as soon as I compile and execute the Tutorial:
1 - Shader Creation
07-31-2011 12:16 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: Shader tutorials problems
I've just tested the latest Mac SDK shader creation tutorial and it works fine for me.
Do you have the correct CG version installed?

Uninstall yours like specified here - http://forums.developer.nvidia.com/lofiv...t4256.html
Then install this http://www.esenthel.com/download/Librari...ry2010.dmg
rebuild your project
08-01-2011 04:27 PM
Find all posts by this user Quote this message in a reply
mystara Offline
Member

Post: #7
RE: Shader tutorials problems
I've tried uninstalling and reinstalling CG.
No luck. I still have the same error.

I'm running OS X Lion. Could the problem be due to an incompatibility between Lion and CG 2.2?
(This post was last modified: 08-01-2011 05:53 PM by mystara.)
08-01-2011 05:53 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #8
RE: Shader tutorials problems
Did you try running the shader tutorials on earlier OS versions? Snow Leopard, Leopard, Tiger?
Is your Lion version is "final", or some "developer preview" (beta) ?
08-03-2011 12:00 PM
Find all posts by this user Quote this message in a reply
mystara Offline
Member

Post: #9
RE: Shader tutorials problems
I recall that I ran them fine in Snow Leopard a few months ago.
I am unable to re-test the current files.

My version of Lion is final. It is the one from the App store.
08-03-2011 07:48 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #10
RE: Shader tutorials problems
thanks, so it looks like the issue is on Lion only.

I'll upgrade my Mac to Lion soon, and will check it out.
08-06-2011 12:50 PM
Find all posts by this user Quote this message in a reply
mystara Offline
Member

Post: #11
RE: Shader tutorials problems
I'll look forward to it. The last two things I have left to do involve the use of infinitely (drawn) planes and this shader thing, so I'm really just waiting on mac stuff now grin

Incidentally, I seem to recall that there are newer versions of CG available. Is it worth me trying one of them?
(This post was last modified: 08-06-2011 05:05 PM by mystara.)
08-06-2011 05:05 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #12
RE: Shader tutorials problems
you could try, but I don't know if that would help
08-06-2011 05:35 PM
Find all posts by this user Quote this message in a reply
mystara Offline
Member

Post: #13
RE: Shader tutorials problems
I'll leave it be then smile
08-06-2011 05:35 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #14
RE: Shader tutorials problems
problem should be solved wink
08-12-2011 10:42 PM
Find all posts by this user Quote this message in a reply
mystara Offline
Member

Post: #15
RE: Shader tutorials problems
Awesome. That does indeed seem to work.

Thanks!
08-17-2011 06:45 PM
Find all posts by this user Quote this message in a reply
Post Reply