Browse Source

added comment

David `Deltakosh` Catuhe 4 years ago
parent
commit
da7066f15f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/Materials/uniformBuffer.ts

+ 2 - 0
src/Materials/uniformBuffer.ts

@@ -450,6 +450,8 @@ export class UniformBuffer {
             var changed = false;
             var changed = false;
 
 
             for (var i = 0; i < size; i++) {
             for (var i = 0; i < size; i++) {
+                // We are checking the matrix cache before calling updateUniform so we do not need to check it here
+                // Hence the test for size === 16 to simply commit the matrix values
                 if (size === 16 || this._bufferData[location + i] !== data[i]) {
                 if (size === 16 || this._bufferData[location + i] !== data[i]) {
                     changed = true;
                     changed = true;
                     this._bufferData[location + i] = data[i];
                     this._bufferData[location + i] = data[i];