Jump to content
  • Advertisement
Sign in to follow this  

"tex2d not supported in this profile"

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!