-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
WebGPU ImGui::Image not accepts different texture formats #7592
Comments
This is a topic that applies to every backends. Generally the suggested solution (e.g. #3590) is to use a Now, whether this is easy or even possible might depends on the backend and how to alter that render state. Generally I think we ought to find solution to make some common case easier (e.g. switch from linear to point filtering). |
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. |
The general idea is:
|
The changes discussed in #6969 (comment) should make this easier nowadays. happy to work together on populating whatever extra data |
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: