Skip to content

Commit

Permalink
Fix transparency
Browse files Browse the repository at this point in the history
  • Loading branch information
StarLederer committed Jan 3, 2023
1 parent 75f59f8 commit a495344
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions crates/bevy_core_pipeline/src/bloom/upsampling_pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ use bevy_ecs::{
use bevy_render::{
render_resource::{
BindGroupLayout, BindGroupLayoutDescriptor, BindGroupLayoutEntry, BindingType,
BlendComponent, BlendFactor, BlendOperation, BlendState,
CachedRenderPipelineId, ColorTargetState, ColorWrites, FragmentState, MultisampleState,
PipelineCache, PrimitiveState, RenderPipelineDescriptor, SamplerBindingType, Shader,
ShaderStages, SpecializedRenderPipeline, SpecializedRenderPipelines,
TextureFormat, TextureSampleType, TextureViewDimension,
BlendComponent, BlendFactor, BlendOperation, BlendState, CachedRenderPipelineId,
ColorTargetState, ColorWrites, FragmentState, MultisampleState, PipelineCache,
PrimitiveState, RenderPipelineDescriptor, SamplerBindingType, Shader, ShaderStages,
SpecializedRenderPipeline, SpecializedRenderPipelines, TextureFormat, TextureSampleType,
TextureViewDimension,
},
renderer::RenderDevice,
texture::BevyDefault,
Expand All @@ -20,9 +20,7 @@ use bevy_render::{

use crate::fullscreen_vertex_shader::fullscreen_shader_vertex_state;

use super::{
BloomCompositeMode, BloomSettings, BLOOM_SHADER_HANDLE, BLOOM_TEXTURE_FORMAT,
};
use super::{BloomCompositeMode, BloomSettings, BLOOM_SHADER_HANDLE, BLOOM_TEXTURE_FORMAT};

#[derive(Component)]
pub struct UpsamplingPipelineIds {
Expand Down Expand Up @@ -134,7 +132,11 @@ impl SpecializedRenderPipeline for BloomUpsamplingPipeline {
operation: BlendOperation::Add,
},
},
alpha: BlendComponent::REPLACE,
alpha: BlendComponent {
src_factor: BlendFactor::Zero,
dst_factor: BlendFactor::One,
operation: BlendOperation::Add,
},
}),
write_mask: ColorWrites::ALL,
})],
Expand Down

0 comments on commit a495344

Please sign in to comment.