Sign in to follow this  

cg fragment shader problem

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

Do all of the Cg standard math library functions work with all profiles? I'm using the CG_PROFILE_FP20 profile on a Geforce 4 Ti 4200, and if I put something like: float duh = pow(11.0, 11.0); I get an error compiling my fragment program. However the same code compiles without error in my vertex shader, using the CG_PROFILE_ARBVP1 profile.

Share this post


Link to post
Share on other sites
The GF4 cannot perform a POW in the fragment shading hardware (which are register combiners). But the vertex programs have EXP and LOG instructions, so they can handle it. To do a per-fragment POW on NV2x hardware (like the GF4), you need to use a look-up texture. NV3x hardware (GFFX) and later can do POW in the fragment shader.

Share this post


Link to post
Share on other sites

This topic is 4399 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this