Jump to content
  • Advertisement
Sign in to follow this  
mlt

"tex2d not supported in this profile"

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

In a fragment program I do:
void main(
            in      float4    texcoord       : TEXCOORD0
          , out     float4    color          : COLOR
          , uniform sampler2D decal
          )
{                                                           
	color.rgb = tex2D(decal, texcoord.xyz);
	color.a = 1;
}

But when I run "cgc" on the fragment program I get: warning C7011: implicit cast from "float4" to "float3" error C3004: function "tex2D" not supported in this profile 24 lines, 1 warnings, 1 errors. But when I run the application it does not give that error. The application runs with arbvp1 and arbfp1 profiles. Any idea on why cgc gives that error at compile time but not at runtime?

Share this post


Link to post
Share on other sites
Advertisement
check the cgc - command line help it should list what the default profiles are (its been a while since I used cg so Im a bit shaky about thjis)
also
texcoord.xyz -> (you prolly mean) texcoord.xy

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!