1 (edited by jarne 2021-03-15 10:41:23)

Topic: Flickering marker images

I've got a problem in my app with flickering icons.
From my past experience I thought the problem would be z-fighting, but after giving a slight offset in Y and setting the Order Layers of the sprites in the prefabs that are used it's still doing this.

This only seems to happen on Android phones, iOS works fine.
Can this be fixed? and if so what are the steps to do so?

I have added a screen recording in which you see the flickering of icons when moving the map.

Post's attachments

Attachment icon screenrecord_small.mp4 1.86 mb, 106 downloads since 2021-03-15 

Re: Flickering marker images

Hello.

This is because the map and markers are in very close position.
The easiest way to solve the problem is to use a shader that has ZTest Always or some Z Offset.
If you are using Online Maps v3.7.9 or higher, just select Tileset / Materials & Shaders / Marker Shader - Tileset DrawingElement ZTest Always or Tileset DrawingElement Z Offset.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Flickering marker images

Hello,

I know this is sort of an old post, but I recently came across the same issue and my project is URP, so the 2 shaders Tileset DrawingElement ZTest Always and Tileset DrawingElement Z Offset are both displaying my markers as magenda rectangles. Is there anything I can do to fix this? I am currently using the ShaderGraph/TilesetPBRMarkerShader at the moment but I am having flickering and clipping issues on my markers.

Thank you in advance.

Re: Flickering marker images

Hello.

Just checked and when using TilesetPBRMarkerShader there is no flicker on my side.

It is not correct to use DrawingElement shaders for markers, because they have a different purpose and work a little differently.
Also, TilesetDrawingElementZOffset and TilesetDrawingElementZTestAlways are for Built-in Render Pipeline.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

5 (edited by InfoRun 2022-06-14 10:48:55)

Re: Flickering marker images

Hello again,

I understand, I am currently using:

1. Shader Graphs/TilesetPBRShader for the Tileset Shader
2. Shader Graphs/TilesetPBRMarkerShader for the Marker Shader
3. Shader Graphs/TilesetPBRDrawingElement for the Drawing Shader

and I am having the issue that can be seen on the screenshot attached. (the problematic marker in the screenshot is the left one as it is cut off at the bottom as you can see).

I have tried using both TilesetDrawingElementZOffset and TilesetDrawingElementZTestAlways as the drawing shader but it does not change anything.

The marker gets cut off on different places and not just the bottom as can be seen in the screenshot only when zooming or moving the map, and when built on an android device, not in the actual editor.

Do you have any idea what could be causing this, or is there anything else I can try to fix this?

Thank you once again for your time.

Post's attachments

Attachment icon example.jpg 533.86 kb, 43 downloads since 2022-06-14 

Re: Flickering marker images

Try the following:
1. Create a new material with TilesetPBRMarkerShader.
2. Set it to Tileset / Materials & Shaders / Marker Material.
3. Select the Renderer in the project.
4. Click Add Renderer Feature.
5. Specify the settings as shown in the screenshot (attached).

Post's attachments

Attachment icon img1.png 728.46 kb, 39 downloads since 2022-06-14 

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Flickering marker images

Hi again,

That worked great! There's no more flickering, however now other objects are rendered wrong in my scenes.

I have created another layer and added all markers there but that doesn't seem to do the trick, because upon creation they get set to the default layer mask and then change to the other layer. Is there a way I can make the markers that are created to be immediately placed on a different layer other than the default one?

I made a coroutine that changes all of the gameobjects that house the markers 2 seconds after awake but it doesn't seem to work as they still flicker even though they are in the correct layer and the renderer is only set to render that specific layer mask with the new render objects

Thank you again for all your help

Re: Flickering marker images

You can try to go the other way - instead of changing the depth of the marker material, change the depth of the map material.
Create a map material with TilesetPBRShader, set it to Materials & Shaders / Tile Material and Renderer / Feature / Overrides Material, and adjust Feature settings.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.