mirror of
https://github.com/godotengine/godot.git
synced 2024-11-24 13:12:42 +00:00
Configure MSAA properly in canvas renderer's pipelines.
This commit is contained in:
parent
f032af7453
commit
fa1aacb455
@ -1446,6 +1446,9 @@ void RendererCanvasRenderRD::CanvasShaderData::_create_pipeline(PipelineKey p_pi
|
|||||||
|
|
||||||
blend_state.attachments.push_back(attachment);
|
blend_state.attachments.push_back(attachment);
|
||||||
|
|
||||||
|
RD::PipelineMultisampleState multisample_state;
|
||||||
|
multisample_state.sample_count = RD::get_singleton()->framebuffer_format_get_texture_samples(p_pipeline_key.framebuffer_format_id, 0);
|
||||||
|
|
||||||
// Convert the specialization from the key to pipeline specialization constants.
|
// Convert the specialization from the key to pipeline specialization constants.
|
||||||
Vector<RD::PipelineSpecializationConstant> specialization_constants;
|
Vector<RD::PipelineSpecializationConstant> specialization_constants;
|
||||||
RD::PipelineSpecializationConstant sc;
|
RD::PipelineSpecializationConstant sc;
|
||||||
@ -1457,7 +1460,7 @@ void RendererCanvasRenderRD::CanvasShaderData::_create_pipeline(PipelineKey p_pi
|
|||||||
RID shader_rid = get_shader(p_pipeline_key.variant, p_pipeline_key.ubershader);
|
RID shader_rid = get_shader(p_pipeline_key.variant, p_pipeline_key.ubershader);
|
||||||
ERR_FAIL_COND(shader_rid.is_null());
|
ERR_FAIL_COND(shader_rid.is_null());
|
||||||
|
|
||||||
RID pipeline = RD::get_singleton()->render_pipeline_create(shader_rid, p_pipeline_key.framebuffer_format_id, p_pipeline_key.vertex_format_id, p_pipeline_key.render_primitive, RD::PipelineRasterizationState(), RD::PipelineMultisampleState(), RD::PipelineDepthStencilState(), blend_state, dynamic_state_flags, 0, specialization_constants);
|
RID pipeline = RD::get_singleton()->render_pipeline_create(shader_rid, p_pipeline_key.framebuffer_format_id, p_pipeline_key.vertex_format_id, p_pipeline_key.render_primitive, RD::PipelineRasterizationState(), multisample_state, RD::PipelineDepthStencilState(), blend_state, dynamic_state_flags, 0, specialization_constants);
|
||||||
ERR_FAIL_COND(pipeline.is_null());
|
ERR_FAIL_COND(pipeline.is_null());
|
||||||
|
|
||||||
pipeline_hash_map.add_compiled_pipeline(p_pipeline_key.hash(), pipeline);
|
pipeline_hash_map.add_compiled_pipeline(p_pipeline_key.hash(), pipeline);
|
||||||
|
Loading…
Reference in New Issue
Block a user