-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for more depth stencil formats. #12675
Add support for more depth stencil formats. #12675
Conversation
I've been struggling to get the visualization tests working and passing locally (not just the new tests, but also existing tests). And not just for this branch, master too. So, still trying to figure that out. |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://babylonsnapshots.z22.web.core.windows.net/refs/pull/12675/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/12675/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/12675/merge#BCU1XR#0 |
Visualization tests for webgl1 have failed. If some tests failed because the snapshots do not match, the report can be found at If tests were successful afterwards, this report might not be available anymore. |
Need to fix some GL1 related issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!
You will also have to update WebGPU. It's in Engines/WebGPU/Extensions/engine.renderTarget.ts
, the _createDepthStencilTexture
function.
packages/dev/core/src/Engines/Extensions/engine.renderTarget.ts
Outdated
Show resolved
Hide resolved
… users/briank/more-depth-stencil-format-support
… users/briank/more-depth-stencil-format-support
@Popov72, from the looks of it, the WebGPU implementation already handles the various depth stencil formats. Correct me if I'm wrong and I will make the necessary updates. |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://babylonsnapshots.z22.web.core.windows.net/refs/pull/12675/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/12675/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/12675/merge#BCU1XR#0 |
I think line 83 of the file I pointed above should be replaced by: depthTextureFormat: options.depthTextureFormat ?? options.generateStencil ? Constants.TEXTUREFORMAT_DEPTH24_STENCIL8 : Constants.TEXTUREFORMAT_DEPTH32_FLOAT, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as soon as @Popov72 concerns have been addressed
@Popov72, does the spread operator for
|
Yes, my bad, everything is ok with no change! |
This is good to merge, right? |
Ok for me. |
This requires some rework of the logic in ThinEngine._createDepthStencilTexture, but it should be non-breaking. A similar change was made to extend MultiRenderTarget's depth-stencil texture handling too.
I've also added visualization tests to exercise the createDepthStencilTexture code path.