Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions comfy-wgpu/src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ pub async fn create_graphics_context(
info!("Supported formats: {:?}", supported_formats);

#[cfg(not(target_arch = "wasm32"))]
let preferred_format = wgpu::TextureFormat::Bgra8UnormSrgb;
let preferred_format = wgpu::TextureFormat::Bgra8Unorm;
#[cfg(target_arch = "wasm32")]
let preferred_format = wgpu::TextureFormat::Rgba8UnormSrgb;
let preferred_format = wgpu::TextureFormat::Bgra8Unorm;

let monitor_surface_format =
if supported_formats.contains(&preferred_format) {
Expand Down
2 changes: 1 addition & 1 deletion comfy-wgpu/src/texture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ impl Texture {
let format = if is_normal_map {
wgpu::TextureFormat::Rgba8Unorm
} else {
wgpu::TextureFormat::Rgba8UnormSrgb
wgpu::TextureFormat::Rgba8Unorm
};

Self::from_image_with_format(
Expand Down