Skip to content

Commit

Permalink
Fix stencil drawing pipeline not setting multisample state
Browse files Browse the repository at this point in the history
  • Loading branch information
EIREXE committed Nov 5, 2024
1 parent 4986963 commit d199503
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion servers/rendering/renderer_rd/stencil_write_rd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ void StencilWriteRD::setup_stencil_write(RenderingDevice::FramebufferFormatID p_
ds_state.front_op.pass = RenderingDeviceCommons::STENCIL_OP_REPLACE;
ds_state.back_op = ds_state.front_op;

RID pipeline = RD::get_singleton()->render_pipeline_create(write_shader.write_shader, p_format_id, vertex_format, RD::RENDER_PRIMITIVE_TRIANGLES, RD::PipelineRasterizationState(), RD::PipelineMultisampleState(), ds_state, cb_state, RD::DYNAMIC_STATE_STENCIL_REFERENCE);
RD::PipelineMultisampleState multisample_state;
multisample_state.sample_count = RD::get_singleton()->framebuffer_format_get_texture_samples(p_format_id, 0);

RID pipeline = RD::get_singleton()->render_pipeline_create(write_shader.write_shader, p_format_id, vertex_format, RD::RENDER_PRIMITIVE_TRIANGLES, RD::PipelineRasterizationState(), multisample_state, ds_state, cb_state, RD::DYNAMIC_STATE_STENCIL_REFERENCE);
print_line(pipeline.is_valid(), p_format_id);
RD::get_singleton()->set_resource_name(pipeline, "Stencil Write Pipeline");
pipelines.insert(p_format_id, pipeline);
Expand Down

0 comments on commit d199503

Please sign in to comment.