diff --git a/src/render/mod.rs b/src/render/mod.rs index a2a12f46..5dd8ad4e 100644 --- a/src/render/mod.rs +++ b/src/render/mod.rs @@ -484,8 +484,8 @@ impl SpecializedRenderPipeline for GaussianCloudPipeline { format: TextureFormat::Rgba8UnormSrgb, blend: Some(BlendState { color: BlendComponent { - src_factor: BlendFactor::DstAlpha, - dst_factor: BlendFactor::One, + src_factor: BlendFactor::One, + dst_factor: BlendFactor::OneMinusSrcAlpha, operation: BlendOperation::Add, }, alpha: BlendComponent { diff --git a/src/render/sort/radix.wgsl b/src/render/sort/radix.wgsl index 3dee8d91..3b929fc6 100644 --- a/src/render/sort/radix.wgsl +++ b/src/render/sort/radix.wgsl @@ -57,9 +57,7 @@ fn radix_sort_a( let clip_space_pos = world_to_clip(transformed_position); if(in_frustum(clip_space_pos.xyz)) { // key = bitcast(1.0 - clip_space_pos.z); - // key = u32(clip_space_pos.z * 0xFFFF.0) << 16u; - let normalized_depth = (1.0 - clip_space_pos.z) * 0.5; - key = u32(normalized_depth * 0xFFFF.0) << 16u; + key = u32(clip_space_pos.z * 0xFFFF.0) << 16u; key |= u32((clip_space_pos.x * 0.5 + 0.5) * 0xFF.0) << 8u; key |= u32((clip_space_pos.y * 0.5 + 0.5) * 0xFF.0); }