cesium-unity icon indicating copy to clipboard operation
cesium-unity copied to clipboard

CesiumPolygonRasterOverlay Cliping can not work when use HDRP

Open XudongZhou opened this issue 1 year ago • 1 comments

I test in unity2022.3 and Unity6000, The CesiumPolygonRasterOverlay has the same bug. CesiumPolygonRasterOverlay Can not Clip when use HDRP,but URP work fine.

XudongZhou avatar Aug 12 '24 06:08 XudongZhou

Thanks for the bug report @XudongZhou. Can you please confirm what version of Cesium for Unity you're using?

kring avatar Aug 14 '24 04:08 kring

Thanks for the bug report @XudongZhou. Can you please confirm what version of Cesium for Unity you're using?

the unity version is 2022.3.40,the Cesium for Unity version is 1.11.0;

The effect is as follows:

1724382135833

1724382135833

luolihui119 avatar Aug 23 '24 03:08 luolihui119

I can't tell quite what I'm looking at in that screenshot. Is it correctly discarding whole tiles, but not clipping the ones that are partially inside the polygon? If that's the case, are you by any chance using a custom Material on this tileset? The clipping of partially-overlapping tiles is done by the Material.

kring avatar Aug 23 '24 03:08 kring

I can't tell quite what I'm looking at in that screenshot. Is it correctly discarding whole tiles, but not clipping the ones that are partially inside the polygon? If that's the case, are you by any chance using a custom Material on this tileset? The clipping of partially-overlapping tiles is done by the Material.

1、No material assigned 1724383109458 2、The first screenshot shows that when the camera is zoomed in, some of the image blocks will be clipping.The second screenshot shows that when the camera is pulled away, it is not clipping

3、It's normal in URP: 1724383753934

luolihui119 avatar Aug 23 '24 03:08 luolihui119

Thanks for the bug report @XudongZhou. Can you please confirm what version of Cesium for Unity you're using?

the unity version is 2022.3.40,the Cesium for Unity version is 1.11.0;

The effect is as follows:

1724382135833

1724382135833

sorry,there is a problem with the screenshot;

The blue line is spline.

1724384259950

1724384190362

luolihui119 avatar Aug 23 '24 03:08 luolihui119

Yeah that behavior is consistent with the tile exclusion working correctly, but the material-based pixel exclusion not working. In other words, there is something wrong with the Material in HDRP. It could be as simple as "Alpha Clipping" is disabled on the HDRP material. I will investigate when I get a chance.

kring avatar Aug 23 '24 04:08 kring

Yeah I copy the "CesiumDefaultTilesetShader" and changed "Alpha Clipping" to enabled, then create a material with it instead of the default material in Cesium3DTileset component, worked fine in HDRP.

XudongZhou avatar Aug 27 '24 10:08 XudongZhou