-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
Shaders: decouple light probe irradiance from other indirect light sources #17359
Conversation
@@ -15,9 +15,11 @@ export default /* glsl */` | |||
|
|||
#endif | |||
|
|||
vec3 iblIrradiance = vec3( 0.0 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can move this to lights_fragment_begin.glsl.js
maybe here?
vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); |
Probably this breaks compatibility with
NodeMaterial
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you will have to decide where it is best to declare it. I do not understand the Node restrictions very well...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that bellow of irradiance is better
vec3 irradiance
vec3 iblIrradiance
No ..._maps
chunk is added in node-material
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunag I'll merge and do that change 👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! |
@WestLangley Thanks! |
@WestLangley Is not necessary create an |
You could, but this was the minimal change. The entire shader probably needs to be rewritten at some point. |
Fixes #17253.
As suggested in #17102 (comment) and #17253 (comment).
This also fixes an unreported bug. The multi-scattering, energy-preservation model introduced in #15644 should only have been applied to irradiance from IBLs, but it was applied to all indirect diffuse light sources.
/ping @jsantell
/ping @elalish
/ping @sunag
/ping @bhouston