OpenGL texture tiling/repeating with matrix
I know you can do texture tiling/repeating in OpenGL by setting the texture coordinates to values greater than 1.0 (eg 2.0) but is there开发者_如何学C a way I can do texture tiling with the OpenGL texture matrix?
Sure
Your input UVs are multiplied by the texture matrix to give the actual UVs.
If you input (1,1,0,0) and want (2,2,0,0), such a matrix could be
2 0 0 0
0 2 0 0
0 0 1 0
0 0 0 1
Of course, this is just an example, but your question is quite generic.
精彩评论