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
Description
I have a straightforward piece of functionality that should display depth texture, which means I have to sample depth texture in the fragment shader. Here is what my fragment shader:
The problem is that the translated shader fails to compile. If I understand correctly, Web GL 2.0 allows using depth textures in shaders but only with comparison samplers (which works fine on Windows).
The message in Chrome's console log says I should report this issue so here I am.
The source code with build instructions is available here: https://github.com/Sunday111/rust-learn-wgpu . I am not sure if that can be fixed for Web GL 2 backend at all but the error description could be better.
Extra materials
Here is console log from the browser where I printed device limits.
wgpu error: Validation Error
Caused by:
In Device::create_render_pipeline, label = 'depth_pass.render_pipeline'
Internal error in ShaderStages(FRAGMENT) shader: ERROR: 0:20: 'textureLod' : no matching overloaded function found
Platform
Windows, WebGL 2.0 (OpenGL ES 3.0 Chromium), Rust compiled to wasm with wgpu 24.0.1
The text was updated successfully, but these errors were encountered:
Description
I have a straightforward piece of functionality that should display depth texture, which means I have to sample depth texture in the fragment shader. Here is what my fragment shader:
display_depth_shader.wgsl
The problem is that the translated shader fails to compile. If I understand correctly, Web GL 2.0 allows using depth textures in shaders but only with comparison samplers (which works fine on Windows).
The message in Chrome's console log says I should report this issue so here I am.
Repro steps
It can be reproduced here https://sunday111.github.io/rust-learn-wgpu/tutorial_8 (focus the surface and press key
O
).The source code with build instructions is available here: https://github.com/Sunday111/rust-learn-wgpu . I am not sure if that can be fixed for Web GL 2 backend at all but the error description could be better.
Extra materials
Here is console log from the browser where I printed device limits.
Here is the validation error
Platform
Windows, WebGL 2.0 (OpenGL ES 3.0 Chromium), Rust compiled to wasm with wgpu 24.0.1
The text was updated successfully, but these errors were encountered: