Skip to content

Commit

Permalink
Merge f59d1d4 into 12675c6
Browse files Browse the repository at this point in the history
  • Loading branch information
felixpalmer committed Mar 20, 2024
2 parents 12675c6 + f59d1d4 commit 8a161d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/core/src/adapter/types/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ export type RenderPassParameters = {
blendConstant?: number[]; // GPUColor
/** Stencil operation "replace" sets the value to stencilReference */
stencilReference?: number; // GPUStencilValue

/** Sets mask for channels (RGBA) to render/clear **/
colorMask?: boolean[];
};

export type RenderPipelineParameters = RasterizationParameters &
Expand Down
3 changes: 3 additions & 0 deletions modules/webgl/src/adapter/resources/webgl-render-pass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ export class WEBGLRenderPass extends RenderPass {
// Does this work?
parameters[GL.STENCIL_REF] = parameters.stencilReference;
}
if (parameters.colorMask) {
glParameters.colorMask = parameters.colorMask;
}

this.glParameters = glParameters;

Expand Down

0 comments on commit 8a161d8

Please sign in to comment.