Filter forge 5 texture map
![filter forge 5 texture map filter forge 5 texture map](https://www.filterforge.com/filters/13151-v5.jpg)
GlTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, borderColor)
![filter forge 5 texture map filter forge 5 texture map](https://filterforge.com/images/features/maps.jpg)
This is done using the fv equivalent of the glTexParameter function with GL_TEXTURE_BORDER_COLOR as its option where we pass in a float array of the border's color value:įloat borderColor = If we choose the GL_CLAMP_TO_BORDER option we should also specify a border color. The last argument requires us to pass in the texture wrapping mode we'd like and in this case OpenGL will set its texture wrapping option on the currently active texture with GL_MIRRORED_REPEAT. The second argument requires us to tell what option we want to set and for which texture axis we want to configure it for both the S and T axis. The first argument specifies the texture target we're working with 2D textures so the texture target is GL_TEXTURE_2D. GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT) GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT) Let's see what these look like on a sample texture image (original image by Hólger Rezende):Įach of the aforementioned options can be set per coordinate axis ( s, t (and r if you're using 3D textures) equivalent to x, y, z) with the glTexParameter* function:
![filter forge 5 texture map filter forge 5 texture map](https://filterforge.com/images/features/seamless-textures.png)
A texture is a 2D image (even 1D and 3D textures exist) used to add detail to an object think of a texture as a piece of paper with a nice brick image (for example) on it neatly folded over your 3D house so it looks like your house has a stone exterior. What artists and programmers generally prefer is to use a texture.
![filter forge 5 texture map filter forge 5 texture map](https://filterforge.com/filters/235.jpg)
This takes up a considerable amount of extra overhead, since each model needs a lot more vertices and for each vertex a color attribute as well. However, to get a fair bit of realism we'd have to have many vertices so we could specify a lot of colors. We learned that to add more detail to our objects we can use colors for each vertex to create some interesting images.