NME - node promoted to incorrect target


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 :smiley: I had to switch explicitly this node to Target Fragment.

Thank you!

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

UV Scale. With the triangle icon.

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).

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

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.

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)

@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.

1 Like

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.

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

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

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!

1 Like