openGL ES

texture2D

2019-01-17  本文已影响18人  啵啵_long_港

vec4 texture2D(sampler2D sampler, vec2 coord)
The texture2D function returns a texel, i.e. the (color) value of the texture for the given coordinates.
第一个参数代表图片纹理,第二个参数代表纹理坐标点,通过GLSL的内建函数texture2D来获取对应位置纹理的颜色RGBA值

上一篇下一篇

猜你喜欢

热点阅读