Skip to content

Commit

Permalink
refactor: rename to depthBufferTexture (remove ID)
Browse files Browse the repository at this point in the history
  • Loading branch information
seankmartin committed Feb 5, 2024
1 parent 1baaced commit 2100f9a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/perspective_view/panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ export class PerspectivePanel extends RenderedDataPanel {
renderContext.emitPickID = false;
for (const [renderLayer, attachment] of visibleLayers) {
if (renderLayer.isTransparent) {
renderContext.depthBufferTextureID =
renderContext.depthBufferTexture =
this.offscreenFramebuffer.colorBuffers[OffscreenTextures.Z].texture;
renderLayer.draw(renderContext, attachment);
}
Expand Down
2 changes: 1 addition & 1 deletion src/perspective_view/render_layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export interface PerspectiveViewRenderContext
/**
* Specifies the ID of the depth frame buffer texture to query during rendering.
*/
depthBufferTextureID?: WebGLTexture | null;
depthBufferTexture?: WebGLTexture | null;
}

export class PerspectiveViewRenderLayer<
Expand Down
6 changes: 3 additions & 3 deletions src/volume_rendering/volume_render_layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,8 @@ void main() {
shaderResult.parameters.parseResult.controls,
);
if (
renderContext.depthBufferTextureID !== undefined &&
renderContext.depthBufferTextureID !== null
renderContext.depthBufferTexture !== undefined &&
renderContext.depthBufferTexture !== null
) {
const depthTextureUnit = shader.textureUnit(
depthSamplerTextureUnit,
Expand All @@ -594,7 +594,7 @@ void main() {
);
gl.bindTexture(
WebGL2RenderingContext.TEXTURE_2D,
renderContext.depthBufferTextureID,
renderContext.depthBufferTexture,
);
} else {
throw new Error(
Expand Down

0 comments on commit 2100f9a

Please sign in to comment.