Skip to content

Commit

Permalink
fix depth texture cache invalidation during resizing; tag 0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Nov 17, 2024
1 parent a4fbe14 commit 76d39a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@triadica/lagopus",
"version": "0.1.2",
"version": "0.1.3",
"type": "module",
"module": "./lib/index.mjs",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/paint.mts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export let makePainter = (info: LagopusObjectData): ((l: number) => void) => {

let device = atomDevice.deref();
let context = atomContext.deref();
let depthTexture = atomDepthTexture.deref();

let renderParticlesBindGroupLayout = device.createBindGroupLayout({
label: info.label + "@render-uniform",
Expand Down Expand Up @@ -189,6 +188,8 @@ export let makePainter = (info: LagopusObjectData): ((l: number) => void) => {
let loadOp: GPULoadOp = needClear ? "clear" : "load";
let clearValue = atomClearColor.deref() ?? { r: 0.0, g: 0.0, b: 0.0, a: 1.0 };

let depthTexture = atomDepthTexture.deref();

let view = atomBloomEnabled.deref() ? atomCanvasTexture.deref().createView() : context.getCurrentTexture().createView();
// resolveTarget: atomBloomEnabled.deref() ? undefined : context.getCurrentTexture().createView(),
const renderPassDescriptor: GPURenderPassDescriptor = {
Expand Down

0 comments on commit 76d39a8

Please sign in to comment.