"tex2d not supported in this profile"

Started by
0 comments, last by zedz 15 years, 4 months ago
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?
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

This topic is closed to new replies.

Advertisement