webglfundamentals.org/webgl/lesso…
texParameteri 横纵参数
- gl.TEXTURE_WRAP_S
- gl.TEXTURE_WRAP_T
- gl.CLAMP_TO_EDGE
- gl.REPEAT
- glMIRRORED_REPEAT
-
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
texParameteri MipMap参数
- NEAREST = choose 1 pixel from the biggest mip
- LINEAR = choose 4 pixels from the biggest mip and blend them
- NEAREST_MIPMAP_NEAREST = choose the best mip, then pick one pixel from that mip
- LINEAR_MIPMAP_NEAREST = choose the best mip, then blend 4 pixels from that mip
- NEAREST_MIPMAP_LINEAR = choose the best 2 mips, choose 1 pixel from each, blend them
- LINEAR_MIPMAP_LINEAR = choose the best 2 mips. choose 4 pixels from each, blend them
-
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_LINEAR); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); - 对于 TEXTURE_MAG_FILTER 只有 NEAREST 和 LINEAR 两个可选设置。