• Advertisement
Sign in to follow this  

How can i pass Texture to shader file.

This topic is 2351 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need to pass texture in shader file, but it is giving me error "Invalid call". Please help to tell where i am doing wrong ?
Follow is code which is i have written. I am able to set all the parameter except Texture.

/
float progress;
float4 colBack;
float reverse;

sampler input : register(s0);
sampler Texture2 : register(s1);

//Code to get the parameterhandle
progressHandle = transitionEffect.GetParameter(null, "progress"));
reverseHandle= transitionEffect.GetParameter(null, "Reverse"));
Texture2Handle= transitionEffect.GetParameter(null, "Texture2"));
//Code to set the value
transitionEffect.SetValue(progressHandle, progress);

transitionEffect.SetValue(reverseHandle, Reverse);
transitionEffect.SetValue(Texture2Handle, smapleTexture);

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement