Skip to content

Commit

Permalink
fix depthtest?
Browse files Browse the repository at this point in the history
  • Loading branch information
pandrr committed Feb 4, 2025
1 parent d64e91d commit 8e52bcb
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/core/cgp/cgp_pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default class Pipeline
if (this.#pipeCfg.depthStencil.depthWriteEnabled != this.#cgp.stateDepthWrite())
{
needsRebuildReason = "depth changed";
this.#pipeCfg.depthStencil.depthWriteEnabled = this.#cgp.stateDepthWrite();
this.#pipeCfg.depthStencil.depthWriteEnabled = !!this.#cgp.stateDepthWrite();
}

if (this.#pipeCfg.fragment.targets[0].blend != this.#cgp.stateBlend())
Expand All @@ -137,15 +137,6 @@ export default class Pipeline
this.#pipeCfg.fragment.targets[0].blend = this.#cgp.stateBlend();
}

// "fragment": {
// "module": shader.gpuShaderModule,
// "entryPoint": "myFSMain",
// "targets": [
// {
// "format": this._cgp.presentationFormat,
// "blend":
// },

if (this.#cgp.stateDepthTest() === false)
{
if (this.#pipeCfg.depthStencil.depthCompare != "never")
Expand Down Expand Up @@ -372,7 +363,7 @@ export default class Pipeline
// "triangle-strip"
},
"depthStencil": {
"depthWriteEnabled": this.#cgp.stateDepthTest(),
"depthWriteEnabled": this.#cgp.stateDepthWrite(),
"depthCompare": this.#cgp.stateDepthFunc(),
"format": "depth24plus",
},
Expand Down

0 comments on commit 8e52bcb

Please sign in to comment.