开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜