Jump to content
  • Advertisement
Sign in to follow this  
khancoder

How can i pass Texture to shader file.

This topic is 2534 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!