Sign in to follow this  
mlt

"tex2d not supported in this profile"

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)
also
texcoord.xyz -> (you prolly mean) texcoord.xy

Share this post


Link to post
Share on other sites

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