# NME - node promoted to incorrect target

**URL:** <https://forum.babylonjs.com/t/nme-node-promoted-to-incorrect-target/23881>\
**Category:** Bugs\
**Created:** [September 16, 2021, 3:20pm UTC](https://forum.babylonjs.com/t/nme-node-promoted-to-incorrect-target/23881 "2021-09-16T15:20:13Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![roland](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/roland/32/38940_2.png) [@roland](https://forum.babylonjs.com/u/roland)\
**Post date:** [September 16, 2021, 3:20pm UTC](https://forum.babylonjs.com/t/nme-node-promoted-to-incorrect-target/23881/1 "2021-09-16T15:20:13Z")

</div>

Hello!

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/a/8/a841dd7b13c565e4b8fb7180cfb7bbb8ea842212.png)

Why is it promoting? An if so, it has promoted it to a wrong target. It ends in a FragmentOutput so should be promoted to Target type Fragment. I didn’t know why was I getting always black output 😃 I had to switch explicitly this node to Target Fragment.

Thank you!

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [September 16, 2021, 3:27pm UTC](https://forum.babylonjs.com/t/nme-node-promoted-to-incorrect-target/23881/2 "2021-09-16T15:27:12Z")

</div>

Which node ? (not sure from the picture the one you are speaking about)

---

<div class="post-metadata">

**Author:** ![roland](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/roland/32/38940_2.png) [@roland](https://forum.babylonjs.com/u/roland)\
**Post date:** [September 16, 2021, 3:34pm UTC](https://forum.babylonjs.com/t/nme-node-promoted-to-incorrect-target/23881/3 "2021-09-16T15:34:17Z")

</div>

UV Scale. With the triangle icon.

---

<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 16, 2021, 3:41pm UTC](https://forum.babylonjs.com/t/nme-node-promoted-to-incorrect-target/23881/4 "2021-09-16T15:41:19Z")

</div>

I think everything works as expected.

As the message is saying, the block will be evaluated in the vertex shader by default for perf reasons (and because it’s possible!). If it’s not what you want (as in your case), you can force the target to be “Fragment” instead.

Adding the triangle is a new hint added by @Deltakosh lately to let you know graphically that something is done under the hood by the system that may not be what you want. It has always been done, but until now you couldn’t know which nodes where evaluated in the vertex or fragment shader (except by looking at the generated shader code).

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [September 16, 2021, 3:49pm UTC](https://forum.babylonjs.com/t/nme-node-promoted-to-incorrect-target/23881/5 "2021-09-16T15:49:22Z")

</div>

It has been promoted cause in most cases it makes sense to manipulate uv in vertex regarding perf considerations 🙂

This would be tricky only if you apply none linear transform to them in which case, you either need a high enough tesselation or to force them in fragment.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [September 16, 2021, 3:58pm UTC](https://forum.babylonjs.com/t/nme-node-promoted-to-incorrect-target/23881/6 "2021-09-16T15:58:01Z")

</div>

Well I guess now thanks to this hint you know that you have to change its target to fragment so it is a plus.  
In your case I think you have not enough tesselation and thus you need to force it to be per fragment (which is DEAD slow)

---

<div class="post-metadata">

**Author:** ![PirateJC](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/piratejc/32/1003_2.png) [@PirateJC](https://forum.babylonjs.com/u/PirateJC)\
**Post date:** [September 16, 2021, 3:59pm UTC](https://forum.babylonjs.com/t/nme-node-promoted-to-incorrect-target/23881/7 "2021-09-16T15:59:19Z")

</div>

@roland we actually had a big discussion about this last week.

The promotion of the evaluation of some nodes on the vertex shader instead of the fragment shader is an optimization that is done under the hood. The idea here is that often times it is FAR more expensive to do operations per pixel vs. per vertex. In most cases this optimization has considerable benefits on performance of a scene.

However the user CAN overwrite this optimization by telling a node that it should be evaluated in a specific “TARGET” shader.

That said, NME users weren’t aware that the optimization was happening, SO we added this triangle as a means of flagging to the user which nodes are “eligible” for the optimization when the shader compiles.

All in all this is here to help ensure the smoothest most powerful scene possible, but without this triangle and the ability to let users know it’s happening, it is too hidden. That’s why we added it this week.

---

<div class="post-metadata">

**Author:** ![roland](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/roland/32/38940_2.png) [@roland](https://forum.babylonjs.com/u/roland)\
**Post date:** [September 16, 2021, 4:25pm UTC](https://forum.babylonjs.com/t/nme-node-promoted-to-incorrect-target/23881/8 "2021-09-16T16:25:54Z")

</div>

Thank you guys for your answers! I got the point now.

Maybe a message telling that the nodes were automatically promoted would help the user to avoid confusion why a working graph started to produce black output. Honestly, I didn’t spot the white triangle at first (I have a much bigger graph) and shame on me, after I’ve spotted it I thought it is just some ui stuff. If it was a yellow or an orange triangle with an exclamation mark I would surely pay more attention to it.

---

<div class="post-metadata">

**Author:** ![roland](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/roland/32/38940_2.png) [@roland](https://forum.babylonjs.com/u/roland)\
**Post date:** [September 16, 2021, 4:52pm UTC](https://forum.babylonjs.com/t/nme-node-promoted-to-incorrect-target/23881/9 "2021-09-16T16:52:15Z")

</div>

If this is a postprocess filter does it make sense to promote the node to target vertex? Sorry, I’m just learning this stuff.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [September 16, 2021, 5:06pm UTC](https://forum.babylonjs.com/t/nme-node-promoted-to-incorrect-target/23881/10 "2021-09-16T17:06:27Z")

</div>

Yes because a vast majority of the time interpolating the computation will work (if the operation is some linear math)

---

<div class="post-metadata">

**Author:** ![roland](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/roland/32/38940_2.png) [@roland](https://forum.babylonjs.com/u/roland)\
**Post date:** [September 16, 2021, 5:17pm UTC](https://forum.babylonjs.com/t/nme-node-promoted-to-incorrect-target/23881/11 "2021-09-16T17:17:52Z")

</div>

I have to learn about this stuff… however I just can’t get my postprocess working without setting this node to target fragment. I will create a new topic for that. Thanks a lot!
