Fix missed light clusters when inside clipped lights
This commit is contained in:
parent
b18942d429
commit
605fdb655c
1 changed files with 4 additions and 2 deletions
|
@ -62,15 +62,17 @@ ClusterBuilderSharedDataRD::ClusterBuilderSharedDataRD() {
|
|||
defines = "\n#define USE_ATTACHMENT\n";
|
||||
}
|
||||
|
||||
RD::PipelineRasterizationState rasterization_state;
|
||||
rasterization_state.enable_depth_clamp = true;
|
||||
Vector<String> versions;
|
||||
versions.push_back("");
|
||||
cluster_render.cluster_render_shader.initialize(versions, defines);
|
||||
cluster_render.shader_version = cluster_render.cluster_render_shader.version_create();
|
||||
cluster_render.shader = cluster_render.cluster_render_shader.version_get_shader(cluster_render.shader_version, 0);
|
||||
cluster_render.shader_pipelines[ClusterRender::PIPELINE_NORMAL] = RD::get_singleton()->render_pipeline_create(cluster_render.shader, fb_format, vertex_format, RD::RENDER_PRIMITIVE_TRIANGLES, RD::PipelineRasterizationState(), RD::PipelineMultisampleState(), RD::PipelineDepthStencilState(), blend_state, 0);
|
||||
cluster_render.shader_pipelines[ClusterRender::PIPELINE_NORMAL] = RD::get_singleton()->render_pipeline_create(cluster_render.shader, fb_format, vertex_format, RD::RENDER_PRIMITIVE_TRIANGLES, rasterization_state, RD::PipelineMultisampleState(), RD::PipelineDepthStencilState(), blend_state, 0);
|
||||
RD::PipelineMultisampleState ms;
|
||||
ms.sample_count = RD::TEXTURE_SAMPLES_4;
|
||||
cluster_render.shader_pipelines[ClusterRender::PIPELINE_MSAA] = RD::get_singleton()->render_pipeline_create(cluster_render.shader, fb_format, vertex_format, RD::RENDER_PRIMITIVE_TRIANGLES, RD::PipelineRasterizationState(), ms, RD::PipelineDepthStencilState(), blend_state, 0);
|
||||
cluster_render.shader_pipelines[ClusterRender::PIPELINE_MSAA] = RD::get_singleton()->render_pipeline_create(cluster_render.shader, fb_format, vertex_format, RD::RENDER_PRIMITIVE_TRIANGLES, rasterization_state, ms, RD::PipelineDepthStencilState(), blend_state, 0);
|
||||
}
|
||||
{
|
||||
Vector<String> versions;
|
||||
|
|
Loading…
Reference in a new issue