Skip to content

Commit ba556eb

Browse files
Implement point size emulation in the forward shader for D3D12.
1 parent f5918a9 commit ba556eb

18 files changed

+249
-46
lines changed

drivers/d3d12/rendering_device_driver_d3d12.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6129,6 +6129,8 @@ bool RenderingDeviceDriverD3D12::has_feature(Features p_feature) {
61296129
return true;
61306130
case SUPPORTS_VULKAN_MEMORY_MODEL:
61316131
return false;
6132+
case SUPPORTS_POINT_SIZE:
6133+
return false;
61326134
default:
61336135
return false;
61346136
}

drivers/metal/rendering_device_driver_metal.mm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2564,6 +2564,8 @@ static void update_uniform_info(const RenderingShaderContainerMetal::UniformData
25642564
return device_properties->features.supports_native_image_atomics;
25652565
case SUPPORTS_VULKAN_MEMORY_MODEL:
25662566
return true;
2567+
case SUPPORTS_POINT_SIZE:
2568+
return true;
25672569
default:
25682570
return false;
25692571
}

drivers/vulkan/rendering_device_driver_vulkan.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6282,6 +6282,8 @@ bool RenderingDeviceDriverVulkan::has_feature(Features p_feature) {
62826282
return vulkan_memory_model_support && vulkan_memory_model_device_scope_support;
62836283
case SUPPORTS_FRAMEBUFFER_DEPTH_RESOLVE:
62846284
return framebuffer_depth_resolve;
6285+
case SUPPORTS_POINT_SIZE:
6286+
return true;
62856287
default:
62866288
return false;
62876289
}

servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,8 @@ void RenderForwardClustered::_render_list_template(RenderingDevice::DrawListID p
485485
pipeline_key.wireframe = p_params->force_wireframe;
486486
pipeline_key.ubershader = 0;
487487

488+
bool emulate_point_size = shader->uses_point_size && scene_shader.emulate_point_size;
489+
488490
const RD::PolygonCullMode cull_mode = shader->get_cull_mode_from_cull_variant(cull_variant);
489491
RID vertex_array_rd;
490492
RID index_array_rd;
@@ -497,9 +499,9 @@ void RenderForwardClustered::_render_list_template(RenderingDevice::DrawListID p
497499
bool pipeline_motion_vectors = pipeline_key.color_pass_flags & SceneShaderForwardClustered::PIPELINE_COLOR_PASS_FLAG_MOTION_VECTORS;
498500
uint64_t input_mask = shader->get_vertex_input_mask(pipeline_key.version, pipeline_key.color_pass_flags, pipeline_key.ubershader);
499501
if (surf->owner->mesh_instance.is_valid()) {
500-
mesh_storage->mesh_instance_surface_get_vertex_arrays_and_format(surf->owner->mesh_instance, surf->surface_index, input_mask, pipeline_motion_vectors, vertex_array_rd, vertex_format);
502+
mesh_storage->mesh_instance_surface_get_vertex_arrays_and_format(surf->owner->mesh_instance, surf->surface_index, input_mask, pipeline_motion_vectors, emulate_point_size, vertex_array_rd, vertex_format);
501503
} else {
502-
mesh_storage->mesh_surface_get_vertex_arrays_and_format(mesh_surface, input_mask, pipeline_motion_vectors, vertex_array_rd, vertex_format);
504+
mesh_storage->mesh_surface_get_vertex_arrays_and_format(mesh_surface, input_mask, pipeline_motion_vectors, emulate_point_size, vertex_array_rd, vertex_format);
503505
}
504506

505507
pipeline_key.vertex_format_id = vertex_format;
@@ -534,7 +536,11 @@ void RenderForwardClustered::_render_list_template(RenderingDevice::DrawListID p
534536
}
535537

536538
if (pipeline_valid) {
537-
index_array_rd = mesh_storage->mesh_surface_get_index_array(mesh_surface, element_info.lod_index);
539+
if (!emulate_point_size) {
540+
index_array_rd = mesh_storage->mesh_surface_get_index_array(mesh_surface, element_info.lod_index);
541+
} else {
542+
index_array_rd = RID();
543+
}
538544

539545
if (prev_vertex_array_rd != vertex_array_rd) {
540546
RD::get_singleton()->draw_list_bind_vertex_array(draw_list, vertex_array_rd);
@@ -592,7 +598,14 @@ void RenderForwardClustered::_render_list_template(RenderingDevice::DrawListID p
592598
instance_count /= surf->owner->trail_steps;
593599
}
594600

595-
if (bool(surf->owner->base_flags & INSTANCE_DATA_FLAG_MULTIMESH_INDIRECT)) {
601+
bool indirect = bool(surf->owner->base_flags & INSTANCE_DATA_FLAG_MULTIMESH_INDIRECT);
602+
603+
if (emulate_point_size) {
604+
if (indirect) {
605+
WARN_PRINT("Indirect draws are not supported when emulating point size.");
606+
}
607+
RD::get_singleton()->draw_list_draw(draw_list, false, mesh_storage->mesh_surface_get_vertex_count(mesh_surface), instance_count * 6);
608+
} else if (indirect) {
596609
RD::get_singleton()->draw_list_draw_indirect(draw_list, index_array_rd.is_valid(), mesh_storage->_multimesh_get_command_buffer_rd_rid(surf->owner->data->base), surf->surface_index * sizeof(uint32_t) * mesh_storage->INDIRECT_MULTIMESH_COMMAND_STRIDE, 1, 0);
597610
} else {
598611
RD::get_singleton()->draw_list_draw(draw_list, index_array_rd.is_valid(), instance_count);
@@ -4517,7 +4530,8 @@ void RenderForwardClustered::_mesh_compile_pipeline_for_surface(SceneShaderForwa
45174530
RendererRD::MeshStorage *mesh_storage = RendererRD::MeshStorage::get_singleton();
45184531
uint64_t input_mask = p_shader->get_vertex_input_mask(r_pipeline_key.version, r_pipeline_key.color_pass_flags, p_ubershader);
45194532
bool pipeline_motion_vectors = r_pipeline_key.color_pass_flags & SceneShaderForwardClustered::PIPELINE_COLOR_PASS_FLAG_MOTION_VECTORS;
4520-
r_pipeline_key.vertex_format_id = mesh_storage->mesh_surface_get_vertex_format(p_mesh_surface, input_mask, p_instanced_surface, pipeline_motion_vectors);
4533+
bool emulate_point_size = p_shader->uses_point_size && scene_shader.emulate_point_size;
4534+
r_pipeline_key.vertex_format_id = mesh_storage->mesh_surface_get_vertex_format(p_mesh_surface, input_mask, p_instanced_surface, pipeline_motion_vectors, emulate_point_size);
45214535
r_pipeline_key.ubershader = p_ubershader;
45224536

45234537
p_shader->pipeline_hash_map.compile_pipeline(r_pipeline_key, r_pipeline_key.hash(), p_source, p_ubershader);

servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,14 @@ void SceneShaderForwardClustered::ShaderData::_create_pipeline(PipelineKey p_pip
411411
RD::RENDER_PRIMITIVE_TRIANGLE_STRIPS,
412412
};
413413

414-
RD::RenderPrimitive primitive_rd = uses_point_size ? RD::RENDER_PRIMITIVE_POINTS : primitive_rd_table[p_pipeline_key.primitive_type];
414+
bool emulate_point_size_flag = uses_point_size && SceneShaderForwardClustered::singleton->emulate_point_size;
415+
416+
RD::RenderPrimitive primitive_rd;
417+
if (uses_point_size) {
418+
primitive_rd = emulate_point_size_flag ? RD::RENDER_PRIMITIVE_TRIANGLES : RD::RENDER_PRIMITIVE_POINTS;
419+
} else {
420+
primitive_rd = primitive_rd_table[p_pipeline_key.primitive_type];
421+
}
415422

416423
RD::PipelineRasterizationState raster_state;
417424
raster_state.cull_mode = p_pipeline_key.cull_mode;
@@ -479,6 +486,13 @@ void SceneShaderForwardClustered::ShaderData::_create_pipeline(PipelineKey p_pip
479486

480487
sc.constant_id = 1;
481488
sc.int_value = p_pipeline_key.shader_specialization.packed_1;
489+
sc.type = RD::PIPELINE_SPECIALIZATION_CONSTANT_TYPE_INT;
490+
specialization_constants.push_back(sc);
491+
492+
sc = {}; // Sanitize value bits. "bool_value" only assigns 8 bits and keeps the remaining bits intact.
493+
sc.constant_id = 2;
494+
sc.bool_value = emulate_point_size_flag;
495+
sc.type = RD::PIPELINE_SPECIALIZATION_CONSTANT_TYPE_BOOL;
482496
specialization_constants.push_back(sc);
483497

484498
RID shader_rid = get_shader_variant(p_pipeline_key.version, p_pipeline_key.color_pass_flags, p_pipeline_key.ubershader);
@@ -621,6 +635,8 @@ SceneShaderForwardClustered::~SceneShaderForwardClustered() {
621635
void SceneShaderForwardClustered::init(const String p_defines) {
622636
RendererRD::MaterialStorage *material_storage = RendererRD::MaterialStorage::get_singleton();
623637

638+
emulate_point_size = !RD::get_singleton()->has_feature(RD::SUPPORTS_POINT_SIZE);
639+
624640
{
625641
Vector<ShaderRD::VariantDefine> shader_versions;
626642
for (uint32_t ubershader = 0; ubershader < 2; ubershader++) {
@@ -701,9 +717,9 @@ void SceneShaderForwardClustered::init(const String p_defines) {
701717
actions.renames["UV"] = "uv_interp";
702718
actions.renames["UV2"] = "uv2_interp";
703719
actions.renames["COLOR"] = "color_interp";
704-
actions.renames["POINT_SIZE"] = "gl_PointSize";
705-
actions.renames["INSTANCE_ID"] = "gl_InstanceIndex";
706-
actions.renames["VERTEX_ID"] = "gl_VertexIndex";
720+
actions.renames["POINT_SIZE"] = "point_size";
721+
actions.renames["INSTANCE_ID"] = "INSTANCE_INDEX";
722+
actions.renames["VERTEX_ID"] = "VERTEX_INDEX";
707723
actions.renames["Z_CLIP_SCALE"] = "z_clip_scale";
708724

709725
actions.renames["ALPHA_SCISSOR_THRESHOLD"] = "alpha_scissor_threshold";
@@ -748,7 +764,7 @@ void SceneShaderForwardClustered::init(const String p_defines) {
748764
actions.renames["AO"] = "ao";
749765
actions.renames["AO_LIGHT_AFFECT"] = "ao_light_affect";
750766
actions.renames["EMISSION"] = "emission";
751-
actions.renames["POINT_COORD"] = "gl_PointCoord";
767+
actions.renames["POINT_COORD"] = "point_coord";
752768
actions.renames["INSTANCE_CUSTOM"] = "instance_custom";
753769
actions.renames["SCREEN_UV"] = "screen_uv";
754770
actions.renames["DEPTH"] = "gl_FragDepth";
@@ -829,6 +845,9 @@ void SceneShaderForwardClustered::init(const String p_defines) {
829845

830846
actions.usage_defines["MODEL_MATRIX"] = "#define MODEL_MATRIX_USED\n";
831847

848+
actions.usage_defines["POINT_SIZE"] = "#define POINT_SIZE_USED\n";
849+
actions.usage_defines["POINT_COORD"] = "#define POINT_COORD_USED\n";
850+
832851
actions.render_mode_defines["skip_vertex_transform"] = "#define SKIP_TRANSFORM_USED\n";
833852
actions.render_mode_defines["world_vertex_coords"] = "#define VERTEX_WORLD_COORDS_USED\n";
834853
actions.render_mode_defines["ensure_correct_normals"] = "#define ENSURE_CORRECT_NORMALS\n";
@@ -871,7 +890,7 @@ void SceneShaderForwardClustered::init(const String p_defines) {
871890
actions.base_texture_binding_index = 1;
872891
actions.texture_layout_set = RenderForwardClustered::MATERIAL_UNIFORM_SET;
873892
actions.base_uniform_string = "material.";
874-
actions.base_varying_index = 14;
893+
actions.base_varying_index = 15;
875894

876895
actions.default_filter = ShaderLanguage::FILTER_LINEAR_MIPMAP;
877896
actions.default_repeat = ShaderLanguage::REPEAT_ENABLE;

servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ class SceneShaderForwardClustered {
342342

343343
SceneForwardClusteredShaderRD shader;
344344
ShaderCompiler compiler;
345+
bool emulate_point_size = false;
345346

346347
RID default_shader;
347348
RID default_material;

servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2429,6 +2429,8 @@ void RenderForwardMobile::_render_list_template(RenderingDevice::DrawListID p_dr
24292429
pipeline_key.render_pass = p_params->subpass;
24302430
pipeline_key.ubershader = 0;
24312431

2432+
bool emulate_point_size = shader->uses_point_size && scene_shader.emulate_point_size;
2433+
24322434
const RD::PolygonCullMode cull_mode = shader->get_cull_mode_from_cull_variant(cull_variant);
24332435
RD::VertexFormatID vertex_format = -1;
24342436
RID pipeline_rd;
@@ -2440,9 +2442,9 @@ void RenderForwardMobile::_render_list_template(RenderingDevice::DrawListID p_dr
24402442
// Skeleton and blend shape.
24412443
uint64_t input_mask = shader->get_vertex_input_mask(pipeline_key.version, pipeline_key.ubershader);
24422444
if (surf->owner->mesh_instance.is_valid()) {
2443-
mesh_storage->mesh_instance_surface_get_vertex_arrays_and_format(surf->owner->mesh_instance, surf->surface_index, input_mask, p_pass_mode == PASS_MODE_MOTION_VECTORS, vertex_array_rd, vertex_format);
2445+
mesh_storage->mesh_instance_surface_get_vertex_arrays_and_format(surf->owner->mesh_instance, surf->surface_index, input_mask, p_pass_mode == PASS_MODE_MOTION_VECTORS, emulate_point_size, vertex_array_rd, vertex_format);
24442446
} else {
2445-
mesh_storage->mesh_surface_get_vertex_arrays_and_format(mesh_surface, input_mask, p_pass_mode == PASS_MODE_MOTION_VECTORS, vertex_array_rd, vertex_format);
2447+
mesh_storage->mesh_surface_get_vertex_arrays_and_format(mesh_surface, input_mask, p_pass_mode == PASS_MODE_MOTION_VECTORS, emulate_point_size, vertex_array_rd, vertex_format);
24462448
}
24472449

24482450
pipeline_key.vertex_format_id = vertex_format;
@@ -2477,7 +2479,11 @@ void RenderForwardMobile::_render_list_template(RenderingDevice::DrawListID p_dr
24772479
}
24782480

24792481
if (pipeline_valid) {
2480-
index_array_rd = mesh_storage->mesh_surface_get_index_array(mesh_surface, element_info.lod_index);
2482+
if (!emulate_point_size) {
2483+
index_array_rd = mesh_storage->mesh_surface_get_index_array(mesh_surface, element_info.lod_index);
2484+
} else {
2485+
index_array_rd = RID();
2486+
}
24812487

24822488
if (prev_vertex_array_rd != vertex_array_rd) {
24832489
RD::get_singleton()->draw_list_bind_vertex_array(draw_list, vertex_array_rd);
@@ -2535,7 +2541,14 @@ void RenderForwardMobile::_render_list_template(RenderingDevice::DrawListID p_dr
25352541
instance_count /= surf->owner->trail_steps;
25362542
}
25372543

2538-
if (bool(surf->owner->base_flags & INSTANCE_DATA_FLAG_MULTIMESH_INDIRECT)) {
2544+
bool indirect = bool(surf->owner->base_flags & INSTANCE_DATA_FLAG_MULTIMESH_INDIRECT);
2545+
2546+
if (emulate_point_size) {
2547+
if (indirect) {
2548+
WARN_PRINT("Indirect draws are not supported when emulating point size.");
2549+
}
2550+
RD::get_singleton()->draw_list_draw(draw_list, false, mesh_storage->mesh_surface_get_vertex_count(mesh_surface), instance_count * 6);
2551+
} else if (indirect) {
25392552
RD::get_singleton()->draw_list_draw_indirect(draw_list, index_array_rd.is_valid(), mesh_storage->_multimesh_get_command_buffer_rd_rid(surf->owner->data->base), surf->surface_index * sizeof(uint32_t) * mesh_storage->INDIRECT_MULTIMESH_COMMAND_STRIDE, 1, 0);
25402553
} else {
25412554
RD::get_singleton()->draw_list_draw(draw_list, index_array_rd.is_valid(), instance_count);
@@ -3167,7 +3180,8 @@ static RD::FramebufferFormatID _get_shadow_atlas_framebuffer_format_for_pipeline
31673180
void RenderForwardMobile::_mesh_compile_pipeline_for_surface(SceneShaderForwardMobile::ShaderData *p_shader, void *p_mesh_surface, bool p_instanced_surface, RS::PipelineSource p_source, SceneShaderForwardMobile::ShaderData::PipelineKey &r_pipeline_key, Vector<ShaderPipelinePair> *r_pipeline_pairs) {
31683181
RendererRD::MeshStorage *mesh_storage = RendererRD::MeshStorage::get_singleton();
31693182
uint64_t input_mask = p_shader->get_vertex_input_mask(r_pipeline_key.version, true);
3170-
r_pipeline_key.vertex_format_id = mesh_storage->mesh_surface_get_vertex_format(p_mesh_surface, input_mask, p_instanced_surface, false);
3183+
bool emulate_point_size = p_shader->uses_point_size && scene_shader.emulate_point_size;
3184+
r_pipeline_key.vertex_format_id = mesh_storage->mesh_surface_get_vertex_format(p_mesh_surface, input_mask, p_instanced_surface, false, emulate_point_size);
31713185
r_pipeline_key.ubershader = true;
31723186
p_shader->pipeline_hash_map.compile_pipeline(r_pipeline_key, r_pipeline_key.hash(), p_source, r_pipeline_key.ubershader);
31733187

servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,14 @@ void SceneShaderForwardMobile::ShaderData::_create_pipeline(PipelineKey p_pipeli
366366
depth_stencil_state.back_op = op;
367367
}
368368

369-
RD::RenderPrimitive primitive_rd = uses_point_size ? RD::RENDER_PRIMITIVE_POINTS : primitive_rd_table[p_pipeline_key.primitive_type];
369+
bool emulate_point_size_flag = uses_point_size && SceneShaderForwardMobile::singleton->emulate_point_size;
370+
371+
RD::RenderPrimitive primitive_rd;
372+
if (uses_point_size) {
373+
primitive_rd = emulate_point_size_flag ? RD::RENDER_PRIMITIVE_TRIANGLES : RD::RENDER_PRIMITIVE_POINTS;
374+
} else {
375+
primitive_rd = primitive_rd_table[p_pipeline_key.primitive_type];
376+
}
370377

371378
RD::PipelineRasterizationState raster_state;
372379
raster_state.cull_mode = p_pipeline_key.cull_mode;
@@ -430,6 +437,12 @@ void SceneShaderForwardMobile::ShaderData::_create_pipeline(PipelineKey p_pipeli
430437
sc.type = RD::PIPELINE_SPECIALIZATION_CONSTANT_TYPE_FLOAT;
431438
specialization_constants.push_back(sc);
432439

440+
sc = {}; // Sanitize value bits. "bool_value" only assigns 8 bits and keeps the remaining bits intact.
441+
sc.constant_id = 3;
442+
sc.bool_value = emulate_point_size_flag;
443+
sc.type = RD::PIPELINE_SPECIALIZATION_CONSTANT_TYPE_BOOL;
444+
specialization_constants.push_back(sc);
445+
433446
RID shader_rid = get_shader_variant(p_pipeline_key.version, p_pipeline_key.ubershader);
434447
ERR_FAIL_COND(shader_rid.is_null());
435448

@@ -559,6 +572,8 @@ void SceneShaderForwardMobile::init(const String p_defines) {
559572
// Store whether the shader will prefer using the FP16 variant.
560573
use_fp16 = RD::get_singleton()->has_feature(RD::SUPPORTS_HALF_FLOAT);
561574

575+
emulate_point_size = !RD::get_singleton()->has_feature(RD::SUPPORTS_POINT_SIZE);
576+
562577
// Immutable samplers : create the shadow sampler to be passed when creating the pipeline.
563578
{
564579
RD::SamplerState sampler;
@@ -636,9 +651,9 @@ void SceneShaderForwardMobile::init(const String p_defines) {
636651
actions.renames["UV"] = "uv_interp";
637652
actions.renames["UV2"] = "uv2_interp";
638653
actions.renames["COLOR"] = "color_highp";
639-
actions.renames["POINT_SIZE"] = "gl_PointSize";
640-
actions.renames["INSTANCE_ID"] = "gl_InstanceIndex";
641-
actions.renames["VERTEX_ID"] = "gl_VertexIndex";
654+
actions.renames["POINT_SIZE"] = "point_size";
655+
actions.renames["INSTANCE_ID"] = "INSTANCE_INDEX";
656+
actions.renames["VERTEX_ID"] = "VERTEX_INDEX";
642657
actions.renames["Z_CLIP_SCALE"] = "z_clip_scale";
643658

644659
actions.renames["ALPHA_SCISSOR_THRESHOLD"] = "alpha_scissor_threshold_highp";
@@ -683,7 +698,7 @@ void SceneShaderForwardMobile::init(const String p_defines) {
683698
actions.renames["AO"] = "ao_highp";
684699
actions.renames["AO_LIGHT_AFFECT"] = "ao_light_affect_highp";
685700
actions.renames["EMISSION"] = "emission_highp";
686-
actions.renames["POINT_COORD"] = "gl_PointCoord";
701+
actions.renames["POINT_COORD"] = "point_coord";
687702
actions.renames["INSTANCE_CUSTOM"] = "instance_custom";
688703
actions.renames["SCREEN_UV"] = "screen_uv";
689704
actions.renames["DEPTH"] = "gl_FragDepth";
@@ -764,6 +779,9 @@ void SceneShaderForwardMobile::init(const String p_defines) {
764779

765780
actions.usage_defines["MODEL_MATRIX"] = "#define MODEL_MATRIX_USED\n";
766781

782+
actions.usage_defines["POINT_SIZE"] = "#define POINT_SIZE_USED\n";
783+
actions.usage_defines["POINT_COORD"] = "#define POINT_COORD_USED\n";
784+
767785
actions.render_mode_defines["skip_vertex_transform"] = "#define SKIP_TRANSFORM_USED\n";
768786
actions.render_mode_defines["world_vertex_coords"] = "#define VERTEX_WORLD_COORDS_USED\n";
769787
actions.render_mode_defines["ensure_correct_normals"] = "#define ENSURE_CORRECT_NORMALS\n";
@@ -805,7 +823,7 @@ void SceneShaderForwardMobile::init(const String p_defines) {
805823
actions.base_texture_binding_index = 1;
806824
actions.texture_layout_set = RenderForwardMobile::MATERIAL_UNIFORM_SET;
807825
actions.base_uniform_string = "material.";
808-
actions.base_varying_index = 14;
826+
actions.base_varying_index = 15;
809827

810828
actions.default_filter = ShaderLanguage::FILTER_LINEAR_MIPMAP;
811829
actions.default_repeat = ShaderLanguage::REPEAT_ENABLE;

servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ class SceneShaderForwardMobile {
345345
SceneForwardMobileShaderRD shader;
346346
ShaderCompiler compiler;
347347
bool use_fp16 = false;
348+
bool emulate_point_size = false;
348349

349350
RID default_shader;
350351
RID default_material;

servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,9 @@ RID RendererCanvasRenderRD::_get_pipeline_specialization_or_ubershader(CanvasSha
478478
RendererRD::MeshStorage *mesh_storage = RendererRD::MeshStorage::get_singleton();
479479
uint64_t input_mask = p_shader_data->get_vertex_input_mask(r_pipeline_key.variant, r_pipeline_key.ubershader);
480480
if (p_mesh_instance.is_valid()) {
481-
mesh_storage->mesh_instance_surface_get_vertex_arrays_and_format(p_mesh_instance, p_surface_index, input_mask, false, *r_vertex_array, r_pipeline_key.vertex_format_id);
481+
mesh_storage->mesh_instance_surface_get_vertex_arrays_and_format(p_mesh_instance, p_surface_index, input_mask, false, false, *r_vertex_array, r_pipeline_key.vertex_format_id);
482482
} else {
483-
mesh_storage->mesh_surface_get_vertex_arrays_and_format(p_surface, input_mask, false, *r_vertex_array, r_pipeline_key.vertex_format_id);
483+
mesh_storage->mesh_surface_get_vertex_arrays_and_format(p_surface, input_mask, false, false, *r_vertex_array, r_pipeline_key.vertex_format_id);
484484
}
485485
}
486486

0 commit comments

Comments
 (0)