[Backport release-3_42] qgsmaterial: Fix removal of parameters when clipping is disabled#61147
[Backport release-3_42] qgsmaterial: Fix removal of parameters when clipping is disabled#61147qgis-bot wants to merge 5 commits intorelease-3_42from
Conversation
Plane clipping uses two `QParameters` named `CLIP_PLANE_ARRAY_PARAMETER_NAME` and `CLIP_PLANE_MAX_PLANE_PARAMETER_NAME`. When clipping is disabled both parameters need to be removed to prevent side effects on the shader code. However, the loops which iterates through the parameters breaks as soon one parameter is found. This means that the second parameter is never removed. This issue is fixed by removing the `break` condition. This way, both parameters are always removed from the material.
This will make it easier to test enabling/disabling clipping multiple times with the other reference image.
This tests that enabling and disabling clipping multiple times works.
This tests that enabling and disabling clipping multiple times works.
🪟 Windows buildsDownload Windows builds of this PR for testing. 🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. |
Tests failed for Qt 6One or more tests failed using the build from commit 8456967 polygon3d_extrusion_clipping (testExtrudedPolygonsClipping)polygon3d_extrusion_clippingTest failed at testExtrudedPolygonsClipping at tests/src/3d/testqgs3drendering.cpp:506 Rendered image did not match tests/testdata/control_images/3d/expected_polygon3d_extrusion_clipping/expected_polygon3d_extrusion_clipping.png (found 77226 pixels different) polygon3d_extrusion_data_defined_phong_clipping (testExtrudedPolygonsDataDefinedPhongClipping)polygon3d_extrusion_data_defined_phong_clippingTest failed at testExtrudedPolygonsDataDefinedPhongClipping at tests/src/3d/testqgs3drendering.cpp:747 Rendered image did not match tests/testdata/control_images/3d/expected_polygon3d_extrusion_data_defined_phong_clipping/expected_polygon3d_extrusion_data_defined_phong_clipping.png (found 77226 pixels different) polygon3d_extrusion_data_defined_gooch_clipping (testExtrudedPolygonsDataDefinedGoochClipping)polygon3d_extrusion_data_defined_gooch_clippingTest failed at testExtrudedPolygonsDataDefinedGoochClipping at tests/src/3d/testqgs3drendering.cpp:890 Rendered image did not match tests/testdata/control_images/3d/expected_polygon3d_extrusion_data_defined_gooch_clipping/expected_polygon3d_extrusion_data_defined_gooch_clipping.png (found 77226 pixels different) line_rendering_clipping (testLineRenderingClipping)line_rendering_clippingTest failed at testLineRenderingClipping at tests/src/3d/testqgs3drendering.cpp:1172 Rendered image did not match tests/testdata/control_images/3d/expected_line_rendering_clipping/expected_line_rendering_clipping.png (found 5327 pixels different) buffered_lines_clipping (testBufferedLineRenderingClipping)buffered_lines_clippingTest failed at testBufferedLineRenderingClipping at tests/src/3d/testqgs3drendering.cpp:1407 Rendered image did not match tests/testdata/control_images/3d/expected_buffered_lines_clipping/expected_buffered_lines_clipping.png (found 15111 pixels different) pointcloud_3d_singlecolor_clipping (testPointCloudSingleColorClipping)pointcloud_3d_singlecolor_clippingTest failed at testPointCloudSingleColorClipping at tests/src/3d/testqgspointcloud3drendering.cpp:327
The full test report (included comparison of rendered vs expected images) can be found here. Further documentation on the QGIS test infrastructure can be found in the Developer's Guide. |
Tests failed for Qt 5One or more tests failed using the build from commit 8456967 polygon3d_extrusion_clipping (testExtrudedPolygonsClipping)polygon3d_extrusion_clippingTest failed at testExtrudedPolygonsClipping at tests/src/3d/testqgs3drendering.cpp:506 Rendered image did not match tests/testdata/control_images/3d/expected_polygon3d_extrusion_clipping/expected_polygon3d_extrusion_clipping.png (found 77226 pixels different) polygon3d_extrusion_data_defined_phong_clipping (testExtrudedPolygonsDataDefinedPhongClipping)polygon3d_extrusion_data_defined_phong_clippingTest failed at testExtrudedPolygonsDataDefinedPhongClipping at tests/src/3d/testqgs3drendering.cpp:747 Rendered image did not match tests/testdata/control_images/3d/expected_polygon3d_extrusion_data_defined_phong_clipping/expected_polygon3d_extrusion_data_defined_phong_clipping.png (found 77226 pixels different) polygon3d_extrusion_data_defined_gooch_clipping (testExtrudedPolygonsDataDefinedGoochClipping)polygon3d_extrusion_data_defined_gooch_clippingTest failed at testExtrudedPolygonsDataDefinedGoochClipping at tests/src/3d/testqgs3drendering.cpp:890 Rendered image did not match tests/testdata/control_images/3d/expected_polygon3d_extrusion_data_defined_gooch_clipping/expected_polygon3d_extrusion_data_defined_gooch_clipping.png (found 77226 pixels different) line_rendering_clipping (testLineRenderingClipping)line_rendering_clippingTest failed at testLineRenderingClipping at tests/src/3d/testqgs3drendering.cpp:1172 Rendered image did not match tests/testdata/control_images/3d/expected_line_rendering_clipping/expected_line_rendering_clipping.png (found 5327 pixels different) buffered_lines_clipping (testBufferedLineRenderingClipping)buffered_lines_clippingTest failed at testBufferedLineRenderingClipping at tests/src/3d/testqgs3drendering.cpp:1407 Rendered image did not match tests/testdata/control_images/3d/expected_buffered_lines_clipping/expected_buffered_lines_clipping.png (found 15111 pixels different) pointcloud_3d_singlecolor_clipping (testPointCloudSingleColorClipping)pointcloud_3d_singlecolor_clippingTest failed at testPointCloudSingleColorClipping at tests/src/3d/testqgspointcloud3drendering.cpp:327
The full test report (included comparison of rendered vs expected images) can be found here. Further documentation on the QGIS test infrastructure can be found in the Developer's Guide. |
|
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
|
|
While we hate to see this happen, this PR has been automatically closed because it has not had any activity in the last 21 days. If this pull request should be reconsidered, please follow the guidelines in the previous comment and reopen this pull request. Or, if you have any further questions, just ask! We love to help, and if there's anything the QGIS project can do to help push this PR forward please let us know how we can assist. |
|
@ptitjano can you update this to fix the tests or close please? |
|
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
|
Backport #61135
Authored by: @ptitjano