Skip to content

Commit

Permalink
Set blendConstant on RenderPass
Browse files Browse the repository at this point in the history
  • Loading branch information
felixpalmer committed Mar 21, 2024
1 parent 49fbdf7 commit 90683b0
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions modules/core/src/lib/layer.ts
Expand Up @@ -1078,18 +1078,19 @@ export default abstract class Layer<PropsT extends {} = {}> extends Component<
for (const model of this.getModels()) {
model.setParameters(parameters);
}
if (parameters.blendColor) {
context.renderPass.setParameters({blendConstant: parameters.blendColor});
}

// Call subclass lifecycle method
context.device.withParametersWebGL(parameters, () => {
const opts = {renderPass, moduleParameters, uniforms, parameters, context};
const opts = {renderPass, moduleParameters, uniforms, parameters, context};

// extensions
for (const extension of this.props.extensions) {
extension.draw.call(this, opts, extension);
}
// extensions
for (const extension of this.props.extensions) {
extension.draw.call(this, opts, extension);
}

this.draw(opts);
});
this.draw(opts);
} finally {
this.props = currentProps;
}
Expand Down

0 comments on commit 90683b0

Please sign in to comment.