-
-
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
separates light entities shaders from light maps shaders #13277
Conversation
OK. I would suggest you not reuse the I suggest the following name changes:
|
@WestLangley Ok! Done. |
I think |
OK. Then, for consistency, |
Yep! |
Renamed! |
examples/js/ShaderTerrain.js
Outdated
@@ -87,7 +87,7 @@ THREE.ShaderTerrain = { | |||
|
|||
THREE.ShaderChunk[ "common" ], | |||
THREE.ShaderChunk[ "bsdfs" ], | |||
THREE.ShaderChunk[ "lights_pars" ], | |||
THREE.ShaderChunk[ "begin_lights_pars" ], |
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.
lights_pars_begin
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.
Fixed 👍
I think you forgot to remove |
Removed! |
Thanks! |
Reminder to note in migration:
|
Done. Thanks! |
Changes required as a result of #13277
It is a continuation of #13149
This PR is just a division of the
lights shaders
in multiples files not affecting in anything the rendering since it is including.The main cause is to be able to use native properties names like
.envMap
together withlights shaders
and modify values ofirradiance
,radiance
andclearCoatRadiance
not need duplicate calculations.The core modification its about:
lights_pars
is separate to:lights_pars
-> light entities shaderslights_maps_pars
-> light maps (USE_ENVMAP
)lights_template
is separate to:begin_lights_fragment
-> light entities beginlights_maps_fragment
-> light maps (USE_LIGHTMAP
,USE_ENVMAP
)end_lights_fragment
-> light entities endIf add the
ShaderChunk
in sequence we will have the same result from the previous code, for example:/cc @WestLangley @bhouston