# HighlightLayer not working for AbstractMesh

**URL:** <https://forum.babylonjs.com/t/highlightlayer-not-working-for-abstractmesh/14061>\
**Category:** Questions\
**Tags:** lighting, material, shader\
**Created:** [September 10, 2020, 9:04am UTC](https://forum.babylonjs.com/t/highlightlayer-not-working-for-abstractmesh/14061 "2020-09-10T09:04:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Charlie\_Wheate](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/charlie_wheate/32/10990_2.png) [@Charlie\_Wheate](https://forum.babylonjs.com/u/Charlie_Wheate)\
**Post date:** [September 10, 2020, 9:04am UTC](https://forum.babylonjs.com/t/highlightlayer-not-working-for-abstractmesh/14061/1 "2020-09-10T09:04:45Z")

</div>

const highlightLayer = new HighlightLayer(

```
        "hl",

        EngineEx.CurrentScene.scene

    );

    highlightLayer.innerGlow = false;

    highlightLayer.addMesh(abstractMesh as Mesh, Color3.White());

```

Hello There!

Im trying to make an abstract mesh have an outer glow, however for some reason the above code is not working and there is not glow at all around the mesh.

Does anyone have any ideas on why this could be? or maybe if there is another way to at a outer glow? (ive tried a glow layer aswell)

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [September 10, 2020, 10:17am UTC](https://forum.babylonjs.com/t/highlightlayer-not-working-for-abstractmesh/14061/2 "2020-09-10T10:17:49Z")

</div>

Welcome aboard!

The highlight layer takes a `Mesh` in parameter, not an `AbstractMesh`: casting an abstrach mesh to mesh will do no good (only the other way around is ok).

An abstract mesh has no geometry so can’t be rendered.

You should provide a repro in the Playground ([https://playground.babylonjs.com/](https://playground.babylonjs.com/)), maybe we will be able to help more.

---

<div class="post-metadata">

**Author:** ![AnweshGangula](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/anweshgangula/32/41858_2.png) [@AnweshGangula](https://forum.babylonjs.com/u/AnweshGangula)\
**Post date:** [August 13, 2024, 6:34am UTC](https://forum.babylonjs.com/t/highlightlayer-not-working-for-abstractmesh/14061/3 "2024-08-13T06:34:32Z")

</div>

As mentioned here, you need to use `getRenderingMesh` for an `AbstractMesh`

```js
hl.addMesh(someVariableWhichContainsImportedMeshOfTypeAbstractMesh.subMeshes[0].getRenderingMesh(), BABYLON.Color3.Green());

```
