Skip to main content
gamedev.net
🔒 Locked

Texture stage / sampler2D binding problem

Started by DaJudge Oct 19, 2003 at 1:38 PM 0 replies 450+ views
Original Post
DaJudge
DaJudge
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... If so, how can the following pshader change output if the texture stage 0 is changed?

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
Alexander Stockinger
Programmer

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.