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值
The texture2D function returns a texel, i.e. the (color) value of the texture for the given coordinates.
第一個參數代表圖片紋理,第二個參數代表紋理坐標點,通過GLSL的內建函數texture2D來獲取對應位置紋理的顏色RGBA值
作者:啵啵_long_港
鏈接:https://www.jianshu.com/p/ca9e9ff50c5b
來源:簡書
著作權歸作者所有。商業轉載請聯系作者獲得授權,非商業轉載請注明出處。