Lighting without the specular lobe: emissive + direct diffuse + indirect diffuse.
three's LightsNode sums directDiffuse + indirectDiffuse into a shader property named
totalDiffuse before adding specular (r186 LightsNode.setup). A PropertyNode is shared by name,
so reading property('vec3', 'totalDiffuse') in an MRT output gives that sum for the same
fragment, with no second render and no patch to the lighting model. Lit materials with no lights
leave it at zero, which is what they render (plus emissive) anyway. Materials that don't light
(lights === false: backgrounds, unlit node materials), basic materials, and materials with a
custom fragmentNode / outputNode write their output colour, which has no specular to remove.
Except basic materials with an environment (envMap / envNode): BasicLightingModel.finish adds
the env reflection to the output after totalDiffuse (= diffuse colour × AO × light map) is set,
and an env map always runs the lighting context, so those take totalDiffuse too.
Lighting without the specular lobe: emissive + direct diffuse + indirect diffuse.
three's LightsNode sums
directDiffuse + indirectDiffuseinto a shader property namedtotalDiffusebefore adding specular (r186 LightsNode.setup). A PropertyNode is shared by name, so readingproperty('vec3', 'totalDiffuse')in an MRT output gives that sum for the same fragment, with no second render and no patch to the lighting model. Lit materials with no lights leave it at zero, which is what they render (plus emissive) anyway. Materials that don't light (lights === false: backgrounds, unlit node materials), basic materials, and materials with a customfragmentNode/outputNodewrite their output colour, which has no specular to remove. Except basic materials with an environment (envMap/envNode): BasicLightingModel.finish adds the env reflection to the output aftertotalDiffuse(= diffuse colour × AO × light map) is set, and an env map always runs the lighting context, so those taketotalDiffusetoo.