-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NodeMaterial: Incorrect RectAreaLight specular highlight #16375
Comments
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. |
I've planned to update Three in a month, it's a bit complex since there are many changes I've to take care. But if you are redirecting me to the forum, you say it isn't a bug.. maybe with the update the problem is already resolved. |
I did not say that. I don't know if it is a bug. I do know it is something I was not able to reproduce.
I would not expect such a conflict to occur. |
Hi @WestLangley https://jsfiddle.net/9zkrbj2m/6/ The problem is only when the specular highlight happens on a NodeMaterial and the Spotlight casts shadows... |
@MEBoo Thanks for the fiddle. It seems to me the Data is being corrupted somewhere, apparently. I am not sure what is going on... |
/ping @sunag |
sorry delay... 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 };
}; |
Also, due to #16777 in r.106, you also need to call THREE.RectAreaLightUniformsLib.init(); |
I know that RectAreaLight can't cast shadows, and that's ok... but I have this problem
A scene with a single spotlight and a single area light (you can see its highlight on the floor)
The same scene with shadow casting enabled for the spotlight
what's wrong?
Three.js version
The text was updated successfully, but these errors were encountered: