Skip to content

Commit

Permalink
Merge pull request #1335 from actnwit/fix/fix2
Browse files Browse the repository at this point in the history
Fix: test works
  • Loading branch information
emadurandal authored May 18, 2024
2 parents ff21bd4 + e495a11 commit f1b9300
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/foundation/materials/core/Material.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ export class Material extends RnObject {
);
this._shaderProgramUid = programUid;

Material.__stateVersion++;

return programUid;
}

Expand All @@ -302,6 +304,7 @@ export class Material extends RnObject {
);

this._shaderProgramUid = programUid;
Material.__stateVersion++;
}

/**
Expand Down Expand Up @@ -329,6 +332,7 @@ export class Material extends RnObject {
// this.__updatedShaderSources = updatedShaderSources;
}

Material.__stateVersion++;
return programUid;
}

Expand Down
2 changes: 1 addition & 1 deletion src/foundation/math/MathClassUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ export class MathClassUtil {
} else if (Array.isArray(objForDetectType)) {
let isSame = true;
for (let i = 0; i < objForDetectType.length; i++) {
if (objForDetectType[i] !== val[i]) {
if (objForDetectType[i] !== val._v[i]) {
isSame = false;
break;
}
Expand Down
3 changes: 2 additions & 1 deletion src/foundation/renderer/RenderPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,8 @@ export class RenderPass extends RnObject {
getAppropriateMaterial(primitive: Primitive): Material {
let material = this._getMaterialOf(primitive);

if (this.__material != null) {
if (material != null) {
} else if (this.__material != null) {
material = this.__material;
} else {
material = primitive.material;
Expand Down

0 comments on commit f1b9300

Please sign in to comment.