Sign in to follow this  
coreSOLO

shaders, reading 2 textures (solved)

Recommended Posts

In my Dx9 app, I am setting 2 textures to render as :
	dx_device->SetTexture(0,tex_src);
	dx_device->SetTexture(1,tex_base);
However in the primitive, I have defined only 1 texture coordinates. Now in my shader, I am reading them as :
sampler2D samp_maxmin;
sampler2D samp;

float4 PS_Def ( in float2 inTex : TEXCOORD ) : COLOR
{
	float4 tempCol1 = tex2D(samp_maxmin, inTex.xy);
	float4 tempCol2 = tex2D(samp, inTex.xy);
However for both the samplers, its picking color from 1st texture only. So my question is that inside a shader, how do I assign different samplers to different textures? [Edited by - coreSOLO on August 19, 2008 6:38:06 AM]

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