* @private
()
| 823 | * @private |
| 824 | */ |
| 825 | bindTextures() { |
| 826 | const empty = this._renderer._getEmptyTexture(); |
| 827 | |
| 828 | for (const uniform of this.samplers) { |
| 829 | if (uniform.noData) continue; |
| 830 | let tex = uniform.texture; |
| 831 | if ( |
| 832 | tex === undefined || |
| 833 | ( |
| 834 | // Make sure we unbind a framebuffer uniform if it's the same |
| 835 | // framebuffer that is actvely being drawn to in order to |
| 836 | // prevent a feedback cycle |
| 837 | tex.isFramebufferTexture && |
| 838 | !tex.src.framebuffer.antialias && |
| 839 | tex.src.framebuffer === this._renderer.activeFramebuffer() |
| 840 | ) |
| 841 | ) { |
| 842 | // user hasn't yet supplied a texture for this slot. |
| 843 | // (or there may not be one--maybe just lighting), |
| 844 | // so we supply a default texture instead. |
| 845 | uniform.texture = tex = empty; |
| 846 | } |
| 847 | this._renderer._updateTexture(uniform, tex); |
| 848 | } |
| 849 | } |
| 850 | |
| 851 | /** |
| 852 | * @private |
no test coverage detected