4 thoughts on “NodeMaterial: Incorrect RectAreaLight specular highlight

  1. It is best to redirect your question to the three.js forum.

    If you can provide a live example demonstrating a bug in the current three.js revision, you may reopen this issue.

  2. @MEBoo Thanks for the fiddle.

    It seems to me the RectAreaLight specular highlight is incorrect with NodeMaterial regardless of whether another light casts a shadow; toggling the shadow can amplify the error.

    Data is being corrupted somewhere, apparently. I am not sure what is going on…

  3. sorry delay… RectAreaLightUniformsLib.js modify native uniforms but nodematerial not use native uniforms… this bug is because of this ltc_1 and ltc_2 is not sended to uniforms.
    This example bellow fix this:

    https://jsfiddle.net/8nhk975v/

     material.onBeforeCompile2 = material.onBeforeCompile;
     material.onBeforeCompile = function ( shader, renderer ) {
    
    	this.onBeforeCompile2( shader, renderer );
    
    	this.uniforms.ltc_1 = { value: undefined };
    	this.uniforms.ltc_2 = { value: undefined };
    
    };

Comments are closed.