瀏覽代碼

Fix MRTT Parallel Shader Compile

sebavan 6 年之前
父節點
當前提交
412555d956
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Engines/engine.ts

+ 1 - 1
src/Engines/engine.ts

@@ -5460,7 +5460,7 @@ export class Engine {
 
 
     private _bindSamplerUniformToChannel(sourceSlot: number, destination: number) {
     private _bindSamplerUniformToChannel(sourceSlot: number, destination: number) {
         let uniform = this._boundUniforms[sourceSlot];
         let uniform = this._boundUniforms[sourceSlot];
-        if (uniform._currentState === destination) {
+        if (!uniform || uniform._currentState === destination) {
             return;
             return;
         }
         }
         this._gl.uniform1i(uniform, destination);
         this._gl.uniform1i(uniform, destination);