correct egui blending
This commit is contained in:
parent
e8bcaae2a7
commit
ea3c24ec46
|
@ -22,18 +22,18 @@ struct PushConstant {
|
|||
ConstantBuffer<PushConstant> push_constant;
|
||||
|
||||
[shader("vertex")]
|
||||
VertexOut vertex(VertexIn vertex, uint draw_id : SV_DrawIndex) {
|
||||
VertexOut vertex(VertexIn vertex, uint draw_id: SV_DrawIndex) {
|
||||
VertexOut output;
|
||||
|
||||
output.position = float4(
|
||||
output.position = float4(
|
||||
2.0 * vertex.pos.x / push_constant.screen_size.x - 1.0,
|
||||
2.0 * vertex.pos.y / push_constant.screen_size.y - 1.0,
|
||||
0.0,
|
||||
2.0 * vertex.pos.y / push_constant.screen_size.y - 1.0,
|
||||
0.0,
|
||||
1.0,
|
||||
);
|
||||
output.color = vertex.color;
|
||||
output.uv = vertex.uv;
|
||||
output.draw_id = draw_id;
|
||||
output.color = vertex.color;
|
||||
output.uv = vertex.uv;
|
||||
output.draw_id = draw_id;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
|
|
@ -1996,11 +1996,15 @@ impl EguiState {
|
|||
..Default::default()
|
||||
}),
|
||||
color_blend: Some(pipeline::ColorBlendState {
|
||||
attachments: &[vk::PipelineColorBlendAttachmentState {
|
||||
color_write_mask: vk::ColorComponentFlags::RGBA,
|
||||
blend_enable: 0,
|
||||
..Default::default()
|
||||
}],
|
||||
attachments: &[vk::PipelineColorBlendAttachmentState::default()
|
||||
.color_write_mask(vk::ColorComponentFlags::RGBA)
|
||||
.blend_enable(true)
|
||||
.color_blend_op(vk::BlendOp::ADD)
|
||||
.src_color_blend_factor(vk::BlendFactor::ONE)
|
||||
.dst_color_blend_factor(vk::BlendFactor::ONE_MINUS_SRC_ALPHA)
|
||||
.alpha_blend_op(vk::BlendOp::ADD)
|
||||
.src_alpha_blend_factor(vk::BlendFactor::ONE)
|
||||
.dst_alpha_blend_factor(vk::BlendFactor::ONE_MINUS_SRC_ALPHA)],
|
||||
..Default::default()
|
||||
}),
|
||||
rendering: Some(pipeline::RenderingState {
|
||||
|
|
Loading…
Reference in a new issue