dajudge01
10-22-2003, 01:01 PM
Hi all.
How is a texture stage bound to the uniform inputs of a pixel shader? As far as I get it the order of the uniform decls in the pshader represent the texture stages...
I use DX8 and Cg, however not the Cg toolkit.
If so, how can the following pshader (that takes the color output ONLY from tex stage 1) change output when a new texture is loaded into stage 0? That's the prob I have here atm...
struct v2f_simple {
float4 HPosition : POSITION;
float2 TexCoord0 : TEXCOORD0;
float2 TexCoord1 : TEXCOORD1;
float4 Color0 : COLOR0;
};
fragout main(v2f_simple IN,
uniform sampler2D ShadowMap,
uniform sampler2D SpotLight)
{
fragout OUT;
float4 temp = tex2D(ShadowMap);
OUT.col = tex2D(SpotLight);
return OUT;
}
Thanks,
Alex
How is a texture stage bound to the uniform inputs of a pixel shader? As far as I get it the order of the uniform decls in the pshader represent the texture stages...
I use DX8 and Cg, however not the Cg toolkit.
If so, how can the following pshader (that takes the color output ONLY from tex stage 1) change output when a new texture is loaded into stage 0? That's the prob I have here atm...
struct v2f_simple {
float4 HPosition : POSITION;
float2 TexCoord0 : TEXCOORD0;
float2 TexCoord1 : TEXCOORD1;
float4 Color0 : COLOR0;
};
fragout main(v2f_simple IN,
uniform sampler2D ShadowMap,
uniform sampler2D SpotLight)
{
fragout OUT;
float4 temp = tex2D(ShadowMap);
OUT.col = tex2D(SpotLight);
return OUT;
}
Thanks,
Alex
