diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2021-10-14 22:48:55 +0300 |
---|---|---|
committer | Yuri Roubinsky <chaosus89@gmail.com> | 2021-10-15 06:53:52 +0300 |
commit | 31ad85881d5a498e61aa1ae6b698763114f76809 (patch) | |
tree | f0d8a648ab0217e7e4a1012f5fc9ec33d3389001 | |
parent | bf322bacdd99cdb81bd7870b0b196ef01652581c (diff) |
Fix `wireframe` render mode
-rw-r--r-- | servers/rendering/renderer_rd/pipeline_cache_rd.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/servers/rendering/renderer_rd/pipeline_cache_rd.cpp b/servers/rendering/renderer_rd/pipeline_cache_rd.cpp index aefe926cb0..0d60052666 100644 --- a/servers/rendering/renderer_rd/pipeline_cache_rd.cpp +++ b/servers/rendering/renderer_rd/pipeline_cache_rd.cpp @@ -35,8 +35,10 @@ RID PipelineCacheRD::_generate_version(RD::VertexFormatID p_vertex_format_id, RD RD::PipelineMultisampleState multisample_state_version = multisample_state; multisample_state_version.sample_count = RD::get_singleton()->framebuffer_format_get_texture_samples(p_framebuffer_format_id, p_render_pass); + bool wireframe = p_wireframe || rasterization_state.wireframe; + RD::PipelineRasterizationState raster_state_version = rasterization_state; - raster_state_version.wireframe = p_wireframe; + raster_state_version.wireframe = wireframe; Vector<RD::PipelineSpecializationConstant> specialization_constants = base_specialization_constants; @@ -59,7 +61,7 @@ RID PipelineCacheRD::_generate_version(RD::VertexFormatID p_vertex_format_id, RD versions = (Version *)memrealloc(versions, sizeof(Version) * (version_count + 1)); versions[version_count].framebuffer_id = p_framebuffer_format_id; versions[version_count].vertex_id = p_vertex_format_id; - versions[version_count].wireframe = p_wireframe; + versions[version_count].wireframe = wireframe; versions[version_count].pipeline = pipeline; versions[version_count].render_pass = p_render_pass; versions[version_count].bool_specializations = p_bool_specializations; |