Time for action — using the mirror mode

For the mirror mode, we again create a new material:

  1. Create a new material called MyMaterial5 using the previous material as a template.
  2. Change the texture mode to mirror:
    tex_address_mode mirror
    
  3. Change the texture to the leaf texture that we used before:
    texture leaf.png
    
  4. Compile and run the application, and you should see the leaf mirrored four times.
    Time for action — using the mirror mode

What just happened?

We again changed the texture mode this time to mirroring. Mirror is a simple, yet effective, mode when used for texturing big areas like a stone wall. Each time the texture coordinates are bigger than 1, the texture gets flipped and then used as it is in wrap mode. We can see the effect of this in the following diagram.

What just happened?
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.130.199