You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I stumbled upon issue which when I directly attempt to display depth texture of the render pass through ImGui::Image program stops with below error, presumably due to sampler mismatch when Image tries to bind Depth texture as an WGPUTextureSampleType_Float format instead of WGPUTextureSampleType_Depth and I wonder if it's an design decision or missing feature? since being not able to set or specify the texture format for Image leads to introduce some manual labor on the users side such as converting different texture formats to WGPUTextureSampleType_Float through an additional pass.
Error:
WGPU error: None of the supported sample types (UnfilterableFloat|Depth) of [Texture (unlabeled 3840x2160 px, TextureFormat::Depth32Float)] match the expected sample
types (Float).
- While validating entries[0] as a Sampled Texture.
Expected entry layout: {sampleType: TextureSampleType::Float, viewDimension: 2, multisampled: 0}
- While validating [BindGroupDescriptor] against [BindGroupLayout (unlabeled)]
- While calling [Device "My Device"].CreateBindGroup([BindGroupDescriptor]).
Generally the suggested solution (e.g. #3590) is to use a AddCallback() drawcmd to manually make the render change sampler or other render state. Note how e.g. #7511 or #6908 would lead to same direction.
Now, whether this is easy or even possible might depends on the backend and how to alter that render state.
For some backends user code may lack access to backend internal data and we may need a solution for that.
I think you should dig in WGPU backend and see if you can find a way to implement this via draw callbacks.
Generally I think we ought to find solution to make some common case easier (e.g. switch from linear to point filtering). #2697 essentially proposed making user able to rewire texture binding code while using standard backends which is probably a desirable eventually but would drag a bunch of other things, as user code may need more standardized access to some backend internal data.
Thanks for the clarification. I agree this not might be easy since problem is tricky to solve in a backend agnostic way which is case for WebGPU too due to lack of api to determine texture state after creation but I will look draw callbacks and what can I do. I close this issue due to there is already plenty of discussions about similar points.
Version/Branch of Dear ImGui:
Version 1.90.6, Branch: master
Back-ends:
imgui_impl_wgpu.cpp + imgui_impl_glfw.cpp
Compiler, OS:
macOS + Clang 17.0.6
Full config/build information:
No response
Details:
My Issue/Question:
I stumbled upon issue which when I directly attempt to display depth texture of the render pass through
ImGui::Image
program stops with below error, presumably due to sampler mismatch when Image tries to bind Depth texture as anWGPUTextureSampleType_Float
format instead ofWGPUTextureSampleType_Depth
and I wonder if it's an design decision or missing feature? since being not able to set or specify the texture format for Image leads to introduce some manual labor on the users side such as converting different texture formats to WGPUTextureSampleType_Float through an additional pass.Error:
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
The text was updated successfully, but these errors were encountered: