Skip to content

Commit 0cb9727

Browse files
authored
Update RenderWebGL.js
1 parent 3dc266b commit 0cb9727

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/RenderWebGL.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2518,7 +2518,7 @@ class RenderWebGL extends EventEmitter {
25182518
const drawable = this._allDrawables[drawableID];
25192519

25202520
const uniforms = {};
2521-
if (!this.renderOffscreen) {
2521+
if (!this.renderOffscreen && drawable.uniformApplied) {
25222522
if (drawMode === ShaderManager.DRAW_MODE.default && drawable.skin) {
25232523
// If rotationCenterDirty or skinScaleDirty is dirty, then set _calculateTransform first
25242524
// because _rotationAdjusted and _skinScale needs to call _calculateTransform before using
@@ -2584,7 +2584,8 @@ class RenderWebGL extends EventEmitter {
25842584
});
25852585
}
25862586

2587-
if (this.renderOffscreen) {
2587+
if (this.renderOffscreen && !drawable.uniformApplied) {
2588+
drawable.uniformApplied = true;
25882589
Object.assign(
25892590
uniforms,
25902591
drawable.skin.getUniforms(drawableScale),

0 commit comments

Comments
 (0)