فهرست منبع

Merge pull request #6774 from sebavan/master

Fix MRTT Parallel Shader Compile + SPS Barycenter
David Catuhe 6 سال پیش
والد
کامیت
d9bb077e9a
2فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 1 1
      src/Engines/engine.ts
  2. 1 0
      src/Particles/solidParticleSystem.ts

+ 1 - 1
src/Engines/engine.ts

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

+ 1 - 0
src/Particles/solidParticleSystem.ts

@@ -277,6 +277,7 @@ export class SolidParticleSystem implements IDisposable {
             var shapeUV: number[] = this._uvsToShapeUV(facetUV);
 
             // compute the barycenter of the shape
+            barycenter.copyFromFloats(0, 0, 0);
             var v: number;
             for (v = 0; v < shape.length; v++) {
                 barycenter.addInPlace(shape[v]);