Recreating PBRMaterial in NME

The lighting output of the PBRMetallicRoughness block is in gamma space with image processing applied.

As you want to make additional computations over lighting, you should instead use the other outputs, which are in linear space: simply sum all of them (you can omit some if you don’t use the corresponding feature - for eg, omit sheenDir and sheenInd if you don’t use sheen).

Once you have summed them all, you can factor in the emissive / lightmap contribution, but you must make sure those are in linear space! If those textures are in gamma space (emissive will most probably be, lightmap I don’t know but I assume that yes), you should check the “Convert to linear space” switch for them:
image

Also, don’t do that:
image

The alpha channel is not concerned by the gamma/linear space conversion, it is always a linear value that you should be used “as is”. In any case, using the “Convert to linear space” switch is the way to go.

Also, taken from the doc:

A note about image processing and manual compositing: Note that the composited lighting output of the PBRMetallicRoughness block also adds image processing from the scene. If you desire to to add additional components to the standard lighting setup, you will want to do the compositing yourself, using the separated components. The outputs of the separated components are in Linear color space. This is important because if you desire to calculate scene image processing in your manual composite, you’ll need the ImageProcessing block. This block assumes input values in gamma color space by default and runs an internal conversation to a linear color space output. You will need to turn this conversion off in the ImageProcessing block properties to pass linear through without a conversion.

So, you should disable the linear space conversion for this block as the input will already be in linear space:
image