Sign in to follow this  

Texture Stages

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

Hi All I am looking at doing some bump mapping, but relized that some triangles in my doom3 map don't use bump mapping, so I need a way of setting texture states for certain triangles, and using a different set for triangles with no bump mapping. Is there a way to save, and restore texture states so a complete map can have different texture states used for different triangles? regards Steve

Share this post


Link to post
Share on other sites
Are your triangles that are bumped in the same buffer/mesh as the triangles that aren't?

If they aren't, all you need to do is use a Shader that bumps for those that are bumped, and when your ready to call the non-bumped you use a Shader that doesn't bump.

If they are in the same buffer, I'll have to think abit on this one.

Share this post


Link to post
Share on other sites
Quote:
Original post by sjmarsha
Is there a way to save, and restore texture states so a complete map can have different texture states used for different triangles?


  • Set up texture stages for drawing non-bump mapped triangles
  • Render non-bump mapped triangles
  • Set up texture stages for drawing bump mapped triangles
  • Render bump mapped triangles

    You don't "save and restore" states, you set them and then render using them.

    Share this post


    Link to post
    Share on other sites
    Quote:
    Original post by Tophurious
    Are your triangles that are bumped in the same buffer/mesh as the triangles that aren't?

    If they aren't, all you need to do is use a Shader that bumps for those that are bumped, and when your ready to call the non-bumped you use a Shader that doesn't bump.

    If they are in the same buffer, I'll have to think abit on this one.


    Hi Tophurious

    My Doom3 Engine, loads the whole map into a single buffer, so I wasn't sure what do to, as the 'pdas' level looks like everything changes, and I attend to do bump mapping for some, and not for all.

    Where can I find a good shader tutorial about bump mapping shaders, and how they are actaully used, as I am very interested in using these.

    ps: Thanks for your help

    regards
    Steve

    Share this post


    Link to post
    Share on other sites

    This topic is 3666 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.

    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