PDA

View Full Version : Pixel Shader Initialization Failed



orbano
01-09-2004, 09:30 AM
Im using Shaders with OpenGL through nvidia's cg library. When initializing the pixel shader profile, it returns with the invalid profile error. Here is the init:

cgContext = cgCreateContext();//ok
...
creating a Vertex Shader profile and Program, went ok
...
cgPixelProfile = cgGLGetLatestProfile(CG_GL_FRAGMENT);
if (cgPixelProfile == CG_PROFILE_UNKNOWN)
{
//this error occurs
GEngine_SendErrorMsg("Invalid Profile Type (PS)");
exit(0);
}

My program runs on a Radeon9700 perfectly, but on my Radeon8500 fails. Could somebody help? Im quite new in shader programming, and not everything is clear about shader versions, profiles, compability, etc.

jra101
01-09-2004, 09:54 AM
A 8500 doesn't support the ARB_fragment_program extension so cgGLGetLatestProfile will return CG_PROFILE_UNKNOWN.

jwatte
01-09-2004, 09:54 AM
CG does not support fragment shaders on Radeon 8500. It probably supports some simple shaders on GeForce3/4, through the NVIDIA register combiner extension, but for obvious reasons they didn't write support for the ATI texture shader extension.

orbano
01-09-2004, 10:03 AM
So what is the solution for me?

Ostsol
01-09-2004, 10:09 AM
On a Radeon 8500 you have to use ATI_fragment_shader. AFAIK, Cg doesn't have a profile for it and won't unless ATI writes one (which they certainly won't).

orbano
01-09-2004, 10:14 AM
Do U know any good tutorials on this extension? Simple specification say me nothing http://www.opengl.org/discussion_boards/ubb/smile.gif
Oh, iots not that hard as i tought http://www.opengl.org/discussion_boards/ubb/smile.gif Extension specs rule!

[This message has been edited by orbano (edited 01-09-2004).]