Jump to content
  • Advertisement
Sign in to follow this  
edwinnie

remove bound effect textures

This topic is 5136 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

hihi! i set a texture to the effects-based shader. but how do i remove it, if i do not need it for the next pass?? thx! Edwinz

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
There's no need to remove a texture once it is set. You can overwrite it with a new one, but removing it doesn't help anything.

Share this post


Link to post
Share on other sites
Beginning/Ending effects may actually save the previous state and restore it, unless you specifically pass flags to make it not save state. However, as not saving state is faster, that's what you should do.

The next effect will set up all the state it needs. Thus, if you use effects for everything, you'll be fine no matter what.

If you don't, then I suggest creating an effect that assigns all textures and shaders to NULL and all other states to whatever defaults you want. When you're done rendering using an effect, and want to render using manual states, apply the first pass of this effect to "clear out" the system; then set the states you want manually.

Share this post


Link to post
Share on other sites
Quote:
Original post by hplus0603
If you don't, then I suggest creating an effect that assigns all textures and shaders to NULL and all other states to whatever defaults you want. When you're done rendering using an effect, and want to render using manual states, apply the first pass of this effect to "clear out" the system; then set the states you want manually.

For that I'd suggest modifying the already-existing defaults.fx file by InFramez.

Share this post


Link to post
Share on other sites
hihi!
thx alot fer replies!

jus one other qn:
I know float texture formats (16bit & above) usually give a performance hit when used in RTTs.

I wanna ask if textures not used for RTTs but used as a lookup will incur any similar performance hits like those used in RTTs.

I understand figuring out the texture sizes & formats are a way to minimize such problems, but dunno if non-RTT based textures would incur the same problems...

thx!
Edwinz

Share this post


Link to post
Share on other sites
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!