Bug report #21121

Hillshade Layer Style wrong if OpenCL acceleration is enabled

Added by luca bellani 12 months ago. Updated 12 months ago.

Status:Closed
Priority:Normal
Assignee:Alessandro Pasotti
Category:Rasters
Affected QGIS version:3.5(master) Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:28939

Description

Hello. I noticed that with certain DEM (not all), QGIS 3.4.4 generates a display problem in the "hillshade" style.
Only in the layer style, because the GDAL geo-process works perfectly.

2.PNG (204 KB) luca bellani, 2019-01-29 07:00 PM

dem_prueba.tif - dem (20.6 KB) luca bellani, 2019-01-29 07:01 PM

comparacion.png - imagen comparativa QGIS 2 & 3 (540 KB) luca bellani, 2019-01-30 05:53 PM

DEM_prova2.rar - Dem de prueba (169 KB) luca bellani, 2019-01-30 05:53 PM

1.PNG - opencl tab (19.1 KB) luca bellani, 2019-02-01 04:42 PM

3.PNG - bilineal hillshade style wrong (81 KB) luca bellani, 2019-02-01 04:42 PM

Associated revisions

Revision 1aef9cfa
Added by Alessandro Pasotti 12 months ago

[opencl] Fix hillshade renderer with 16bit rasters

Fixes #21121

History

#1 Updated by luca bellani 12 months ago

#2 Updated by Alessandro Pasotti 12 months ago

  • Status changed from Open to Feedback
  • Assignee set to Alessandro Pasotti
  • Operating System changed from Windows 10 64 bit v. 1809 to Any
  • Priority changed from High to Normal
  • Affected QGIS version changed from 3.4.4 to 3.5(master)

I think it's a know issue and there is not much we can do, did you try to adjust the "Resampling" parameters in the renderer configuration?

#3 Updated by luca bellani 12 months ago

Salve. What is strange to me, is that in QGIS 2.18 it does not give any problem.
And it seems to be something random. In QGIS 3.4.4, I loaded the DEM again, and adjust the "Resampling" parameters "bilineal", and now all is ok.

#4 Updated by Alessandro Pasotti 12 months ago

I think it depends on the zoom level too.

#5 Updated by Giovanni Manghi 12 months ago

Alessandro Pasotti wrote:

I think it's a know issue and there is not much we can do, did you try to adjust the "Resampling" parameters in the renderer configuration?

closing then?

#6 Updated by luca bellani 12 months ago

I have reviewed other DEMs that gave me problems, and as can be seen in the comparative image, the problem is presented in QGIS 3, not in QGIS 2. I have already completely manipulated the resampling options, but it is not solved.
It's funny that it's a bug, but only in the new version of QGIS.
Annex also another DEM, so that they can prove it.
Thanks for the support.

#7 Updated by Alessandro Pasotti 12 months ago

Out of curiosity: are you using OpenCL acceleration? If yes can you try to disable it?

#8 Updated by luca bellani 12 months ago

Yes! That's the reason!
Deactivating OpenGl and always putting the resampling in "bilinear" is displayed correctly.
Thank you!

#9 Updated by Giovanni Manghi 12 months ago

  • Subject changed from Error Hillshade Layer Style to Hillshade Layer Style wrong if OpenCL acceleration is enabled
  • Status changed from Feedback to Open
  • Operating System deleted (Any)

#10 Updated by Alessandro Pasotti 12 months ago

Luca, can you please make a quick test with OpenCL activated and tell me if it works with the sampling bilinear option or if it does not?
If it does not work, can you please have a look to the QGIS messages (small icon at the bottom right) in the OpenCL section?
Also, please paste a picture of the OpenCL tab in your settings or copy-paste the information about your OpenCL device.

#11 Updated by luca bellani 12 months ago

I did the tests. When you activate OpenCl, even if you change the type of resampling, it is displayed incorrectly.
In the message window, I do not see the OpenCl tab, I do not know if I have something wrong installed. Annex images.
Thank you

#12 Updated by Alessandro Pasotti 12 months ago

  • Status changed from Open to In Progress
  • Category changed from Symbology to Rasters
  • Pull Request or Patch supplied changed from No to Yes

PR https://github.com/qgis/QGIS/pull/9070

I'd like you to test if this patch solves your issue (with OpenCL ativated).

#13 Updated by Alessandro Pasotti 12 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF