NME is not updating linked PG

Hello!
Go to:
https://playground.babylonjs.com/#M7U9GS#18

Open the highlights material in NME:
image

Change this node’s target to Vertex:

There are some expected changes, no render. Change the target back to Fragment.

like this:

No render. Expected to have the highlights rendered.

Thank you!

I’m fully booked all the afternoon

Let me add @Evgeni_Popov to see if he can have a look

1 Like

Thank you! :vulcan_salute:

For the post process node material to work properly you need to use the CurrentScreen block as the texture block, not a regular Texture block:

https://playground.babylonjs.com/#M7U9GS#55

That will ensure the texture lookups are always done in the fragment shader.

Hi!
Can we elaborate on this a bit please? I’m setting the texture by code and it works at first as you can see the highlights on the screenshot. When I change the target in nme to any other value and I change it back to the original one shouldn’t the result be the same and shouldn’t I see the highlights again? Thanks!

@Evgeni_Popov I guess I can repro what @roland said.

Basically if you change the target wrongly on a node → switching from fragment to vertex, currently there is a shader compilation error so then we can not recover the preview.

Even though the next compilation is sucessfull? I don’t know the implementation details just guessing that this should work. :sunglasses:

Ok, I found why it did not work when using a regular texture, here’s the fix:

If you set the target of UV scale to Vertex you will have to enable the Disable multiplying by level switch of the texture:
image

That’s because in Vertex mode the level property of the texture is used as a multiplicator for the lookup, and as the texture block has no texture the level ends up being 0.

2 Likes

Thank you!