Jump to content
  • Advertisement
Sign in to follow this  
zix99

Fragment shader support...

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

Hello all, I recently finished a testing version of my online RPG, and I sent it to my friends to test, but they all run into the same error: Can't find appropriate Fragment Profile. (Using CG). So my question is, is this my code? Or do their cards not support it? Vertex shader works fine on both their systems. I use a 6600 GT, works fine. Geforce4 440 - Doesn't work Radeon 9200 - Doesn't work Is this support issues? If it is, I have to reprogram my terrain engine over (for the 5th time now). Thanks ~zix~

Share this post


Link to post
Share on other sites
Advertisement
Er, depends on what you actually do in your shaders.
Slipping into DirectX shaders for a moment, the GF6xxx cards supports SM3.0. The Radeon 9200 only supports 2.0, and I'm not sure about the GF4, but I think that's 1.3 or so.
So yes, if you've written shaders that require advanced features, they'll be unavailable on non 6x00 cards.

Share this post


Link to post
Share on other sites
The thing is, it doesn't even get past initializing the fragment shader, forget loading it.

My initializing function goes like this:

void cgmInitialize(){
cgContext = cgCreateContext();
if (cgContext == 0){
MessageBox(NULL, "Error starting CG, check to make sure cg.dll is present!", "ERROR", MB_OK);
exit(1);
}
cgVertexProfile = cgGLGetLatestProfile(CG_GL_VERTEX);
cgFragmentProfile=cgGLGetLatestProfile(CG_GL_FRAGMENT);
if (cgVertexProfile == CG_PROFILE_UNKNOWN){
MessageBox(NULL, "Can't find Vertex Profile", "CG ERROR", MB_OK);
exit(1);
}
if (cgFragmentProfile == CG_PROFILE_UNKNOWN){
MessageBox(NULL, "Can't find Fragment Profile", "CG ERROR", MB_OK);
exit(1);
}
}

And the error pops up for the second if statement, fragment profile unknown.

The shader itself is relativly simple, get some texture data using Tex2D, add it up, divide by 5, return color value.

Known anything that might help me?
Thanks agian.
~zix~

Share this post


Link to post
Share on other sites
Do not insist on using the latest profile.
Perhaps you should check out for something that is just enough for you, and use that specified profile.

Or you should try something like this:


if( cgGLIsProfileSupported(CG_PROFILE_ARBFP1) )
cgFragmentProfile = CG_PROFILE_ARBFP1;
else if( cgGLIsProfileSupported(CG_PROFILE_FP30) )
cgFragmentProfile = CG_PROFILE_FP30;
else if( cgGLIsProfileSupported(CG_PROFILE_FP20) )
cgFragmentProfile = CG_PROFILE_FP20;


Share this post


Link to post
Share on other sites
Quote:
Original post by phantom
I'm pretty sure the 9200 is only a PS1.4 card, its just a refresh of the 8500 if memory serves.


As I recall I think the 9200 is the equivlent of the nVidia 5200, the lowist PS 2.0 card that they have. I myself use cgGLGetLatestProfile, what exactly are you doing in your shaders?

Share this post


Link to post
Share on other sites
Quote:
Original post by skow
Quote:
Original post by phantom
I'm pretty sure the 9200 is only a PS1.4 card, its just a refresh of the 8500 if memory serves.


As I recall I think the 9200 is the equivlent of the nVidia 5200, the lowist PS 2.0 card that they have. I myself use cgGLGetLatestProfile, what exactly are you doing in your shaders?


I'm pretty sure it's a 1.4 card too. If cgGetLatestProfile isn't finding a valid profile, then it probably is (Cg doesn't support pre SM2.0 ATI cards).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!