且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

WebGL-使用多个纹理时的条纹

更新时间:2023-02-02 17:41:49

我看到的可能性是,您变化的vTextureIndex的插值效果很差.尝试将其四舍五入到最接近的值,而不是向下:int(vTextureIndex + 0.5).

The possibility I see is poor interpolation of your varying vTextureIndex. Try rounding it to nearest rather than down: int(vTextureIndex + 0.5).

是的,您会认为这不是必需的,但是GPU在允许的所有位置使用大致良好的近似值.

Yes, you would think this wouldn't be necessary, but GPUs use rough good-enough approximations all over the place where they're allowed to.